Using state space in simulink
显示 更早的评论
What does x represent in the state space I define in simulink?

4 个评论
Sam Chak
2024-5-22
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
2024-5-22
Sam Chak
2024-5-22
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
2024-5-22
采纳的回答
更多回答(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 个评论
Marina
2024-5-27
类别
在 帮助中心 和 File Exchange 中查找有关 State-Space Control Design 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!