0% found this document useful (0 votes)
10 views70 pages

Ee3512 c&i Lab Manual

The document outlines the Control and Instrumentation Laboratory (EE3512) for Electrical and Electronics Engineering students at Anna University, Chennai, detailing the course objectives, outcomes, and experiments to be conducted during the academic year 2023-2024. It includes the institute's vision and mission, department goals, and specific program education objectives and outcomes. The laboratory exercises focus on various control system analyses and designs, using MATLAB for simulations and practical implementations.

Uploaded by

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

Ee3512 c&i Lab Manual

The document outlines the Control and Instrumentation Laboratory (EE3512) for Electrical and Electronics Engineering students at Anna University, Chennai, detailing the course objectives, outcomes, and experiments to be conducted during the academic year 2023-2024. It includes the institute's vision and mission, department goals, and specific program education objectives and outcomes. The laboratory exercises focus on various control system analyses and designs, using MATLAB for simulations and practical implementations.

Uploaded by

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

CONTROL AND INSTRUMENTATION LABORATORY

EE3512

REGULATION - 2021

Prepared By
Mr. J. Madhavan

ASSISTANT PROFESSOR

ELECTRICAL AND ELECTRONICS ENGINEERING

AVADI, CHENNAI – 600 054

Affiliated to Anna University, Chennai & Approved by AICTE, New Delhi


Accredited by NAAC with ‘A’ Grade & An ISO 9001:2015 Certified Institution
Avadi, Chennai – 600 054
Affiliated to Anna University, Chennai & Approved by AICTE, New Delhi
Accredited by NAAC with ‘A’ Grade & An ISO 9001:2015 Certified Institution

EE3512 – CONTROL AND INSTRUMENTATION


LABORATORY

NAME :

REGISTER NUMBER :

DEPARTMENT :

YEAR / SEMESTER :

ACADEMIC YEAR: 2023 – 2024 (ODD SEM)


INSTITUTE VISION

To emerge as an Institution of Excellence by providing High Quality Education in Engineering,


Technology and Management to contribute for the economic as well as societal growth of our
Nation.

INSTITUTE MISSION

➢ To impart strong fundamental and Value-Based Academic knowledge in various Engineering,


Technology and Management disciplines to nurture creativity.

➢ To promote innovative Research and Development activities by collaborating with Industries,


R&D organizations and other statutory bodies.

➢ To provide conducive learning environment and training so as to empower the students with
dynamic skill development for employability.

➢ To foster Entrepreneurial spirit amongst the students for making a positive impact on
remarkable community development.
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

DEPARTMENT VISION

To be recognized as a centre of excellence in the field of Electrical and Electronics Engineering


education, research and the application of knowledge for the benefit of society.

DEPARTMENT MISSION

➢ Inspire the student to acquire knowledge and generate ideas.

➢ To accept the challenges to provide solution for societal needs.

➢ To excel and empower the students in their chosen career.


DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Programme Education Objectives (PEOs)

PEO1 : Find employment in Core Electrical and Electronics Engineering and service sectors.
PEO2 : Get elevated to technical lead position and lead the organization competitively.
PEO3 : Enter into higher studies leading to post-graduate and research degrees.
PEO4 : Become consultant and provide solutions to the practical problems of core
organization.
PEO5 : Become an entrepreneur and be part of electrical and electronics product and service
industries.

Programme Outcomes (POs)

PO-1: Engineering knowledge: Apply the knowledge of mathematics, science, engineering


fundamentals, and an engineering specialization to the solution of complex engineering
problems.
PO-2: Problem analysis: Identify, formulate, review research literature and analyze complex
engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
PO-3: Design/development of solutions: Design solutions for complex engineering problems and
design system components or processes that meet the specified needs with appropriate
consideration for the public health and safety, and the cultural, societal, and environmental
Considerations.
PO-4: Conduct investigations of complex problems: Use research-based knowledge and research
methods including design of experiments, analysis and interpretation of data, and synthesis
of the information to provide valid conclusions.
PO-5: Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modeling to complex engineering activities
with an understanding of the limitations.
PO-6: The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant
to the professional engineering practice.
PO-7: Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and
need for sustainable development.
PO-8: Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
PO-9: Individual and team work: Function effectively as an individual, and as a member or leader
in diverse teams, and in multidisciplinary settings.
PO-10: Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and
write effective reports and design documentation, make effective presentations, and give and
receive clear instructions.
PO-11: Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member
and leader in a team, to manage projects and in multidisciplinary environments.
PO-12: Life-long learning: Recognize the need for, and have the preparation and ability to engage
in independent and life-long learning in the broadest context of technological change.

Program Specific Outcomes (PSOs) of Electrical and Electronics Engineering

PSO-1: Foundation of Electrical and Electronics Engineering


Ability to understand the principles and working of Electrical and Electronic components,
circuits, system and control that are forming a part of Power Generation, Transmission,
Distribution, Utilization, Conservation and Energy saving.
PSO-2: Foundation of Mathematical concept and Computation Solution
Ability to apply Mathematical Knowledge to solve problem related to Electrical Engineering
using appropriate engineering tools and to make them to Design Software and Hardware by
developing computation Solutions.
PSO-3: Research Ability
Ability to carry out research in advanced area such as Smart Grid, E vehicle by providing
new ideas and innovation.
Avadi, Chennai – 600 054
Affiliated to Anna University, Chennai & Approved by AICTE, New Delhi
An ISO 9001:2015 Certified Institution

BONAFIDE CERTIFICATE
It is certified that this is a bonafide record of work done by
Mr. / Ms. ____________________________ Reg. No., ______________ of
Vth semester, B.E., - Electrical and Electronics Engineering in the
EE3512 Control and Instrumentation Laboratory during the academic
year 2023 – 2024 (ODD SEM).

Staff-in-charge Head of the Department

Submitted for the Anna University B.E., / B.Tech practical examination


held on: _________________________

