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!