How to remove unwanted states from a linearized Simulink dynamic model?

27 views (last 30 days)
I have a non-linear Simulink model of a dynamic system. When I linearize the model using the function "linearize" at an operating point (trim), I get a state space system with 30 states. That is expected because my model indeed has 30 states. But not all these states have significant dynamic effects on the linearized model, my use case, and the input/output (I/O) of the system. What is the best way to remove the unwanted states from my state space model and reduce it to the necessary 12 states that are significant for my system dynamics?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 29 Mar 2024 at 0:00
Edited: MathWorks Support Team on 29 Mar 2024 at 10:18
For the following use case, the "linearize" function generates a 30 dimensional state space model stored in an object, for example, called 'linsys'. 'linsys' stores a 30x1 vector of states. If you do not know the exact rows that correspond to the unwanted states in the state vector, you can execute the function "balreal" to perform a Gramian-based input/output balancing of state-space realizations in order to identify which states have negligible effect on the input and output. It returns the corresponding vector row index for the negligible states. Then, you can use the function "modred" to eliminate the states that do not affect the system I/O.
An example of how to achieve the above workflow can be found in the link below:
The documentation for the functions "linearize", "balreal", and "modred" can be found below respectively:
  1 Comment
Paul
Paul on 25 Nov 2020
Edited: Paul on 8 Oct 2021
In addition to removing states that have a small entries in g, another consdieration may be to remove states in certain frequency bands, typically at high frequency above a certain threshold. For example,
>> h=tf([1 2],conv([1 1],[1/2000 1]));
>> [sysb,g]=balreal(h);
>> g
g =
5.223509018229017e-01
4.776490981770978e-01
Both elements of g are about the same value, yet it still may be appropriate in some use cases to eliminate the pole at s = -2000.
doc freqsep
A follow up question: Is there any difference between minreal and the combination of balreal followed by modred? For example, suppose I have a realization, sys, that is internally stable but with, for example, three modes that are uncontrollabe, unobservable, or both. Then I can compute its balanced realization and three additional realizations as:
[sysb,g] = balreal(sys);
sys1 = minreal(sys);
% for discussion, assume that g(8:10) correspond to those three modes
sys2 = modred(sysb,8:10,'MatchDC');
sys3 = modred(sysb,8:10,'Truncate');
Presumably sys2 and sys3 are different from each other in the sense that they would have different frequency responses. But is either of sys2 or sys3 equivalent to sys1 (same frequency response)? If not, then the answer to the original question may be a bit different for non-minimal realizatons.

Sign in to comment.

More Answers (0)

Categories

Find more on Dynamic System Models in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!