Simulink Example, how to obtain the data?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Swarooph
el 18 de Oct. de 2016
Can you specifically say which blocks are using these parameters? Please give us the particular block names.
Respuestas (2)
Swarooph
el 19 de Oct. de 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 comentarios
Ameer Janabi
el 19 de Oct. de 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 comentario
Swarooph
el 19 de Oct. de 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)
Ver también
Categorías
Más información sobre Dependency Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!