Different simulation results using discrete and continous systems

I have a simple system (H(s) = 1/s^2+10s+20). I've added a proportional controller(Kp = 300) to the system to observe the step response. I used Simulink to do this (fixed-step size: 0.01, solver: ode8).
I also used the c2d function to create the z-transform (H(z)= c2d(H,0.01)) and then added the same proportional controller to observe the step response. In this case, I used both Simulink (fixed-step size: 0.01, solver: discrete) and a simple m file I wrote using the difference equation coming from the z-transform.
Now, I have three step responses. All of them have the same steady state response but the transient response is different (overshoot amplitude is different between all three).
I appreciate if someone can explain to me why this is happening.
Omid

2 个评论

You have the continuous and discrete system, what is the third?
For the discrete case I'm using both simulink (z-transfer function block) and a code which implemented to do a difference equation.

请先登录,再进行评论。

回答(1 个)

Why are you expecting to get the same step response for both continuous and discrete model with the same continuous proportional controller? If you want to get the same step response you should apply c2d to the continuous model in a closed loop: Kp*H(p)/(1+Kp*H(p))

1 个评论

Thanks Azzi for your answer but the problem was something else.
I needed to use the sampling rate of 1000 Hz (i.e. c2d(H,0.001)). Also in the code I wrote, I needed to enter z-transform coefficients with 16-digit precision.

请先登录,再进行评论。

类别

提问:

2013-10-30

评论:

2013-11-26

Community Treasure Hunt

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

Start Hunting!

Translated by