get the space states matrix in terms of output
조회 수: 1 (최근 30일)
이전 댓글 표시
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
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?
채택된 답변
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
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 Exchange에서 Applications에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!