Difference between Simscape 'Electrical' and 'SPS' Block parameters linkage with the workspace
5 次查看(过去 30 天)
显示 更早的评论
When you link the one of the Simscape 'SPS' Block parameter with the model work space or base work space, According to the attached picture you can see where the paramerter got linked. Here the Parameter 'Resistance (ohms)' got linked to the variable 'R' and it has been considered from R(Mask Initialization: Distributed Parameters line). ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1353449/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1353449/image.png)
But when you link the one of the Simscape 'Electrical' Block parameter with the model work space or base work space. You cannot see where it linked to?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1353454/image.jpeg)
can you please advise?
0 个评论
回答(1 个)
Atharva
2023-4-26
Hey Nachiappan,
When you link a parameter of a Simscape Electrical block to a variable in the model workspace or base workspace, you may not see an explicit link between the two. This is because Simscape Electrical uses a different parameterization approach compared to other Simscape domains.
In Simscape Electrical, parameters are typically defined in terms of physical values such as resistance, capacitance, and inductance, rather than in terms of individual parameter values such as R, C, and L. These physical values are then used to derive the parameter values needed for simulation. Therefore, when you link a parameter of a Simscape Electrical block to a variable in the workspace, you are essentially specifying the physical value that the parameter should take on, rather than the parameter value itself.
For example, if you link the 'Resistance' parameter of a Simscape Electrical resistor block to a variable named 'R' in the model workspace, the resistor block will use the value of 'R' to calculate the resistance of the resistor, rather than storing the value of 'R' directly as a parameter.
To verify that the parameter has been linked correctly, you can check the value of the parameter during simulation by using the 'Signal Logging' feature in Simulink. This will allow you to see the value of the parameter at each time step during simulation and confirm that it is taking on the expected values.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Parameterization Methods 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!