State-Space Systems
State-space system are linear dynamic system with input u and output y defined as in the equation below:
where x is the state variable vector.
An alternative representation of the above dynamic system is:
The later form is more suitable for large systems because the matrices MC and MCA usually become much more sparse than A.
In COMSOL you can choose two approaches to assemble the state-space matrices Mc, MA, MB, C, and D. You can either choose to linearize your system using a reduced-order model, or assemble the linearized matrices from the full model.
Model order reduction has the advantage of returning reduced system matrices, which can be useful when working with a model that has too many degrees of freedom to be practically simulated in Simulink. Model order reduction reduces the number of states that are necessary to capture the behavior of the dynamic input/output relationship. However, as it is based on a modal solution, model reduction is restricted to physics interfaces that support eigenvalue analysis. Multiphysics problems may not be suited for reduced-order models. The assembly operation of the state-space matrices has to be done within the COMSOL model. LiveLink™ for Simulink® comes with the function mphreduction to extract the desired matrices in the MATLAB environment.
Directly extracting state-space matrices for the full-order system is an alternative to reduced-order modeling because the state-space system is not restricted to a specific physics interface and can be used with multiphysics problem as long as you use a suitable linearization point. The resulting matrices have the size of the number of degrees of freedom of the model, which may lead to very large matrices. The assembly operation of the state-space matrices has to be done within the COMSOL model. To extract the matrices in MATLAB, you can use the function mphstate, which is included with LiveLink™ for MATLAB®.