Vous êtes sur la page 1sur 75

CONTROL SYSTEM LAB MANUAL

Revised Date
February, 2017

Updated By

Engr. Umair Tahir

DEPARTMENT OF ELECTRICAL ENGINEERING


THE UNIVERSITY OF LAHORE

1
Revision History (January 2017)

Revisions in Manual Revised By Revised Date


Few more examples are added. Danista Khan January 2014
Lab Manual # 3 is shifted to Lab Manual # 8 and January 2014
Danista Khan
few more examples are added.
Lab Manual # 4 and 5 are merged and few more January 2014
Danista Khan
examples are added.
Lab Manual # 7 is shifted to Lab Manual # 5 and January 2014
Danista Khan
few more examples are added.
Lab Manual # 8 is shifted to Lab Manual # 6 and January 2014
Danista Khan
few more examples are added.
Lab Manual # 9 is shifted to Lab Manual # 7 and January 2014
Danista Khan
few more examples are added.
Lab Manual # 10 few more examples are added. Danista Khan January 2014
Lab Manual # 15 is shifted to Lab Manual # 9 and January 2014
Danista Khan
few more examples are added.
Lab Manual # 14 is shifted to Lab Manual # 13 and January 2014
Danista Khan
few more examples are added.
Lab Manual # 13 is excluded. Danista Khan January 2014
Few new labs are added as manual # 2, 3, 14, 15 & January 2014
Danista Khan
16.

2
Revision History (January 2014)

Revisions in Manual Revised By Revised Date


Few more examples are added. Danista Khan January 2014
Lab Manual # 3 is shifted to Lab Manual # 8 and January 2014
Danista Khan
few more examples are added.
Lab Manual # 4 and 5 are merged and few more January 2014
Danista Khan
examples are added.
Lab Manual # 7 is shifted to Lab Manual # 5 and January 2014
Danista Khan
few more examples are added.
Lab Manual # 8 is shifted to Lab Manual # 6 and January 2014
Danista Khan
few more examples are added.
Lab Manual # 9 is shifted to Lab Manual # 7 and January 2014
Danista Khan
few more examples are added.
Lab Manual # 10 few more examples are added. Danista Khan January 2014
Lab Manual # 15 is shifted to Lab Manual # 9 and January 2014
Danista Khan
few more examples are added.
Lab Manual # 14 is shifted to Lab Manual # 13 and January 2014
Danista Khan
few more examples are added.
Lab Manual # 13 is excluded. Danista Khan January 2014
Few new labs are added as manual # 2, 3, 14, 15 & January 2014
Danista Khan
16.

Revision History (February 2015)

Revisions made in all Experiments Revised By Revised Date


Experiment # 1
All equations written in Math Type Software and
reformatting is done.
Additions: M Usman Asad Feb 2015
1. Pre-requisite
2. Learning Outcomes
3. Questions
Experiment # 2
Simulink Tutorial and example is included with
snapshots from MATLAB to guide the students.
Additions: M Usman Asad Feb 2015
1. Pre-requisite
2. Learning Outcomes
3. Questions
Experiment # 3
Mass-Spring System example is included in revised
edition. And some other examples are excluded.
M Usman Asad Feb 2015
Spaces for sketching step and impulse response is
provided.
Additions:

3
1. Pre-requisite
2. Learning Outcomes
3. Questions
Experiment # 4
New example added from with different pole
location to check the step and impulse response.
Equations are written in Math type Software.
M Usman Asad Feb 2015
Additions:
1. Pre-requisite
2. Learning Outcomes
3. Questions
Experiment No 5
New Lab task is being added.
Additions:
M Usman Asad Feb 2015
1. Pre-requisite
2. Learning Outcomes
3. Questions
Experiment No 6
Equations are rewritten in Math type Software.
Additions:
M Usman Asad Feb 2015
1. Pre-requisite
2. Learning Outcomes
3. Questions
Experiment # 7,8,9,10, 11
Reformatting is done. Equations are written in
MATH TYPE software.
Additions: M Saad Afzal Feb 2015
1. Pre-requisite
2. Learning Outcomes
3. Questions
Experiment # 12
Description about SISO is added in more detail.
Additions:
Bilal Ahmed May 2015
1. Pre-requisite
2. Learning Outcomes
3. Questions
Experiment # 13
Lab 14 is shifted to lab 13. Lab task is added to do
the same experiment by changing the Mechanical
constant values.
Bilal Ahmed May 2015
Additions:
4. Pre-requisite
5. Learning Outcomes
6. Questions
New Experiment # 14
Give overview to Hardware setup Analog and M Usman Asad May 2015
Digital Motor Control Module

4
Additions:
1. Pre-requisite
2. Learning Outcomes
3. Questions

New Experiment # 15
Demonstration of Proportional Speed Control on
hardware setup is included.
Additions: M Usman Asad May 2015
1. Pre-requisite
2. Learning Outcomes
3. Questions
New Experiment # 16
Demonstration of PID Control on hardware setup is
included.
Additions: M Usman Asad May 2015
1. Pre-requisite
2. Learning Outcomes
3. Questions

5
C ER TI FICA TE O F AP PROVA L

It is certified that the lab manual titled ―Control System‖, in scope and in quality, covers the
objectives and topics defined in the course outline.

Remarks by Mentor: ----------------------------------------------

Dr Ghulam Abbas
Assistant Professor
Department of Electrical Engineering
The University of Lahore

Remarks by HOD: -------------------------------------------------

Hafiz Tehzeeb ul Hassan


Professor
Department of Electrical Engineering
The University of Lahore

6
TABLE OF CONTENT

Sr. No TOPICS Page No

1
Introduction to MATLAB 1

2 Introduction to MATLAB Basic Tool (SIMULINK) 4

3 Modeling in SIMULINK 8

4 Response of Dynamic System 13

5 Block Diagram Reduction & Time Specifications for Closed loop Control
Systems 18

6 Stability of a System 23

7 Steady State Error 28

8
State Space Representation 32

9 Designing Controller and Observer in MATLAB 36

10 Root Locus 39

11 Lead-Lag Compensation 43

12 49
To Design a PID Controller using SISO Tool

13 To Design a Lead and Lag Compensator using SISO Tool 53

14 Magnetic Levitation System: Hardware Setup 57

15 Speed Control of DC Motor: Hardware Setup 59

16 DC Motor Position Control: Hardware Setup 61

7
Lab-01: Introduction to MATLAB

Pre-Requisite:

Students must be familiar with operating system and basic computer fundamentals

Objective:
To become familiar with the basic commands of MATLAB

Theory:

MATLAB is widely used in all areas of applied mathematics, in education and research at
universities, and in the industry. MATLAB stands for Matrix Laboratory and the software is
built up around vectors and matrices. This makes the software particularly useful for linear
algebra but MATLAB is also a great tool for solving algebraic and differential equations and
for numerical integration. MATLAB has powerful graphic tools and can produce nice pictures
in both 2D and 3D. It is also a programming language, and is one of the easiest programming
languages for writing mathematical programs. MATLAB also has some tool boxes useful for
signal processing, image processing, optimization, etc.

Equipment:
1. PC
2. MATLAB® R2009b

Procedure:

1. Invoke PC-MATLAB by clicking on the MATLAB icon


2. While in MATLAB, type "demo". This will bring up a menu of the available
demonstrations. Try some of the demonstrations for a quick display of MATLAB
capabilities.
3. Executing "help" gives a list of HELP topics, including the M-files in the various
libraries on disk. Typing "help topic" gives help on the Specified topic.
4. If the topic is not in the help file, the help facility looks on the disk for an M-file with
the filename topic.m.

8
5. Follow the instructions in the PC-MATLAB PRIMER supplied to you to gain
familiarity with MATLAB.
6. The section entitled "Analysis and Simulation of Control Systems using MATLAB"
is to demonstrate the use of MATLAB in control systems.

Lab Task:
Use the "help" command to get familiar with each of the following MATLAB
commands:

roots - poly - conv - polyval - pzmap - series - parallel-


feedback - impulse - step - plot - subplot - bode -
conj - imag - real - residue- ss2tf -tf2ss-tf-zpk-tf2zp
a) Polynomials in‘s‘ can be expressed as arrow vectors containing their coefficients.
b) A ‘poly ‗command is used to get a vector of a polynomial represented in factored
form.
c) Polynomials can be multiplied by using ‗conv‘ command.
d) The ‘roots’ command is used to find the roots of a polynomial.
e) A transfer function command ‗tf’ can be used to get transfer function expressed as
numerator polynomial divided by denominator polynomial.
f) The command ([ ]) is used to get transfer function.
( )
( )( )

g) The command ‗zpk‘ is used to get a transfer function if the numerator and
denominator are expressed in factored form.
h) The command polyval is use to calculate the value of polynomial of degree
evaluated at particular variable used in polynomial.
i) The command series is used to connect systems in series.
j) The command parallel is used to connect systems in parallel.
k) The command feedback is used to get the closed loop system.
l) The command impulse is used to get impulse response of the system.
m) The command step is used to get the step response of the system.

