Simulink Example, how to obtain the data?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Swarooph
am 18 Okt. 2016
Can you specifically say which blocks are using these parameters? Please give us the particular block names.
Antworten (2)
Swarooph
am 19 Okt. 2016
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175278/image.jpeg)
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175279/image.jpeg)
0 Kommentare
Ameer Janabi
am 19 Okt. 2016
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 Kommentar
Swarooph
am 19 Okt. 2016
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/185094/image.jpeg)
So in the dialog for Half-bridge IGBT with Loss Calculation (Module 3), we can see these values in the IGBT tab.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/185095/image.jpeg)
Siehe auch
Kategorien
Mehr zu Author Block Masks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!