Steady state error of control system on MATLAB

  • Thread starter geft
  • Start date
  • #1
148
0
Given the following system (d(t)=0), I'm supposed to calculate the steady state error for unit step and unit ramp inputs respectively.

Basically, the open-loop transfer function of the system is
[tex]\frac { 3s+0.5 }{ s({ s }^{ 2 }+3s+8) } [/tex]
The closed-loop system is
[tex]\frac { 3s+0.5 }{ { s }^{ 3 }+{ s }^{ 2 }+11s+0.5 } [/tex]
I found the values of the steady-state errors, but the problem is that the numbers don't match with the simulation. I'm pretty sure there is something wrong with my code since the errors for both step and ramp responses are close to 0. The calculations show 0.5 and infinity respectively.

Here is my working and plots.

Here is my code:
Code:
sys1 = 3 + tf(0.5.*[1], [1 0]);
sys2 = tf([1], [1 3 8]);
sys = feedback(sys1*sys2, 1)

subplot(1,2,1)
step(sys)
hold on
step(tf(1))
hold off

sys3 = tf([1], [1 0]);
subplot(1,2,2)
step(sys*sys3)
title('Ramp Response')
hold on
step(sys3)
hold off
 

Answers and Replies

Related Threads on Steady state error of control system on MATLAB

Replies
1
Views
7K
Replies
7
Views
1K
Replies
3
Views
3K
  • Last Post
Replies
1
Views
6K
  • Last Post
Replies
2
Views
3K
Replies
3
Views
3K
Replies
0
Views
3K
Replies
0
Views
1K
  • Last Post
Replies
0
Views
2K
Replies
0
Views
3K
Top