9
n) The command bode is used to get the frequency response of the system.
o) The command pzmap is used to plot the pole zero map of the system.
p) The command plot is used for graphical representation.
q) The command real is used to get the real part of the system
r) The command imag is used to get the imaginary part of the system
s) The command conj is used to get the conjugate of the system
t) The command residue is used to convert a quotient of polynomial to pole residue
representation and back again.

u) The command tf2ss is used to convert transfer function to state space.


v) The command ss2tf is used to convert the state space to transfer function.

3) Consider the following polynomials.

P110s315s25s100P2(s1)(s2)(s3)(s4)

Find the roots of the following polynomials.

a. P3P1P2b.P4P1P2 c. P5 P1.P2

4) Find the overall transfer function C(s)/R(s) = G1(s). G2(s) symbolically both in factored
and polynomial form by using MATLAB. Also find its magnitude and phase in degree
with s = 2+j4.

2(s 2) C(s)


R(s) 1
s3 5s210s20 s + 8 (s + 2)

MATLABCODE:

10
OUTPUT:

Learning Outcome:
At the end of this experiment, students will
1. How to use elementary functions in MATLAB and to use MATLAB to plot functions.
2. Understand basic commands used in control system toolbox.

Questions:
1. What is difference between open loop and close loop system?
2. What is the basic advantage of using MATLAB as a tool to learn control system?
3. Why we convert any transfer function to state space representation?

11
Lab-02: Introduction to MATLAB Basic Tool (SIMULINK)

Pre-Requisite:

Concrete understanding of frequently used commands of control system toolbox

Objective:

1. To become familiar with the SIMULINK...


2. To learn how the disturbances in the control system are overcome.

Theory:

Simulink is a tool for simulating dynamic systems. As an extension to MATLAB, Simulink


adds many features specific to dynamic systems while retaining all of MATLAB's general
purpose functionality. Simulink has two phases of use: model definition and model analysis.
Atypical session starts by either defining a model or recalling a previously defined model, and
then proceeds to analysis of that model. To facilitate model definition, Simulink adds a class of
windows called Block diagram windows. In these windows, models are created and edited
principally by mouse driven commands. Part of mastering Simulink is to become familiar with
the manipulation. After you define a model, you can analyze it either by choosing options from
the Simulink menus or by entering commands in MATLAB's command window. Progress of
simulation can be viewed while simulation is running. Final results can be made available in
MATLAB workspace when simulation is complete.

Equipment:
1. PC
2. MATLAB® R2009b

Procedure:

1. You start Simulink from the MATLAB.


2. Open MATLAB and select the Simulink icon in the Toolbar (figure 1)
3. Or type ―Simulink‖ in the Command window (figure 2).
4. Then the window appears Simulink Library Browser (figure 3).

12
Figure 1: How to Start Simulink from icon available in MATLAB Toolbar

Figure 2: How to start Simulink by writing Simulink in command prompt

13
Figure 3: Simulink Library

5. The Simulink Library Browser is the library where you find all the blocks you may
use in Simulink. Simulink software includes an extensive library of functions
commonly used in modeling a system.
6. These include:  Continuous and discrete dynamics blocks, such as Integration,
Transfer functions, Transport Delay, etc.  Math blocks, such as Sum, Product, Add,
14
7. etc Sources, such as Ramp, Random Generator, Step, etc
8. Click the New icon on the Toolbar in order to create a new Simulink model:

Figure 4: How to Start Creating Model in Simulink

9. The following window appears. You may now drag the blocks you want to use from the
Simulink Library Browser to the model surface (or right-click on a block and select
―Add to…‖).

Figure5: Model Surface for creating Simulink Model

10. There are lots of parameters you may want to configure regarding your simulation.
Select ―Configuration Parameters…‖ in the Simulation menu.
11. After that following window appear in figure 7.
12. Here you set important parameters such as:
i. Start and Stop time for the simulation
ii. What kind of Solver to be used (ode45, ode23 etc.)
iii. Fixed-step/Variable-step
15
Figure 6: Simulation configuration in Simulink

Figure 7: Configuration window in Simulink

Simulink Examples:
Example No 1: Sine wave

1. Create the block diagram as shown in figure 8.


2. Set the following parameter for the Integrator block as given in Fig 9.
3. The result should be like this as shown in Fig 10.

16
Figure 8: How to create sine wave through Simulink modeling

Figure 9: Parameter setting for integrator


17
Figure 10: Sine wave generated by Simulink

Example No 1: Integrator

1. Create the following model (an integrator) and run the simulation.

Figure 11: Integrator Implementation


18
2. Place the blocks on the model surface
3. Double-click on the Integrator block. The Parameter window for the Integrator block
appears. (Fig 12).

Figure 12: Integrator parameter configuration

4. Select ―Initial condition source=external‖. The Integrator block now looks like this.
5. Double-click on the Constant block. The Parameter window for the Constant block
appears. (Fig 13). In the Constant value field we type in the initial value for the
integrator, e.g., type the value 1.
6. Draw a wire between the output on the Constant block to the lower input in the
Integrator block, like this:
7. Start the simulation by clicking the ―Start Simulation‖ icon in the Toolbar.
8. Double-click in the Scope block in order to see the simulated result.

19
Figure 2.13: Constant Block Configuration

Figure 2.14: Integrator output from Simulink Model

20
Lab Task:
Implement the following models in Simulink and produce the output.

Figure: 2.15 Simulink Model

Figure: 2.16 Simulink Model

Figure: 2.17Disturbance Rejections in Cruise Control System

Figure: 2.18 Disturbance Rejections in Cruise Control System with feedback

Learning Outcome:
At the end of this experiment, students will

21
1. Learn the use of Simulink to simulate different models like sine wave etc.
2. Understand the use of Simulink in analysis of dynamic systems
3. Learn efficiently with frequent feedback, the interactive nature of Simulink encourages
you to try things out, you can change parameters ―on the fly‖ and immediately see what
happens, for ―what if‖ exploration.
Questions:
1. What are the basic components or blocks available in Simulink for display purpose?
2. What is purpose of gain and saturation block and ―simset‖ command in MATLAB?
3. How could we able to open the Simulink library using main command prompt window?

22
Lab-03: Modeling in Simulink
Pre-Requisite:

1. Hands on experience is required on Simulink


2. Student should know how to model any dynamic systems (Chapter 2 Norman S Nise)
Objective:
Modeling of electrical/mechanical system in Simulink

Theory:
Simulink is an environment for simulation and model-based design for dynamic and embedded
systems. It provides an interactive graphical environment and a customizable set of block
libraries that let you design, simulate, implement, and test a variety of time-varying systems,
including communications, controls, signal processing, video processing, and image
processing. Simulink offers: A quick way of develop your model in contrast to text based-
programming language such as e.g., C. Simulink has integrated solvers. In text based-
programming language such as e.g., C you need to write your own solver.
Equipment:
1. PC
2. MATLAB® R2009b
Procedure:
Example 1:

a) Implement the transfer function of circuit given below using SIMULINK and analyze
its
1. Step response
2. Ramp response
3. Parabolic response

23
Example 2:

a) Implement the transfer function of circuit given below using SIMULINK and analyze
its
1. Step response
2. Ramp response
3. Parabolic response

Learning Outcomes:

At the end of this experiment, students will


1. How to model any mechanical, electrical and electro-mechanical system in Simulink
2. Learn how to measure plot the step and impulse response of the system.
Question:
1. Define transfer function?
2. What is difference between step response and impulse response of the system?
3. What is difference between forced response and natural response of the system?
4. Why do transfer functions for mechanical networks look identical to transfer functions
for electrical networks?

24
Lab-04: Response of Dynamic System
Pre-Requisite:

1. Chapter No 4 (Norman S Nise)


2. Hands on experience on Simulink and MATLAB Programming

Objective:

To evaluate the effect of pole and zero location upon the time response of first and second
order systems
Theory:
The output response of a system is the sum of two responses: the forced response and the
natural response. Although many techniques, such as solving a differential equation or taking
the inverse Laplace transform, enable us to evaluate this output response, these techniques are
laborious and time-consuming. Productivity is aided by analysis and design techniques that
yield results in a minimum of time. If the technique is so rapid that we feel we derive the
desired result by inspection, we sometimes use the attribute qualitative to describe the method.
The use of poles and zeros and their relationship to the time response of a system is such a
technique. Learning this relationship gives us a qualitative "handle" on problems. The concept
of poles and zeros, fundamental to the analysis and design of control systems, simplifies the
evaluation of a system's response.

Equipment:
1. PC
2. MATLAB® R2009b
Procedure:

Experiment No 1:

Objective: To evaluate the effect of pole and zero location upon the time response of first- and
second-order systems.

Prelab:
1) Given the transfer function G(s) = a / (s+a), evaluate settling time and rise time for the
following values of a: 1, 2, 3, 4. Also, plot the poles.
25
2) Given the transfer function G(s)= b / (s2+as+b) ;
a. Evaluate percent overshoot, settling time, peak time, and rise time for
the following values: a = 4; b = 25. Also, plot the poles.
b. Calculate the values of a and b so that the imaginary part of the poles
remains the same but the real part is increased two times over that of Prelab
2a, and repeat Prelab 2a.
c. Calculate the values of a and b so that the imaginary part of the poles
remains the same but the real part is decreased 1 time over that of Prelab 2a,
and repeat Prelab 2a.
3)
a) For the system of Prelab 2a, calculate the values of a and b so that the real
part of the poles remains the same but the imaginary part is increased two
times over that of Prelab 2a, and repeat Prelab 2a.
b) For the system of Prelab 2a, calculate the values of a and b so that the real
part of the poles remains the same but the imaginary part is increased four
times over that of Prelab 2a, and repeat Prelab 2a.
4)
a) For the system of Prelab 2a, calculate the values of a and b so that the
damping ratio remains the same but the natural frequency is increased two
times over that of Prelab 2a, and repeat Prelab 2a.
b) For the system of Prelab 2a, calculate the values of a and b so that the
damping ratio remains the same but the natural frequency is increased four
times over that of Prelab 2a, and repeat Prelab 2a.
5) Briefly describe the effects on the time response as the poles are changed in each of
Prelab 2, 3, and 4.

Lab:
1. Using Simulink set up the systems of Prelab 1 and plots the step response of each of the
four transfer functions on a single graph by using the Simulink. Also, record the
values of settling time and rise time for each step response.
2. Using Simulink set up the systems of Prelab 2. Using the Simulink, plot the step
response of each of the three transfer functions on a single graph. Also, record the
values of percent overshoot, settling time, peak time, and rise time for each step
26
response.

3. Using Simulink set up the systems of Prelab 2a and Prelab 3. Using the Simulink
Viewer, plot the step response of each of the three transfer functions on a single graph.
Also, record the values of percent overshoot, settling time, peak time, and rise time for
each step response.
4. Using Simulink set up the systems of Prelab 2a and Prelab 4. Using the Simulink
Viewer, plot the step response of each of the three transfer functions on a single graph.
Also, record the values of percent overshoot, settling time, peak time, and rise time for
each step response.

Postlab:
1) For the first-order systems, make a table of calculated and experimental values of
settling time, rise time, and pole location.
2) Forthesecond-ordersystemsofPrelab2, make a table of calculated and experimental
values of percent overshoot, settling time, peak time, rise time, and pole location.
3) For the second-order systems of Prelab 2a and Prelab 3, make a table of calculated
and experimental values of percent overshoot, settling time, peak time, rise time,
and pole location.
4) For the second-order systems of Prelab 2a and Prelab 4, make a table of calculated
and experimental values of percent overshoot, settling time, peak time, rise time,
and pole location.
5) Discuss the effects of pole location upon the time response for both first- and second-
order systems. Discuss any discrepancies between your calculated and experimental
values.

Experiment No 2:

Objective: To evaluate the effect of additional poles and zeros upon the time response of
second-order systems.

Prelab:

25
1) a. Given the transfer function G (s) =𝑆 2 +4𝑆+25 , evaluate the percent over-shoot, settling

time, peak time, and rise time. Also, plot the poles.
b. Add a pole at -200 to the system of Prelab 1a. Estimate whether the transient
27
response in Prelab 1a will be appreciably affected.
c. Repeat Prelab 1b with the pole successively placed at -20; -10, and -2.
2) A zero is added to the system of Prelab 1a at -200 and then moved to -50, -20, -10, -5,

and -2. List the values of zero location in the order of the greatest to the least effect
upon the pure second-order transient response.
(25𝑏/𝑎)(𝑠+𝑎)
3) Given the transfer function G (s) =(𝑠+𝑏)(𝑠 2 +40𝑠+25), let a = 3 and b = 3.01, 3.1, 3.3, 3.5,

and 4.0. Which values of b will have minimal effect upon the pure second-order
transient response?
(2500 𝑏/𝑎)(𝑠+𝑎)
4) Given the transfer function G (s) =(𝑠+𝑏)(𝑠 2 +40𝑠+2500 ), let a = 30 and b = 30.01, 30.1,

30.5, 31, 35 and 40. Which values of b will have minimal effect upon the pure second-
order transient response?
Lab:

1) Using Simulink, add a pole to the second-order system of Prelab 1a and plot the step
responses of the system when the higher-order pole is nonexistent, at -200, -20, -10 and -2.
Make your plots on a single graph, using the Simulink LTI Viewer. Normalize all plots to
a steady-state value of unity. Record percent overshoot, settling time, peak time, and rise
time for each response.
2) Using Simulink, add a zero to the second-order system of Prelab 1a and plot the step
responses of the system when the zero is nonexistent, at -200, -50, -20, -10, - 5 and -2.
Make your plots on a single graph, using the Simulink LTI Viewer. Normalize all plots to
a steady-state value of unity. Record percent overshoot, settling time, peak time, and rise
time for each response.
3) Using Simulink and the transfer function of Prelab 3 with a = 3, plot the step responses of
the system when the value of b is 3, 3.01, 3.1, 3.3, 3.5 and 4.0. Make your plots on a single
graph using the Simulink LTI Viewer. Record percent overshoot, settling time, peak time,
and rise time for each response.
4) Using Simulink and the transfer function of Prelab 4 with a = 30, plot the step responses of
the system when the value of b is 30, 30.01, 30.1, 30.5, 31, 35 and 40. Make your plots on
a single graph, using the Simulink LTI Viewer. Record percent overshoot, settling time,
peak time, and rise time for each response.

28
Postlab:

1) Discuss the effect upon the transient response of the proximity of a higher-order pole to the
dominant second-order pole pair.

2) Discuss the effect upon the transient response of the proximity of a zero to the dominant
second-order pole pair. Explore the relationship between the length of the vector from the
zero to the dominant pole and the zero‘s effect upon the pure second-order step response.

3) Discuss the effect of pole-zero cancellation upon the transient response of dominant
second-order pole pair. Allude to how close the canceling pole and zero should be and the
relationships of (1) the distance between them and (2) the distance between the zero and
the dominant second-order poles.

Learning Outcome:
At the end of this experiment, students will learn
1. Use poles and zeros of transfer functions to determine the time response of a control
system
2. How to find the settling time, peak time, percent overshoot, and rise time for an under-
damped Second-order system efficiently using MATLAB
Question:
1. In a system with an input and an output, what poles generate the transient response?
2. What is the difference between the natural frequency and the damped frequency of
oscillation?
3. If a pole is moved with a constant imaginary part, what will the responses have in
common?
4. If a pole is moved with a constant real part, what will the responses have in common?
5. If a pole is moved along a radial line extending from the origin, what will the responses
have in common?

29
Lab-05: Block Diagram Reduction & Time Specifications for Closed loop
Control Systems

Pre-Requisite:

1. Chapter No 5 (Norman S Nise)


2. Hands on experience on Simulink and MATLAB Programming
Objective:
To verify the equivalency of the basic forms, including cascade, parallel and feedback forms
Theory:
Multiple subsystems are represented in two ways: as block diagrams and as signal-flow graphs.
Although neither representation is limited to a particular analysis and design technique, block
diagrams are usually used for frequency-domain analysis and design, and signal-flow graphs
for state-space analysis.
Signal-flow graphs represent transfer functions as lines, and signals as small circular nodes.
Summing is implicit. A graphical representation of a system's transfer function is simple.
However, a graphical representation of a system in state space requires representation of each
state variable. In that example, a single-block transfer function requires seven blocks and a
summing junction to show the state variables explicitly. Thus, signal-flow graphs have
advantages over block diagrams. They can be drawn more quickly, they are more compact, and
they emphasize the state variables. We will develop techniques to reduce each representation to
a single transfer function. Again, it must be emphasized that these methods are typically used
as described. As we shall see, however, either method can be used for frequency-domain or
state-space analysis and design.
30
Equipment:
1. PC
2. MATLAB® R2009b
Procedure:
The following three methods are available for block diagram reduction.
1. Solution via series, parallel and feedback commands.
i. Series (G1, G2) For cascade connection

ii. Parallel (G1, G2) For parallel connection


iii. Feedback (G, H sign) For feedback connection
2. Solution via Algebraic Operation
G( s)
i. Ge ( s)  For Feedback Connection
1  G( s)  H (s)

ii. Ge (s)  G1 (s)  G2 (s) For Parallel Connection

iii. Ge (s)  G1 (s)  G2 (s) For cascade Connection

Experiment:

Prelab:
1
1) Find the equivalent transfer function of three cascaded blocks, G1(s) = , G2(s)
s +1
1 𝑠+3
= , and G3(s) = .
s +4 𝑠+5

1
2) Find the equivalent transfer function of three parallel blocks, G1(s) = , G2(s)
s +4
1 𝑠+3
= , and G3(s) = .
s +4 𝑠+5

3) Find the equivalent transfer function of the negative feedback system of figure below
s+1 𝑠 +3
if G(s) = , and H(s) = .
s(s+2) 𝑠 +5

31
Lab:

1) Using Simulink set up the cascade system of Prelab 1 and the equivalent single block.
Make separate plots of the step response of the cascaded system and its equivalent
single block. Record the values of settling time and rise time for each step response.

