Feedback and control steady state error

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
7 replies · 3K views
Dustinsfl
Messages
2,217
Reaction score
5

Homework Statement


Determine the system type for
$$
G(s) = \frac{K}{(s + 1)(10s + 1)(20s + 1)}
$$

Homework Equations


I am using a step, ramp, and parabolic inputs. That is,
\begin{align}
R(s) &= \frac{R}{s}\\
R(s) &= \frac{R}{s^2}\\
R(s) &= \frac{R}{s^3}
\end{align}

The Attempt at a Solution


For a step input, we have
$$
e_{ss} = \lim_{s\to 0}\frac{sR(s)}{1 + G(s)}
$$
where ##R(s) = \frac{R}{s}##.
\begin{align*}
e_{ss} &= \lim_{s\to 0}\frac{R}{1 + G(s)}\\
&= \frac{R}{1 + \lim\limits_{s\to 0}G(s)}
\end{align*}
Let ##\lim\limits_{s\to 0}G(s) = K_p##.
Then
$$
e_{ss} = \frac{R}{1 + K_p}.
$$
Since ##G(s)## has no poles, that is ##\frac{1}{s}##, ##K_p < \infty##.
Therefore,
$$
e_{ss} = \frac{R}{1 + K_p} = \frac{R}{1 + K}.
$$
For a ramp input, ##R(s) = \frac{R}{s^2}##.
\begin{align*}
e_{ss} &= \lim_{s\to 0}\frac{R}{s + sG(s)}\\
&= \lim_{s\to 0}\frac{R}{sG(s)}
\end{align*}
Let ##\lim\limits_{s\to 0}sG(s) = K_v##.
Then
$$
e_{ss} = \lim_{s\to 0}\frac{R}{sG(s)} = \frac{R}{K_v}.
$$
In this case, ##sG(s)## has a pole of order ##1##.
Therefore, ##K_v = 0##.
$$
e_{ss} = \frac{R}{K_v} = \infty
$$
For a parabolic input, ##R(s) = \frac{R}{s^3}##.
\begin{align*}
e_{ss} &= \lim_{s\to 0}\frac{R}{s^2 + s^2G(s)}\\
&= \lim_{s\to 0}\frac{R}{s^2G(s)}
\end{align*}
Let ##\lim\limits_{s\to 0}s^2G(s) = K_a##.
Then
$$
e_{ss} = \lim_{s\to 0}\frac{R}{s^2G(s)} = \frac{R}{K_a}.
$$
In this case, ##s^2G(s)## has a pole of order ##2##.
Therefore, ##K_a = 0##.
$$
e_{ss} = \frac{R}{K_a} = \infty
$$
Thus, we have a type ##0## system.

I am confident with everything above, but how do I find the range that ##K## must be in for the cloosed loop system to be stable?

I have been plotting values of ##K##, and for ##K \geq 0.18##, my steady state error for the step input goes off to infinity when it should be ##\frac{R}{1 + K}##. However, the errors for the ramp and parabolic inputs aren't diverging to infinity like they should. If I take ##0 < K < 0.18##, the step input error goes to 0 as ##t\to\infty##, and the ramp and parabolic error observe a behavior a system of 1 and 2 respectively.

The MATLAB code I am using is below.

Code:
%  G(s) = K/((s + 1)(10s + 1)(20s + 1))
%  ss error and error constants

%  step input
K = .1;
Gzpk = zpk([], [-1, -1/10, -1/20], K);
G = tf(Gzpk)
H = 1;
clooptf = feedback(G, H);

figure(1);
step(clooptf, 100)

% ramp input
t = (0:0.001:500);
u = t;
[y, x] = lsim(clooptf, u, t);

figure(2);
plot(t, y, t, u);
title('Cloosed-loop response for a ramp input')
xlabel('time(sec)')
ylabel('amplitude')

%  parabolic input
%t2 = (0:0.001:50);
u2 = t.^2;
[y2, x2] = lsim(clooptf, u2, t);

figure(3);
plot(t, y2, t, u2);
title('Cloosed-loop response for a parabolic input')
xlabel('time(sec)')
ylabel('amplitude')
 
Last edited:
Physics news on Phys.org
You are not modeling your system correctly.
the error is in here...
% step input
K = .1;
Gzpk = zpk([], [-1, -1/10, -1/20], K);
G = tf(Gzpk)
H = 1;
clooptf = feedback(G, H);

Show me an attempt. If you are still stuck I will help you further
 
donpacino said:
You are not modeling your system correctly.
the error is in here...
% step input
K = .1;
Gzpk = zpk([], [-1, -1/10, -1/20], K);
G = tf(Gzpk)
H = 1;
clooptf = feedback(G, H);

Show me an attempt. If you are still stuck I will help you further

There isn't an error there.

Also, this doesn't answer how I analytically find the K value that makes the system stable.
 
Since your model was wrong the scale of your graphs were off. The ess was indeed going to 1/(1+K) as t approached inf. The ess was approaching inf as t approached inf.
 
I am going to assume that G is your entire system and controller, and there is unity feedback.

r=input
y=output
sys_cl=closed loop system

In this case e=r-y
y=G*e
so y=G*r-y

find the new relationship between y and r (the closed loop system)

expand G and determine the equations for the new poles and evaluate where the system becomes unstable. It should be a product of K. You will then be able to determine the max K.

Note: I pointed out one problem with your work. When someone criticizes do not get defensive, go back and check your work. For the record you said

"However, the errors for the ramp and parabolic inputs aren't diverging to infinity like they should. If I take 0<K<0.18, the step input error goes to 0 as t→∞, and the ramp and parabolic error observe a behavior a system of 1 and 2 respectively."

I was pointing out why you saw that effect
 
donpacino said:
Gzpk = zpk([], [-1, -1/10, -1/20], K);
This produces the system
k/[ (s+1) (s+1/10) (s+1/20) ]

That is what G(s) is so that isn't incorrect. We are analzying the unity feedback of the cloosed loop not G(s). What we are looking at is clooptf = feedback(G, H)
 
Dustinsfl said:
That is what G(s) is so that isn't incorrect ...
I think you're missing the point. Check your algebra:
[tex] \begin{align}<br /> G(s) &= \frac{K}{(s + 1)(10s + 1)(20s + 1)} = \frac{K}{\frac{10}{10} \frac{20}{20} (s + 1)(10s + 1)(20s + 1)} = \frac{\frac{1}{200} K}{(s + 1)(s + \frac{1}{10})(s + \frac{1}{20})}<br /> \end{align}[/tex]
MATLAB trick:
Code:
s = tf('s');
K = 0.1;
G = K/((s + 1)*(10*s + 1)*(20*s + 1));

Also, system type is given by the number of free integrators (poles at the origin) of your open-loop function. You usually don't iterate over steady-state expressions to determine it. I guess it must be part of your assignment.

Dustinsfl said:
... how do I find the range that ##K## must be in for the cloosed loop system to be stable?
You could try to find your systems closed-loop poles by analytically solving its characteristic equation [itex]1 + G(s) = 0[/itex], but that can be rather difficult, depending on polynomial order. If you really want an analytical solution, I'd suggest you get familiar with the Routh–Hurwitz stability criterion.
 
  • Like
Likes   Reactions: 1 person