Is there a way to display which state are deleted by "minreal"

10 visualizzazioni (ultimi 30 giorni)
Emma D.
Emma D. il 24 Ago 2020
Risposto: Naga il 23 Ott 2024 alle 8:06
Hi,
Using Linear Analysis Tool, I've obtained a linearization of my model that has 18 states. A structure "linsys1" is created and contains each state's name.
Using minreal to reduce the system, 12 states are deleted.
I've have not a lot of experience yet in linearization and state representation. How can I know the names of states that have been left by the minreal function ?
Thanks

Risposte (1)

Naga
Naga il 23 Ott 2024 alle 8:06
Hello Emma,
When you use the 'minreal' function in MATLAB to reduce a state-space model, it simplifies the system by removing uncontrollable and unobservable states. However, 'minreal' itself doesn't directly provide information on which specific states were removed. To determine the states that have been removed, you can follow these steps:
  1. Extract State Names Before Reduction: Before applying 'minreal', extract and store the names of the states from your original system (linsys1). You can access state names using the 'StateName' property of the state-space system object.
  2. Compare State Names After Reduction: After applying 'minreal', extract the state names from the reduced system and compare them with the original state names to identify which ones were removed.
% Assume linsys1 is your original state-space model
originalStateNames = linsys1.StateName;
% Apply minreal to reduce the system
reducedSys = minreal(linsys1);
% Extract state names from the reduced system
reducedStateNames = reducedSys.StateName;
% Find the names of the states that were removed
removedStates = setdiff(originalStateNames, reducedStateNames);
% Display the removed state names
disp('States removed by minreal:');
disp(removedStates);
This method allows you to track which states were eliminated during the reduction process. Make sure that your original system has state names defined; otherwise, this approach won't work as expected.

Categorie

Scopri di più su Linearization in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by