How to extract State-Space Matrices, states, etc. from Simulink model for Simscape subsystem?
22 views (last 30 days)
Show older comments
Is there a function such as ""power_analyze" for Simscape to extract State-Space Matrices, states, etc. from Simscape Simulink model or subsystem?
[A,B,C,D,x0,states,inputs,outputs,uss,xss,yss,frequencies,Hlin] =power_analyze('sys')
0 Comments
Answers (1)
Aabha
on 7 Feb 2025 at 10:20
Edited: Aabha
on 7 Feb 2025 at 11:02
I understand that you are looking for a function similar to “power_analyze” to extract state-space matrices from a Simscape model.
This can be done using the “Linear Analysis Tool” provided by Simulink Control Design. For instance, the function “linmod” can be used to extract state matrices from a Simscape or Simulink model. The “linmod” function performs a perturbation-based linearization around the model’s initial conditions, or a specialised operating point. You can refer to the function documentation for more details.
The function can be used as follows:
[A, B, C, D] = linmod ('system_name');
You can also specify the operating point around which the model has to be linearised, using additional input arguments.
[A, B, C, D] = linmod ('system_name', x, u);
Here, “x” and “u” represent the state and input vectors respectively.
You can also refer to the “Linearizing Models” documentation in Simulink, for more details.
0 Comments
See Also
Categories
Find more on Trimming and Linearization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!