INTERNAL EXAMINER EXTERNAL EXAMINER


DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
III YEAR / V SEMESTER

EE3512 CONTROL AND INSTRUMENTATION LABORATORY

LIST OF EXPERIMENTS:

1. Step, ramp and impulse response.


2. Identification of damping in second order
3. Time domain analysis
4. Stability analysis using Pole zero maps and Routh Hurwitz Criterion in simulation platform.
5. Root Locus based analysis in simulation platform.
6. Frequency response analysis using bode plot.
7. Frequency response analysis using polar plot.
8. Design of Lag, lead compensators and evaluation of closed loop performance.
9. Design of PID controllers and evaluation of closed loop performance.
10. Discretization of continuous system and effect of sampling.
11. Test of controllability and observability in continuous and discrete domain in simulation
platform.
12. Mini Project 1: Simulation of complete closed loop control systems including sensor and
actuator dynamics.
13. Mini Project 2: Demonstration of a closed loop system in hardware.

Content Beyond the Syllabus:

14. State space model for classical transfer function using MATLAB
15. Determination of steady state error using MATLAB
COURSE OUTCOMES:
Upon successful completion of the course, the students will be able to:
CO1: To model and analyze simple physical systems and simulate the performance in analog and
digital platform.
CO2: To design and implement simple controllers in standard forms.
CO3: To design compensators based on time and frequency domain specifications.
CO4: To design a complete closed control loop and evaluate its performance for simple physical
systems.
CO5: To analyze the stability of a physical system in both continuous and discrete domains.
MAPPING OF COs WITH POs AND PSOs:

POs PSOs
COs
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2 PSO3
CO1 3 3 3 3 3 1.5 2 3 3 3
CO2 3 3 3 3 3 1.5 2 3 3 3
CO3 3 3 3 3 3 1.5 2 3 3 3
CO4 3 3 3 3 3 1.5 2 3 3 3
CO5 3 3 3 3 3 1.5 2 3 3 3
Avg 3 3 3 3 3 1.5 2 3 3 3
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
III YEAR / V SEMESTER

EE3512 CONTROL AND INSTRUMENTATION LABORATORY

CYCLE – I
1. Step, ramp and impulse response.
2. Identification of damping in second order
3. Time domain analysis
4. Stability analysis using Pole zero maps and Routh Hurwitz Criterion in simulation platform.
5. Root Locus based analysis in simulation platform.

CYCLE – II

1. Frequency response analysis using bode plot.


2. Frequency response analysis using polar plot.
3. Design of Lag, lead compensators and evaluation of closed loop performance.
4. Design of PID controllers and evaluation of closed loop performance.
5. Discretization of continuous system and effect of sampling.
6. Test of controllability and observability in continuous and discrete domain in simulation
platform.

Content Beyond the Syllabus:

1. State space model for classical transfer function using MATLAB


2. Determination of steady state error using MATLAB
INDEX

Expt. Marks
Date Name of the Experiment Page No. Signature
No. Obtained

CYCLE – I

Step, Ramp, and Impulse


1 1–6
Response
Identification of damping in
2 7 – 13
second order system

3 Time Domain Analysis 14 – 16

Stability analysis using Routh-


4 17 – 19
Hurwitz Method
Stability analysis of linear system
5 20 – 22
using Root Locus

CYCLE – II

Frequency Response Analysis


6 23 – 25
using Bode Plot
Frequency Response Analysis
7 26 – 28
using Polar Plot
Design of Lead, Lag AND Lead-
8 29 – 38
Lag Compensators
Design of PID Controller for first
9 39 – 43
order and second order systems
Discretization of continuous
10 44 – 51
system and effect of sampling
Test of controllability and
observability in continuous and
11 52 – 53
discrete domain in simulation
platform
Content Beyond the Syllabus
State space model for classical
12 transfer function using 54 – 55
MATLAB
Determination of steady state
13 56 – 57
error using MATLAB

Staff Incharge
2. GENERAL INSTRUCTIONS FOR LABORATORY CLASSES

1. Enter the Lab with CLOSED TOE SHOES.

2. Students should wear lab coat.

3. The HAIR should be protected, let it not be loose.

4. TOOLS, APPARATUS and COMPONENT sets are to be returned before


leaving the lab.

5. HEADINGS and DETAILS should be neatly written

i. Aim of the experiment

ii. Apparatus / Tools / Instruments


required

iii. Theory

iv. Procedure / Algorithm /


Program

v. Model Calculations/ Design


calculations

vi. Block Diagram / Flow charts/


Circuit diagram

vii. Tabulations/ Waveforms/ Graph

viii. Result / discussions .

6. Experiment number and date should be written in the appropriate place.

7. After completing the experiment, the answer to pre lab viva-voce questions should
be neatly written in the workbook.

8. Be REGULAR, SYSTEMATIC, PATIENT, AND STEADY.

4
Exp. No.: 1 Date:
Exercise Number: 1

Title of the Experiment: STEP, RAMP AND IMPULSE RESPONSE


Date of the Exercise:

OBJECTIVE (AIM) OF THE EXPERIMENT

To obtain step, ramp, impulse response of first and second order system.

FACILITIES REQUIRED AND PROCEDURE

a) FACILITIES REQUIRED TO DO THE EXPERIMENT:

S.NO APPARATUS QUANTITY


1. Matlab software 1
2. Computer 1

Control system
3. tool box 1

b) THEORY:
Transfer function: It is the laplace of the output divided by the laplace of the input of
a system.

Step-The response of a system (with all initial conditions equal to zero at t= 0-, i.e,
zero state response) to the unit step input is called the unit step response.

Ramp : The ramp function is a unary real function whose graph is shaped like a graph.

c) PROCEDURE:
 Enter the program in the editor window. If the program is typed in command window,
the functions should be typed without semi-colon.
 Enter the values in the numerator & denominator depending on order of the system.
 The syntax used to get transfer function is tf.
 The syntax used for impulse is impulse.
 Finally save the program and run it.