2) Using Simulink set up the parallel system of Prelab 2 and the equivalent single block.
Make separate plots of the step response of the parallel system and its equivalent
single block. Record the values of settling time and rise time for each step response.

3) Using Simulink set up the negative feedback system of Prelab 3 and the equivalent
single block. Make separate plots of the step response of the negative feedback system
and its equivalent single block. Record the values of settling time and rise time for
each step response.

Postlab:
1) Using your lab data, verify the equivalent transfer function of blocks in cascade.
2) Using your lab data, verify the equivalent transfer function of blocks in parallel.
3) Using your lab data, verify the equivalent transfer function of negative feedback
systems.

Learning Outcomes:
At the end of this experiment student will learn
1. Reduce a block diagram of multiple subsystems to a single block representing the
transfer function from input to output.
2. Find the transfer function of multiple subsystems using MATLAB commands.
3. Analyze and design transient response for a system consisting of multiple subsystems.

Questions:
1. Name three basic forms for interconnecting subsystems.
2. Name five representations of systems in state space.
3. Name the four components of a block diagram for a linear, time-invariant system.

32
Lab-06: Stability of a System
Pre-Requisite:
1. Chapter No 6 (Norman S Nise)
2. Hands on experience on Simulink and MATLAB Programming
Objective:
To evaluate the stability of linear time invariant system by calculating the root location of the
denominator of the closed loop transfer function.
Theory:
Stability is the most important system specification. If a system is unstable, transient response
and steady-state errors are moot points. An unstable system cannot be designed for a specific
transient response or steady-state error requirement. What, then, is stability? There are many
definitions for stability, depending upon the kind of system or the point of view. In this section,
we limit ourselves to linear, time-invariant systems. Computer can be used to determine the
stability by calculating the root locations of the denominator of the closed-loop transfer
function. Today some hand-held calculators can evaluate the roots of a polynomial. There is,
however, another method to test for stability without having to solve for the roots of the
denominator.
Equipment:
1. PC
2. MATLAB® R2009b
Experiment:
Prelab:
1. Find the equivalent transfer function of the negative feedback system of Figure below
if:
33
𝐾
G(s) = and 𝐻 𝑠 = 1
𝑠 𝑠 +2 2

2. For the system of Prelab 1, find two values of gain that will yield closed-loop, over-
damped, second-order poles. Repeat for under damped poles.

3. For the system of Prelab 1, find the value of gain, K that will make the system critically
damped.

4. For the system of Prelab 1, find the value of gain, K that will make the system
marginally stable. Also, find the frequency of oscillation at that value of K that makes
the system marginally stable.

5. For each of Prelab 2 through 4, plot on one graph the pole locations for each case and
write the corresponding value of gain, K, at each pole.
Lab:
1. Using Simulink set up the negative feedback system of Prelab 1. Plot the step response
of the system at each value of gain calculated to yield over-damped, under-damped,
critically damped, and marginally stable responses.

2. Plot the step responses for two values of gain, K, above that calculated to yield
marginal stability.
1
3. At the output of the negative feedback system, cascade the transfer functionG1(s) =𝑠 2 + 4
and Set the gain, K, at a value below that calculated for marginal stability and plot the
step response. Repeat for K calculated to yield marginal stability.

Postlab:

1. From your plots, discuss the conditions that lead to unstable responses.

2. Discuss the effect of gain upon the nature of the step response of a closed-loop system.

Learning Outcome:
At the end of this experiment student will
1. Understand the significance of pole and zeros location in the stability of a system
2. Understand that how the pole and zero location will affect the stability
3. Learn the method used in checking the stability of LTI system
34
Question:
1. What is the range of K for a stable operation?
2. What is the significant effect of using a PI controller on the system response?
3. What part of the output response is responsible for determining the stability of a linear
system?
4. Where do system poles have to be to ensure that a system is not unstable?
5. What does the Routh-Hurwitz criterion tell us?

35
Lab – 07 Steady State Error
Pre-Requisite:
1. Student must be familiar with the features of MATLAB i.e. SIMULINK.
2. Student must read the chapter no 7 of the text book ‗Norman S Nice‘.

Objective:
1. To become familiar with Steady state errors and Static error constants.

2. To know, how this Error will be verify by using SIMULINK.

Theory:
Steady State Error is the difference between input and output at t=∞ or at large value of
time, when our system waveform reaches steady state. It is represented by e (∞).

For finding steady state error of a particular system, three inputs are used i.e.

1. Step input
2. Ramp input
3. Parabola input

Steady state error can be calculated of only Stable systems. Unstable system‘s steady
state error does not exist as there is no steady state in systems.

Steady state error can be improved by multiplying the system with integration (1/sⁿ)
where n=1, 2, 3…

Equipment:
1. PC
2. MATLAB® R2009b

Experiment:
To verify the effect of input waveform, loop gain, and system type upon steady-state error

Prelab:
1. What system types will yield zero steady-state error for step inputs?

2. What system types will yield zero steady-state error for ramp inputs?

3. What system types will yield infinite steady-state error for ramp inputs?

36
4. What system types will yield zero steady-state error for parabolic inputs?

5. What system types will yield infinite steady-state error for parabolic inputs?

6. For the negative feedback system of Figure below:

K (s+6)
Where G(s) = and H(s) = 1, calculate the steady-state error
(s+4)(s+7)( s+9)(s+12)

In terms of K for the following inputs: 5u(t), 5tu(t), and 5t2u(t).


K (s+6)(s+8)
7. Repeat Prelab 6 for G(s) = and H(s) = 1.
s(s+4)(s+7)( s+9)(s+12)

K (s+1)(s+6)(s+8)
8. Repeat Prelab 6 for G(s) = and H(s) = 1.
𝑠 2 (s+4)(s+7)( s+9)(s+12)

Lab:
1. Using Simulink set up the negative feedback system of Prelab 6. Plot on one graph
the error signal of the system for an input of 5u(t) and K = 50, 500, 1000 and 5000.
Repeat for inputs of 5tu(t) and 5t2u(t).

2. Using Simulink set up the negative feedback system of Prelab 7. Plot on one graph
the error signal of the system for an input of 5u(t) and K = 50, 500, 1000 and 5000.
Repeat for inputs of 5tu(t) and 5t2u(t).

3. Using Simulink set up the negative feedback system of Prelab 8. Plot on one graph
the error signal of the system for an input of 5u(t) and K = 200, 400, 800and 1000.
Repeat for inputs of 5tu(t) and 5t2u(t).

Postlab:
1. Use your plots from Lab 1 and compare the expected steady-state errors to those
calculated in the Prelab. Explain the reasons for any discrepancies.

2. Use your plots from Lab 2 and compare the expected steady-state errors to those
calculated in the Prelab. Explain the reasons for any discrepancies.

37
3. Use your plots from Lab 3 and compare the expected steady-state errors to those
calculated in the Prelab. Explain the reasons for any discrepancies.

Learning Outcomes:
1. The students will be able to understand following thing at the end of lab session.
2. Understand the steady state error of different systems.
3. Understand to find the static error constants of a system to step, impulse and
parabolic input.

38
Lab–8: Root Locus

Pre-Requisite:
1. Students should be familiar with the open loop poles and closed loop poles and MATLAB.
2. Students must be read chapter no 8 of the text book ‗Norman S Nise‘.

Objective:
1. To know, how the root locus (path of roots) produce when value of gain (k) changes.

Theory:
In control theory and stability theory, root locus analysis is a graphical method for examining
how the roots of a system change with variation of a certain system parameter, commonly
gain within a feedback system. This is a technique used as a stability criterion in the field
of control systems developed by Walter R. Evans which can determine stability of the
system. The root locus plots the poles of the closed loop transfer function in the complex s
plane as a function of a gain parameter. The path that closed loop poles attain when the
value of k changes is called Root Locus. The path of root locus can be of any shape. It
starts with the open loop pole and ends at the open loop zero. Root locus effects on
stability, steady state error. Here k changes from 0 to ∞.At k=o the position of poles of
open loop system and closed loop system is same but by increasing k, the position of
closed loop pole will change only.

Procedure:
1. First of all open the MATLAB i.e. m.file.

2. Then write the code of open loop transfer function.

3. Then use a command rlocus (open loop T.F.).

4. This command will show the path of roots.


5. Then by the analysis of graph showed, we can see various things like %OS, gain (k) etc at
any point of graph.

39
Lab Task:
1. Find the loop gain and poles position by plotting the root locus of the following system
with negative feedback.

K
G( s) 
s  10s  1
2

Fig No.10.1 Block Diagram of the closed loop system

Table: Value of Gain w.r.t Pole location

K Pole 1 Pole 2 K Pole 1 Pole 2

40
Root Locus:

2. Design the K in the following system to yield1.52% overshoot. Also estimate the settling
time, peak time and steady state error if second order approximation is valid.

Block Diagram of the closed loop system

Calculation of K and Time Response

Case Close Loop Poles Close Loop Gain Third C.L.P Ts Tp Kv

41
Experiment:

Prelab:
𝐾(𝑠+1.5)
If the open-loop system is G(s) =𝑠(𝑠+0.5)(𝑠+10) , estimate the percent overshoot at the following
values of gain, K: 20, 50, 85, 200, and 700

Lab:
1. Using Matlab‘s SISO Design Tool, set up a negative unity feedback system with G(s)
𝐾(𝑠+6)
= to produce a root locus. For convenience, set up the zero to -6 on the
𝑠(𝑠+0.5)(𝑠+10)

resulting root locus. Print the root locus for the zero at -6.Move the zero to the following
locations and print out a root locus at each location: -2, -1.5, -1.37, and -1.2.
2. Using Matlab‘s SISO Design Tool, set up a negative unity feedback system with G(s)
𝐾(𝑠+1.5)
= to produce a root locus. Open the LTI Viewer for SISODesign Tool to
𝑠(𝑠+0.5)(𝑠+10)

show step responses. Using the values of K specified in Prelab, record the percent
overshoot and settling time and print the root loci and step response for each value of K.

Postlab:

Make a table comparing percent overshoot and settling time from your calculations in Prelab
and your experimental values found in Lab 2. Discuss the reasons for any discrepancies.
What conclusions can you draw?

Learning Outcome:
1. Use the root locus to design a parameter value to meet a transient response
specification for systems of order 2 and higher.
2. Find the root sensitivity for points along the root locus.
Questions:

42
1. Briefly describe how the zeros of the open-loop system affect the root locus and
the transient response?
2. How would you determine whether or not a root locus plot crossed the real axis?
3. How can you tell from the root locus that the natural frequency does not change
over a region of gain?
4. Briefly describe how the zeros of the open-loop system affect the root locus and
the transient response?

43
Lab -09 Lead Lag Compensation

Pre Requisite:
1. Students must be familiar with the MATLAB control systems tool box.
2. Students must read the chapter 9 of the text book ―Norman S Nise‖.
Objective:
1. Improvement in transient and steady state error via lead and lag
compensators.

Theory:
A lead–lag compensator is a component in a control system that improves an
undesirable frequency response in a feedback and control system. It is a fundamental building
block in classical control theory. Both lead compensators and lag compensators introduce a pole–
zero pair into the open loop transfer function. A system which has one pole and one dominating
zero (the zero which is closer to the origin than all over zeros is known as dominating zero.) is
known as lead network. If we want to add a dominating zero for compensation in control system
then we have to select lead compensation network.

A system which has one zero and one dominating pole (the pole which is closer to origin that all
other poles is known as dominating pole) is known as lag network. If we want to add a
dominating pole for compensation in control system then, we have to select a lag compensation
network.

Equipment:
3. PC
4. MATLAB® R2009b

Experiment: To perform a trade-off study for lead compensation. To design a PI controller


and see its effect upon steady-state error

Prelab:
1. How many lead compensator designs will meet the transient response specifications of a
system?

44
2. What differences do the lead compensators of Prelab 1 make?
3. Design a lead compensator for a unity negative feedback system with a forward transfer
𝐾
function of G(s) = 𝑠 𝑠+3 (𝑠+6) to meet the following specifications: percent overshoot =
20%; settling time = 2 seconds. Specify the required gain, K. Estimate the validity of the
second-order approximation.
4. What is the total angular contribution of the lead compensator of Prelab 3?
5. Determine the pole and zero of two more lead compensators that will meet the
requirements of Prelab 3.
6. What is the expected steady-state error for a step input for each of the lead compensated
systems?
7. What is the expected steady-state error for a ramp input for each of the lead compensated
systems?
8. Select one of the lead compensator designs and specify a PI controller that can be
cascaded with the lead compensator that will produce a system with zero steady state
error for both step and ramp inputs.

Lab:
1. Using the SISO Design Tool, create the design in Prelab 3 and plot the root locus, step
response, and ramp response. Take data to determine the percent overshoot, settling time,
and step and ramp steady-state errors. Record the gain, K.
2. Repeat Lab 1 for each of the designs in Prelab 5.
3. For the design selected in Prelab 8, use the SISO Design Tool and insert the PI controller.
Plot the step response and measure the percent overshoot, settling time, and steady-state
error. Also, plot the ramp response for the design and measure the steady-state error.
4. Plot the step and ramp responses for two more values of the PI controller zero.

Postlab:
1. Make a table showing calculated and actual values for percent overshoot, settling time,
gain, K, steady-state error for step inputs, and steady-state error for ramp inputs. Use the
three systems without the PI controller and the single system with the PI controller from
Lab 3.
2. Itemize the benefits of each system without the PI controller.
3. Choose a final design and discuss the reasons for your choice.

Learning Outcomes:

45
1. To understand the design of lead compensators
2. To understand the design of the lag compensators
3. To design the compensators using root locus techniques.

Questions:
1. Why do we use a phase lag compensators?
2. How can we design the compensator using frequency response?
3. How can we improve the transient response of the system by designing the
compensators?

46
Lab-10: To Design a PD Controller using SISO Tool
Pre-Requisite:
1. Chapter No 8 & 9 (Norman S Nise)
2. Hands on experience on Simulink and MATLAB Programming
Objective:
PID control for magnetic levitation, Inverted Pendulum and Ball & a Beam System
1. Using m-file in MATLAB
2. Using SISO TOOL box of MATLAB
Theory:
PID control (Proportional, Integral and Derivative control) is a widely used control algorithm. It
can be used to control position of an object, temperature of an oven, speed of a car and so on.
Here it is used it to control the position of a magnet in air. The command ―SISO tool‖ opens a
SISO Design GUI for interactive compensator design. This GUI allows you to design a single-
input/single-output (SISO) compensator using root locus, Bode diagram, Nichols and Nyquist
techniques. You can also automatically design a compensator using this GUI.
Equipment:
3. PC
4. MATLAB® R2009b
Procedure:
1. Open the control design GUIs by typing the following in the MATLAB command window
―sisotool‖.
2. Define the control architecture for your system.
3. Specify the plant model and initial guesses for the compensator elements in the control
architecture.
4. Design a compensator using automated tuning, for example PID Tuning
5. Evaluate the system's closed-loop performance.
6. Display specific performance characteristic for your system. Compare values to design
requirements.
7. Refine compensator design using graphical tuning.

47
8. In a design plot, modify the compensator by adding poles, zeros, lead, and lag, for
example. To do this, right-click to add dynamic elements in the controller structure.

a. Add a new pole, for example, by clicking the pole location on the plot.
b. Modify the compensator structure by moving the poles, zeros, and other dynamic
elements directly on the plot.
Task 1:
For the transfer function specified below for Magnetic Levitation System,
77.8421
T.F=
0.0311 s 2 − 30.525
Design a controller which will meet the following requirements
a. Settling Time = 0.2 sec
b. Percentage Overshoot = 10%
Assume controller zero at -23.424

Steps:
1. Find open loop response.
2. Develop the close loop system and find whether changing gain (K) can fulfill the
requirements.
3. If step 2 is unsatisfactory the add zero at location mentioned. Then add pole on real axis
and by hit and trial adjust its position so that the root locus pass through the design point.
4. Simulate your design in Simulink.

Task 2:
For the transfer function specified below for Inverted Pendulum System,
3
T.F=
s 2 − 29.4
Design a controller which will meet the following requirements
a) Settling Time = 0.18 sec
b) Percentage Overshoot = 12.6 %
Assume controller zero at -5.42

48
Steps:
1. Find open loop response.
2. Develop the close loop system and find whether changing gain (K) can fulfill the
requirements.
3. If step 2 is unsatisfactory the add zero at location mentioned. Then add pole on real axis
and by hit and trial adjust its position so that the root locus pass through the design point.
4. Simulate your design in Simulink.

Task 3:
For the transfer function specified below for Ball and a Beam System,
0.7
T.F=
s2
Design a controller which will meet the following requirements
a. Settling Time = 1 sec
b. Percentage Overshoot = 10%
Assume controller zero at -3.10057

Steps:
1. Find open loop response.
2. Develop the close loop system and find whether changing gain (K) can fulfill the
requirements.
3. If step 2 is unsatisfactory the add zero at location mentioned. Then add pole on real axis
and by hit and trial adjust its position so that the root locus pass through the design point.
4. Simulate your design in Simulink.

Postlab:
For all the three experiments, attach the following results/screenshot at your practical notebook:
1. Output graph of step 1.
2. Root Locus diagram of step 2.
3. Root Locus diagram of step 3 and output responses.
4. Block diagram and output response of step 4.

49
Learning Outcomes:

At the end of this experiment student will learn


1. To successfully design P, I, PD, PI, and PID controllers to meet closed‐loop performance
specifications including transient performance and steady‐error.
2. How to use SISO tool to improve the steady state error.
Questions:
1. How to load transfer function in SISO tool?
2. How to set value for different parameters like settling time, % overshoot etc in SISO
tool.
3. How to adjust he axes for suitable view of graph?

50
Lab-11: Designing Controller and Observer in MATLAB.
Pre-Requisite:
1. Student should be familiar of term ―state space‖, Controller, Observer and
MATLAB.
2. Students must read the state space design section of the text book (Norman S
Nise).
Objective:
1. To simulate a system that has been designed for transient response via state-space
controller and observer.
Theory:
In control theory, a state observer is a system that provides an estimate of the internal state of a
given real system, from measurements of the input and output of the real system. It is typically
computer-implemented, and provides the basis of many practical applications, for example
stabilizing a system using state feedback. In most practical cases, the physical state of the system
cannot be determined by direct observation.

Procedure:
1. Make an m. file to calculate the controller gains from the system matrix (F) using the
Command K=acker (F, G, poles).
2. Include L=acker (F‘, H‘, poles)‘ in your m file to find the observer gains.
3. Check the controllability and observability the system by finding the ranks of controllability
and observability matrices respectively.
4. Run your m.file.
5. In SIMULINK design a controller and import the parameters from the workspace

Experiment:
To simulate a system that has been designed for transient response via a state-space controller
and observer.

51
Prelab:

1. Consider the transfer system of the antenna position control below:


1325
TF =
𝑠 (𝑠+1.71)(𝑠+100)
Design a controller for given transfer function of antenna control to yield a 10%
overshoot and a settling time of 1 second. Place the third pole 10 times as far from the
imaginary axis as the second-order dominant pair. Assume that the state variables of the
plant are not accessible and design an observer to estimate the states. The desired
transient response for the observer is a 10 % overshoot and a natural frequency 10 times
as great as the system response above. As in the case of the controller, place the third
pole 10 times as far from the imaginary axis as the observer‘s dominant second-order
pair.
2. What is the controller gain vector for your design of the system specified in the Prelab 1?
3. What is the observer gain vector for your design of the system specified in the Prelab 1?
4. Draw a Simulink diagram to simulate the system. Show the system, the controller, and
the observer using the physical variables specified in the Prelab 1.

Lab:
1. Using Simulink and your diagram from Prelab 4, produce the Simulink diagram from
which you can simulate the response.
2. Produce response plots of the system and the observer for a step input.
3. Measure the percent overshoot and the settling time for both plots.

Postlab:
1. Make a table showing the design specifications and the simulation results for percent
overshoot and settling time.
2. Compare the design specifications with the simulation results for both the system
response and the observer response. Explain any discrepancies.
3. Describe any problems you had implementing your design.

Learning Outcomes:

1. Design a state-feedback observer using pole placement for systems represented in


observer canonical form

52
2. Determine if a system is observable
3. Determine if a system is controllable

Questions:
1. Consider a system with the transfer function

9
G( s) 
s 9
2

a. Find (Fo, Go, Ho) for this system in observer canonical form.
b. Is (Fo, Go) controllable?
c. Compute K so that the closed-loop poles are assigned to s=-3±3j
d. Is the closed-loop system of part(c) observable?
e. Design a full-order estimator with estimator-error poles are =-12±12j
f. Suppose the system is modified to have a zero at -1
9( s  1)
G1 
s2  9
g. Prove that if u=-Kx+r, there is a feedback gain K that makes the closed-loop system
unobservable.
h. Compare the major difference in the transient response of an observer to that of
a controller. Why does this difference exist?

53
Lab – 12: Frequency Response
Pre-Requisite:
1. Chapter no.10 of the text book ‗Norman S Nise ‗.
2. Student should be familiar with the usage of MATLAB.

Objectives:
To examine the relationships between open-loop frequency response and stability, open-loop
frequency response, closed-loop transient response, the effect of additional closed-loop poles and
zeros upon the ability to predict closed-loop transient response.

Theory:
This experiment presents the design of feedback control systems through gain adjustment and
compensation networks from another perspective— that of frequency response. The results of
frequency response compensation techniques are not new or different from the results of root
locus techniques. Frequency response methods, developed by Nyquist and Bode in the 1930s, are
older than the root locus method, which was discovered by Evans in 1948 (Nyquist, 1932; Bode,
1945). The older method, which is covered in this chapter, is not as intuitive as the root locus.
However, frequency response yields a new vantage point from which to view feedback control
systems. This technique has distinct advantages in the following situations:
a. When modeling transfer functions from physical data.
b. When designing lead compensators to meet a steady-state error requirement and a
transient response requirement.
c. When finding the stability of nonlinear systems.
d. In settling ambiguities when sketching a root locus.

Equipment:
1. PC
2. MATLAB® R2009b

Experiment:
Prelab:
1. Sketch the Nyquist diagram for a unity negative feedback system with a forward transfer
𝐾
function of G(s) = . From your Nyquist plot, determine the range of gain, K,
𝑠 𝑠+2 (𝑠+10)

54
for stability.

2. Find the phase margins required for second-order closed-loop step responses with the
following percent overshoots: 5%, 10%, 20% and 30%.

Lab:
1. Using the SISO Design Tool, produce the following plots simultaneously for the system
of Prelab 1: root locus, Nyquist diagram, and step response. Make plots for the following
values of K: 50, 100, the value for marginal stability found in Prelab 1, and a value above
that found for marginal stability. Use the zoom tools when required to produce an
illustrative plot. Finally, change the gain by grabbing and moving the closed-loop poles
along the root locus and note the changes in the Nyquist diagram and step response.
2. Using the SISO Design Tool, produce Bode plots and closed-loop step responses for a
𝐾
unity negative feedback system with a forward transfer function of G(s) = .
𝑠(𝑠+10)2
Produce these plots for each value of phase margin found in Prelab 2. Adjust the gain to
arrive at the desired phase margin by grabbing the Bode magnitude curve and moving it
up or down. Observe the effects, if any, upon the Bode phase plot. For each case, record
the value of gain and the location of the closed-loop poles.
𝐾
3. Repeat Lab 2 for G(s) = .
𝑠 (𝑠+10)

Postlab:
1. Make a table showing calculated and actual values for the range of gain for stability as
found in Prelab 1 and Lab 1.
2. Make a table from the data obtained in Lab 2 itemizing phase margin, percent overshoot,
and the location of the closed-loop poles.
3. Make a table from the data obtained in Lab 3 itemizing phase margin, percent overshoot,
and the location of the closed-loop poles.
4. For each Postlab task 1 to 3, explain any discrepancies between the actual values
obtained and those expected.

Learning Outcomes:
1. Convert a transfer function to state space.
2. Convert a state-space representation to a transfer function.
3. Line arise a state-space representation.

55
Lab-13: Magnetic Levitation system
Pre-Requisite:
1. Chapter No 9 (Norman S Nise)
2. Hands on experience on Simulink and MATLAB Programming
Objective:
1. Mathematical modeling of magnetic levitation system.
2. To familiar the students with the magnetic levitation system.
3. How the gains of PID affect the magnetic levitation system behavior.

Theory:
Magnetic levitation is a method of levitating a metallic object against the gravity using them a
genetic force. This can be achieved either by them a genetic repulsion or magnetic attraction
phenomenon. Permanent magnets can be used forth is purpose but to have proper levitation, a
control over the magnetic force must be there to reduce the external disturbances. That‘s why
most of the systems use electromagnets for levitation and control. Maglev systems have their
applications in especially in Maglev trains, Maglev bearings, Maglev in wind turbine &
Research works in cell growth related to microbiology.

56
The GML control system is a platform for the research of magnetic levitation technology. It is a
typical suction levitation system; the system configuration is shown in below Figure:

When current go through the winding, electromagnetic force F will be generated. By controlling
the current in the electromagnet winding to balance the steal ball gravity force mg by magnetic
force, the steal ball will be levitated in the air. Closed loop control is required for the stability
and anti-interference. The distance x from the steal ball to electric magnet is detected by sensor
system composed of light source and light sensor. To enhance the performance, the speed of the
distance variance can also be considered. The control current is the input for magnetic levitation
control object. The transfer function specified below for Magnetic Levitation System,
77.8421
T.F = 0.0311s2− 30.525

Procedure:
Root Locus Real Time Control Experiment
Please install Googol MATLAB real control software before experiment. Details please refer to
GML system installation manual.
1) Open MATLAB and Simulink as follow:

57
2) Open GML system root locus control interface.
(Enter MATLAB Simulink real time control toolbox ―Googol Education Products‖, open ―Root
Locus Control Demo‖ in ―Magnetic Levitation System\Root Locus Experiments‖).

3) Click― ‖to build, after successful build there will be information notice in MATLAB command
window as follow (If the control interface structure is not changed, not further build is needed after
run once):

4) If not successful, please refer to Googol Technology MATLAB Real Time Control Software User
Manual to find out the reason.
5) Select external mode ―External‖ and click― ‖to connect;

5) Click ― ‖to run;

6) When program is running, the electromagnetic force will be detected around the electromagnet.

58
7) Put the steal ball to the expected position under electromagnet by hand. When the program starts
to run, loosen the ball gradually.
8) Add ―Scope‖ to view the experiment data:

9) Double click ―Manual Switch‖ to switch controller, observe the experiment data and record. The
system response under certain disturbances can be observed:

10) Users can also save the experiment data as file or output to MATLAB ―Workspace‖ as follow.
Details please refer to MATLAB references.

11) Compare the experiment data with simulation result.

12) Users may also use other root locus methods for the controller design.

