Using state space in simulink
Afficher commentaires plus anciens
What does x represent in the state space I define in simulink?

4 commentaires
Sam Chak
le 22 Mai 2024
Hi Marina,
If the size of the identified state space model is not big, can you show it here? You can also update the question.
Marina
le 22 Mai 2024
Sam Chak
le 22 Mai 2024
Hi Marina,
If it is not absolutely necessary to use the State Space block, you can try using the Transfer Function block. From the identified state space model, you can convert it to a transfer function.
By the way, do you know the initial value of the system output when you want to operate it in real-time? This is a very important question
Marina
le 22 Mai 2024
Réponse acceptée
Plus de réponses (1)
Hi @Marina
Since you know the initial output value, the idea is to convert the Identified State-Space to an equivalent Canonical State-Space, where the system's output is the first state variable of the Canonical State-Space system.
By transforming the state-space model into canonical form, you can ensure that the first state variable directly corresponds to the system's output. The second state variable then represents the time-derivative of the first state, which, in the case of a positional displacement system, would be the velocity.
With the state-space model in canonical form, you can readily assign the appropriate initial values to the corresponding state variables within the Simulink State-Space block. This will help ensure that the simulation accurately reflects the initial conditions of your system.
%% Identified State-Space
Aid = magic(3);
Bid = [0; 0; 1];
Cid = [1, 2, 3];
Did = 0;
sys = ss(Aid, Bid, Cid, Did)
%% Convert to Canonical State-Space
S = compreal(sys);
csys= ss(S.A', S.C', S.B', S.D)
2 commentaires
Marina
le 27 Mai 2024
Catégories
En savoir plus sur Loop-Shaping Design dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!