Simulink : Unstable response for a stable system
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have modeled a spring mass damper system along with a compensator in simulink. The transfer function of the spring mass damper system goes like this 1/(Ms^2+bs+k) where m=5.2e-6 b=6.25e-5 k=70 Am getting a stable response when i actually code this in matlab.But in simulink using ode45 dormand-prince, am getting a unstable response. Pls help me out in this, as this is my fisrt step in modeling a micro accelerometer.
0 Kommentare
Akzeptierte Antwort
Simon Stroebel
am 14 Mär. 2011
Hello Omkar,
I investigated your system a little bit, and I think I can give you some answers. I think your problem is due to the numerical values of your system paramters. Since you are modelling a (mechnaical) spring mass damper system, the parameters can be interpreted as follows:
M: mass
b: (linear) friction
k: spring rate
With these parameters, you create a Model with transfer function G(s) = 1/(Ms^2 + bs + k). This is a LTI-Model, more precisely a so called PT2-System. The numerical values of the characteristic coefficients of this PT2-System are (based on the numerical values of your system parameters):
w0 = 3.6690e+003 (Eigenfrequency)
D = 0.0016 (Damping)
K = 0.0143 (Gain)
the two Eigenvalues of the corresponding System Matrix A = [0 1; -w0^2 -2*D*w0] are:
1.0e+003 *
-0.0060 + 3.6690i
-0.0060 - 3.6690i
--> Your System has complex Eigenvalues with small real parts and large imaginary parts (compared to each other). The consequence is that your system is a so called "stiff" system.
"explicit" solvers, as ode45 for example, have problems to solve stiff systems, respectively they are not designed to solve these problems. Therefore Simulink offers other solvers, especially designed to solve stiff systems. One of such a solver is ode15s for example. If I use this solver, I get the same results as when I simulate the step response with the "step" command offered by the control toolbox.
The solution for you may be, that you use a solver that fits your problem.
I hope this will help you...
4 Kommentare
Paulo Silva
am 15 Mär. 2011
+1 vote for a good answer, looking forward to see more answers from you Simon Stroebel
Weitere Antworten (2)
Simon Stroebel
am 14 Mär. 2011
Hello Omkar, it would be neccessary to know if you used the "Transfer Function" Block in your Simulink Model, or if you coded it via a "real" Block Diagramm, that means with Integrators, Gain and Sum Blocks. In the latter case, you probably may have mixed up the signs in the Sum Blocks? This is common mistake which leads to "unstable" system responses of stable systems.
Arnaud Miege
am 14 Mär. 2011
I tried these values with the transfer function block in Simulink and a step input and I get a stable input if I use ode23t, ode23s or ode23tb, with a max step size of 0.01s. It is however, a marginally stable system. Consider increasing the damping to make the system less stiff. ode45 is not well suited for numerically stiff systems, as has been pointed out already.
HTH,
Arnaud
3 Kommentare
Arnaud Miege
am 14 Mär. 2011
What MATLAB code are you using to solve the system? Make sure you are using the same solver if you use an ode solver. Using:
m=5.2e-6; b=6.25e-5; k=70;
msd = tf(1,[m b k]);
step(msd,10)
I get the same response.
Siehe auch
Kategorien
Mehr zu Assembly finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!