Learning Outcomes:
At the end of this experiment student will learn
1. Use the root locus to design cascade compensators to improve the steady-state error.
2. Use the root locus to design cascade compensators to improve the transient response.
3. Use the root locus to design cascade compensators to improve both the steady-state error
and the transient response.
Questions:
1. What kind of compensation improves the steady-state error?
2. What kind of compensation improves transient response?
3. What kind of compensation improves both steady-state error and transient response?
4. Cascade compensation to improve the steady-state error is based upon what pole-zero
placement of the compensator? Also, state the reasons for this placement.

59
Lab-14: Inverted Pendulum
Pre-Requisite:
1. Capability of handling GUI based software
2. Basics of Inverted Pendulum
Objective:
1. Hardware setup is used to teach physically the basis of control engineering
2. Overview to Inverted Pendulum Control Module

Experiment Purpose for Automatic Control Theory


The Automatic Control Theory is the core fundamental course for the major of Automatic
Control and compulsory course for the motor related majors, and it is one of the most effective
ways to master the methods of control system analysis and design.

The main purpose of this experiment is to, through experiment, further the understanding of the
basic concept of automatic control theory, get familiar with and master the analysis and design
method of control system, and know such commonly-used engineering software as MATLAB
and LabView etc.

This experiment, with the object of the linear 1-stage inverted pendulum-typical control theory
experiment equipment; aims to have the student understand and master the basic principle and
application method for automatic control theory through the control of pendulum bar angle and
cart's position. This experiment covers the root locus analysis and control of Inverted Pendulum
System.

The linear 1-stage inverted pendulum system may be abstracted into a system composed of cart
and uniform bar after the ignorance of air resistance and various friction forces, and it is shown
as below:

The transfer function specified below is for Inverted Pendulum System,

60
3
T.F = s2− 29.4

Procedure:
1) Switch on the power button on the electric cabinet of the inverted pendulum, then place the
inverted pendulum cart at the mid of the guide rail.
2) Open file ―Root_Locus_Control.mdl‖ in MATLAB/Current Folder, then the real control page
as shown in Figure below will pop up.

3) Click on ― ‖to start real-time workshop build procedures, and prompt message will pop up
in the MATLAB command window upon the completion of such procedure (this procedures
shall not repeat if no modification occurs to the control page structure):

61
4) Click on ― ‖icon to link the programs, when the buzzing generated from the motor after
servo would be heard.
5) Click on ― ‖button to operate the program, then manually place the pendulum bar to the
straight up position, when the program would enter control state. Hold the pendulum bar and
maintain it at the mid of the guide rail.
6) Double click on the ―Step Switch‖ to stimulate the input signal to the 0.05m/s2end, hold the
pendulum bar still for 10s, and then observe the motion with hands off.
7) Click on button to stop the program, and double click on the "Step" and "Angle"
oscilloscopes to observe the response of system output in Angle when the signal in Step in
switched into 0.05m/s2.

Learning Outcomes:
At the end of this experiment student will learn
1. Use the root locus to design cascade compensators to improve the steady-state error.
2. Use the root locus to design cascade compensators to improve the transient response.
3. Use the root locus to design cascade compensators to improve both the steady-state error
and the transient response.
Questions:
1. What kind of compensation improves the steady-state error?
2. What kind of compensation improves transient response?
3. What kind of compensation improves both steady-state error and transient response?
4. Cascade compensation to improve the steady-state error is based upon what pole-zero
placement of the compensator? Also, state the reasons for this placement.

62
Lab-15: Step Response of Analog and Digital Motor Control Module

Pre-Requisite:
3. Capability of handling GUI based software
4. Basics of DC Motor
Objective:
3. Hardware setup is used to teach physically the basis of control engineering
4. Overview to Analog and Digital Motor Control Module
Theory:
Practical exercises are an integral part of the course and waveforms displayed on the PC are used
to illustrate parts of the course. A PC with the virtual control laboratory software and control
laboratory input/output interface is used to replace a number of different traditional instruments,
eliminating the need for separate signal generator, oscilloscope, millimeter or controller. In this
first chapter, you will refresh your knowledge of the DC motor which is used as the ‗plant‘ and
familiarize yourself with the interface board and the operation of the software.
Equipment:
1. MS15 DC Motor Module
2. AS3 Command Potentiometer
3. CLIO Interface Module
4. Virtual Control Laboratory Software
Procedure:
1. All the experiments in the Analog section of this course are physically wired in the same
way.
2. Different configurations are achieved using data signal paths in the computer.
3. Figure below shows the wiring between the MS15 DC motor module, the CLIO
Interface Module and the AS3 Command Potentiometer.
4. The AS3 Command potentiometer is used to provide a manually generated input signal.
It is calibrated in degrees to correspond with the calibrated disc on the output shaft of the
MS15 DC Motor Module.

63
5. CLIO Interface module is used to interface hardware setup with PC by mean of USB
port
6. The system should be wired with the standard analog system connections as shown in
figure below:

Figure: Wiring Diagram: Analog and Digital Motor Control Module

7. Start the VCL software and Load setup | CA06PE03.


8. Adjust the parameters as shown in table below:

64
9. Disengage the output potentiometer then switch power ON and Enable the motor.
The output velocity trace (purple) on the PC shows what is called the Step
Response (what happens when there is a step change in the input).
10. The purple trace is the Step Response of motor speed. Observe that the speed does
become constant after a time but initially lags behind the input. Expand the time scale by
decreasing the Rate to 10msec and click the x2 time multiplier. Click Freeze. This
freezes the display at the end of the current cycle. The Frozen' control box appears when
the cycle ends. The motor can now be disabled and measurements made from the screen.
11. You are going to measure the Gain and Time Constant which characterize the motor.
Figure overleaf shows the measurements to be made. The measurement facility is
activated from the Frozen control box by clicking Time ON. The measurement lines and
value boxes appear on the graph as:

12. Steady State Response


Input Span:
Input span is the amount by which the input changes.

 Select channel 1/Input/Dark Blue. The scale will show the input
channel scale.

65
 Select Line A by clicking within the A box. The box and the line will
change color.
 Move the mouse until the pointer is pointing at the upper dark blue
trace in the graph area. Click the left button and line A will move to
where you are pointing. You can click again if you did not position the
line exactly the first time. The A box indicates the level of the line.
 Click in the B box and, in the same way, position line B over the lower
part of the dark blue trace.
 The difference between A and B is the Input Span.
Input Span = A1 - B1 =

Output Span:

 Output span is the amount by which the output changes in response to the
input changes.
 Change to channel 4/Velocity/purple and repeat the measurements on the
purple trace. Line B should be positioned where the trace can be seen
starting at the left of the graph.
Output Span = A4 - B4 =

Gain:

 Gain, or Magnitude Ratio or Amplitude Ratio, is the ratio between


input and output when they have reached a steady state. The spans have
been measured when the output has reached a steady state so:

Gain= Output Span/Input Span= (A4-B4) / (A1-B1)=

Transient Response:

There are a number of ways to characterize the transient response. These come under the
general heading of 'Rise Time'. The most popular method is 63% Method.
 63% Method
Another time measurement is the time it takes for the transient to change
by 63%.vFrom above, the output span = A4 - B4. The 63% level is then:
B4 + 0.63 (A4 - B4) = _________ volts

Use the values you have measured to calculate the 63% level for you experiment.
13. Click the A box to highlight Line A and move it to the 63% level. You may not be able
to set the line exactly owing to the screen resolution. Expanding the scale using the
Magnify and Shift controls may help. The traces required being redrawn using Freeze |
Redraw option after Magnify or Shift are changes.
14. Now click the Time box and move the time line to the time at which the velocity trace
reaches its 63% level. The time shown is the Time Constant measured by the 63%
method.

66
Time Constant t3 = ___________seconds

15. Fill the table below:

16. Enter your model gain and time constant into Table below:

Learning Outcome:

At the end of this experiment students will learn

1. How to operating analog and digital motor control module


2. How to operate Virtual control laboratory software
Question:
1. What is purpose of using command potentiometer used in module?
2. What is primary difference between VCL and MATLAB?
3. What is purpose of DAC in CLIO interface module?

67
Lab-16: Proportional Derivative and Integral Control for Analog and
Digital Motor Module
Pre-Requisite:
1. Chapter No 9 (Norman S Nise)
2. Hands on experience on motor module and VCL software
Objective:
To study Proportional speed control on motor module
Theory:
Position control using a DC motor is one of the major applications of control. Many of the
control solutions were developed for this type of problem – mainly to do with the aiming of
artillery weapons by the military. There are many more peaceful applications for this type of
control. The DC motor is also called a Servomotor and this branch of control is called
servomechanisms.

Three-Term or PID Control


Servo control grew out of the need to control the targeting of artillery. Three-term control is a
few decades older and was developed to control petrochemical plant. The original three-term
controller (the Brown Pneumatic Controller/Recorder) was an intrinsically safe controller which
could be used in hazardous locations. Examples of the modern version (manufactured by
Honeywell) are still in use today. However, most three-term controllers are now electronic in
operation but the terminology remains. Although the underlying mathematics is the same for
three-term and servo control, sometimes different names are used for the same concept.

