Simulink Example, how to obtain the data?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
2016년 10월 18일
Can you specifically say which blocks are using these parameters? Please give us the particular block names.
답변 (2개)
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:
- Any dialog parameters created through the Mask Parameters and Dialog Pane.
- 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.
댓글 수: 0
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
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 Center 및 File Exchange에서 Dependency Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!