1
DESIGN PROCEDURE/ DESIGN CALCULATIONS:

Step and Impulse Function

A=input(‘enter numerator’);
B=input(‘enter denominator’);
h = tf(A,B);
step(h);
impulse(h);
subplot(2,1,1),plot(step(h));
subplot(2,1,2),plot(impulse(h));

Ramp Function
t = -1:0.1:1;
x1= t>0;
u = (t.*x1);
lsim(h,u,t);

STEP RESPONSE:

2
IMPULSE RESPONSE:

RAMP RESPONSE:

3
FIRST ORDER
STEP RESPONSE

IMPULSE RESPONSE:

10

4
RAMP RESPONSE:

11

5
Pre lab questions:
1. What is meant by order of a system?
The highest power of the s term in the denominator of the transfer function of the
system is called the order of the system.

2. What is a transfer function?


It is the laplace of the output divided by the laplace of the input of the system.

Post lab questions:

1. What is step response of a system?


The response of a system (with all initial conditions equal to zero at t=0- i.e zero
state response) to the unit step input is called the step response.

2. What is a ramp function?


The ramp function is a unary real function whose graph is shaped like a
ramp.

Result:

Thus, the step, ramp, impulse response of first order and second order systems are obtained.

12

6
Exp. No.: 2 Exercise Number: 2 Date:

Title of the Experiment: IDENTIFICATION


IDENTIFICATION OF DAMPING
OF DAMPING IN SCONDINORDER
SECOND ORDER
SYSTEM. SYSTEM
Date of the Exercise:

OBJECTIVE (AIM) OF THE EXPERIMENT:

To study and identify the damping in second order system using MATLAB.

FACILITIES REQUIRED:

MATLAB software

PROCEDURE:

1. Open MATLAB software.


2. Type “SIMULINK” in the command window or just go to the simulink library bar. A new
box will open where we can get the output of different responses using block diagrams.
3. In the ‘New Model’ window, add input response, transfer function, scope and workspace.
4. Run the simulink and double click on the scope block.
5. Take the output graph.

THEORY:

𝜔𝑛 2
 The general second order transfer function is G(s) =
𝑠2 +2𝜁𝜔𝑛 𝑠+𝜔𝑛 2
Where,
ζ=Damping coefficient
𝝎𝒏 =natural frequency

 There are 4 conditions of 𝜻:


1) When ζ=0, Undamped
2) When 0< 𝜁 < 1, Underdamped
3) When ζ=1, Critically Damped
4) When 𝜻 > 𝟏,Over Damped

 As the ζ value is varied, the output graph is varied for the various inputs given be it
step, ramp or impulse.
 For ‘Undamped’ system, the graph is of continuous wave w.r.t. critical line. The
amplitude differs for different 𝝎 values. If it is high, amplitude is high and vice versa.
 For ‘Under Damped’ system, the graph is also a continuous wave but the amplitude
decreases with time and it finally merges with the critical line passing through 1.

13

7
 For ‘Critically Damped’ system, the wave increases gradually and gets in straight line
with the value of 1. This indicates the perfect damping required in a system which is
controllable.
 For ‘Over Damped’ system, the wave always remains below or critical line for any𝝎
value.
 The graph always remains the same for the damping conditions. Just the nature of
waves changes w.r.t. to the
 Critically damped system is the commonly used and effective.
 With varying 𝝎 values, the amplitude changes. They don’t make any significant
changes. The important factor is ζ.
 We can check the damping by using any values in the place of 𝝎&ζ.

CIRCUIT DIAGRAM / MODEL GRAPH:

100
Undamped Condition (step) G(s)=
𝒔𝟐 +𝟏𝟎𝟎

14

8
𝟏𝟎𝟎
Undamped Condition (ramp) G(s)=
𝒔𝟐 +𝟏𝟎𝟎

15

9
𝟏𝟎𝟎
Under Damped (step) G(s)=
𝒔𝟐 +𝟐𝒔+𝟏𝟎𝟎

𝟏𝟎𝟎
Under Damped (ramp) G(s)=
𝒔𝟐 +𝟐𝒔+𝟏𝟎𝟎

16

10
𝟏𝟎𝟎
Critically Damped (step) G(s)=
𝒔𝟐 +𝟐𝟎𝒔+𝟏𝟎𝟎

17

11
𝟏𝟎𝟎
Critically Damped (ramp) ) G(s)=
𝒔𝟐 +𝟐𝟎𝒔+𝟏𝟎𝟎

18

12
RESULT:

Thus the importance of Damping Coefficient ζwas studied with its various conditions and for
various 𝝎values for various inputs.

PRE LAB QUESTIONS:

1) What is steady state error?

2) What is target value?

POST LAB QUESTIONS:

1) What do you mean by order of a system?

19

13
Exp. No.: 3 Exercise Number: 3 Date:

Title of the Experiment: TIME DOMAIN ANALYSIS


Date of the Exercise: 28/07/2017

OBJECTIVE (AIM) OF THE EXPERIMENT

To Analyze the Time Domain specifications of Under damped second order system.

FACILITIES REQUIRED AND PROCEDURE:

FACILITIES REQUIRED TO DO THE EXPERIMENT


 Matlab software

A) THEORY:

We can analyze the time domain of the second order under damped system. Peak value,
Rise time, overshoot, settling time and steady point.
The system has some in-built tolerance; therefore, the settling time is achieved when the
wave signal enters this tolerance range. But in some ζ conditions, the wave isn’t actually
merging with reference line but is in continuous wave motion but since it has entered the
tolerance range, it is considered as settled.

B) PROCEDURE:

 Open MATLAB software.


 Go to ‘New Script’ option which opens the editor window.
 Write the generic code for second order transfer function which is :
