0% found this document useful (0 votes)
12 views15 pages

First Order System

The document outlines an experiment on first-order systems using MATLAB, focusing on transient and steady-state responses. It details the objectives, time response characteristics, and the impact of gain and time constant on system behavior. Several examples and assignments are provided to illustrate the concepts and require MATLAB simulations for analysis.

Uploaded by

ali alaa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views15 pages

First Order System

The document outlines an experiment on first-order systems using MATLAB, focusing on transient and steady-state responses. It details the objectives, time response characteristics, and the impact of gain and time constant on system behavior. Several examples and assignments are provided to illustrate the concepts and require MATLAB simulations for analysis.

Uploaded by

ali alaa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

61

MATLAB Experiment No. (1)


First Order Systems

 Objectives:
The objectives of this experiment are to:
1. Describe quantitatively the transient response of first
order systems.
2. See the effect of the gain and time constant on the
transient response and steady state error.
 Time Response:

The time response of a control system consists of two parts:


the transient and the steady-state response as shown in
Figure 5.1. By transient response, we mean that which goes
from the initial state to the final state. By steady-state
response, we mean the manner in which the system output
behaves as time approaches infinity.

Khaled Mustafa Mahmoud Session: Spring 2020/2021


62

Figure 5.1: First order lag response specifications.


 Transient Response:
One of the most important characterestics of control systems
is their transient response. The transient response is the
response of a system as a function of time. Because the
purpose of control systems is to provide a desired response,
the transient response of control systems often must be
adjusted until it is satisfactory. If an open loop control system
does not provide a satisfactory response, then the process
must be replaced with a more suitable process. By constrast,
a closed loop system can often be adjusted to yield the desired
response by the adjusting the feedback loop parameters. In
specifying the transient response characteristics of a control
system to a unit-step input, it is common to specify the
following:

Khaled Mustafa Mahmoud Session: Spring 2020/2021


63

1. Time Constant(τ): is the time required for the response


curve to reach 63.2% of its final value in the phase lag, or
36.8 % in the phase lead.
2. Rise Time (T r): is the time required for the response to rise
from 10% to 90% of its final value.
3. Settling Time (T s): is the time required for the response
curve to reach and stay within a range about 2% or 5% of its
final value.
 Steady State Error (e ss):
The steady state error is the difference between the input and
the output for a prescribed test input as time→ ∞.
 First Order Systems:
The dynamics of many systems of interest to engineers may be
represented by a simple model containing one independent
energy storage element. For example, the braking of an
automobile, the discharge of an electronic camera flash, the
flow of fluid from a tank, and the cooling of a cup of coffee may
all be approximated by a first-order differential equation.
1. First-Order System Lag: may represented by an RC
circuit where the output on the capacitor as shown in
Figure 5.2 (a) and the output step response as shown in
Figure 5.2(b) . The transfer function is given by:
V o (s ) 1
= where τ=RC
V i ( s ) τ s+1

Khaled Mustafa Mahmoud Session: Spring 2020/2021


64

(a) (b)
Figure 5.2: First order system lag: (a) RC lag circuit, (b) output step
response.

2. First-Order System Lead: may represented by an RC


circuit. where the output on the resistor as shown in Figure
5.3 (a) and the output step response as shown in Figure
5.3(b). The transfer function is given by:
V o (s ) τs
=
V i ( s ) τ s+1

(a)
(b)

Figure 5.3: First order system lead: (a) RC lead circuit, (b) output step
response.
Example 5.1: Consider a first order system has the closed
loop transfer function with the unity feedback:

Y (s ) 1
=
R ( s ) τ s+1

Do the following using MATLAB:


1. Obtain the step response of the system for τ =1 ,3 ,∧5sec on
the same figure.
2. Repeat part (1) for unit ramp input.

Solution:

Khaled Mustafa Mahmoud Session: Spring 2020/2021


65

% 1. To obtain the step response for tau=1, 3, and 5 %


s=tf('s');
tau=[1 3 5];
hold on
for i=1:3
T=1/(tau(i)*s+1)
step(T)
end
gtext('\tau=1')
gtext('\tau=3')
gtext('\tau=5')

Step Response
1
=1
0.9
=3
0.8
=5
0.7

