You are on page 1of 40

Medi-Caps University

Practical File
Control System

Submitted By : Submitted To :
Name: Purvansh Jain Prof. Vinit Gupta
Enrollment No. : EN18EL301133
PRACTICAL 1
1. Objective (s):
a. To study about various software tools used for analyzing  the open loop response of the control
system with controller
b. To learn the fundamentals of MATLAB and octave online (a cloud supported MATLAB)

 2. Theory:
  
Introduction

The MATLAB high-performance language for technical computing integrates computation, visualization,
and programming in an easy-to-use environment where problems and solutions are expressed in familiar
mathematical notation. Typical uses include

 Math and computation


 Algorithm development

 Data acquisition

 Modeling, simulation, and prototyping

 Data analysis, exploration, and visualization

 Scientific and engineering graphics

 Application development, including graphical user interface building

MATLAB is an interactive system whose basic data element is an array that does not require dimensioning.
It allows you to solve many technical computing problems, especially those with matrix and vector
formulations, in a fraction of the time it would take to write a program in a scalar noninteractive language
such as C or Fortran.

The name MATLAB stands for matrix laboratory. MATLAB was originally written to provide easy access
to matrix software developed by the LINPACK and EISPACK projects. Today, MATLAB engines
incorporate the LAPACK and BLAS libraries, embedding the state of the art in software for matrix
computation.

MATLAB has evolved over a period of years with input from many users. In university environments, it is
the standard instructional tool for introductory and advanced courses in mathematics, engineering, and
science. In industry, MATLAB is the tool of choice for high-productivity research, development, and
analysis.

MATLAB features a family of add-on application-specific solutions called toolboxes. Very important to
most users of MATLAB, toolboxes allow you to learn and apply specialized technology. Toolboxes are
comprehensive collections of MATLAB functions (M-files) that extend the MATLAB environment to solve
particular classes of problems. You can add on toolboxes for signal processing, control systems, neural
networks, fuzzy logic, wavelets, simulation, and many other areas

1. The MATLAB System


2. The MATLAB system consists of these main parts:
1. Desktop Tools and Development Environment

This part of MATLAB is the set of tools and facilities that help you use and become more productive with
MATLAB functions and files. Many of these tools are graphical user interfaces. It includes: the MATLAB
desktop and Command Window, an editor and debugger, a code analyzer, browsers for viewing help, the
workspace, and files, and other tools.

3. Introduction to the Desktop

Use desktop tools to manage your work and become more productive using MATLAB software. You can
also use MATLAB functions to perform the equivalent of most of the features found in the desktop tools.
The following illustration shows the default configuration of the  MATLAB desktop. You can modify the
setup to meet your needs.MATLAB

4. Summary of Desktop Tools

The following tools are managed by the MATLAB desktop, although not all of them appear by default when
you first start. If you prefer a command-line interface, you can often use equivalent functions to accomplish
the same result. To perform the equivalent of the GUI tasks in M-files, you must use the equivalent function.
Instructions for using equivalent functions to perform the task are provided with the documentation for each
tool and are typically labeled as Function Alternatives.

Desktop Tool Description

Command History View a log of or search for the statements you entered in the Command Window,
copy them, execute them, and more.
Command Window
Run MATLAB language statements.

Current Directory
Browser  View files, perform file operations such as open, find files and file content, and
manage and tune your files.
Editor
Create, edit, debug, and analyze M-files (files containing MATLAB language
statements).
Figures
Create, modify, view, and print figures generated with MATLAB.

File and Directory View line-by-line differences between two files


Comparisons
Help Browser
View and search the documentation and demos for all your MathWorks
products.

Profiler Improve the performance of your M-files.


Start Button
Run tools and access documentation for all your MathWorks products, and
create and use shortcuts for MATLAB.

Variable Editor. View array contents in a table format and edit the values.

Web Browser View HTML and related files produced by MATLAB.


Workspace Browser
View and make changes to the contents of the workspace.

1. Mathematical Function Library

This library is a vast collection of computational algorithms ranging from elementary functions, like sum,
sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse, matrix, Eigen
values, Bessel functions, and fast Fourier transforms.

The MATLAB language is a high-level matrix/array language with control flow statements, functions, data
structures, input/output, and object-oriented programming features. It allows both "programming in the
small" to rapidly create quick programs you do not intend to reuse. You can also do "programming in the
large" to create complex application programs intended for reuse.

2. Graphics

The external interfaces library allows you to write C and FORTRAN programs that interact with MATLAB.
It includes facilities for calling routines from MATLAB (dynamic linking), for calling MATLAB as a
computational engine, and for reading and writing MAT-files.

3. External Interfaces

MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well as annotating and
printing these graphs. It includes high-level functions for two-dimensional and three-dimensional data
visualization, image processing, animation, and presentation graphics. It also includes low-level functions
that allow you to fully customize the appearance of graphics as well as to build complete graphical user
interfaces on your MATLAB applications.

Introduction of control Toolbox

The Control System Toolbox builds on the foundations of MATLAB to provide functions designed for
control engineering. The Control System Toolbox is a collection of algorithms, written mostly as M-files,
that implements common control system design, analysis, and modeling techniques. Convenient graphical
user interfaces (GUIs) simplify typical control engineering tasks. 

Control systems can be modeled as transfer functions, in zero-pole-gain or state-space form, allowing you to
use both classical and modern control techniques. You can manipulate both continuous-time and discrete-
time systems. Conversions between various model representations are provided. Time responses, frequency
responses, and root loci can be computed and graphed. Other functions allow pole placement, optimal
control, and estimation. Finally, the Control System Toolbox is open and extensible. You can create custom
M-files to suit your particular application.

The Control System Toolbox provides demonstration files that show you how to use the toolbox to perform
control design tasks in various settings. To run these demos, type >>demo

at the MATLAB prompt. This opens the Demos pane in the Help browser. Select Toolboxes and then
Control System to see a list of available demos. Alternatively, if you have the Help browser open, you can
select the Demos pane directly and follow the same procedure. 

In addition, Design Case Studies in the online documentation contains detailed examples of various design
problems.

If you are a new user, this guide, Getting Started with the Control System Toolbox, is written for you.
Specifically, you will learn How to build and manipulate linear time-invariant models of dynamical systems
How to analyze such models and plot their time and frequency responses How to design compensators using
root locus and pole placement techniques 

In addition, this guide discusses model order reduction, linear quadratic Gaussian (LQG) techniques, and
presents examples that show how to use these techniques. 

You may also click Control System Toolbox in help browser to open its product page, which is a roadmap
with links to the Control System Toolbox documentation. The documentation including the following: 

Creating and Manipulating Models:  In-depth information on how to create and manipulate linear models
and linear time-invariant (LTI) arrays, which are data objects that you can use to store collections of linear
models in one variable 

Customization:  Information about setting plot properties, including how to set preferences that persist from
session to session Design Case Studies -- Worked examples, including Kalman filtering and MIMO design

Reliable Computations:  Numerical stability and accuracy issues 

GUI Reference:  Complete descriptions of the LTI Viewer and SISO Design Tool, which are graphical user
interfaces (GUIs) that you can use to analyze systems and design SISO compensators

Functions:  Categorical List (You should read and understand at least 20 functions that are used during
laboratory session).

For example:-
1. How to write and solve matrix using MATLAB 
2. How to plot 2-D plots
3. How to compare 2 or more plots 
4. How to define variables varying with time
5. How to define transfer function
6. How to find impulse, step and ramp response
7. How to find the characteristics of second order system
8. How to find root locus of system
9. How to find bode and nyquist plot of the system
10. How to find stability of system
11. How to find the state model from the given transfer function
12. How to find the transfer function from the given state model

Octave Online:-
Octave Online is a web UI for GNU Octave, the open-source alternative to MATLAB.
MATLAB is probably a lot more powerful than Octave, and the algorithms run faster, but for most
applications, Octave is more than adequate and is, in my opinion' an amazing tool that is completely free,
where Octave is completely free.
In this only command prompt is available to write command and the results are shown after pressing the
“enter” button on same page.

Procedure:-
Make a summary of all the commands that can be used for studying control system with their appropriate
syntaxes and check whether these commands are working in a similar manner on www.octave online.net or
not.
           
PRACTICAL 2
1. Objective (s):
a) To learn how to define transfer function using numerator and denominator polynomial using MATLAB
b) To find the zero pole gain of a system using the transfer function in MATLAB
c) To determine Impulse Response of a given system using MATLAB

2. Theory:

2.1 Transfer Function:-A transfer function is also known as the network function is a mathematical representation,
in terms of spatial or temporal frequency, of the relation between the input and output of a (linear time invariant)
system. The transfer function is the ratio of the output Laplace Transform to the input Laplace Transform assuming
zero initial conditions. Many important characteristics of dynamic or control systems can be determined from the
transfer function.

The transfer function is commonly used in the analysis of single-input single-output electronic system, for instance. It
is mainly used in signal processing, communication theory, and control theory. The term is often used exclusively to
refer to linear time-invariant systems (LTI). In its simplest form for continuous time input signal x(t) and output y(t),
the transfer function is the linear mapping of the Laplace transform of the input, X(s), to the output Y(s).

The general procedure to find the transfer function of a linear differential equation from input to output is to take
the Laplace Transforms of both sides assuming zero initial conditions, and to solve for the ratio of the output Laplace
over the input Laplace.

2.2 Impulse Response:-

The output of the control system measured when input is impulse is called as impulse response of the system.

An impulse signal is a signal whose value changes from zero to infinity in zero time.

Mathematically, the unit impulse signal is represented as given below:

r(t) = δ(t) where

δ(t)=1; t=0 and

=0; t≠0

In the Laplace transform form, R(S)= 1 The impulse response of the given transfer function is obtained as follows:
So the transfer function is the impulse response itself.

3. Software Required:
1) MATLAB version R2016 and above with Control System Tool Box OR
2) www.octaveonline.net (Cloud supported MATLAB Environment)

4. Procedure: Using appropriate MATLAB command


1) Define transfer function using numerator and denominator polynomial for the following set of numerator
and denominator polynomials either in MATLAB or in www.octaveonline.net

a) num=[1], den= [0 1 10] ,

b) num=[1 2], den= [1 5 6],

c) num=[1], den=[1 4 25]

2) Using the obtained transfer functions find zeroes, poles and gain of each of the transfer functions

3) Find impulse response of all the transfer functions

4) Verify the results obtained with theoretical calculations

5. Result: Tabulate the transfer function and their zeroes, poles and gain. Take snap shot of impulse
responses and attach here. The experimental and theoretical results should match with 100% accuracy.
a) num=[1], den= [0 1 10]

b) num=[1 2], den= [1 5 6],

c) num=[1], den=[1 4 25]


COMPARING THE PRACTICAL AND THEORETICAL VALUES OF THE POLES, ZEROES AND
GAIN OF THE SYSTEMS
Funct Practical Theoretical Practical Theoretical Practical Theoretical
Zeroes Zeroes Poles Poles Gain Gain
1/(s+10) No No zeroes -10 -10
zeroes
(s+2) -2 -2 -2, -3 -2, -3
/(s2+5s+6)
1/(s2+4s+25) No No zeroes
zeroes

6. Self Assessment Questions:


1) Define poles and zeroes of a transfer function.

Poles and Zeros of a transfer function are the frequencies for which the value of the denominator and numerator
of transfer function becomes zero respectively. The values of the poles and the zeros of a system determine
whether the system is stable, and how well the system performs.

2) How initial (t=0) and final value (t=∞) of the system response can be calculated using transfer function?

If f(t) and F(s) is Laplace transform pairs. i.e

then Initial value theorem is given by

If F(s) is given, we would like to know what is F(∞), Without knowing the function f(t), which is Inverse Laplace
Transformation, at time t→ ∞. This can be done by using the property of Laplace Transform known as Final Value
Theorem.

3) What is/are the limitation/s of transfer function approach?

1) Transfer function doesn't take into account the initial conditions


2) It can be defined for linear systems only
3) No inferences can be drawn about the physical structure of the system

PRACTICAL 3
1. Objective (s):
a. To determine step response of first order system
b. To determine time constant of the system 
c. To determine ramp response of first order system

 2. Theory: 
The standard test signals are of four types:-
   a) Impulse input – Signifies momentary shock 
   b) Step input - Signifies a sudden change
   c) Ramp input – Signifies a constant velocity
d) Parabolic input – Signifies constant acceleration

The response of the system is named as per the given input. So the response to a step input is called as
“step response”; to a ramp input is called as ramp response and to a parabolic input is called as parabolic
response.
a. Unit Step Input:-  Mathematically unit step input is represented as:-
r(t) = 1.u(t) = 1, t>0
    = 0, t<0 
Graphically it is represented as:-

b. Unit ramp Input:-  Mathematically unit ramp input is represented as:-

r(t) = 1.t,  t>0


    = 0,   t<0

Graphically it is represented as:-

The general procedure to find the step response or ramp response or due to any arbitrary input remains the
same that we discussed in experiment no 2 earlier. 
For unit step input R(S)= 1/S and the response will be:-
And similarly we can proceed for the rest of the inputs. For a first order system such as one given by 

The expected step and ramp responses are shown in figure 1 and 2 below respectively. 

Figure1: Step response of a stable First Order System

Figure2: Ramp response of a stable First Order System

3. Software Required:
1. MATLAB version R2016 and above with Control System Tool Box  OR
2. www.octaveonline.net (Cloud supported MATLAB Environment)

4.   Procedure: Using appropriate MATLAB command (Note:- lsim command can be used in
MATLAB and ramp command can be used in octaveonline.net for obtaining ramp response)
1) obtain step and ramp response for the following systems 
a)

b)

2) Compare the step responses for both the system using subplot command
3) Compare the ramp responses for both the system using subplot command
4) Verify the time constant obtained with theoretical value
5) Obtain the steady state error using graph and verify with theoretical value

4. Result: Tabulate the observations properly for both the system and comment upon obtained
values.

6. Self Assessment Questions:


1) What is time constant?
Ans–Ifthe output of control system for an input varies with respect to time, then it is called the time response
of the control system.

2) What is the importance of time constant?


Ans. It is defined as the time required for the signal to attain 63.2 % of final or steady state
value. Time constant means how fast the system reaches the final value.
Time constant is important to process modelling and PID controller tuning.

3) Name a few real world control system example of first order systems.
Ans -Coffee cooling to ambient temperature,interest accumulating in a savings account,the bass
diffusion model is a first order system etc.

4) Why step input is more generous as far as the study of control system is concerned than any
other type of inputs?
Ans - Because step response is the time behaviour of the outputs of a general system when its inputs
change from zero to one in a very short time.
5) How time constant is affected due to changing pole locations?

Ans –As the poles move toward the left, the response becomes quicker and the
system settles faster; the lower value of σ leads to the oscillations dying out quicker.
PRACTICAL 4
1. Objective (s):
a.    To determine step response of a second order system
b. To compare responses of various second order systems for different value of damping ratio
c. To determine the specifications of an under damped system 

2.  Theory:
  
The time response has utmost importance for the design and analysis of control systems because these are
inherently time domain systems where time is independent variable. During the analysis of response, the
variation of output with respect to time can be studied and it is known as time response. To obtain
satisfactory performance of the system with respect to time must be within the specified limits. From time
response analysis and corresponding results, the stability of system, accuracy of system and complete
evaluation can be studied easily. Due to the application of an excitation to a system, the response of the
system is known as time response and it is a function of time. The two parts of response of any system:
(i) Transient response
(ii) Steady-state response.

Transient response: The part of the time response which goes to zero after large interval of time is known as
transient response.
Steady state response: The part of response that means even after the transients have died out is said to be
steady state response.
The total response of a system is sum of transient response and steady state response:
C(t)=Ctr(t)+Css(t)

A second order control system is one wherein the highest power of ‘s’ in the denominator of its transfer function
equals 2. The generalized transfer function of a second order system is given by
 

ωn: Natural Frequency of Oscillations and ζ: Damping ratio. 


When such a system is subjected to step input the response may be obtained as below and it is categorized
in 4 types depending on the values of ζ

1. If 0<ζ<1 then the response is called as under damped response


2. If ζ=1 then the response is called as critically damped response
3. If ζ>1 then the response is called as over damped response and
4. If ζ=0 then the response is called as un-damped response. The responses can be observed as:-

 
Time Response Specifications:- For the under damped system the response has following
specifications

1. Rise Time (Tr)


2. Peak Time (Tp)
3. Peak Overshoot (Mp)
4. Settling Time (Ts)

3.  Software Required:


1. MATLAB version R2016 and above with Control System Tool Box  OR
2. www.octaveonline.net (Cloud supported MATLAB Environment)
 
     4. Procedure:Using appropriate MATLAB command 
i. obtain step response for the following systems

a.

b.

c.

d.

ii. Compare the step responses of all the systems mentioned above using
subplot command and observe the value of damping ratio and its effect.
iii. For system (a) identify various time response specifications using MATLAB and compare your
result with theoretical values 

5.Observation and Result: Insert the screen shots of all the results. Write the obtained values of time
response specifications using MATLAB and those obtained theoretically in tabular form. Also comment on
the type of response for each system defined above.
6.  Self Assessment Questions:
1) Define damping ratio, natural frequency and damped frequency of oscillations.
Ans.
Damping ratio -The damping ratio is a measure describing how rapidly
the oscillations decay from one bounce to the next.
Natural frequency - the frequency at which a system tends to oscillate in the
absence of any driving or damping force. 
Damped frequency - The frequency of the oscillation is ωd and the time constant
of exponential decay is 1/ζωn. Where, ωd, is referred as damped frequency

2) Why damping ratio is chosen between 0 and 1 quite often?


Ans. Because then the system returns to rest in a oscillatory fashion.

3) If an under damped system has the damping ratio of 0.75 then the phase difference between the
output and the input will be?
Ans.59.73°
PRACTICAL 5
1. Objective (s):
a.    To determine steady state error for different inputs 
b. To determine the static error coefficients 

2.  Theory:
  
The time response has utmost importance for the design and analysis of control systems because these are
inherently time domain systems where time is independent variable. During the analysis of response, the
variation of output with respect to time can be studied and it is known as time response. To obtain
satisfactory performance of the system with respect to time must be within the specified limits. From time
response analysis and corresponding results, the stability of system, accuracy of system and complete
evaluation can be studied easily. Due to the application of an excitation to a system, the response of the
system is known as time response and it is a function of time. The two parts of response of any system:
(i) Transient response
(ii) Steady-state response.

So in previous experiment we have discussed about transient response now we focus on steady state
response.

Steady state response: The part of response that means even after the transients have died out is said to be
steady state response.

The steady state response is largely affected by the type of the system. The error is defined as the difference
between the steady state output and the reference input. 

e(t) = r(t) – c(t)

 
And steady state error is 

From the final value theorem 

………………………………………………………..(I)
And for a closed loop system the steady state error can be calculated by the given relation for various
inputs:-

………………………………………(II)
Where R(S) is the standard input 
G(S) is the open loop transfer function
H(S) is the feedback transfer function , normally unity.

Static Error Constants


i. Positional Error Constant :Kp where it is given as 

ii. Velocity Error Constant: Kv where it is given as


iii. Acceleration Error Constant: Ka where it is given as 

The relation between the above error constants and the steady state error can be summarized in below table:-

  

So the steady state error for any system can be examined in three ways either using equation (i) i.e. by
calculating the final value and subtracting it from reference input or by using equation (ii) directly or by
determining the static error constant and finding the error using the table.

3.  Software Required:
1. MATLAB version R2016 and above with Control System Tool Box  OR
2. www.octaveonline.net (Cloud supported MATLAB Environment)
 
4. Procedure:Using appropriate MATLAB command 
i. Obtain step response for the following systems 
a. G(s) =
b.    G(s) =

c.    G(s) =
ii. Compare the step responses of all the systems mentioned above using subplot command and
observe the final value of output.
ii. Verify the value of steady state error and static error coefficients for each of these systems

5. Observation and Result: Insert the screen shots of all the results. Write the obtained values of
error from time response using MATLAB and those obtained theoretically in tabular form. Also
comment on the type of system and their steady state behaviors.
A= B=

C=
6.  Self Assessment Questions:
1) Steady state performance is dependent on type or order of the system? Justify your answer with
one example.

Ans-Yes, Steady state performance is dependent on type and the order of the syatem. For example, if
we have a spring system and suddenly apply a load to it, it has a transient response
which results in it taking some time to reach itssteady state value and also it is likely
to overshoot the steady state value before it finally settles down to the steady
state value.

2) If a system is having 3 poles at origin and 2 finite poles at other locations then the system type
and order are respectively?

Ans–

3) Steady state error formula is derived only for unity feedback system. True or False?

Ans–False.

4) If False then give the reason for question 3.

Ans -We can find the steady state errors only for the unity feedback systems. So, we have to convert the
non-unity feedback system into unity feedback system. After that we can dind steady state of non - unity
feedback system too.                   
 
                 
PRACTICAL 6
1. Objective (s):
a. To determine root locus of a given system
b. To study the effect of adding pole to a system
c. To study the effect of adding zero to a system

2. Theory:
The root locus of a system is defined as “the locus of closed loop poles of a system in s plane when system gain
K is varied from 0 to ∞”. This technique gives a graphical representation of poles location so that the system
nature can be detected. In this technique, we will use an open loop transfer function to know the stability of the
closed loop control system.

We know that, the characteristic equation of the closed loop control system is

We can represent G(s)H(s) as

Where,
5. K represents the multiplying factor or system gain(parameter)
6. N(s) represents the numerator term having (factored) nth order polynomial of ‘s’.
7. D(s) represents the denominator term having (factored) mth order polynomial of ‘s’.

Substitute, This G(s)H(s) value in the characteristic equation:-

Solution of above equation will be the closed loop poles of the system and their location is affected when the system
gain K is varied.

Hence using the construction rules the root locus of a system can be obtained. In MATLAB construction
rules are embedded into a function called “rlocus”. Hence using this command the system root locus can be
obtained using MATLAB very queckly
3. Software Required:
3) MATLAB version R2016 and above with Control System Tool Box OR
4) www.octaveonline.net (Cloud supported MATLAB Environment)
4. Procedure: Using rlocus MATLAB command
d) obtain root locus of the following system
a) G(s) H(s)=
e) Now add an open loop pole to above system and observe the root locus and compare it with the root
locus of the above system.
b) G(s) H(s)=

f) Now add an open loop zero to system (a) and observe the root locus and compare it with the root
locus of the system (a) and (b)
c) G(s) H(s)=
g) Comment on the nature of system (b) and (c) and also tell the effect of adding pole and zero.

5. Observation and Result:

G(s) H(s)=

G(s) H(s)=

G(s) H(s)=
Comparing the theoretical and practical values of asymptotes, centroid, break away point and marginal gain

Theor. Pract. Theor. Pract. Theor. Pract. Theor. Pract.

Asympt. Asympt. Centroid Centroid BA pt BA pt M.gain M.gain

60,180,300 60,180,300 -4 -4 -2.8 -2.8

45,135,225, 45,135,225, -5 -5 -5+-2.19 -5+-2.2

315 315
90,270 90,270 -2 -2 -2.9 -2.9

6. Self Assessment Questions:


1) What is the significance of angle and magnitude criteria?

The magnitude criterion is used to determine the locations of a set of roots in the s-plane for a given value of K. or,
equivalently, Taking the magnitude of each side of the equation yields the magnitude criterion. The angle of
departure is the angle at which the locus leaves a pole in the s-plane.

2) Describe the graphical procedure of determining gain K at any point on to the root locus.

 For example, if we want to know the value of K at s=-1.5+j0 we can use the fact that the characteristic equation of
C(s)R(s)=K⋅G(s)1+K⋅G(s)

The characterstic equation is :


1+K⋅G(s)=0, 

K = −1/G(s)

Since at s= -1.5

G(s)= 1/s(s+3)

G(−1.5)= − 0.44

We can use this information to calculate the desired value of K:


K = −1/G(-1.5)=2.25

3) The path of complex poles/zeroes in the system can be determined by determining which angle and how?

The path of complex poles/zeroes in the system can be determined by determining angle of departure/arrival.
PRACTICAL 7
1. Objective (s):
d) To obtain bode plot of different systems
e) To compare bode plot of different systems
f) To determine the stability of the system by finding the gain and phase margin.
2. Theory:
In electrical engineering and control theory, a Bode plot  is a graph of the frequency response of a system. It is
usually a combination of a Bode magnitude plot, expressing the magnitude (usually in decibels) of the frequency
response, and a Bode phase plot, expressing the phase shift. In both the plots, x-axis represents angular
frequency (logarithmic scale). Whereas, yaxis represents the magnitude (linear scale) of open loop transfer
function in the magnitude plot and the phase angle (linear scale) of the open loop transfer function in the phase
plot.

The magnitude of the open loop transfer function in dB is -


M=20log|G(jω)H(jω)|

The phase angle of the open loop transfer function in degrees is -


ϕ=∠G(jω)H(jω)

Where the base of logarithm is 10

The following table shows the slope, magnitude and the phase angle values of the terms present in the open loop
transfer function. This data is useful while drawing the Bode plots.

Type of term G(jω)H(jω) Slope(dB/dec Magnitude (dB) Phase angle(degree)


)
Constant K 0 20logK 0

Zero at origin jω 20 20logω 90

‘n’ zeros at origin (jω)n 20n 20nlogω 90n

Pole at origin -20 −20logω -90

‘n’ poles at origin -20n −20nlogω -90n

Simple zero 1+jωT 20 0 for ω<1/T 0 for ω< 1/T


20logωT for ω>1/T 90 for ω>1/T
Simple pole -20 0 for ω<1/T 0 for ω< 1/T

−20logωT for -90 for ω>1/T


ω>1/T

In MATLAB “bode” is an inbuilt function which includes all the rules for constructing bode plot and using “margin”
function all margins and cross over frequencies can be obtained.

3. Software Required:
 1.MATLAB version R2016 and above with Control System Tool Box OR
 2.www.octaveonline.net (Cloud supported MATLAB Environment)
4. Procedure: Using appropriate MATLAB command (bode and margin)
h) obtain bode plot for the following systems
8. G(s)H(s) =
9. G(s)H(s) =
10. G(s)H(s) =
11. G(s)H(s) =

i) Compare the bode plot of all the systems mentioned above using subplot command and observe the
value of gain and phase cross over frequency
j) Compare the bode plot of all the systems mentioned above using subplot command and observe the
value of gain and phase margin
k) Comment on system stability
5. Observation and Result: Insert the screen shots of all the results. Write the obtained values of gain and phase
cross over frequencies and gain and phase margin using MATLAB and those obtained theoretically in tabular form.

Bode plot for the following systems

G(s)H(s) = G(s)H(s) =

G(s)H(s) = G(s)H(s) =
Compare the bode plot of all the systems mentioned above using subplot command

Comparing the theoretical and practical values of phase margin, gain margin, phase crossover frequency and, gain

crossover frequency

Theor. Pract. Theor. Pract. Theor. Pract. Theor. Pract. System

PM
PM GM GM Wpc Wpc Wgc Wgc Type

47.4 309.54 11 -22.49 6.32 1.414 1.57 4.120 stable


134.43 134.43 infinite infinite NaN 8.348

0 360 1 7.71 2 2 2 2 Marginally

Stable

-0.63 359.37 0 -558.2 0.00 0.00 0.10 0.099 Unstable

6. Self Assessment Questions:


1) How system stability can be investigated using bode plot?

The greater the Phase Margin (PM), the greater will be the stability of the system. ... This is done by calculating
the vertical distance between the phase curve (on the Bode phase plot) and the x-axis at the frequency where
the Bode magnitude plot = 0 dB. This point is known as the gain crossover frequency

2) Define gain cross over frequency and phase cross over frequency.

Gain crossover frequency is the frequency at which magnitude of open loop transfer function is unity or else the
frequency at which the gain of the system is zero while phase crossover frequency is the frequency at which the
phase angle becomes -180 degrees.

3) Define gain and phase margin.

Gain margin is the value of gain a control system can have to operate in stable state. Small variation over
this value leads to unstable system. the gain margin occurs at phase cross over frequency

while phase margin is the amount of phase lag added to gain cross over frequency to bring system from
stable to unstable.

phase margin = 180 + phase angle at which gain cross over frequency occurs
PRACTICAL 8

1. Objective (s):
a.    To obtain Nyquist plot of different systems 
b. To compare Nyquist plot of different systems
c. To observe polar plot of a given system 
d. To compare bode and nyquist plot of various systems
c.   To determine the stability of the system by finding the gain and phase margin
2.  Theory:
  
A Nyquist plot is used in automatic control and signal processing for assessing the stability of a system
with feedback. It is represented by a graph in polar coordinates in which the gain and phase of a frequency
response are plotted. The plot of these phasor quantities shows the phase as the angle and the magnitude as
the distance from the origin. This plot combines the two types of Bode plot — magnitude and phase — on
a single graph with frequency as a parameter along the curve. Nyquist calculates the Nyquist frequency
response of LTI models. When invoked without left hand arguments, nyquist produces a Nyquist plot on
the screen. Nyquist plots are used to analyze system properties including gain margin, phase margin, and
stability.
The nyquist stability criterion provides a simple test for stability of a closed-loop control system by
examining the open-loop system's Nyquist plot. Stability of the closed-loop control system may be
determined directly by computing the poles of the closed-loop transfer function. The Nyquist Criteria can
tell us things about the frequency characteristics of the system. For instance, some systems with constant
gain might be stable for low-frequency inputs, but become unstable for high-frequency inputs. Also, the
Nyquist Criteria can tell us things about the phase of the input signals, the time-shift of the system, and other
important information.

The Nyquist Contour


The nyquist contour, the contour that makes the entire nyquist criterion work, must encircle the entire right
half of the complex s plane. Remember that if a pole to the closed-loop transfer function (or equivalently a
zero of the characteristic equation) lies in the right-half of the s plane, the system is an unstable system. To
satisfy this requirement, the nyquist contour takes the shape of an infinite semi-circle that encircles the entire
right-half of the s plane.

Nyquist Criteria
Let us first introduce the most important equation when dealing with the Nyquist criterion: 
N= Z-P
Where:
N is the number of encirclements of the critical (-1, 0) point
Z is the number of zeros of the characteristic equation
P is the number of poles of the characteristic equation

With this equation stated, we can now state the Nyquist Stability Criterion: Nyquist Stability Criterion
A feedback control system is stable, if and only if the contour of G(s) H(s) in the F(s) plane does not encircle
the (-1, 0) point when P is 0.
A feedback control system is stable, if and only if the contour of G(s) H(s) in the F(s) plane encircles the (-1,
0) point number of times equal to the number of poles of F(s) enclosed by the contour. In other words, 

if P is zero then N must equal zero. Otherwise, N must equal P. Essentially, we are saying that Z must
always equal zero, because Z is the number of zeros of the characteristic equation (and therefore the number
of poles of the closed-loop transfer function) that are in the right-half of the s plane.
3. Software Required:
1. MATLAB version R2016 and above with Control System Tool Box  OR
2. www.octaveonline.net (Cloud supported MATLAB Environment)
 
4. Procedure: Using appropriate MATLAB command (nyquist and margin)
i. obtain nyquist plot for the following systems

a. G(s)H(s) =
b. G(s)H(s) =
c. G(s)H(s) =

ii. Compare the nyquist plot of all the systems mentioned above using subplot command and observe
the value of gain and phase cross over frequency
ii. Compare the nyquist plot of all the systems mentioned above using subplot command and observe
the value of gain and phase margin
ii. Comment on system stability 
ii. Observe the difference between bode and nyquist plots
ii. Observe the polar plot using nyquist plot 

6. Observation and Result: Insert the screen shots of all the results. Write the obtained values of
time response specifications using MATLAB and those obtained theoretically in tabular form. 
A=
B=

C=

COMPARING ALL THE NYQUIST PLOT THROUGH SUBPLOT COMMAND:


COMPARING THE PHASE MARGIN,GAIN MARGIN ,PHASE CROSSOVER, GAIN CROSSOVER
FREQUENCY AND STABILITY OF THE SYSTEMS:

PHASE GAIN GAIN  PHASE  STABILITY


CROSSOVER MARGIN CROSSOVE MARGI STATUS
R N
6.32 rad/s 20.8db 1.57rad/s 47.4deg Stable systm
0 rad/s Infinity 1.2rad/s -134deg Unstable
system
2rad/s 0 2rad/s 0 Marginally
stable
0rad/s -infinity 0.1rad/s -0.63deg unstable

6.  Self Assessment Questions:


1)The Nyquist contour does not contain which points in F(S) plane?

Ans. -1 points.
2) Define Encirclement and Enclosement.

Ans.Encirclement: The Nyquist contour is a closed contour in the s-plane which completely encloses the entire
right-hand half of s-plane. In order to enclose the complete RHS of s-plane a large semicircle path is drawn with
diameter along jω axis and center at the origin. The radius of the semicircle is treated as Nyquist Encirclement.

Enclosement: A point or region is said to be enclosed by a closed path if the point or region lies to the right of the
path when the path is traversed in any prescribed direction

3) Define Analytic Function.


Ans.A function f(z) is said to be analytic in a region R of the complex plane if f(z) has a derivative at each
point of R and if f(z) is single valued. Hence the concept of analyticfunction at a point implies that the
function is analytic in some circle with center at this point.

PRACTICAL 9
1. Objective (s):
a. To study the open loop response of the control system without controller
b. To study the closed loop response of the control system with controller
c. To understand the characteristics of P, PI and PID controller

2.  Theory: 1. Process control block diagram and its elements:-


  
The block diagram can be described as below:
C: Proces output : controlled variable 
P: controller output (4-20 mA or 3 -15 psi)
E: Error signal (generated due to the difference between set point and actual controlled    variable
R: set point (depends on need)
Controller: Generates control signal for necessary correction
Control Element: Follow the instruction given by the controller such as valve
Measurement: Sensor used to measure the process output
B: Sensor output
Summing Point: Compares the sensor output with set point and generates error signal
2. Types of Controllers
The controller can be classified in two ways 
a) Depending on the control action:   i) Direct Action ii) Reverse Action 
b) Depending the mode of operation: i) Continuous and Discontinuous Controller
Continuous mode controllers are the controllers which generate continues ouput in response to the error
signal. They are further classified as:
i)   Proportional (P) Controller
ii)  Integral (I) Controller
iii) Derivative (D) Controller       
iv) Proportional-Integral (PI) Controller
v) Proportional-Derivative (PD) Controller
vi) Proportional-Integral-Derivative (PID) Controller 

Proportional Controller:-

Its equation is given by:-


P= K e where,
p p

P =controller output Kp= Proportional gain and e = error signal and 


p

PB = 100/ K p

Where PB= Proportional band (It is the range of error to cover 0% to 100% controller output.)
From the equation of controller it is clear that for a change in error there is a proportional change in
controller output and hence the name given. 

Proportional Integral Controller:-


It is a combination of two control modes one is proportional and the other is integral Equation may be
represented as
P= K e + K K
p p i + P where,
0

P =controller output 
Kp= Proportional gain 
K = Integral rate constant (%/%sec)  = 1/T , Ti = reset action time
i i

e = error signal and P0 = controller output for zero error 


From the equation of controller its clear that for a change in error the change in controller output varies as a
correction term plus integral of error function. 

Proportional Integral Derivative Controller


Equation may be represented as

P= K e + K K
p p i +K K p d   + P where,
0

P = Controller output Kp = Proportional gain ,e = error signal and K = Derivative rate constant = T (sec)
d d

Ki= Integral rate constant (/sec) and P = controller output for zero error
0

Comparison of performance parameters:-

3. Software Required:
1. MATLAB version R2016 and above with Control System Tool Box  OR
2. www.octaveonline.net (Cloud supported MATLAB Environment)
 
4. Procedure: Assume a suitable process transfer function such as                            

 
Where, X(s) is output and F(s) is input. Now using Mat lab/octaveonline proceed as follows:
1. Obtain its open loop step response without any controller 
2. Obtain its closed loop step response with each of the P PI and PID controllers (assuming unity
feedback. Let Kp = 300, Ki = 350 and Kd=5500 as and when required
3. Compare the responses due to each of the controllers using subplot command 

4. Observation and Result: Insert the screen shots of all the results. Write the obtained values of
time response specifications using MATLAB and those obtained theoretically in tabular form. 
6.  Self Assessment Questions:
1) What are discontinuous controllers?
Ans.A discontinuous-action controller influences the process with short switching
actions at a constant level of energy. 

2) Compare controllers and compensators.


Ans.The objective of a controller is to respond to the error, an example of
a controller is the PID. On the other hand the objective of a compensator is to change
the original dynamics of the plant, examples of compensators are the lead, lag, and
lag-lead compensators.

3) What do you mean by direct action and reverse action?

Ans. Direct action means that the controller output rises if the measurement
increases. Reverseaction means that the controller output drops when the
measurement rises. If an increase in error increases the controller output, it's direct-
acting.
PRACTICAL 10

1. Objective (s):
a.   To determine transfer function from given state model
b. To determine state model using given transfer function
c. To understand formation of state model 

2.  Theory: A state space representation is a mathematical model of a physical system as a set of input,
output and state variables related by first-order differential equations. The state space representation (also
known as the "time-domain approach") provides a convenient and compact way to model and analyze
systems with multiple inputs and outputs. Unlike the frequency domain approach, the use of the state space
representation is not limited to systems with linear components and zero initial conditions. "State space"
refers to the space whose axes are the state variables. The state of the system can be represented as a vector
within that space.

 input state equation is given by:-

…………………………………………………(i)
The output equation is written as:-

………………………………………………….(ii)

Equation (i) and (ii) above represent the state model of any system where

A= System Matrix B= Input Matrix or Control Matrix C= Observation Matrix


D= Transmission Matrix Y= Output vector U= Input vector X= state variables vector
= States 

Using the state model the transfer function can be obtained by :-

State model from the transfer function can be obtained using various methods. Some of the important are:-
1. Phase variable method
2. Physical variable method
3. Canonical variable method 
MATLAB gives simplicity of doing this using simple inbuilt function such as tf2ss.

3.  Software Required:
1. MATLAB version R2016 and above with Control System Tool Box  OR
2. www.octaveonline.net (Cloud supported MATLAB Environment)
 
4. Procedure: using appropriate MATLAB command (ss2tf and tf2ss)
i. Obtain the state model of following transfer functions

a.

b.

ii. Using the state models obtained above find the transfer function again and verify your results

5. Observation and Result: Insert the screen shots of all the results. Write the obtained values of
time response specifications using MATLAB and those obtained theoretically in tabular form. 

6.  Self Assessment Questions:

1) Define state vector?


Ans.It is a vector, which contains the state variables as elements.

2) How solution of state equations can be obtained?

Ans.Solution of state equations can be obtained by two mathematical models of control system the
differential equation model and the transfer function model. 

3) Define controllability and observability?

Ans.Controllability: In order to be able to do whatever we want with the given dynamic system
under control input, the system must be controllable. 
Observability: In order to see what is going on inside the system under obser- vation, the system must
be observable.

4) Write some of the properties of state transition matrix.

Ans.

1. It has continuous derivatives.

2. It is continuous.

3. It cannot be singular. Φ-1 (t, 𝜏) = Φ(𝜏, t)

Φ-1 (t, 𝜏) Φ(t, 𝜏) = I. I is the identity matrix.

4. Φ(t, t) = I ∀ t.

5. Φ (t2,t1) Φ(t1, t0) = Φ(t2, t0) ∀ t0≤ t1≤ t2

6. Φ(t, 𝜏) = U(t) U-1(𝜏).

U(t) is an n×n matrix. It is the fundamental solution matrix that satisfies the following equation with
initial condition U(t0) = I.

                 

You might also like