Simulink Example, how to obtain the data?

조회 수: 2 (최근 30일)
Ameer Janabi
Ameer Janabi 2016년 10월 18일
댓글: Swarooph 2016년 10월 19일
Hello Everyone,
I am using the Simulink example particularly (power_switchinglosses) provided by the MATLAB.
How can I obtain the parameter used in the simulation? They use named such as R and sps.A. I have been looking so long of how can i obtain the actual value. I could not find any M.file associated with the Simulink example. When i use findVars function it can not obtain anything!
variables = Simulink.findVars('power_switchinglosses','Name','DIODE_If_Erec')
variables =
3x1 VariableUsage array with properties:
Name
Source
SourceType
Users
Can anyone help me of how can obtain the parameter associated with the simulink example "power_switchinglosses"?
Ameer
  댓글 수: 2
Swarooph
Swarooph 2016년 10월 18일
Can you specifically say which blocks are using these parameters? Please give us the particular block names.
Ameer Janabi
Ameer Janabi 2016년 10월 18일
Sure, for example: 1) lunch the Simulink example by typing (power_switchinglosses) in the command window.
2) Navigate through the subsystem block as follow power_switchinglosses/Half-bridge IGBT with Loss Calculation (Module 3)/Loss Calculation Unit/Thermal Model
3) Then double click on (Discrete State-Space1) block that contains the state space system its have variables named (Ad_IGBT, Bd_IGBT, Cd_IGBT and extra). -How can I option the value of this variable? Or where they are saved?

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

답변 (2개)

Swarooph
Swarooph 2016년 10월 19일
Thanks for the clarification.
Both the Half-bridge IGBT with Loss Calculation (Module 3) subsystem and the Thermal Model subsystem underneath are called masked subsystems. You can mask a subsystem to bring up your own set of dialog parameters for the subsystem underneath. As a part of this, instead of looking for values in the MATLAB base workspace, it looks first for values in the Mask workspace. If you don't find a particular variable in the base workspace, it proabably is being defined in the mask workspace. Now there are TWO ways to define variables in the mask workspace:
  1. Any dialog parameters created through the Mask Parameters and Dialog Pane.
  2. Any variable initialized in the Mask Initialization Pane. These are usually derived variables based on the dialog parameters defined in (1).
In the case of Discrete State-Space1 block which lies in the masked subsystem Thermal Model, right click on the Thermal Model block > Mask > Edit Mask.
Here choose the tab Initialization. Here you can see the MATLAB code that calculates the parameters for the Discrete State-Space1 block among other variables.
Take a look at this documentation to learn more about masking subsystems.

Ameer Janabi
Ameer Janabi 2016년 10월 19일
Thank you Swarooph, This solved half of the problem. How can find the value in the mask dialog box such as [ IGBT_Rth_jc IGBT_Cth_j ]. I opened the parameter window and i can only see the name without the actual value. Can you help me of how can i obtain them?
Ameer
  댓글 수: 1
Swarooph
Swarooph 2016년 10월 19일
Please comment on particular answers for clarifications instead of submitting a new answer.
These are pulled from the dialog parameters at the upper level masked subsystem such as Half-bridge IGBT with Loss Calculation (Module 3). Look at the Parameters and Dialog Pane of this block shown below. IGBT_Rth_jc and IGBT_Cth_j are Junction-to-Case thermal resistance and Junction thermal capacitance respectively.
So in the dialog for Half-bridge IGBT with Loss Calculation (Module 3), we can see these values in the IGBT tab.

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

카테고리

Help CenterFile Exchange에서 Dependency Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by