68
The way in which the pneumatic controller worked placed the integral and derivative actions in
parallel with the proportional element resulting in a three terms Proportional, Integral and
Derivative (or PID) controller in the forward path of the control loop. Figure below opposite
shows how this is configured.

Equipment:
1. MS15 DC Motor Module
2. AS3 Command Potentiometer
3. CLIO Interface Module
4. Virtual Control Laboratory Software
Procedure:
1. Proportional Control
Start VCL and load CA06PE09

 Set Integral time constant (Itc) Off and Derivative time constant (Dtc) to
0. The controller is now proportional only.
 The proportional control is marked PB. This stands for Proportional
Band. Proportional Band is the inverse of gain. When expressed as a

69
percent, %PB = 100/Kc. This nomenclature is a result of the origins of PID
control.
 Set PB to 100% (KC = 1). Switch on the system. A considerable error can
be seen between the input (ch1 dark blue) and the velocity (ch4
purple).Since output will be K/(1+K) and K = Kc × Kp , and KP is close
to 1, the error will be around 50%.
 Increase the controller gain to 2.5 by setting PB to 40%. Observe that the
error has been reduced but is still considerable. You can also observe that
the response time has decreased indicating that the system has speeded up.
 Decrease the PB to 4% (controller gain = 25). As the gain is increased, the
error reduces but the drive signal and the output get increasingly noisy.
 Proportional Band on its own does not give adequate control. There is
always an error and increasing the gain to reduce the error causes the plant
to run rough.
2. Integral Control
 Position control of the servo did not have a steady state error to a step input because
of the natural integration between velocity and position. It therefore seems that the
way to achieve zero steady state error is to have an integrator in the forward loop.
 The pneumatic controller placed the integrator in parallel with the proportional band.
It was found that this configuration gave a more stable response than having the
integrator in series with the proportional element.
 Decrease the input Level to 30% and set the PB to 40%. Now set the Integral time
constant (Itc) to 1 second and click the On/Off box to bring in the Integral controller.
Click channel 7 ON. Observe that, during the positive step, the output of the integral
term (channel 7 yellow) now ramps upward with time as the error is integrated. This
pushes the output closer to the required value.
 Decrease the Integral time constant until a good response is obtained. This should
occur when the Integral time constant is of the order of 0.1s. The Integral action has
removed the steady state error.

If the integral goes off scale and the system will not respond, click the Itc to Off then back to
On. This resets the integrator.

The Integral time constant (or Integral Time) sets the response speed of the integrator. In
some texts and installations, Integral Gain is used instead of Integral Time. Integral Gain is
the inverse of Integral Time - the shorter the Integral Time, the higher the Integral Gain.

Although adding an integrator in this way does make the system more prone to oscillation,
the closed loop system does not oscillate as readily as did the position system since the
integrator in parallel with the proportional gain creates a dampening effect rather like that
introduced by velocity feedback. As a result, many plants can be controlled by just the two
terms, P+I.

3. Derivative Control

70
Velocity Feedback was introduced to stabilize the position servo system. Since velocity is the
rate of change (or the derivative) of position, velocity feedback can also be termed derivative
feedback so derivative action may be required to stabilize the system.

The DC Motor is rather a simple system as it can be represented by a first order lag. As a
result, the test rig being used does not exhibit the characteristics that make it necessary to use
derivative action. The effect of derivative action can be seen on a simulated system.

Make a note in your workbook of the PI settings you have determined for the DC Motor
system.

PB = __________% Itc =___________ S

Change the Plant to Process. The computer is now simulating a more complicated plant. Set
PB = 30% and Itc = 0.24s. The Output should be showing an oscillatory transient. Increase
the Derivative time constant (Dtc) until only a small overshoot can be seen. Derivative action
works in a way similar to Velocity Feedback acting to stabilize the system - in theory. The
plant being simulated is more like real process than the simple DC motor.
Make a note in your workbook of the derivative setting you have determined.

Dtc =__________ S

Derivative Time Constant and Derivative Gain are directly related.


A problem with Derivative action that does not appear in the simulation is that high
frequencies are amplified so that high frequency noise in the output can lead to
deterioration in performance.
Change Plant back to Analog, restore the PB and Itc settings to those recorded earlier
and set Dtc to Off (0s). Reduce Itc by 0.02s. This should introduce some overshoot.
Increase Dtc and observe the effect on the output and drive signals. With Dtc above
0.20s, the noise will dominate making the derivative action ineffective. Reset Dtc to Off
(0s).

Measures can be taken to improve derivative action. It is actually impractical to build a


pure differentiator - that would require infinite energy. Also, due to the lags in the plant,
the plant does not change fast so the action of the differentiator can be limited to the
expected rate of change of the output. This can be done in two ways. The differentiator is
replaced with a high pass (or lead) filter which acts as a differentiator at low frequencies
but not at high. Also, a low pass filter can be inserted into the derivative control path to
filter out the high frequency noise from the tacho-generator.

4. Tuning a PID Controller


If a mathematical analysis of a plant with three-term control is made, it is not at all obvious
how the controller values can be calculated for a particular performance criterion.

Setting the values for PB, Itc and Dtc for a plant can be done in a number of ways and this is
called Tuning the Controller.

71
Many modern controllers are implemented using fast microprocessors. The more expensive
models can use the normal operation of the plant to detect the error and adjust the parameters
to suit the operating conditions.

Older plant may require the parameters to be set manually. This can be done by trial and
error which is fine when the time constant is short, as in the experiments you are performing,
but is tedious or impractical when the time constant is measured in minutes or hours. There is
a simple rule-of-thumb procedure called Ziegler - Nichols but care must be taken with this as
plant managers do not like engineers opening the loop and putting signals onto the plant.

To determine the PID settings using the Ziegler - Nichols tuning procedure, start by taking an
open-loop step response of the system. This will have the form shown in Figure below:

72
Select Controller | Open Loop and Plant | Process. The signal generator should be set to
Signal | Step, Level | 30% and Rate | 10 msec. Once a step had be drawn, freeze the picture
and make the measurement - as detailed overleaf -required for the tuning calculation. Enter
each of the measurements into your workbook.
1. Measure the output span So – the difference between the initial value and steady state
value of the output.
Output span So = __________ Volts
2. Measure the input span – the difference between the initial value and steady state value of
the input.
Input span S1= __________ Volts
Line of Maximum Slope – Time Constant τ
3. Using line B and slope controls, determine the line of maximum slope. It might be
helpful to change channel 4 Magnify to ½ and time to ×2.

4. The time constant τ is the time the line of maximum slope takes to travel from the initial

output value to the final output value. τ =__________ sec


Time Delay T
5. The time delay T is the time at which the line of maximum slope crosses the initial value
line. T = _______ sec
Controller Settings
The controller setting is then calculated from the table below.
Table: Ziegler – Nichols Setting
Controller type Gain Kc Integral TI Derivative TD
Si τ
P only ×
so T
Si τ 3.3 × T
P+I 0.9× so × T
Kc
Si τ 2×T
P+I+D 1.2× so × T 0.5× T × Kc
Kc

6. For our PID example, calculate Kc (and hence PB %), TI and TD and enter the values in
Table 16.2.

Table 16..2 Controller settings from Ziegler – Nichols Test


Controller type Gain Kc PB% Integral TI Derivative TD
P+I+D

73
Unfreeze the display, restore the controller to PID and use the values calculated as the
controller settings.

Learning Outcome:
At the end of this experiment, students will learn
1. How to physically realize the effect of proportional controller on plant.
2. How the transient is being affected by employing the proportional controller.
3. Hands on tuning of PID controller on motor hardware setup.
4. Effect of integral and derivative and proportional control on transient performance of
plant separately.

Questions:
1. Which of the following is not true? In a position control system, the steady state position
error is zero because:
a) The low frequency gain of an integrator is high.
b) The error is integrated until there is no error.
c) Input position is compared with output position to produce an error signal.
d) The output voltage is added to the input voltage to create the motor drive.
2. As the proportional gain is increased, the transient response:
a) Slows down.
b) Does not change.
c) Speeds up but is not oscillatory.
d) Speeds up but is oscillatory.
3. Compared to an open loop system, closing the loop under changing load conditions:
a) Has no effect.
b) Eliminates change in steady state error.
c) Eliminates steady state error.
d) Increase the steady state error.
4. A PID controller is introduced to:
a) Increase speed of response by decreasing Proportional Band
b) Eliminate steady state error by introducing Integral action
c) Increase stability by introducing Derivative action

74
d) All of the above
5. A parallel PID controller has the settings – PB = 30%, TI = 0.5 minutes, TD = 0.24
minutes. The equivalent settings for a serial PID controller would be?
a) PB = 30%, ti = 0.167 minutes, td = 0.72 minutes.
b) PB = 30%, ti = 0.67 minutes, td = 0.07 minutes.
c) PB = 90%, ti = 0.67 minutes, td = 0.72 minutes.
d) PB = 30%, ti = 0.167 minutes, td = 0.07 minutes.

75

Vous aimerez peut-être aussi