Num=[25];
Den=[1,2,25];
Y=tf(num,den);
Stepplot(y)

 By giving ζ value between 0 and 1 we can have underdamped transfer function.


 Changing the numerator and denominator values as per our requirement, we can
generate graphs.
 We can measure peak value, overshoot, rise time etc in the graph itself.

C) PROGRAM /COMMAND :

1. num= [10000];
2. den =[1,20,10000];
3. y= tf(num,den);
4. stepplot(y)

20

14
D) CIRCUIT DIAGRAM / MODEL GRAPH:

1)

2)

3)

21

15
1) Here, ζ=0.1 and 𝜔 = 5

Peak amplitude = 1.53 Rise Time = 0.241 seconds

Overshoot = 52.7 % Settling time = 3.92 seconds

2) Here, ζ=0.05 and 𝜔 = 10

Peak amplitude = 1.85 Rise Time = 0.108 seconds

Overshoot = 0.314 % Settling time = 7.6 seconds

3) Here, ζ=0.1 and 𝜔 = 100

Peak amplitude = 1.73 Rise time = 0.013 seconds

Overshoot = 72.9% Settling time = 0.384 seconds

INFERENCE:
 Through the above graphs we understand that if the 𝜁 value is varied in between 0 and
1, the no. of waves may increase or decrease depending on 𝜔 value.
 If 𝜔 is taken of very high value, then rise time as well as settling time decreases. And
if it is taken low then, the rise time and settling time are of mediocre range.
 If the ζ value is very much decreased then high overshooting takes place and it takes
time to settle, i.e., high peak value is attained.
 In some cases we may see that settling time is achieved much before the peak value is
attained. It is because that the ζ value is very close to achieve critical damping
condition.
RESULT:

Thus the time domain of second order underdamped system is analyzed for various ζ
and 𝜔 values. The graphs for the same are also plotted with step response.

PRELAB QUESTIONS:

1) Define peak time and rise time?

2) What is settling time? Give example.


POSTLAB QUESTIONS:

1) What is Frequency Response?

22

16
Exp. No.: 4 Date:
Exercise Number: 4
Title of the Experiment: STABILITY ANALYSIS USING ROUTH- HURWITZ METHOD
Date of the Exercise:
AIM OF THE EXPERIMENT:

To determine the stability of a system using Routh Hurwitz method.

FACILITIES REQUIRED:
 MATLAB software.
 Computer.

THEORY:
The theory of network synthesis states that any pole of the system lies on the right hand side
of the origin of the s plane, it makes the system unstable. On the basis of this condition A.
Hurwitz and E.J.Routh started investigating the necessary and sufficient conditions of
stability of a system. We will discuss two criteria for stability of the system. A first criterion
is given by A. Hurwitz and this criterion is also known as Hurwitz Criterion for
stability or Routh Hurwitz Stability Criterion. With the help of characteristic equation, we will
make a number of Hurwitz determinants in order to find out the stability of the system. We
define characteristic equation of the system as:

where n determinants for nth order characteristic equation.

PROCEDURE:

 Enter the program in the editor window.


 Execute the program.
 Enter the coefficients of characteristic equation in the command window.
 Finally save the program and run it.
 The Routh matrix is obtained in the command window.

23

17
Program:

clear
clc
%% firstly it is required to get first two row of routh matrix
e=input('enter the coefficients of characteristic equation: ');
disp('-------------------------------------------------------------------------')
l=length(e);
m=mod(l,2);
if m==0
a=rand(1,(l/2));
b=rand(1,(l/2));
for i=1:(l/2)
a(i)=e((2*i)-1);
b(i)=e(2*i);
end
else
e1=[e 0];
a=rand(1,((l+1)/2));
b=[rand(1,((l-1)/2)),0];
for i=1:((l+1)/2)
a(i)=e1((2*i)-1);
b(i)=e1(2*i);
end
end
%% now we genrate the remaining rows of routh matrix
l1=length(a);
c=zeros(l,l1);
c(1,:)=a;
c(2,:)=b;
for m=3:l
for n=1:l1-1
c(m,n)=-(1/c(m-1,1))*det([c((m-2),1) c((m-2),(n+1));c((m-1),1) c((m-1),(n+1))]);
end
end
disp('the routh matrix:')
disp(c)
%% now we check the stablity of system
if c(:,1)>0
disp('System is Stable')
else
disp('System is Unstable');
end

24

18
OUTPUT:
enter the coefficients of characteristic equation: [1 1 3 1 6]
-------------------------------------------------------------------------
the routh matrix:
1 3 6
1 1 0
2 6 0
-2 0 0
6 0 0

System is Unstable

PRE LAB QUESTIONS:


1. What is meant by the stabitity of a system?

2. How to determine stability of a system?

POST LAB QUESTIONS:

1. Define the Routh Hurwitz rule.

Result:
Thus, the stability of a system using Routh Hurwitz method was determined.

25

19
Exercise Number: 5 Date:
Exp. No.: 5

Title of the Experiment: STABILITY ANALYSIS OF LINEAR SYSTEM USING ROOT LOCUS
Date of the Exercise:

OBJECTIVE (AIM) OF THE EXPERIMENT

• To analyze the stability of the system by using Root locus,

FACILITIES REQUIRED AND PROCEDURE

• FACILITIES REQUIRED TO DO THE EXPERIMENT:

S.NO APPARATUS QUANTITY


1. Personal Computer 1
2. Matlab Software 1

• ROOT LOCUS

• THEORY:
The root locus technique is a powerful tool for adjusting the location of closed
loop poles to achieve the desired system performance by varying one or more system
parameters. The path taken by the roots of the characteristics equation when open
loop gain K is varied from 0 to ∞ are called root loci.

• PROCEDURE:

1. Enter the command window of the MATLAB.


2. Create a new M – file by selecting File – New – M – File.
3. Type and save the program.
4. Execute the program by either pressing F5 or Debug – Run.
5. View the results.
6. Analyze the stability of the system for various values of gain.

DESIGN PROCEDURE/ DESIGN CALCULATIONS:

Problem:

The open loop transfer function of a unity feedback system G(s)=K/s (s2 +8s+17)
Draw the root locus using MATLAB Software. (Assume K=1).

26

20
Matlab Program:

% Root locus of the transfer function G(s)=1/(S^3+8S^2+17S)

num=[1];

den=[1 8 17 0];

figure(1);

rlocus(num,den);

Title('Root Locus for the transfer function G(s)=1/(S^3+8S^2+17S)')

grid;

Matlab Output:

27

21
Pre lab questions:

• Define stability of the system.

• What are the disadvantages of RH criterion?

• How many roots are in the left half of s plane for the equation s3 - 4s2 + s + 6 ?

Post lab questions:

• Discuss the effects of adding poles and zeros in a closed loop system.

Result:
• The transfer function of an unity feedback system is G(s) = k/s(s+2). Find the
Thus, the stability
centroid of the system
and breakaway point.by using Root locus was determined.

28

22
Exercise Number: 6
Exp. No.: 6 Date:

Title of the Experiment: FREQUENCY RESPONSE ANALYSIS USING BODE PLOT


Date of the Exercise:

OBJECTIVE (AIM) OF THE EXPERIMENT

To analyze the stability of the given linear system using Bode plot .

FACILITIES REQUIRED AND PROCEDURE

• FACILITIES REQUIRED TO DO THE EXPERIMENT:

S.NO APPARATUS QUANTITY


1. Personal Computer 1
2. Matlab Software 1

• BODE PLOT :

THEORY:
The bode plot is a frequency response plot of the transfer function of a system.
A bode plot consists of two graphs. One is plot of the magnitude of a sinusoidal
transfer function versus log ω . The other is plot of the phase angle of a sinusoidal
transfer function versus logω .The main advantage of the bode plot is that
multiplication of magnitude can be converted into addition. Also a simple method for
sketching an approximate log magnitude curve is available.

DESIGN PROCEDURE/ DESIGN CALCULATIONS:

Problem:

• The open loop transfer function of a unity feedback system G(s)=K/s(s2 +2s+3)
Draw the Bode Plot. Find (i)Gain Margin (ii)Phase Margin (iii)Gain cross over
frequency (iv)Phase cross over frequency (v) Resonant Peak (vi)Resonant
Frequency (vii)Bandwidth and Check the same results using MATLAB
Software. (Assume K=1)

29

23
Matlab Program:

%Draw the Bode Plot for the given transfer functionG(S)=1/S(S2+2S+3) %Find (i)Gain
Margin (ii) Phase Margin (iii) Gain Cross over Frequency %(iv) Phase Cross over Frequency
(v)Resonant Peak (vi)Resonant %Frequency (vii)Bandwidth

num=[1 ];
den=[1 2 3 0];
w=logspace(-1,3,100);
figure(1);
bode(num,den,w);
title('Bode Plot for the given transfer function G(s)=1/s(s^2+2s+3)')
grid;
[Gm Pm Wcg Wcp] =margin(num,den);
Gain_Margin_dB=20*log10(Gm)
Phase_Margin=Pm
Gaincrossover_Frequency=Wcp
Phasecrossover_Frequency=Wcg
[M P w]=bode(num,den);
[Mp i]=max(M);
Resonant_PeakdB=20*log10(Mp)
Wp=w(i);
Resonant_Frequency=Wp
for i=1:1:length(M);
if M(i)<=1/(sqrt(2));
Bandwidth=w(i)
break;
end;
end;

Matlab Output:

30

24
Gain_Margin_dB =15.5630

Phase_Margin = 76.8410

Gaincrossover_Frequency = 0.3374rad/sec

Phasecrossover_Frequency= 1.7321 rad/sec

Resonant_PeakdB = 10.4672

Resonant_Frequency = 0.1000 rad/sec

Bandwidth = 0.5356

Pre lab questions:

• Define frequency response analysis.

• What is Gain margin and phase margin?

Post lab questions:

• What are theadvantages and disadvantages of Bode plot?

• How can you analyse the stability of the system with Bode plot?

Result:

Thus, the stability of the given linear system using Bode plot was determined.

31

25
Exp. No.: 7 Exercise Number: 7 Date:

Title of the Experiment: FREQUENCY RESPONSE ANALYSIS USING POLAR PLOT


Date of the Exercise:

OBJECTIVE (AIM) OF THE EXPERIMENT

• To analyze the stability of the given linear system using polar plot.

FACILITIES REQUIRED AND PROCEDURE

• FACILITIES REQUIRED TO DO THE EXPERIMENT:

S.NO APPARATUS QUANTITY


1. Personal Computer 1
2. Matlab Software 1

• POLAR PLOT :

THEORY:
The Polar plot provides a simple test for stability of a closed- loop control
system by examining the open-loop system. Stability of the closed-loop control system
may be determined directly by computing the poles of the closed-loop transfer function.
The Polar Criteria can tell us things about the frequency characteristics of the system.
A Polar 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 frequencry as a parameter along the curve.

DESIGN PROCEDURE/ DESIGN CALCULATIONS:

Problem:

• The open loop transfer function of a unity feedback system G(s)=K/s(s2 +2s+3)
Draw the Polar Plot. Find (i)Gain Margin (ii)Phase Margin (iii)Gain cross over
frequency (iv)Phase cross over frequency and Check the same results using
MATLAB Software. (Assume K=1)

32

26
Matlab Program:

%Polar Plot for the Transfer Function G(s)=1/(s+1)^3

num=[1];

den=[1 3 3 1];

figure(1);

polar (num,den)

Title('Polar Plot for the Transfer Function G(s)=1/(s+1)^3')

[Gm,Pm,Wcg,Wcp] = margin(num,den)

grid;

[Gm,Pm,Wcg,Wcp] = margin(num,den);

Gain_Margin = Gm

Phase_Margin = Pm

PhaseCrossover_Frequency = Wcg

GainCrossover_Frequency = Wc

Matlab Output:

Gain_Margin = 8.0011

Phase_Margin = -180

33

27
PhaseCrossover_Frequency = 1.7322 rad/sec

GainCrossover_Frequency = 0 rad/sec

Pre lab questions:

• What is contour?

• Define the type number and order of the system.

Post lab questions:

• Explain the conditions for stable system in Polar plot.

• State Polar stability criterion.

Result:

Thus, the stability of the given linear system using polar plot was determined.

34

28
Answers

num = 20
den = 1 5 4 0
Transfer function:
20
-----------------
s^3 + 5 s^2 + 4 s
Gm = 1.0000
Pm = 7.3342e-006
Wcp = 2.0000
Wcp = 2.0000
PM = -135
Wg = 0.7016
beta = 5.7480
tau = 11.4025
Transfer function:
11.4 s + 1
-----------
65.54 s + 1
Transfer function:
228 s + 20
---------------------------------------
65.54 s^4 + 328.7 s^3 + 267.2 s^2 + 4 s
Gm1 = 5.2261
Pm1 = 38.9569
Wcg1 = 1.9073
Wcp1 = 0.7053

29
Ex. No: Date:
Exp. No.: 8
Date:

10. DESIGN OF LEAD, LAG AND LEAD-LAG COMPENSATORS


AIM :

To Design the Lead, Lag and Lead-Lag compensator for the system using MATLAB
Software.

APPARATUS REQUIRED :

1. MATLAB Software.

DESIGN PROCEDURE

1. Design a Phase Lag compensator for the unity feedback transfer function G(s)=K
/s(s+1)(s+4) has specifications : a. Phase Margin>_ 400 b. The steady state error for ramp
input is less than or equal to 0.2 and check the results using MATLAB Software.

Solution

num=[20]

den=[1 5 4 0]

G=tf(num,den)

figure(1);

bode(num,den);

Title('bode plot for uncompensated system G(s)=20/S(S+1)(S+4)')

grid;

[Gm,Pm,Wcp,Wcp]=MARGIN(num,den)

30
Gmdb=20*log10(Gm);

W=logspace(-1,1,100)';

[mag,ph]=BODE(G,W);

ph=reshape(ph,100,1);

mag=reshape(mag,100,1);

PM=-180+40+5

Wg=interp1(ph,W,PM)

beta=interp1(ph,mag,PM)

tau=8/Wg

D=tf([tau 1],[beta*tau 1])

Gc=D*G

figure(2);

bode(Gc);

Title('Bode Plot for the Lag compensated System')

grid;

[Gm1,Pm1,Wcg1,Wcp1]=MARGIN(Gc)

31
bode plot f or uncompensated system G(s)=20/S(S+1)(S+4)
100

50
Magnitude (dB)

-50

-100
-90

-135
Phase (deg)

-180

-225

-270
-2 -1 0 1 2
10 10 10 10 10
Frequency (rad/sec)

Bode Plot for the Lag compensated System


100

50
Magnitude (dB)

-50

-100

-150
-90

-135
Phase (deg)

-180

-225

-270
-4 -3 -2 -1 0 1 2
10 10 10 10 10 10 10
Frequency (rad/sec)

32
2. Design a Phase Lead compensator for the unity feedback transfer function G(s)=K
/s(s+2) has specifications : a. Phase Margin>_ 550 b. The steady state error for ramp
input is less than or equal to 0.33 and check the results using MATLAB Software. (Assume
K=1)

Solution

num=[5]

den=[1 2 0]

G=tf(num,den)

figure(1);

bode(num,den);

Title('Bode Plot for uncompensated system G(s)=5/s(s+2)')

grid;

[Gm,Pm,Wcg,Wcp]=MARGIN(num,den)

GmdB=20*log10(Gm)

PM=55-Pm+3

alpha=(1-sin(PM*pi/180))/(1+sin(PM*pi/180))

Gm=-20*log10(1/sqrt(alpha))

w=logspace(-1,1,100)';

[mag1,phase1]=BODE(num,den,w);

mag=20*log10(mag1);

magdB=reshape(mag,100,1);

Wm=interp1(magdB,w,-20*log10(1/sqrt(alpha)))

33
tau=1/(Wm*sqrt(alpha))

D=tf([tau 1],[alpha*tau 1])

Gc=D*G

figure(2);

bode(Gc);

Title('Bode Plot for the Lead Compensated System')

grid;

[Gm1,Pm1,Wcg1,Wcp1]=MARGIN(Gc)

Answers

num = 5
den = 1 2 0
Transfer function:
5
---------
s^2 + 2 s
Gm = Inf
Pm = 47.3878
Wcg = Inf
Wcp = 1.8399
GmdB = Inf
PM = 10.6122
alpha = 0.6890
Gm = -1.6181
Wm = 2.0853
tau = 0.5777
Transfer function:
0.5777 s + 1
------------
0.398 s + 1

34
Transfer function:
2.889 s + 5
---------------------------
0.398 s^3 + 1.796 s^2 + 2 s
Gm1 = Inf
Pm1 = 54.4212
Wcg1 = Inf
Wcp1 = 2.0849

Bode Plot f or uncompensated system G(s)=5/s(s+2)


40

20
Magnitude (dB)

-20

-40

-60

-80
-90
Phase (deg)

-135

-180
-1 0 1 2
10 10 10 10
Frequency (rad/sec)

Bode Plot f or the Lead Compensated System


40

20
Magnitude (dB)

-20

-40

-60

-80
-90
Phase (deg)

-135

-180
-1 0 1 2
10 10 10 10
Frequency (rad/sec)

35
3. Design a Phase Lead-lag compensator for the unity feedback transfer function G(s)=K
/s(s+1)(s+2) has specifications : a. Phase Margin>_ 500 b. The Velocity error constant
Kv=10 sec-1 and check the results using MATLAB Software. (Assume K=1).

Solution

num=[20]
den=[1 3 2 0]

G=tf(num,den)
figure(1);

bode(num,den);
Title('bode Plot for Uncompensated System G(s)=20/S(S+1)(S+2)')

grid;
[Gm,Pm,Wcg,Wcp]=MARGIN(num,den)

GmdB=20*log10(Gm);
W=logspace(-1,1,100)';

%Bode Plot for Lag Section


[mag,ph]=BODE(G,W);

ph=reshape(ph,100,1);
mag=reshape(mag,100,1);

PM=-180+50+5
Wg=interp1(ph,W,PM)

beta=interp1(ph,mag,PM)
tau=8/Wg

D=tf([tau 1],[beta*tau 1])


%Bode Plot for Lead section

alpha=20/beta
mag=20*log10(mag)
Gm=-20*log10(1/sqrt(alpha))

36
Wm=interp1(mag,W,-20*log10(1/sqrt(alpha)))
tau=1/(Wm*sqrt(alpha))

E=tf([tau 1],[alpha*tau 1])


Gc1=D*E*G

figure(2);
bode(Gc1);

Title('Bode Plot for the Lag-lead compensated System')


grid;

[Gm1,Pm1,Wcg1,Wcp1]=MARGIN(Gc1)

Answers

num = 20
den = 1 3 2 0
Transfer function:
20
-----------------
s^3 + 3 s^2 + 2 s
Gm = 0.3000
Pm = -28.0814
Wcg = 1.4142
Wcp = 2.4253
PM = -125
Wg = 0.4247
beta = 21.2032
tau = 18.8362
Transfer function:
18.84 s + 1
-----------
399.4 s + 1
alpha = 0.9433
Gm = -0.2537
Wm = 2.4546
tau = 0.4195
Transfer function:
0.4195 s + 1
------------
0.3957 s + 1
Transfer function:

37
158 s^2 + 385.1 s + 20
------------------------------------------------
158 s^5 + 873.9 s^4 + 1516 s^3 + 802.6 s^2 + 2 s
Gm1 = 6.1202
Pm1 = 48.5839
Wcg1 = 1.3976
Wcp1 = 0.4279

bode Plot f or Uncompensated System G(s)=20/S(S+1)(S+2)


100

50
Magnitude (dB)

-50

-100
-90

-135
Phase (deg)

-180

-225

-270
-2 -1 0 1 2
10 10 10 10 10
Frequency (rad/sec)

Bode Plot f or the Lag-lead compensated System


150

100
Magnitude (dB)

50

-50

-100

-150
-90

-135
Phase (deg)

-180

-225

-270
-4 -3 -2 -1 0 1 2
10 10 10 10 10 10 10
Frequency (rad/sec)

RESULT

Thus, the Lead, Lag and Lead-Lag compensator for the system was designed.

38
Exp. No.: 9 Exercise Number:8 Date:

Title of the Experiment: Design of PID Controller for first order and second order systems
Date of the Exercise:

OBJECTIVE OF THE EXPERIMENT

To design a PID controller for the following first order and second order system,
3.6
1. 𝐺 (𝑠) =
(𝑠+10)
5
2. 𝐺 (𝑠) = 2
𝑠 +6𝑠+5

Your design should satisfy the following specifications:


i) Percentage overshoot < 15%.
ii) Rise time < 100 msec.
iii) Settling time < 500 msec.
iv)Zero steady-state error to a step.

FACILITIES REQUIRED AND PROCEDURE

d) FACILITIES REQUIRED TO DO THE EXPERIMENT:

S.NO APPARATUS SPECIFICATION QUANTITY


1. PC - 1
2. MATLAB Any version Package

e) THEORY:

Most PID controllers are adjusted on-site and many different types of tuning rules
have been proposed in different literatures. Using these tuning rules, delicate and fine tuning
of PID controllers can be made on-site. Also, automatic tuning methods have been developed
and some of the PID controllers may possess on-line automatic tuning capabilities. Modified
forms of PID control, such as I-PD control and two-degrees-of- freedom PID control, are
currently in use in industry

f) PROCEDURE:

 Implement the understanding of effects of Proportional, Integral and Derivative Gains


over the system response.

g) DESIGN PROCEDURE/ DESIGN CALCULATIONS:

Trial and Error basis


If needed use the cascaded controllers like PID with another PID or any other
combinations in series.

35

39
e) BLOCK DIAGRAM:

f) DESIGN PARAMETERS OF PID CONTROLLERS:

FIRST ORDER SYSTEM:


Kp =
Ki =
Kd =

SECOND ORDER SYSTEM:

Kp =
Ki =

36

40
Kd =
g) MODEL OUTPUT RESPONSE:

Figure 1: First order uncontrolled open loop response

37

41
Figure 2: First order controlled closed loop response

Figure 3: Second order uncontrolled open loop response

Figure 4: Second order controlled closed loop response

38

42
Pre lab questions:
2. What is conventional controller?

2. What is the effect of P, I and D on output response of a system?

Post lab questions:

3. List the advantages of PID over PI controller.


4. What is the effect of addition of poles and zeros to a system?

Result:

Thus, the PID controller of first order and second order system was designed.

39

43
Exp. No.: 10 Date:

Discretization of continuous system and effect of sampling

AIM:
To discretization of continuous system and effect of sampling of first and second
order system.

APPARATUS REQUIED:
MATLAB Software

THEORY:

Discretization is the process through which a continuous system (function/equation) is


converted into a discrete system (function/equation). In engineering applications we use
computers and microcontrollers to carry out computing and control tasks. These
machines need discretized mathematical models of the control functions, which are
suitable for numerical implementation and evaluation.

Every time a continuous system is discretized, there will be some level of discretization
error. This happens because the discretized model is an approximation of the continuous
model.

In the Control System domain, through discretization, a transfer function H(s) is


converted from the s-domain (Laplace) into the z-domain (discrete) transfer function
H(z).

There are several techniques (methods) for transfer function discretization, the most
common being:

➢ Forward Euler (difference) discretization


➢ Backward Euler (difference) discretization
➢ Trapezoidal (Tustin) discretization

44
Continuous system – step input time response

This step input response is going to be used as a comparison baseline with the discretized
systems.

Step input system response – continuous system

Using the discretization methods above, we are going to convert the transfer function of
the first order system H(s) from continuous time domain (s) to discrete time domain (z).

45
As you can see, the discretized version (forward Euler) of the first order system is made
up entirely of algebraic operations. This allows the equation to be encoded into
programming languages (like C, C++) and run on microcontrollers.

The [k] values represent the values at the current calculation step and the [k-1] values
represent the values at the previous calculation step. For example u[k-1] is the value of
the input signal at the previous calculation step and y[k-1] is the value of the output at
previous calculation step.

To verify if the discretized function gives the same output for a step response as the
continuous version (equation (1)), we are going to implement equation (8) in Xcos as a
block diagram.

46
Discrete system (forward Euler) for first order system – Xcos block diagram

Running the model with a sample time of 0.01 s will result in the same output as for the
continuous system.

Discrete system (forward Euler) for first order system – step input response

47
48
Discrete system (backward Euler) for first order system – Xcos block diagram

Running the model with a sample time of 0.01 s will result in the same output as for the
continuous system.

Discrete system (forward Euler) for first order system – step input response

49
50
Discrete system (trapezoidal) – step input time response

Running the model with a sample time of 0.01 s will result in the same output as for the
continuous system.

Discrete system (trapezoidal / Tustin) for first order system – step input response

RESULT:

Thus, the discretization of continuous system and effect of sampling of first and
second order system was obtained.

51
Exp. No.: 11 Date:

Test of controllability and observability in continuous and discrete


domain in simulation platform

AIM:
To test controllability and observability properties of the system by both Kalman’s
Test and Gilbert’s Test mathematically.

APPARATUS REQUIED:
MATLAB Software

Learning Outcomes:
After the successful completion of this experiment, students will be able to
1. Test controllability and observability properties of the system
2. Verify controllability and observability by software programming

PROGRAM:

%% Check for observability and controllability


% Name of student: Roll No.

clear
close all
clc

%% Initial values
r=3; % number at the unit place in roll number
d=1; % number at tenth place in date of birth
m=1; % number at unit place in month of birth

A31=d*m*r; A32=d*m+(d+m)*r; A33=d+m+r;

%% Problem: Consider the system representation


A=[0 1 0;0 0 1;-A31 -A32 -A33];
B=[0; 0; 1];
C=[1 0 0];

% eigenvaues (just for checking stability)


E=eig(A);

%% Controllability Test
% Kalman's Test: Method 1 (by calculation)
Qc1=[B A*B A^2*B];

52
R1=rank(Qc1);

% Kalman's Test: Method 2 (using inbuilt command)


Qc2=ctrb(A,B);
R2=rank(Qc2);

% Gilbert's Test
[M,D]=eig(A); % To get diagonal and modal matrices
lambda=inv(M)*A*M;
B_tilde=inv(M)*B;

%% Observability Test
% Kalman's Test: Method 1 (by calculation)
Qo1=[C; C*A; C*A^2];
R3=rank(Qo1);

% Kalman's Test: Method 2 (using inbuilt command)


Qo2=obsv(A,C);
R4=rank(Qo2);

% Gilbert's Test
C_tilde=C*M;

RESULT:

Thus, the controllability and observability properties of the system by both


Kalman’s Test and Gilbert’s Test mathematically was obtained.

53
CONTROL SYSTEMS AND SIMULATION LAB

Exp. No.: 12 Date:


Experiment - 10
STATE SPACE MODEL FOR CLASSICAL TRANSFER FUNCTION USING MATLAB
Aim:
To obtain the state space model for the given transfer function.

Apparatus:
S.No. Apparatus Range Quantity
1 Personal Computer with MATLAB software --- 01

Problem Specifications:
2) Input is num=[ ]
den=[ ]

Procedure:
1) Obtain the state space model of the given system represented in the form of transfer function.
2) Verify the result with MATLAB.

Sample Program:
%Conversion of Transfer Function to State Space%
num=[ ]
den=[ ]
sys=tf(num,den)
[A B C D]=tf2ss(num,den)

Dept of EEE Page 45


54
CONTROL SYSTEMS AND SIMULATION LAB

Theoretical calculations:

Result:

Thus, the the state space model for the given transfer function was obtained.

Dept of EEE Page 46


55
CONTROL SYSTEMS AND SIMULATION LAB

Exp. No.: 13 Date:


Experiment - 12
DETERMINATION OF STEADYSTATE ERROR USING MATLAB
Aim : To obtain the steady state error for the given input.

Apparatus:
S.No. Apparatus Range Quantity
1 Personal Computer with MATLAB software --- 01

Procedure :

1. Obtain the steady state error for the given input.


2. Verify the result with matlab.

Program :
clear();

numg=[1 0]

deng=[1 2]

numg=conv(conv[1 0],[1 2])

G=tf(numg,deng)

kp=dcgain(G);

ess=5\1+kp

numsg=conv([1 0],numg)

densg=deng

sg=tf(numsg,densg)

kv=dcgain(sg)

ess=5\kv

nums2g=conv([1 0],numsg)

dens2g=densg

s2g=tf(nums2g,dens2g)

kp=dcgain(s2g)

ess=3\ka

Dept of EEE Page 52


56
CONTROL SYSTEMS AND SIMULATION LAB

Theoretical calculations:

Result:

Thus, the steady state error for the given input was obtained.

Dept of EEE Page 53


57

You might also like

pFad - Phonifier reborn

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

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


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy