get the space states matrix in terms of output

1 回表示 (過去 30 日間)
Vermeer Bonhomme
Vermeer Bonhomme 2023 年 2 月 6 日
コメント済み: Paul 2023 年 2 月 6 日
Hello,
I am currently working on a Simscape model. I would like to linearize the behavior of my system around an equilibrium point.
To do so, I define my inputs here: ( 6 degrees of freedom)
io(io_i) = linio([mdl, '/Ground_x'], 1, 'openinput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/Ground_y'], 1, 'openinput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/Ground_z'], 1, 'openinput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/Ground_xr'],1, 'openinput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/Ground_yr'], 1, 'openinput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/Ground_zr'], 1, 'openinput'); io_i = io_i + 1;
and my outputs here: (6 degrees of freedom)
io(io_i) = linio([mdl, '/IPPx'], 1, 'openoutput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/IPPy'], 1, 'openoutput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/IPPz'], 1, 'openoutput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/IPPxr'],1, 'openoutput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/IPPyr'], 1, 'openoutput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/IPPzr'], 1, 'openoutput'); io_i = io_i + 1;
and then I linearize:
G = linearize(mdl,io,50);
With that I get Space State Matrix habing the following shapes:
disp(G)
6×6 ss array with properties:
A: [60×60 double]
B: [60×6 double]
C: [6×60 double]
D: [6×6 double]
E: []
Scaled: 0
StateName: {60×1 cell}
StatePath: {60×1 cell}
StateUnit: {60×1 cell}
InternalDelay: [0×1 double]
InputDelay: [6×1 double]
OutputDelay: [6×1 double]
InputName: {6×1 cell}
InputUnit: {6×1 cell}
InputGroup: [1×1 struct]
OutputName: {6×1 cell}
OutputUnit: {6×1 cell}
OutputGroup: [1×1 struct]
Notes: {'Operating Point at t = 50'}
UserData: []
Name: ''
Ts: 0
TimeUnit: 'seconds'
SamplingGrid: [1×1 struct]
Zith the StataNames:
{'Pendulum.Ground_Subsystem1.Simulink_PS_Converter6.outputFiltered_42727722_0' }
{'Pendulum.Ground_Subsystem1.Simulink_PS_Converter6.outputFiltered_42727722_1' }
{'Pendulum.Ground_Subsystem1.Simulink_PS_Converter1.outputFiltered_2964006202_0'}
{'Pendulum.Ground_Subsystem1.Simulink_PS_Converter1.outputFiltered_2964006202_1'}
{'Pendulum.Ground_Subsystem1.Simulink_PS_Converter2.outputFiltered_4144717802_0'}
{'Pendulum.Ground_Subsystem1.Simulink_PS_Converter2.outputFiltered_4144717802_1'}
{'Pendulum.Ground_Subsystem1.Simulink_PS_Converter5.outputFiltered_1160479738_0'}
{'Pendulum.Ground_Subsystem1.Simulink_PS_Converter5.outputFiltered_1160479738_1'}
{'Pendulum.Ground_Subsystem1.Simulink_PS_Converter3.outputFiltered_3396040282_0'}
{'Pendulum.Ground_Subsystem1.Simulink_PS_Converter3.outputFiltered_3396040282_1'}
{'Pendulum.Ground_Subsystem1.Simulink_PS_Converter4.outputFiltered_2018224714_0'}
{'Pendulum.Ground_Subsystem1.Simulink_PS_Converter4.outputFiltered_2018224714_1'}
{'Pendulum.Subsystem.Mar_Bottom_5.Ry.q' }
{'Pendulum.Subsystem.Mar_Bottom_5.Ry.w' }
{'Pendulum.Subsystem.Wire_1.Prismatic_Joint.Pz.p' }
{'Pendulum.Subsystem.Wire_1.Prismatic_Joint.Pz.v' }
{'Pendulum.Subsystem.Mar_Bottom_1.Rx.w' }
{'Pendulum.Subsystem.Mar_Bottom_1.Ry.w' }
{'Pendulum.Subsystem.Mar_Bottom_1.Rz.w' }
...
{'Pendulum.Subsystem.Blade_Spring_4.Prismatic_Joint.Pz.v' }
{'Pendulum.Subsystem.Mar_Bottom_8.Ry.q' }
{'Pendulum.Subsystem.Mar_Bottom_8.Ry.w' }
I would like to have a A matrix having a shape of 12x12 which coresponds to my output degreesof freedom and their derivatives.
Thank you for your help,
Vermeer
  2 件のコメント
Paul
Paul 2023 年 2 月 6 日
Hi Vermeer,
Apparently the model has 60 states. Do you have any reason to believe that only 12 states are sufficient to represent the dynamics from the specified inputs to the specified outputs?
Vermeer Bonhomme
Vermeer Bonhomme 2023 年 2 月 6 日
Hi, thank you for your fast answer.
My system is a kind of double Pendulum.
In theory, we have only 24 states (12 states for the top mass ans 12 for the bottom mass). But in this model, we are indeed adding more states because we consider that objects have mass. (wires for exemple).So I agree we need more state spaces
We suppose that this tiny mass have a very neglictible effect on the behavior. so if our state space was the degrees of freedom of each mass, that would be nice, like this we could see if the effect of the tiny mass is neglictible and get a simplified matrix 24x24.
Instead, we have the degrees of freedom of the joints.
I would like to get the equivalent in center of mass of each object.
So I would like to choose to which states i am looking at.
Thank you very much,
Vermeer

サインインしてコメントする。

採用された回答

Paul
Paul 2023 年 2 月 6 日
Hi Vermeer,
Based on this comment it sounds like you might want to pursue model reduction techniques. The Control System Toolbox offers some options, start from this doc page. Because you have the state names and their ordering in the model, it may be easy to use modred to simply eliminate the states associated with the DOFs the elements that aren't the top or bottom masses. Other options may be of use as well.
Having said that, I'm still not clear on the goal. I don't know much about SimScape modeling of multi-body systems but I thought it models all of the degrees-of-freedom in the system and no more. In other words, based on the elements of the system and the joints that connect them, there are 30 degrees-of-freedom. So I don't see how one can eliminate states from the model and still properly represent the physical configuration of the system, though maybe that's an approximation you're willing to live with dpeending on what you're going to do with the reduced order model. Does SimScape allow you to specify a massless rigid body? If so, that sounds like something worth pursuing, or making the mass and inertia matrix very, very, small for the elements you don't care about.
  3 件のコメント
Vermeer Bonhomme
Vermeer Bonhomme 2023 年 2 月 6 日
Yes I completly agree. On this software, you have to put real mass between the different joints.
Paul
Paul 2023 年 2 月 6 日
Could be, I'm very much not familiar with that tool. Interesting that, for example, a solid brick element expicilty allows "This [mass] parameter can be positive or negative." Don't know if that means that zero mass is not allowed or if the doc writers were just not being exactly precise.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeApplications についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by