0.6
Amplitude

0.5

0.4

0.3

0.2

0.1

0
0 5 10 15 20 25 30
Time (sec)

Figure 5.4: Step response for τ =1 ,3 ,∧5 of Example 5.1.

% 2. To obtain the ramp response for tau=1,3, and 5 %


s=tf('s');

Khaled Mustafa Mahmoud Session: Spring 2020/2021


66

tau=[1 3 5];
hold on
for i=1:3
T=1/(tau(i)*s+1)
t=0:0.01:30;
r=t;
lsim(T,r,t)
end
gtext('Input')
gtext('\tau=1')
gtext('\tau=3')
gtext('\tau=5')

Linear Simulation Results


30

=1

25

20
Input =3
Amplitude

15
=5

10

0
0 5 10 15 20 25 30
Time (sec)

Figure 5.5: Ramp response for τ =1 ,3 ,∧5 of Example 5.1.

Khaled Mustafa Mahmoud Session: Spring 2020/2021


67

Performance specifications for each value of time constant


as shown in the following table:
Performance
Specifications
τ =1 sec τ =3 sec τ =5 sec

Rise Time ( T r ¿ 2.2 sec 6.59 sec 11 sec

Settling Time ( 3.91 sec 11.7 sec 19.6 sec

Error [step
Ts¿

input]
0 0 0

Error [ramp
1 3 5
input]

What is the effect of the time constant on the system


response?

Example 5.2: A tank level control system is shown in Figure


5.6 (a). It is desired to regulate the level H in response to an
input change Q1 . The open loop transfer function is:
∆H R
G ( s )= =
∆ Q1 RCs+1

For closed loop system, a float level sensor and valve may
be used. The valve is controlled so that a reduction in the
flow rate ∆ Q1, is a proportional to an increase in head H . The
block diagram of the system shown in Figure 5.6 (b). Do the
following:
1. Write a MATLAB program to obtain the closed loop step
response of the system for K=2, 4, and 10. Assuming:
C=1 m2 and R=0.5 sec/m2.

Khaled Mustafa Mahmoud Session: Spring 2020/2021


68

2. Determine the values of time constant, rise time, settling


time, and steady state error for each value of gain.

(a)
(b)

Figure 5.6: Tank level system: (a) schematic diagram, (b) block
diagram.

Solution:
% 1. To obtain the closed loop step response for K=2,4, and 10 %
s=tf('s');
R=0.5;C=1;
K=[2 4 10];
hold on

for i=1:3
G=K(i)*R/(R*C*s+1);
T=feedback(G,1)
step(T)
xlabel('Time')
ylabel('Height')
title('Step Response')
end
gtext('K=2')

Khaled Mustafa Mahmoud Session: Spring 2020/2021


69

gtext('K=4')
gtext('K=10')

Step Response
0.9

0.8
K=10
0.7

K=4
0.6

0.5
Height

K=2
0.4

0.3

0.2

0.1

0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
Time (sec)

Figure 5.7: Step response for K=2, 4 ,∧10 of Example 5.2.

2. Performance specifications for each value of gain as


shown in the following table:
Performance
Specifications
K=2 K=4 K=10

Time Constant (
τ)
0.25 sec 0.167 sec 0.0831sec

Rise Time ( T r ¿ 0. 549 sec 0.366 sec 0.183 sec

Settling Time ( 0.978 sec 0.652 sec 0.326 sec


Ts¿

Error(e ss ¿ 0.5 0.33 0.167

Khaled Mustafa Mahmoud Session: Spring 2020/2021


70

Discuss the effect of the system gain on the time constant


and steady state error.
-------------------------------------------------------------------------------------------
-
Example 5.3: The transfer function of the RC network given
in Figure 5.8 is:
Y (s ) 1
=
R ( s ) 1+ R C s

Figure 5.8: A first order system.

Do the following:

1. Find the step response when R=1 K Ω , 5 KΩ , 10 KΩ, and C=1 µ f .


2. Record the values of time constant, rise time, settling
time, and steady state error for each case in parts (1) and
(2).

Solution:
% 1. To obtain step response of the RC network for R=1KΩ,5KΩ,10KΩ,
and C=1µf %
s=tf('s');
C=1*10^-6;
R=[1*10^3 5*10^3 10*10^3];
hold on

Khaled Mustafa Mahmoud Session: Spring 2020/2021


71

for i=1:3
T=1/(1+R(i)*C*s);
step(T)
end
gtext('R=1K ohm')
gtext('R=5K ohm')
gtext('R=10K ohm')

Step Response

R=1K ohm

R=5K ohm

0.8
R=10K ohm
Amplitude

0.6

0.4

0.2

0
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
Time (sec)

Figure 5.9: Step response of the RC network for R=1KΩ, 5KΩ,


10KΩ, and C=1µf.

Performance specifications for each case as shown in the


following table:
Performance
Specifications
C=1 µf C=1 µf C=1 µf
R=1 KΩ R=5 KΩ R=10 KΩ

Time Constant ( 1 msec 5 msec 10 msec

Khaled Mustafa Mahmoud Session: Spring 2020/2021


72

τ)
Rise Time ( T r ¿
Settling Time (
2.2 msec 11msec 22 msec

3.91 msec 19.6 msec 39.1 msec


Ts¿
Error(e ss ¿ 0 0 0

What is the effect of the increasing the value of resistor on


the performance specifications?
-------------------------------------------------------------------------------------------
-
Assignment 5.1: A useful cirquit, called a lead network is
shown in Figure 5.10. Do the following:
1. Determine the transfer function G ( s )=V o (s)/V ( s).
2. Use MATLAB to obtain the step response of the network.
3. Determine the values of time constant, rise time, settling
time, and steady state error.

Figure 5.10: RC lead network.


-------------------------------------------------------------------------------------------
-
Assignment 5.2: Consider the feedback control system given
in Figure 5.11. Do the following:
1. Find the value of gain K such that the step response
reaches 98% of the final value in 1 sec. Verify your
answer using MATLAB.

Khaled Mustafa Mahmoud Session: Spring 2020/2021


73

2. Use MATLAB to find the steady state error to a unit step


input.

Figure 5.11: A feedback control system of Homework 5.2.


------------------------------------------------------------------------------------------------
-
Assignment 5.3: Consider the system with transfer function:
K
G ( s )=
s +a

1. Using a “for loop”, develop an m-file to obtain the step


resonse in the single figure of the system y (t ) and tabulate
the values of y (t ) for
t=0 , 1 ,2 , 3 , … 10 sec for:

( a ) K =1 ,a=1(b) K=1 , a=0.5(c)K =2 , a=1


2. Record the values of time constant and steady state error
for each case.
3. Discuss the reasons for any discrepancies. What
conclusion can you draw?
------------------------------------------------------------------------------------------------
-
Assignment 5.4: Consider the open loop voltage regulator in
Figure 5.12.
1.If R L=100Ω and if r (t ) is a unit step function, what is the
response v o (t)? What is its steady state response? How many

Khaled Mustafa Mahmoud Session: Spring 2020/2021


74

seconds will v o (t) take to reach and stay within 1% of its


steady state?
2.What is the required reference input if the output voltage is
20 V?
3.If we use the reference signal computed in part (2), and
decrease R L from 100 Ω to 50Ω, what is the steady state output

voltage?

Figure 5.12: Open loop voltage regulator.

Assignment 5.5: Consider the closed loop voltage regulator as


shown in Figure 5.13.
1.If R L=100Ω and if r (t ) is a unit step function, what is the
response v o (t)? What is its steady state response? How many
seconds will v o (t) take to reach and stay within 1% of its
steady state?
2.What is the required r ( t )if the output voltage is 20 V?
3.If we use r (t ) in part (2), and decrease R L from 100 Ω to 50Ω, what
is the steady state output voltage?

Figure 5.13: Closed loop voltage regulator.


------------------------------------------------------------------------------------------------
-

Khaled Mustafa Mahmoud Session: Spring 2020/2021


75

Assignment 5.6: Compare the two systems in Assignments 4


and 5 in terms of:
a) The time constant or speed of response.
b) The magnitudes of the reference signals.
c) The deviations of the output voltages from 20 V as R L
decreases from 100 Ω to 50Ω. Which system is better?

Khaled Mustafa Mahmoud Session: Spring 2020/2021

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy