Transfer Function from Linearization is not correct. Simscape Model.

Hello,
I am modeling a double pendulum on Simscape. This is a system of two masses that are hanging on flexible beams which models a kind of spring.
.
Here is what I do:
  • I run the simulation to reach the steady state.
  • I Linearize (from control system toolbox) my system around the steady state and I look at the 6 degrees of freedom of the bottom mass as output and the 6 degrees of freedom of the ground as input.
% Ground Input (1:6)
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;
% IPP Center Output (37:42)
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;
G = linearize(mdl,io,50);
  • I take a transfer functions from the linearization.
With a siplified version of this model, (no flexible beams but prismatic joints instead), This is the transfer function that I manage to have:
There is all the modes that I expect.
On this version, all the Bases and Followers of the joints are matching at the linearization operating point.
Then, on this new version, the physics of the simulation works well, but the transfer function is completly incorrect:
But it should be very similar.
The only difference that I have found is that the Bases and followers of the top gimbal joints are not matching at the operating point because of the flexure of the beam.
The thing is that I don't understand the real reason why this is not working. Is that from Linearize or from Simscape?
Thank you for your help,
Vermeer

12 commentaires

Paul
Paul le 13 Fév 2023
Modifié(e) : Paul le 13 Fév 2023
Hi Vermeer,.
I doubt this is the problem, but don't convert the ss output of linearize to a tf object. Just use the ss object as is.
Does the model include any nonlinear elements?
Hello,
yes I keep the ss and I just do bode(ss(intput,output)).
Yes, the flexible beams, but I had this problem before including them, when I was bulding the model.
Paul
Paul le 13 Fév 2023
Modifié(e) : Paul le 13 Fév 2023
Shouldn't that be ss(output,input)?
I thought the simplified model was without flexible beams and the new version model is with flexible beams. Is that not the case?
The flexible beams are non-linear elements? How so?
From the question, I thought there were only two models in question, w/ and w/o flexible beams. Is there also a third model that showed this same concerning behavior between those two models.
Why is the linearization being taken as a snapshot at t = 50, as opposed to, say, t = 40 or t = 30? Is the system being stimulated by an external input and it takes 50 seconds to reach steady state?
  • sorry you are right its output,input.
  • So I have first built the model with one pendulum, and the transfer function was not working, so I changed few things without really understanding what I did. Then it worked. I added the second stage, the transfer function was bad and also by changing few things and waiting to reach a real steady state it worked.
  • Indeed if I choosed t=50 s because my initial position is not exactly the steady state so I wait the time that my system stabilises itself.
But i still don't know how to resolve this issue.
It might be profitable to understand the changes and their effect in the second bullet.
Based on your physical understanding of the system, how many degrees-of-freedom does it have? How many states are in the output G of the linearize command?
Does SimScape allow you to define constraints at the configuration, velocity, or acceleration levels? If so, do you have any of those?
There is 60 Degrees of freedom,
There is 12 states om the output of G which are the 6 degrees of freedom of the center of mass of the two hanging masses
maybe I can share the the two models if you want.
No need to share the models, at least not for me.
If the system has 60 degrees of freedom, then for an unconstrained configuration
size(G.A,1)
should return 120. Is that the case?
Sorry, the order is 30 so size(G.A,1) returns 60.
Have you tried running the simulation from an initial condition with no forcing input, collecting the time-domain outputs, and then doing a quick FFT anlaysis of those outputs to see if the modal frequencies are consistent with your expectations or with the output of linearize?
I have found what the issue was.
  • If the peak location is not stable, which means that linearizing at t=t1 and t=t2 gives different modes frequencies, that could be from the solver. In my case, i am using daessc which is the solver made for SIMSCAPE. You have to change the max step size from Auto to 0.01 or 0.001. In my case, the solver was doing a very bad approximation.
  • If after adding a flexible beam, the transfer function is flat, it could be from the fidelity of the beam. Indeed, if you choose a discretization of n=10 and you put a fidelity (number of retained modes) of n=10, you reduced the order of the model by 10 and 10-10=0 so it is a flat transfer function. Put 1 or 0 instead.
Excellent. I completely forgot that the solver can influence the linearization in some cases. With a DAE solver, as I assume that daessc is, I imagine that can be even trickier.

Connectez-vous pour commenter.

 Réponse acceptée

I have found what the issue was.
  • If the peak location is not stable, which means that linearizing at t=t1 and t=t2 gives different modes frequencies, that could be from the solver. In my case, i am using daessc which is the solver made for SIMSCAPE. You have to change the max step size from Auto to 0.01 or 0.001. In my case, the solver was doing a very bad approximation.
  • If after adding a flexible beam, the transfer function is flat, it could be from the fidelity of the beam. Indeed, if you choose a discretization of n=10 and you put a fidelity (number of retained modes) of n=10, you reduced the order of the model by 10 and 10-10=0 so it is a flat transfer function. Put 1 or 0 instead.

Plus de réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by