Simulation of an Electric Arc in Circuit

조회 수: 9 (최근 30일)
Yossi Abutbul
Yossi Abutbul 2016년 9월 25일
댓글: Mukti Chaturvedi 2022년 7월 28일
I am trying to build the ssc model - "ssc_build".
I am getting the error:
"Error using ArcLib.IdealArc>equations (line 43)
No matching signature found for atan. atan takes one dimensionless argument.
Argument 1 = {[1x1 double], 'A'}
b = 1.4600
it = {[1x1 double], 'A'}"
Is it related to the atan function?

답변 (2개)

Walter Roberson
Walter Roberson 2016년 9월 26일
When you open the model, notice the warnings:
Warning: File: Line: 1, the unit of value assigned to 'v' was changed from '1' to 'V'.
Warning: File: Line: 1, the unit of value assigned to 'i' was changed from '1' to 'A'.
Warning: File: Line: 1, the unit of value assigned to 'it' was changed from '1' to 'A'.
so for some reason, where effectively "no unit" was configured for those variables in the model, the variables are being forced to volts and amps.
At line 43 of IdealArc.ssc (the line warned about), you will find
v + TauV*v.der == a*Rc*(it)/(Rc*(it)*atan(b*(it))+a);
Because the variable it has been changed to units A, the expression b*it has units A, so Simscape is being asked to find arctan of some number of amps. But the arctan function, atan, is only configured to know how to take the arctan of something that has no units, so Simscape cannot find a function named atan that is configured to accept Amps as input.
It might take me a bit of time to figure out how to properly override units.
  댓글 수: 3
Walter Roberson
Walter Roberson 2016년 9월 26일
Okay, so find that IdealArc.ssc file, and edit it, and at line 43, which is originally as shown above, change it to
v + TauV*v.der == a*Rc*(it)/(Rc*(it)*atan(value(b*(it),'A'))+a);
and then you should be able to build.
It turns out that in Simscape, value(expression, unit) does any necessary unit conversion on the expression to make it match the given unit, and then it strips off the unit marker, allowing it to be used in a pure computation.
Normally when you strip off a unit marker this way, you need to later put it back, the syntax for which is {expression, unit} . For example,
{atan(value(b*(it),'A')), 'A'}
would be for the case where you needed to temporarily strip off the amps from b*it so you could do the MATLAB function on it, and then afterwards you needed to put the amps unit back.
But it turns out that in this particular expression, somehow the result of the atan is expected to be a pure numeric value without units. The Rc is Ohm and the it is amps, and the product of those is Volts, matching the Volts of the +a, so unitless for the atan() is what is needed.
Mukti Chaturvedi
Mukti Chaturvedi 2022년 7월 28일
Need more help on this issue. On making the suggested change in the IdealArc.ssc file, now getting this error:
=== Simulation (Elapsed: 1 sec) ===
Warning:File: Line: 1, the unit of value assigned to 'v' was changed from '1' to 'V'.
Warning:File: Line: 1, the unit of value assigned to 'i' was changed from '1' to 'A'.
Warning:File: Line: 1, the unit of value assigned to 'it' was changed from '1' to 'A'.
Error:Error compiling Simscape network for model sim_opencontact.
Caused by:
['sim_opencontact/Ideal Arc']: No matching signature found for atan. atan takes one dimensionless argument.
Argument 1 = {[1x1 double], 'A'}
b = [1x1 double]
it = {[1x1 double], 'A'}
=== Simulation (Elapsed: 2 sec) ===
Warning:File: Line: 1, the unit of value assigned to 'v' was changed from '1' to 'V'.
Warning:File: Line: 1, the unit of value assigned to 'i' was changed from '1' to 'A'.
Warning:File: Line: 1, the unit of value assigned to 'it' was changed from '1' to 'A'.
Warning:First solve for initial conditions failed to converge. Trying again with all high priorities relaxed to low.
Warning:Unable to satisfy all initial conditions. The variables involved are listed below.
The following variables are involved in a constraint that conflicts with their targets:
'Ideal_Arc.i' (Current)
'Ideal_Arc.v' (Voltage)
'Inductor.i_L' (Inductor current)
Here are the equations involved:
all components involved
'sim_opencontact/Arc Current Sensor'
Equation location is:
'C:\Program Files\MATLAB\R2022a\toolbox\physmod\simscape\library\m\+foundation\+electrical\+sensors\current.ssc' (line 31)

댓글을 달려면 로그인하십시오.


Mukti Chaturvedi
Mukti Chaturvedi 2022년 7월 26일
How to access the arcLib_lib? Getting the library access error " ArcLib_lib not found". Thanks for any suggestion regarding this.
  댓글 수: 2
Walter Roberson
Walter Roberson 2022년 7월 26일
https://www.mathworks.com/matlabcentral/fileexchange/56887-simulation-of-an-electric-arc-in-circuit has it. ArcLib_lib.slx in one of the directories.
Mukti Chaturvedi
Mukti Chaturvedi 2022년 7월 26일
Getting this error now. I am new to MATLAB, request you if you may pelase list the steps to work around with this file. attached the error file to this post.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Choose and Parameterize Blocks에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by