Lab 03 Steady-State Error: Prepared by
Lab 03 Steady-State Error: Prepared by
30
Lab 03
Steady-State Error
Prepared By:
Mohd Azraai Razman
[email protected]
Checked by:
Dr Mohammed Abdo Hashem
[email protected]
Dr Anwar P.P. Abdul Majeed
[email protected]
Lab Location
Control System FKMP, UMP
Lab Objectives
The objective in this lab is to familiarize with MATLAB command on steady state error.
Students should be able to simulate the model accordingly based on the systems given. The
first order system will be investigated to identify the significant parameters such as time
constant, rise time and settling time.
In this lab, students are required to have ample understanding on steady-state error. The
objectives of this lab exercises are to ensure students familiarise with MATLAB commands.
The steady-state error is defined as the difference in the time to infinity between the input
(command) and the output of a process (i.e. when the answer is stable). The steady state error
may depend on the type of input (step, path, etc.) as well as the process type (0, I, or II).
Analysis of stable status error is useful only for stable systems. Before conducting a steady
state error analysis, you should check the stability of the system. Many of the techniques we
present provide a response even if the error does not reach a limited static value.
When the system has a specific structure and the input is one of our standard functions, we will
start deriving the formulas that we can apply. The open or closed loop transition method of
Unity Feedback Systems can be used to measure steady-state errors. Let's say, for instance, that
we have the following system in Figure 1 (a) and it applies to the method below, where T(s) is
the closing loop transition function.
(a) (b)
The system's steady-state error can be determined using the Final Value Theorem using the
open or closing-loop transition function. Note that this principle may extend only if there are
pole size of negative real part on the subject of the limit (sE(s) in this case).
sR( s)
e() = lim sE ( s) = lim (1)
s →0 1 + G( s)
s →0
Now, insert in the Laplace to adjust for a number of standard outputs and to measure
coefficients for the open loop transition method in each case to determine steady states errors.
Usually we also want to compensate for a system disturbances when developing a controller.
Let's say we've got a confusing system that goes the direction shown in Figure Figure 2.
The steady state error can be detected again using the Final value theorem (let R(s) = 0) because
of a phase disruption information.
1
e() = lim sE ( s ) =
s →0 1 (6)
lim + lim C ( s)
s →0 P ( s ) s →0
We need to be careful when a non-unity feedback system is in place since G(s) no longer is the
actual mistake E(s). Error is the discrepancy between the actual output and the managed
database, E(s)= R(s)-Y(s). If the input direction has a transfer feature H(s), it was skewed to
H(s) that the signal being subtracted from R(s) is not the actual output Y(s). The following is
the case in Figure 3 (a) and turn the device into a unity-feedback design similar to the following
while controlling the building block in Figure 3 (b). Hence, the
(a) (b)
You note that we have specified those constants (called fixed error constants) while referring
back to the formulas for the estimation of steady-state errors for unit feedback systems. Such
quantities are the constant locations (Kp), the constant velocity (Kv), and the constant
acceleration (Ka). We may determine when our model will have a finite state failure
understanding both the importance of these constants and the form of system.
Let's speak first of the type of system. The type of system is defined as the number of pure
integrators in a unity feedback system's forward direction. That is, if the process is shown as
shown in the following figure, the device value is equivalent to n. Whether the integrators are
part of the regulator or the plant doesn't matter.
Therefore, a system can be type 0, type 1, etc. The following tables summarize how steady-
state error varies with system type.
For given unity-feedback system as below, lets investigate on the effect for different inputs.
1
G( s) = (7)
( s + 1)( s + 2)
Step input example:
s = tf('s');
Gs = 1/((s+1)*(s+2));
sys_closed = feedback(G,1);
[y,t] = step(sys_cl);
u = ones(size(t));
plot(t,y,'-.b',t,u,'k')
axis([0,2.9,0,1.1])
xlabel('Time(s)')
ylabel('Amplitude')
t = 0:0.1:200;
u = 0.5*t.*t;
[y,t,x] = lsim(sys_cl,u,t);
plot(t,y,'y',t,u,'m')
xlabel('Time(s)')
ylabel('Amplitude')
Questions
Repeat from Type 0 examples and investigate for the following systems:
Q1. Identify which type error, generate the system with given inputs for step, ramp and
parabolic and examine the outcomes.
1
G( s) = (8)
s( s + 3)( s + 4)
Q2. Identify which type error, generate the system with given inputs for step, ramp and
parabolic and examine the outcomes.
( s + 2)( s + 3)
G( s) = (9)
s 2 ( s + 3)( s + 4)
IV – Steady-state requirements
Consider
K ( s + 4)( s + 5)
G( s) = (10)
s( s + 8)( s + 9)
Since the system is Type 1, a step input is not subject to any steady-state error and a parabola
input is subject to endless errors. The only input in this system that produces a limited steady
state error is a ramp input. In response to a ramp reference, we want to choose K so that the
closing loop system contains a static 0.1 error. Let's first look at the reaction to a gain K = 1.
G = ((s+4)*(s+5))/(s*(s+8)*(s+9));
This device has a very large steady-state error because we can see that the performance is about
17 seconds, opposed to 20 seconds, (state-state error is about 3). Let's take a closer look at this.
Our problem declaration says that the steady-state error should be 0.1. Therefore, following
these measures we should solve the problem:
1
= 0.1 e( ) = (10)
Kv
20K
Kv = 10 = lim sG(s) = K = 36 (11)
s →0 72
Show the ramp answer to input K = 37.33 by accessing the MATLAB command window with
the following script.
K = 36;
G = (K*(s+4)*(s+5))/(s*(s+8)*(s+9));
(a) (b)
A study of the above shows that the stability error actually amounts to 0.1 as desired. Let's just
adjust the problem a bit and assume that the form shown below is on our process.
Essentially, our feedback system does not differentiate between the operator and the field. For
a ramp feedback we would like to make no steady-state error. We learn from our tables that a
type 2 system gives us a ramp input failure at a null stable level. Therefore, by just introducing
an integrator (a polar at the source), we can get zero permanent-state error. When we add an
integrator and use a win K = 1, let's see the ramp input response for phase input
P = ((s+4)*(s+5))/(s*(s+8)*(s+9));
C = 1/s;
sysCL = feedback(C*P,1);
(a) (b)
As you can see, any oscillation first takes place (you may have to zoom in). However, we have
no stability error as needed just constant state. In about 241 seconds we can zoom. The
stationary loss is zero, as you can see. Figure out how the solution approaches a constant state
in different parts of the map.
a. Calculate the steady-state error due to a command input R(s) =3/s with D(s) = 0.
b. Verify the results of Part (a) in MATLAB
c. Calculate the steady-state error due to a disturbance input D(s) = -1/s with R(s) = 0.
d. Verify the result of Part (c) using MATLAB
e. Calculate the total steady-state error due to a command input R(s) = 3/s and a
disturbance of D(s) = -1/s applied simultaneously.
f. Verify the result of Part (e) using MATLAB.
Figure 12