- #1
Dustinsfl
- 2,281
- 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: