0% found this document useful (0 votes)
4 views62 pages

Control System Lab Manual

The Control Systems Laboratory Manual for the Electronics & Communication Engineering department outlines the course objectives, teaching methodologies, and assessment details for the BEC403 course. It emphasizes the importance of practical knowledge, problem-solving skills, and ethical considerations in engineering education. The manual also includes specific modules covering control systems concepts, stability analysis, and practical experiments to enhance student learning and competency.

Uploaded by

Nishitha Girish
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)
4 views62 pages

Control System Lab Manual

The Control Systems Laboratory Manual for the Electronics & Communication Engineering department outlines the course objectives, teaching methodologies, and assessment details for the BEC403 course. It emphasizes the importance of practical knowledge, problem-solving skills, and ethical considerations in engineering education. The manual also includes specific modules covering control systems concepts, stability analysis, and practical experiments to enhance student learning and competency.

Uploaded by

Nishitha Girish
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/ 62

Department of Electronics & Communication Engineering

Control Systems Laboratory Manual


[BEC403]
4 SEMESTER, EVEN – 2024
th

Prepared by

Dr. Basavanna M Spoorthi Y Sri Yuvaraju T


Assistant Professor Assistant Professor Assistant. Professor
ECE DEPT, GSSSIETW ECE DEPT, GSSSIETW ECE DEPT, GSSSIETW
Vision of the Department:
"To foster professional level competence in all areas of Electronics and Communication
Engineering and to benchmark the Department as a centre for nurturing Women
Engineers in the Country"

Mission of the Department:


M1: To impart value based Technical education and training.

M2: To impart Theoretical Knowledge, Practical Knowledge and Entrepreneurship


Skills.

M3: Fostering culture of innovation and research for development of society.

M4: To sensitize the Students regarding Social, Moral and Professional ethics.

M5: To provide industry standard certifications on skills to enhance students knowledge


make them prepared for placements.

PROGRAM EDUCATIONAL OBJECTIVES

PEO1: To inculcate students to excel in professional career and/or higher education by


acquiring knowledge in the field of Electronics and Communication.

PEO2: To make the students capable of managing their profession based on existing as
well as new emerging technologies in the area of Electronics and Communication
Engineering.

PEO3: To Produce Technically competent graduates with ability to analyze, design,


develop, optimize and implement Electronics and Communication systems.

PEO4: To prepare the students to be able to exhibit professionalism, ethical attitude,


communication skills, team work in their profession and to adapt to current trends
by engaging in life-long learning.
Program Outcomes

Engineering Graduates will be able to:

1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering


fundamentals, and an engineering specialization to the solution of complex engineering
problems.
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.
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.
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.
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.
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.
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.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or leader
in diverse teams, and in multidisciplinary settings.
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.
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.
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

PSO1. Graduates will have the ability to mould the technology in the areas of Analog and Digital
Scenario.

PSO2. Implementation of functional Blocks of hardware software co-design for signal


processing and communication application.
03.10.2022

VISVESVARAYA TECHNOLOGICAL UNIVERSITY, BELAGAVI


B.E: Electronics & Communication Engineering / B.E: Electronics & Telecommunication
Engineering NEP, Outcome Based Education (OBE) and Choice Based Credit System (CBCS)
(Effective from the academic year 2023 – 24)

IV Semester

Control Systems
Course Code BEC403 CIE Marks 50
Teaching Hours/Week (L: T: P) (3:0:2) SEE Marks 50
Total Hours of Pedagogy 40 hours Theory + 12 Lab slots Total Marks 100
Credits 04 Exam Hours 03
Course objectives: This course will enable students to:
1. Understand basics of control systems and design mathematical models using block diagram
reduction, SFG, etc.
2. Understand Time domain and Frequency domain analysis.
3. Analyze the stability of a system from the transfer function
4. Familiarize with the State Space Model of the system.

Teaching-Learning Process (General Instructions)


These are sample Strategies, which teacher can use to accelerate the attainment of the various
course outcomes.
• Lecture method (L) does not mean only traditional lecture method, but different type of
teaching methods may be adopted to develop the outcomes.
• Show Video/animation films to explain the different concepts of Linear Algebra & Signal
Processing.
• Encourage collaborative (Group) Learning in the class.
• Ask at least three HOTS (Higher order Thinking) questions in the class, which promotes
critical thinking.
• Adopt Problem Based Learning (PBL), which fosters students’ Analytical skills, develop
thinking skills such as the ability to evaluate, generalize, and analyze information rather than
simply recall it.
• Topics will be introduced in a multiple representation.
• Show the different ways to solve the same problem and encourage the students to come up
withtheir own creative ways to solve them.
• Discuss how every concept can be applied to the real world - and when that's possible, it
helps improve the students' understanding.
• Adopt Flipped class technique by sharing the materials / Sample Videos prior to the class and
have discussions on the that topic in the succeeding classes.
• Give Programming Assignments.
Module-1
Introduction to Control Systems: Types of Control Systems, Effect of Feedback Systems,
Differential equation of Physical Systems -Mechanical Systems, Electrical Systems, Analogous
Systems. (Textbook 1: Chapter 1.1, 2.2)

Teaching- Chalk and Talk, YouTube videos


LearningProcess RBT Level: L1, L2, L3
03.10.2022

Module-2
Block diagrams and signal flow graphs: Transfer functions, Block diagram algebra and Signal
Flow graphs. (Textbook 1: Chapter 2.4, 2.5, 2.6)
Teaching- Chalk and Talk, YouTube videos, Any software tool to implement block diagram
LearningProcess reduction techniques and Signal Flow graphs
RBT Level: L1, L2, L3
Module-3
Time Response of feedback control systems: Standard test signals, Unit step response of First
and Second order Systems. Time response specifications, Time response specifications of second
order systems, steady state errors and error constants. Introduction to PI, PD and PID Controllers
(excluding design). (Textbook 1: Chapter 5.3, 5.4, 5.5)
Teaching- Chalk and Talk, YouTube videos, Any software tool to show time
LearningProcess response for various transfer functions and PI, PD and PID controllers.
RBT Level: L1, L2, L3
Module-4
Stability analysis: Concepts of stability, Necessary conditions for Stability, Routh stability
criterion, Relative stability analysis: more on the Routh stability criterion.
Introduction to Root-Locus Techniques, The root locus concepts, Construction of root loci.
(Textbook 1: Chapter 6.1, 6.2, 6.4, 6.5, 7.1, 7.2, 7.3)
Teaching- Chalk and Talk, YouTube videos, Any software tool to plot Root locus for
LearningProcess various transfer functions
RBT Level: L1, L2, L3
Module-5
Frequency domain analysis and stability: Correlation between time and frequency response,
Bode Plots, Experimental determination of transfer function. (Textbook 1: Chapter 4: 8.1, 8.2, 8.4)
Mathematical preliminaries, Nyquist Stability criterion, (Stability criteria related to polar plots are
excluded) (Textbook 1: 9.2, 9.3)
State Variable Analysis: Introduction to state variable analysis: Concepts of state, state variable
and state models. State model for Linear continuous –Time systems, solution of state equations.
(Textbook 1: 12.2, 12.3, 12.6)
Teaching- Chalk and Talk, YouTube videos, Any software tool to draw Bode plot
LearningProcess for various transfer functions
RBT Level: L1, L2, L3

PRACTICAL COMPONENT OF IPCC


Using suitable simulation software (P-Spice/ MATLAB / Python / Scilab / OCTAVE / LabVIEW)
demonstrate the operation of the following circuits:
Sl.No Experiments
1 Implement Block diagram reduction technique to obtain transfer function a control system.
2 Implement Signal Flow graph to obtain transfer function a control system.
3 Simulation of poles and zeros of a transfer function.
4 Implement time response specification of a second order Under damped System, for different
damping factors.
5 Implement frequency response of a second order System.
6 Implement frequency response of a lead lag compensator.
7 Analyze the stability of the given system using Routh stability criterion.
8 Analyze the stability of the given system using Root locus.
9 Analyze the stability of the given system using Bode plots.
10 Analyze the stability of the given system using Nyquist plot.
11 Obtain the time response from state model of a system.
12 Implement PI and PD Controllers.
13 Implement a PID Controller and hence realize an Error Detector.
14 Demonstrate the effect of PI, PD and PID controller on the system response.
03.10.2022

Course Outcomes

At the end of the course the student will be able to:


1. Deduce transfer function of a given physical system, from differential equation
representation or Block Diagram representation and SFG representation.
2. Calculate time response specifications and analyse the stability of the system.
3. Draw and analyse the effect of gain on system behaviour using root loci.
4. Perform frequency response Analysis and find the stability of the system.
5. Represent State model of the system and find the time response of the system.

Assessment Details (both CIE and SEE)


The weightage of Continuous Internal Evaluation (CIE) is 50% and for Semester End Exam
(SEE) is 50%. The minimum passing mark for the CIE is 40% of the maximum marks (20
marks). A student shall be deemed to have satisfied the academic requirements and earned the
credits allotted to each subject/ course if the student secures not less than 35% (18 Marks out
of 50) in the semester-end examination (SEE), and a minimum of 40% (40 marks out of 100) in
the sum total of the CIE (Continuous Internal Evaluation) and SEE (Semester End Examination)
taken together

CIE for the theory component of IPCC


Two Tests each of 20 Marks (duration 01 hour)
• First test at the end of 5th week of the semester
• Second test at the end of the 10th week of the semester
Two assignments each of 10 Marks
• First assignment at the end of 4th week of the semester
• Second assignment at the end of 9th week of the semester
Scaled-down marks of two tests and two assignments added will be CIE marks for the theory
component of IPCC for 30 marks.

CIE for the practical component of IPCC


• On completion of every experiment/program in the laboratory, the students shall be
evaluated and marks shall be awarded on the same day. The 15 marks are for
conducting the experiment and preparation of the laboratory record, the other 05
marks shall be for the test conducted at the end of the semester.
• The CIE marks awarded in the case of the Practical component shall be based on the
continuous evaluation of the laboratory report. Each experiment report can be
evaluated for 10 marks. Marks of all experiments’ write-ups are added and scaled down
to 15 marks.
• The laboratory test (duration 03 hours) at the end of the 15th week of the semester
/after completion of all the experiments (whichever is early) shall be conducted for
50 marks and scaled down to 05 marks.
• Scaled-down marks of write-up evaluations and tests added will be CIE marks for the
laboratory component of IPCC for 20 marks.
03.10.2022

SEE for IPCC


Theory SEE will be conducted by University as per the scheduled timetable, with common
question papers for the course (duration 03 hours)
• The question paper will have ten questions. Each question is set for 20 marks.
• There will be 2 questions from each module. Each of the two questions under a
module (with a maximum of 3 sub-questions), should have a mix of topics under that
module.
• The students have to answer 5 full questions, selecting one full question from each
module.

The theory portion of the IPCC shall be for both CIE and SEE, whereas the practical
portion will have a CIE component only. Questions mentioned in the SEE paper shall
include questions from the practical component.
• The minimum marks to be secured in CIE to appear for SEE shall be the 12 (40% of
maximum marks-30) in the theory component and 08 (40% of maximum marks -20) in
the practical component. The laboratory component of the IPCC shall be for CIE only.
However, in SEE, the questions from the laboratory component shall be included. The
maximum of 04/05 questions to be set from the practical component of IPCC, the total
marks of all questions should not be more than the 20 marks.

SEE will be conducted for 100 marks and students shall secure 35% of the maximum marks to
qualify inthe SEE. Marks secured out of 100 shall be reduced proportionally to 50.
Suggested Learning Resources:
Text Books
1. Control Systems Engineering, I J Nagrath, M. Gopal, New age international Publishers, Fifth
edition.

Web links and Video Lectures (e-Resources):


• https://nptel.ac.in/courses/108106098

Activity Based Learning (Suggested Activities in Class)/ Practical Based learning


Programming Assignments / Mini Projects can be given to improve programming skills
Department of Electronics and Communication Engineering
Year of Study: 2024-25

SEMESTER & YEAR: 4th EVEN 2025 FACULTY NAME: Dr. Basavanna M, Smt. Spoorthi Y and
Mr. Yuvaraju T

COURSE NAME/CODE: Control Systems (BEC403)/C218

Course Outcomes
Students will be able to deduce transfer function of a given physical system,
C 218.1 from differential equation representation or Block Diagram representation and
SFG representation.
Students will be able to calculate time response specifications and analyze the
C 218.2
stability of the system.
Students will be able to draw and analyze the effect of gain on system behavior
C 218.3
using root loci.
Students will be able to perform frequency response Analysis and find the
C 218.4
stability of the system.
Students will be able to represent state model of the system and find the time
C 218.5
response of the system.
IMPORTANT INSTRUCTIONS TO THE STUDENTS

1. You should come prepared for the experiments to be done in the lab.

2. Data sheet should be complete with theoretical calculations and the program.

3. Lab record should be complete with theory, theoretical calculations, program, and
observations.

4. You should try to analyze and understand the solved problems and then solve the
unsolved problems of the experiment in the lab.

5. Results of all the problems solved in the lab should be properly noted down in the
data sheet and the output must be plotted on the graph sheet in the lab.

6. You have to get your results verified and observation copies checked by the
instructor before leaving the lab for the day.

7. You should maintain a folder of all the programs you do in the lab in the computer
you use by your name/roll no.

8. Maintain the timings and the discipline of the lab.

9. You will be evaluated in every lab you attend, based on your performance,
observation copy and behavior in the lab.
DO’S AND DON’T’S OF THE LABORATORY
DO’S:
1. Laboratory regulations and procedures for conduction of experiments are to be
followed strictly.

2. Follow the instruction given by faculty members

3. Ensure the main supply is off before making any connection.

4. Make all connections tight.

5. Get the connection checked by the staff before switching on the supply.

6. Keep away from rotating parts motors.

7. During Conduction should be away from the equipments

8. Use all apparatus carefully & replace the same in proper place.

9. For any alteration and change of connection get the approval by the staff.

10. Switch off the supply and remove all the connection made to the Machine / System
after completion of the experiment.

11. Put all the connecting wires in bins.

DONT’S:
1. Do not spread unwanted connecting wires on the table.

2. Do not change connection while supply is on.

3. Do not leave the experiment table unattended while the experimental set up supply
is on.
LIST OF EXPERIMENTS
Control Systems Laboratory
Sl. Page No
Name of Experiment
No
Implement Block diagram reduction technique to obtain transfer 1-3
1
function a control system.
Implement Signal Flow graph to obtain transfer function a control 4-6
2
system.
3 Simulation of poles and zeros of a transfer function. 7-9
Implement time response specification of a second order Under 10-13
4
damped System, for different damping factors.
5 Implement frequency response of a second order System. 14-16
6 Implement frequency response of a lead lag compensator. 17-19
Analyze the stability of the given system using Routh stability 20-23
7
criterion.
8 Analyze the stability of the given system using Root locus. 24-26
9 Analyze the stability of the given system using Bode plots. 27-29
10 Analyze the stability of the given system using Nyquist plot. 30-32
11 Obtain the time response from state model of a system. 33-36
12 Implementation of PI, PD Controllers. 37-41
13 Implement a PID Controller and hence realize an Error Detector. 42-45
Demonstrate the effect of PI, PD and PID controller on the system 46-50
14
response.
Experiment No: 01

Implement Block diagram reduction technique to obtain transfer function


a control system.
Aim: To implement the block diagram reduction technique in order to obtain the transfer
function of a control system using Scilab.

Software Required: SCILAB.

Theory:

A block diagram is a graphical representation of a control system, illustrating the flow of


signals and the relationships between system components. Block diagram reduction involves
simplifying a complex system into a single transfer function, which represents the relationship
between the input and output.

Key Steps in Block Diagram Reduction:

• Series Blocks: If two blocks 𝐺1(𝑠) and 𝐺2(𝑠) are in series, their equivalent transfer
function is 𝐺(𝑠) = 𝐺1(𝑠) ⋅ 𝐺2(𝑠).
• Parallel Blocks: If two blocks 𝐺1(𝑠) and 𝐺2(𝑠) are in parallel, their equivalent transfer
function is 𝐺(𝑠) = 𝐺1(𝑠) + 𝐺2(𝑠).
• Feedback Loop: For a feedback loop with forward transfer function 𝐺(𝑠) and feedback
𝐺(𝑠)
transfer function 𝐻(𝑠), the equivalent transfer function is 𝐺𝑒𝑞 (𝑠) = for
1+𝐺(𝑠)𝐻(𝑠)
𝐺(𝑠)
negative feedback and 𝐺𝑒𝑞 (𝑠) = for positive feedback.
1−(𝑠)𝐻(𝑠)

• Moving Summing Points: Summing points can be moved to simplify the diagram
without changing the overall transfer function.
• Moving Pickoff Points: Pickoff points can be moved in the diagram to facilitate
reduction.
Program

// Define the symbolic variable s


s=%s;

// Define the transfer functions


G1 = 1/(s+1);
G2 = 1/(s+2);
G3 = 1/(s+3);
G4 = (s+1)/(s+4);
G5 = (s-1)/(s+5);

// Simplify the block diagram step-by-step

// Step 1: Combine G1 and G2 in series


G1_G2 = G1 * G2;

// Step 2: Combine G4 and G5 in series


G4_G5 = G4 * G5;

// Step 3: Combine G1_G2 and G4_G5 in parallel


G_parallel = G1_G2 + G4_G5;

// Step 4: Combine the parallel block with G3 in series


G_total = G3 * G_parallel;

// Display the transfer function


disp('The equivalent transfer function is:');
disp(G_total);

Output:

"The equivalent transfer function is:"


18 +6s +2s^2 +3s^3 +s^4
--------------------------------------------------
120 +274s +225s^2 +85s^3 +15s^4 +s^5

Conclusion:

By using the block diagram reduction technique, we can simplify complex control systems into
a single transfer function. This method is crucial for analyzing and designing control systems,
making it easier to understand system behavior.
Viva Questions:

1. What is a block diagram in control systems?


2. How do you combine blocks in series?
3. How do you combine blocks in parallel?
4. What is the formula for the equivalent transfer function of a feedback loop?
5. Why is block diagram reduction important in control systems?
Experiment No: 02

Implement Signal Flow graph to obtain transfer function a control system.


Aim: To implement a signal flow graph (SFG) in order to obtain the transfer function of a
control system using Scilab.

Software Required: SCILAB.

Theory:

A signal flow graph (SFG) is a graphical representation of a set of linear algebraic equations.
It consists of nodes connected by directed branches, where each branch represents a gain and
each node represents a variable. In control systems, SFG is used to represent the relationships
between system variables and to derive the transfer function.

Key Elements of a Signal Flow Graph:

• Nodes: Represent system variables or signals.


• Branches: Directed lines that connect nodes, each with an associated gain (weight).
• Input Node: Node with only outgoing branches.
• Output Node: Node with only incoming branches.

Mason's Gain Formula:

The transfer function 𝑇(𝑠) of a control system represented by an SFG can be obtained using
Mason's Gain Formula:
𝑌(𝑠) ∑𝑁𝑘=1 𝑃𝑘 ∆𝑘
𝑇(𝑠) = =
𝑋(𝑠) Δ

where:
• 𝛥 is the determinant of the graph (1 minus the sum of all loop gains plus the sum of
gains of all possible non-touching loops taken two at a time minus the sum of gains of
all possible non-touching loops taken three at a time, and so on).
• 𝑃𝑘 is the forward path gain of the 𝑘-th forward path.
• ∆𝑘 is the cofactor of 𝑃𝑘 (determinant of the graph with the loops touching the 𝑘-th
forward path removed).
Program

// Define the signal flow graph components

// Define the gains


a1 = syslin('c',%s,%s+1);; // gain from X1 to X2
a2 = syslin('c',%s,%s+2); // gain from X2 to X3
a3 = syslin('c',1,%s+3); // gain from X1 to X3
a4 =syslin('c',1,%s+1); // self-loop gain at X2

// Define the matrices for forward paths and loops


// Forward paths
P1 = a1 * a2; // X1 -> X2 -> X3
P2 = a3; // X1 -> X3 (direct path)

// Loop gains
L1 = a4; // self-loop at X2

// Determine the determinant of the graph (Delta)


Delta = 1 - (L1); // only one loop

// Since there are no non-touching loops, Delta1 and Delta2 are both 1
Delta1 = 1; // cofactor for P1
Delta2 = 1; // cofactor for P2

// Compute the transfer function using Mason's Gain Formula


T = (P1 * Delta1 + P2 * Delta2) / Delta;

// Display the transfer function


disp('The transfer function is:');
disp(T);

Output:

"The transfer function is:"


2 +3s +4s^2 +s^3
---------------------
6s +5s^2 +s^3
Conclusion:

By using the signal flow graph method and Mason's Gain Formula, we can systematically
determine the transfer function of a control system. The Scilab implementation helps in
visualizing and calculating the transfer function, ensuring an understanding of the system's
behavior.

Viva Questions:

1. What is a Signal Flow Graph (SFG)?


2. What is the purpose of using Mason's Gain Formula in SFG?
3. How are nodes and branches defined in an SFG?
4. What is the significance of the determinant (𝛥) in Mason's Gain Formula?
5. Can you explain the concept of non-touching loops in SFG?
Experiment No: 03

Simulation of poles and zeros of a transfer function.


Aim: To simulate and analyze the poles and zeros of a given transfer function using Scilab.

Software Required: SCILAB.

Theory:

In control systems, the transfer function 𝐻(𝑠)of a linear time-invariant system is a ratio of
two polynomials in the Laplace variable 𝑠. It is typically expressed as:

𝑁(𝑠)
𝐻(𝑠) =
𝐷(𝑠)

where 𝑁(𝑠) and 𝐷(𝑠) are polynomial in 𝑠. The roots of the numerator polynomial 𝑁(𝑠) are
called zeros of the transfer function, and the roots of the denominator polynomial 𝐷(𝑠) are
called poles of the transfer function.

Poles:

• Poles of a transfer function determine the stability and transient response of the
system.
• The location of poles in the s-plane (complex plane) provides insight into the system's
behavior. For example, poles on the left half-plane indicate a stable system, while
poles on the right half-plane indicate an unstable system.

Zeros:

• Zeros of a transfer function influence the frequency response and the shape of the
system's response.
• The placement of zeros in the s-plane can enhance or cancel certain frequencies in the
system's output.

Poles and Zeros Analysis:

• By analyzing the poles and zeros of a transfer function, we can determine the stability,
transient response, and frequency response of the system.
• The pole-zero plot is a graphical representation of the poles and zeros in the complex
plane.

Program

clc;
clear;
s=%s;

// Define the numerator and denominator coefficients of the transfer function


num=poly([1, 3, 2],'s','coeff');// Example numerator coefficients
den=poly([1, 5, 6],'s','coeff');// Example denominator coefficients

// Create the transfer function H(s)


H=syslin('c',num,den);
disp("the TF is",H);

// Compute the poles and zeros


[zz,pp,kk]=tf2zp(H);
disp("poles",pp);
disp("zeros",zz);
disp("gain",kk);

// Plot the poles and zeros


clf;
plzr(H);
xlabel('Real Part');
ylabel('Imaginary Part');
title('Pole-Zero Plot of the Transfer Function');

Output:

"the TF is"
1 +3s +2s^2
-----------
1 +5s +6s^2
"poles"
-0.5 + 0.i
-0.3333333 + 0.i
"zeros"
-1. + 0.i
-0.5 + 0.i
"gain"
0.3333333

Conclusion:
By simulating the poles and zeros of a transfer function using Scilab, we can gain valuable
insights into the stability and dynamic behavior of a control system. This analysis is crucial for
designing and tuning control systems to achieve desired performance.

Viva Questions:
1. What are poles and zeros of a transfer function?
2. How do poles affect the stability of a system?
3. What is the significance of zeros in a transfer function?
4. How can you determine the stability of a system by looking at the pole-zero plot?
5. What information can you obtain from the pole-zero plot of a transfer function?
Experiment No: 04

Implement time response specification of a second order Under damped


System, for different damping factors.
Aim: To study and implement the time response specifications of a second order underdamped
system for different damping factors (𝜁) and observe the effects on the system's response.

Software Required: SCILAB.

Theory:

A second order system is described by the standard transfer function:

𝜔𝑛 2
𝐻(𝑠) = 2
𝑠 + 2𝜁𝜔𝑛 𝑠 + 𝜔𝑛 2

where:

• 𝜔𝑛 is the natural frequency.


• 𝜁 is the damping ratio.

The time response of a second order system to a step input is characterized by several key
specifications:

1. Rise Time (𝒕𝒓 ): The time it takes for the response to rise from 0% to 100% of its final
value for the first time.
2. Peak Time (𝒕𝒑 ): The time it takes for the response to reach its first peak.
3. Maximum Overshoot (𝑴𝒑 ): The maximum peak value of the response curve measured
from the final steady-state value, expressed as a percentage.
4. Settling Time (𝒕𝒔 ): The time it takes for the response to remain within a certain
percentage (commonly 2% or 5%) of its final value.

For an underdamped system (0 < 𝜁 < 1), these specifications are influenced by the damping
ratio 𝜁 and the natural frequency 𝝎𝒏 :

• The system oscillates with an exponentially decaying envelope.


• The frequency of oscillation is given by the damped natural frequency
𝜔𝑑 = 𝜔𝑛 √1 − 𝜁 2 .
Program

clc
clear
s=%s;
num=25;
den=poly([25,4,1],'s',"coeff");
T=syslin('c',num,den);
disp("The TF is",T)
t=0:0.0005:5;
Ts=csim('step',t,T);
plot2d(t,Ts);
xgrid;

xtitle( 'Response of second order function to unit step input for T(s)=25/(sˆ2+6*s+25)',
'Time(seconds)', 'C(t)' ) ;

z=coeff(den);
disp("The z value is",z)
Wn=sqrt(z(1,1))
disp("The Wn value is",Wn)
zeta=z(1,2)/(2*Wn)
disp("The Zeta value is",zeta)
Wd=Wn*sqrt(1-zeta^2)
disp("The Damped frequency is",Wd)
Tp=%pi/Wd
disp("The Peak time is",Tp)
Mp=100*(exp((-%pi*zeta)/sqrt(1-zeta^2)))
disp("The Percentage of peak Overshoot is",Mp)
Td=(1+0.7*zeta)/Wn
disp("The Delay time is",Td)
Theta=atan(sqrt(1-zeta^2)/zeta)
disp("The Theta value is",Theta)
Tr=(%pi-Theta)/Wd
disp("The Rise time is",Tr)
Tset=4/(zeta*Wn)
disp("The Settling time is",Tset)

Output:

"The TF is"
25
-----------
25 +4s +s^2
"The z value is"
25. 4. 1.
"The Wn value is"
5.
"The Zeta value is"
0.4
"The Damped frequency is"
4.5825757
"The Peak time is"
0.6855517
"The Percentage of peak Overshoot is"
25.382672
"The Delay time is"
0.256
"The Theta value is"
1.1592795
"The Rise time is"
0.4325762
"The Settling time is"
2.
Conclusion:
By analyzing the time response of a second order underdamped system with different damping
factors, we can observe how the damping ratio 𝜁 affects the rise time, peak time, maximum
overshoot, and settling time. Understanding these effects is crucial for designing and tuning
control systems to achieve desired performance criteria.

Viva Questions:
1. What is a second order system?
2. How does the damping ratio (𝜁) affect the frequency response of a second order
system?
3. What is the natural frequency of a second order system?
4. Explain the significance of the resonant frequency in a second order system.
5. What information can you gather from the phase plot of a Bode plot?
Experiment No: 05

Implement Frequency Response of a Second Order System.


Aim: To study and analyze the frequency response of a second order system by plotting its
Bode plot and observing the magnitude and phase characteristics.

Software Required: SCILAB.

Theory:

A second order system is typically represented by its transfer function in the Laplace domain
as:

𝜔𝑛 2
𝐻(𝑠) =
𝑠 2 + 2𝜁𝜔𝑛 𝑠 + 𝜔𝑛 2

where:

• 𝜔𝑛 is the natural frequency.


• 𝜁 is the damping ratio.

The frequency response of a system is analyzed by determining how the system's output
amplitude and phase vary with the input signal's frequency. This analysis is crucial for
understanding the behavior of the system in the frequency domain.

Bode Plot:

• Magnitude Plot: Shows how the gain (magnitude) of the system changes with
frequency.
• Phase Plot: Shows how the phase angle of the output signal relative to the input signal
changes with frequency.

For a second order system, the key points in the Bode plot include:

• Resonant Frequency (𝝎𝒓 ): Frequency at which the magnitude peak occurs.


• Bandwidth: Range of frequencies over which the system responds effectively.
• Damping Ratio (𝜻): Affects the shape and peak of the magnitude plot.
Program

clc
clear
// Define the parameters
omega_n = 1; // Natural frequency (rad/s)
zeta = 0.5; // Damping ratio

// Define the transfer function H(s) = omega_n^2 / (s^2 + 2*zeta*omega_n*s +


omega_n^2)
s = poly(0, 's');
numerator = omega_n^2;
denominator = s^2 + 2*zeta*omega_n*s + omega_n^2;
H = syslin('c', numerator / denominator);

// Plot the frequency response


bode(H);

Output:
Conclusion:
By analyzing the magnitude and phase plots, one can determine important characteristics such
as resonant frequency, bandwidth, and damping effects, which are critical for designing and
tuning control systems.

Viva Questions:
1. What is a second order system?
2. How does the damping ratio (𝜁) affect the frequency response of a second order
system?
3. What is the natural frequency of a second order system?
4. Explain the significance of the resonant frequency in a second order system.
5. What information can you gather from the phase plot of a Bode plot?
Experiment No: 06

Implement Frequency Response of a Lead Lag Compensator.


Aim: To analyze the frequency response of a Lead Lag Compensator.

Software Required: SCILAB.

Theory:

Lead and lag compensators are widely used in control systems to improve the system's stability,
transient response, and steady-state error characteristics. The frequency response analysis of
these compensators is crucial for understanding their impact on the overall system
performance. A lead-lag compensator combines the effects of both lead and lag compensators.
It improves both transient response and steady-state error characteristics.
The transfer function of a lead-lag compensator is:

(𝑠 + 𝑧1 )(𝑠 + 𝑧2 )
𝐺𝑙𝑒𝑎𝑑−𝑙𝑎𝑔 (𝑠) = 𝐾
(𝑠 + 𝑝1 )(𝑠 + 𝑝2 )

where 𝑧1 < 𝑝1 (lead compensator) and 𝑧2 > 𝑝2 (lag compensator).

To analyze the frequency response, substitute 𝒔 = 𝑗𝜔:

(𝑗𝜔 + 𝑧1 )(𝑗𝜔 + 𝑧2 )
𝐺𝑙𝑒𝑎𝑑−𝑙𝑎𝑔 (𝑗𝜔) = 𝐾
(𝑗𝜔 + 𝑝1 )(𝑗𝜔 + 𝑝2 )

The magnitude and phase of the lead-lag compensator at a frequency 𝜔 are given by:

√(𝜔 2 + 𝑧1 2 )(𝜔 2 + 𝑧2 2 )
|𝐺𝑙𝑒𝑎𝑑−𝑙𝑎𝑔 (𝑗𝜔)| = 𝐾
√(𝜔 2 + 𝑝1 2 )(𝜔 2 + 𝑝2 2 )

𝜔 𝜔 𝜔 𝜔
∠𝐺𝑙𝑒𝑎𝑑−𝑙𝑎𝑔 (𝑗𝜔) = tan−1 ( ) + tan−1 ( ) − tan−1 ( ) − tan−1 ( )
𝑧1 𝑧2 𝑝1 𝑝2

Program

// Define the zeros and poles of the lead-lag compensator


z_lead = 10; // Zero of the lead compensator
p_lead = 2; // Pole of the lead compensator
z_lag = 0.1; // Zero of the lag compensator
p_lag = 0.01; // Pole of the lag compensator

// Define the transfer function H(s) = (s + z_lead)(s + z_lag) / (s + p_lead)(s + p_lag)


s = poly(0, 's');
numerator = (s + z_lead) * (s + z_lag);
denominator = (s + p_lead) * (s + p_lag);
H = syslin('c', numerator / denominator);

// Plot the frequency response (Bode plot)


clf;
scf(0);
bode(H);
title('Bode Plot of Lead-Lag Compensator');

Output:

Conclusion:
Understanding the frequency response of lead, lag, and lead-lag compensators helps in
designing control systems that meet specific performance criteria, such as improved stability,
faster transient response, and reduced steady-state error.

Viva Questions:
1. What is the purpose of a lead-lag compensator in a control system?
2. How does a lead compensator affect the phase and magnitude of the system?
3. Explain the difference in the placement of poles and zeros for lead and lag
compensators.
4. How do you determine the transfer function of a lead-lag compensator?
Experiment No: 07

Analyze the stability of the given system using Routh stability criterion.
Aim: To analyze the stability of the system using Routh stability criterion.

Software Required: SCILAB.

Theory:

The Routh-Hurwitz Stability Criterion is a mathematical test used to determine the stability of
a linear time-invariant (LTI) system. It provides a straightforward method to assess whether all
the roots of the characteristic equation of a system have negative real parts, which is a
requirement for the system to be stable.

Key Concepts

1. Characteristic Equation:
o The characteristic equation of an LTI system with transfer function 𝐺(𝑠) is
derived from the denominator of the closed-loop transfer function:
o 𝑃(𝑠) = 𝑎𝑛 𝑠 𝑛 + 𝑎𝑛−1 𝑠 𝑛−1 + 𝑎𝑛−2 𝑠 𝑛−2 + ⋯ + 𝑎1 𝑠 + 𝑎0 = 0
o The coefficients 𝑎𝑖 are real numbers.
2. Stability:
o A system is stable if all the roots of its characteristic equation have negative real
parts. This ensures that the system's response to any bounded input will remain
bounded over time (bounded-input, bounded-output stability).

Stability Criteria
• The system is stable if and only if all the elements in the first column of the Routh array
are positive.
• If any element in the first column is zero or changes sign, the system is either marginally
stable or unstable.

Special Cases
1. Zero in the First Column:
o If a zero appears in the first column, replace it with a small positive number ∈
and continue constructing the array. Evaluate the sign changes in the first
column for stability analysis.
2. Entire Row of Zeros:
o If an entire row of zeros is encountered, this indicates the presence of
symmetrical roots about the origin. A special auxiliary polynomial is formed
from the row above the zero row to determine the stability.

Program

clc ;
clear all;

D = input('Input coefficients of characteristic equation ,ie:[an an-1 an-2 a0]= ');


l = length(D);
disp('Roots of characteristic equation are= ')
disp(roots(D))
if modulo(l,2)==0
m=zeros(l,l/2);
[cols,rows]=size(m);
for i =1:rows
m(1,i)=det(1,(2*i)-1);
m(2,i)=det(1,(2* i));
end
else
m=zeros(l,(l+1)/2);
[cols,rows]= size(m);
for i=1: rows
m(1,i)= D(1,(2*i)-1);
end
for i =1:(( l -1) /2)
m(2,i)=D(1,(2*i));
end
end
for j =3:cols
if m(j-1,1)==0
m(j -1,1)=0.001;
end
for i =1:rows-1
m(j,i)=(-1/m(j-1,1))*det([m(j-2,1) m(j-2,i+1); m(j-1,1) m(j-1,i+1)]);
end
end
disp ('−−−−−−−−The Routh−Hurwitz array is=−−−−−−−− ',m )
Temp = sign(m);
a=0;
for j =1: cols
a=a+Temp(j,1);
end
if a == cols
disp (' −−−−> Sign Not Changed in first Column so System is Stable <−−−− ' )
else
disp (' −−−−> Sign Changed in first Column so System is Unstable <−−−− ' )
end

Output:

Case 1:
Input coefficients of characteristic equation ,ie:[a0 an+1 an+2 an]= [1 2 8 4 3]

"Roots of characteristic equation are= "


-0.7555135 + 2.5001105i
-0.7555135 - 2.5001105i
-0.2444865 + 0.6164591i
-0.2444865 - 0.6164591i
"−−−−−−−−The Routh−Hurwitz array is=−−−−−−−− "
1. 8. 3.
2. 4. 0.
6. 3. 0.
3. 0. 0.
3. 0. 0.
" −−−−> Sign Not Changed in first Column so System is Stable <−−−− "

Case 2:
Input coefficients of characteristic equation ,ie:[an an-1 an+2 a0]= [1 1 3 6 6]

"Roots of characteristic equation are= "


0.5519991 + 1.8432071i
0.5519991 - 1.8432071i
-1.0519991 + 0.7169329i
-1.0519991 - 0.7169329i
"−−−−−−−−The Routh−Hurwitz array is=−−−−−−−− "
1. 3. 6.
1. 6. 0.
-3. 6. 0.
8. 0. 0.
6. 0. 0.
" −−−−> Sign Changed in first Column so System is Unstable <−−−− "
Conclusion:
The Routh-Hurwitz criterion provides a method to determine the stability of a system by
examining the sign changes in the first column of the Routh array. The construction of the
Routh array involves organizing the coefficients of the characteristic polynomial into a tabular
form and applying a recursive formula to fill subsequent rows. Special cases, such as zeros in
the first column or entire rows of zeros, require additional steps to evaluate system stability.

Viva Questions:
1. What is the Routh-Hurwitz stability criterion?
2. How do you construct the Routh array?
3. How do you handle an entire row of zeros in the Routh array?
4. Why is the Routh-Hurwitz criterion important in control systems?
Experiment No: 08

Analyze the Stability of the Given system using Root Locus.


Aim: To analyze the stability of the system using Root Locus.

Software Required: SCILAB.

Theory:

The root locus method is a graphical technique used in control system engineering to determine
how the roots of the characteristic equation of a feedback system (i.e., the closed-loop poles)
change with variations in a certain parameter, typically the gain 𝐾. This method helps analyze
system stability and design controllers to achieve desired performance.

Key Concepts
1. Open-Loop Transfer Function:
o Consider a system with an open-loop transfer function 𝑮(𝒔)𝑯(𝒔), where 𝑮(𝒔)
is the plant transfer function and 𝑯(𝒔) is the feedback transfer function.
2. Characteristic Equation:
o The closed-loop poles of the system are the roots of the characteristic equation:
1 + 𝐾𝐺(𝑠)𝐻(𝑠) = 0
1
o Rewriting, we get: 𝐺(𝑠)𝐻(𝑠) = − 𝐾

o As 𝐾 varies from 0 𝑡𝑜 ∞, the roots of this equation trace the path of the closed-
loop poles on the complex 𝑠 −plane, known as the root locus.

Root Locus and Stability


• Stability:
o A system is stable if all the closed-loop poles are in the left half of the 𝑠 −plane
(i.e., have negative real parts).
o The root locus plot shows the movement of poles as 𝐾 varies, indicating the
range of 𝐾 for which the system remains stable.
• Transient Response:
o The location of the closed-loop poles affects the transient response of the
system. Poles further to the left in the 𝑠 −plane indicate faster response, while
poles closer to the imaginary axis indicate slower response and potential
oscillations.
Program

clc;
close;
s = %s;
num = input('Enter the Numerator = ');
den = input('Enter the denominator = ');
TF = syslin('c',num,den);
disp(TF, "The Transfer Function of the system = ");
evans(TF,100);

Output:

Enter the Numerator = s+1

Enter the denominator = s^2*(s+3)*(s+5)

"The Transfer Function of the system = "


1 +s
----------------
15s^2 +8s^3 +s^4

Conclusion:
The root locus is a graphical method used in control system engineering to analyze how the
roots of the characteristic equation of a feedback system vary as a system parameter, typically
the gain 𝐾, changes. It provides valuable insights into the stability and transient response of
the system.
Viva Questions:
1. What is the root locus method?
2. Why is the root locus method important in control systems?
3. What are the asymptotes in a root locus plot?
4. How do you find the breakaway and break-in points on the root locus?
5. What is the angle criterion for root locus?
6. What are the limitations of the root locus method?.
Experiment No: 09

Analyze the Stability of the Given system using Bode Plot.


Aim: To analyze the stability of the system using Bode plot.

Software Required: SCILAB.

Theory:

Bode plots are a graphical representation of a linear, time-invariant system's frequency


response. They consist of two separate plots: one for the magnitude (in dB) versus frequency
and one for the phase (in degrees) versus frequency. Bode plots are widely used in control
system engineering to analyze the stability and performance of systems.

Components of Bode Plots

1. Magnitude Plot:
o The magnitude plot shows the gain of the system in decibels (dB) as a function
of frequency (usually on a logarithmic scale).
o Gain in dB is calculated as: 𝐺𝑎𝑖𝑛 (𝑑𝐵) = 20 log10 |𝐺(𝑗𝜔)𝐻(𝑗𝜔)|
2. Phase Plot:
o The phase plot shows the phase shift introduced by the system (in degrees) as a
function of frequency.
180
o Phase shift is calculated as: 𝑃ℎ𝑎𝑠𝑒 (𝑑𝑒𝑔𝑟𝑒𝑒𝑠) = 𝑎𝑟𝑔|𝐺(𝑗𝜔)𝐻(𝑗𝜔)|⁡× 𝜋

Steps to Create Bode Plots

1. Determine the open-loop transfer function 𝐺(𝑠)𝐻(𝑠) of the system.


2. Substitute 𝑠 = 𝑗𝜔 to find 𝐺(𝑗𝜔)𝐻(𝑗𝜔).
3. Calculate the magnitude and phase for a range of frequencies 𝜔.
4. Plot the magnitude and phase on logarithmic frequency scales.

Stability Criteria Using Bode Plots

To assess the stability of a system using Bode plots, the following criteria and concepts are
used:
1. Gain Margin (GM):
o The gain margin is the amount of gain increase required to bring the system to
the verge of instability.
o It is determined at the frequency where the phase is −180∘ (the phase crossover
frequency 𝜔𝑝𝑐 ).
o The gain margin in dB is:

1
𝐺𝑀 (𝑑𝐵) = 20 log10 ( )
|𝐺(𝑗𝜔𝑝𝑐 )𝐻(𝑗𝜔𝑝𝑐 )|

2. Phase Margin (PM):


o The phase margin is the amount of additional phase lag required to bring the
system to the verge of instability.
o It is determined at the frequency where the magnitude is 0⁡𝑑𝐵 (the gain
crossover frequency 𝜔𝑔𝑐 ).
o The phase margin is: 𝑃𝑀 (𝑑𝑒𝑔𝑟𝑒𝑒𝑠) = 180° + 𝑃ℎ𝑎𝑠𝑒 𝑎𝑡 𝜔𝑔𝑐
3. Stability Criteria:
o A system is stable if the gain margin is positive and the phase margin is positive.
o Typical values for robust stability are a gain margin greater than 6⁡𝑑𝐵 and a
phase margin between 30° and 60°.

Program

clc;
close;
s = poly(0,'s');
num = input('Enter the Numerator = ');
den = input('Enter the denominator = ');
h = syslin('c',num,den);
disp("The Transfer Function of the system = ");
disp(h);
clf();
bode(h,0.1,100)
g_margin(h);
show_margins(h);
p_margin(h);
show_margins(h);
Output:

Enter the Numerator = 20

Enter the denominator = s*(s+1)*(0.5*s+1)

"The Transfer Function of the system = "


20
-----------------
s +1.5s^2 +0.5s^3

Conclusion:
Bode plots provide a powerful tool for stability analysis in control systems. By examining the
gain and phase margins, engineers can assess how close the system is to instability and make
necessary design adjustments. Positive gain and phase margins indicate a stable system, while
the margins themselves give insight into the robustness of the system's stability.

Viva Questions:
1. What is a Bode plot?
2. What information do Bode plots provide?
3. Why are Bode plots important in control systems?
4. What is gain margin and how is it determined from a Bode plot?
5. What is phase margin and how is it determined from a Bode plot?
6. Explain the significance of positive gain and phase margins.
Experiment No: 10

Analyze the Stability of the Given system using Nyquist Plot.


Aim: To analyze the stability of the system using Nyquist plot.

Software Required: SCILAB.

Theory:

Nyquist plot is a graphical method used in control systems and signal processing to determine
the stability of a feedback system. The plot provides a visual way to assess the stability by
examining the frequency response of the open-loop transfer function.

Nyquist Plot Basics

1. Open-Loop Transfer Function: Consider a feedback control system with an open-


loop transfer function 𝐺(𝑠)𝐻(𝑠), where 𝐺(𝑠) is the plant transfer function and 𝑯(𝒔) is
the feedback transfer function.
2. Nyquist Contour: The Nyquist contour is a closed path in the complex plane that
typically encircles the right-half plane (RHP), including the imaginary axis and a
semicircle at infinity. For practical purposes, we usually focus on the part of the contour
that runs along the imaginary axis.
3. Plotting: The Nyquist plot is a parametric plot of G(𝑗𝜔)𝐻(𝑗𝜔) as 𝜔 ranges from
−∞ 𝑡𝑜 ∞. The real part of 𝐺(𝑗𝜔)𝐻(𝑗𝜔) is plotted on the x-axis, and the imaginary part
is plotted on the y-axis.

Nyquist Criterion for Stability

The Nyquist stability criterion relates the encirclements of the critical point (−1,0) in the
Nyquist plot to the stability of the closed-loop system.

1. Encirclements: The critical point (−1,0) on the Nyquist plot is important for stability
analysis. The number of clockwise encirclements of (−1,0) by the Nyquist plot is used
to determine stability.
2. Poles and Zeros:
o Let 𝑃 be the number of poles of 𝐺(𝑠)𝐻(𝑠) in the RHP.
o Let 𝑁 be the number of clockwise encirclements of (−1,0) by the Nyquist plot.
o Let 𝑍 be the number of zeros of 1 + 𝐺(𝑠)𝐻(𝑠) in the RHP, which corresponds
to the poles of the closed-loop transfer function in the RHP.
3. Nyquist Criterion: The system is stable if the number of RHP poles of the closed-loop
system (𝒁) is zero. According to the Nyquist criterion:

𝑍 =𝑁+𝑃

For the system to be stable, 𝑍 must be zero. Therefore, 𝑁 must be −𝑃, meaning the
Nyquist plot must encircle the critical point (−1,0) 𝑃 times counterclockwise if there
are 𝑃 poles in the RHP.

Program

clc;
close;
s = poly(0,'s');
num = input('Enter the Numerator = ');
den = input('Enter the denominator = ');
TF = syslin('c',num,den);
disp("The Transfer Function of the system = ");
disp(TF);
clf();
nyquist(TF);

Output:

Enter the Numerator = 1

Enter the denominator = s*(s+1)*(2*s+1)

"The Transfer Function of the system = "


1
-------------
s +3s^2 +2s^3
Conclusion:
The Nyquist plot is a powerful tool for stability analysis in control systems. By examining the
encirclements of the critical point (−1,0) and relating them to the number of right-half plane
poles, engineers can determine the stability of the closed-loop system. The visual nature of the
Nyquist plot also aids in understanding the system's frequency response and margins for
stability.

Viva Questions:
1. What is a Nyquist plot?
2. Why do we use Nyquist plots in control systems?
3. What are the key components of the Nyquist plot?
4. How do you determine if a system is stable using the Nyquist plot?
5. What are gain margin and phase margin, and how can they be determined from the
Nyquist plot?
6. Explain how the Nyquist plot can be used for systems with multiple input and output
(MIMO) systems.
Experiment No: 11

Obtain Time Response from State Model of a System.


Aim: To obtain the time response from the state model of a system.

Software Required: SCILAB.

Theory:

The time response of a system refers to how the system's state and output variables change over
time when subjected to an initial condition or an external input. The state-space representation
provides a framework for analyzing the time response of multi-input, multi-output (MIMO)
systems. This representation is particularly powerful because it can handle complex dynamics
and interactions within a system.

State-Space Representation

A linear time-invariant (LTI) system in state-space form is described by the following


equations:

1. State Equation:

𝑥̇ (𝑡) = 𝐴𝑥(𝑡) + 𝐵𝑢(𝑡)

where:

o 𝑥(𝑡) is the state vector.


o 𝑢(𝑡) is the input vector.
o 𝐴 is the state matrix.
o 𝐵 is the input matrix.
o 𝑥̇ (𝑡) is the derivative of the state vector with respect to time.
2. Output Equation:

𝑦(𝑡) = 𝐶𝑥(𝑡) + 𝐷𝑢(𝑡)

where:

o 𝑦(𝑡) is the output vector.


o 𝐶 is the output matrix.
o 𝐷 is the feedforward (or direct transmission) matrix.

Solving the State Equation

To find the time response of the system, we need to solve the state equation. The general
solution to the state equation is given by:
𝑡
𝑥(𝑡) = 𝑒 𝑥(0) + ∫ 𝑒 𝐴(𝑡−𝜏) 𝐵𝑢(𝜏)𝑑𝜏
𝐴𝑡
0

where:

• 𝑒 𝐴𝑡 is the state transition matrix, which describes the system's natural response.
• 𝑥(0) is the initial state vector.

State Transition Matrix

The state transition matrix, 𝑒 𝐴𝑡 , is a key component in determining the system's response. It
can be computed using various methods, including:

• Power Series Expansion:

(𝐴𝑡)𝑘
𝑒 𝐴𝑡 = ∑∞
𝑘=0 𝑘!

• Laplace Transform:

𝑒 𝐴𝑡 = ℒ −1 [(𝑠𝐼 − 𝐴)−1 ]

• Eigenvalue and Eigenvector Decomposition (if 𝐴is diagonalizable):

𝑒 𝐴𝑡 = 𝑉𝑒 Λ𝑡 𝑉 −1

where 𝑉Λ𝑉 −1 , 𝑉 is the matrix of eigenvectors, and 𝛬 is the diagonal matrix of


eigenvalues.

Output Response

Once the state vector 𝑥(𝑡) is determined, the output vector 𝑦(𝑡) can be found using the output
equation:

𝑦(𝑡) = 𝐶𝑥(𝑡) + 𝐷𝑢(𝑡)

Program

clc;
clear;
// Define the state-space matrices
A = [0 1; -2 -3];
B = [0; 1];
C = [1 0];
D = [0];

// Define the initial state


x0 = [1; 0];
// Define the time vector and the input signal (step input)
t = 0:0.01:10; // time vector
u = ones(t); // input vector (step input)

// Create a state-space system


sys = syslin('c', A, B, C, D);

// Compute the time response using csim


[y, x] = csim(u, t, sys, x0);

x1 = x(1,:);

x2 = x(2,:);

// Plot the output response


scf(0);
plot(t, y);
xlabel('Time (s)');
ylabel('Output y(t)');
title('Time Response of the System');

// Plot the state responses


scf(1);
plot(t,x1,'r', t,x2,'b');
xlabel('Time (s)');
ylabel('States');
legend('x_1(t)', 'x_2(t)');
title('State Responses of the System');

Result:
Conclusion:
The time response of a system from its state model involves solving the state equations to find
the state vector 𝑥(𝑡) and then using the output equation to determine the output vector 𝑦(𝑡).
The state-space approach provides a comprehensive method for analyzing and designing
control systems, especially those with multiple inputs and outputs. The state transition matrix
𝑒 𝐴𝑡 plays a critical role in determining the system's natural response and its behavior over time.

Viva Questions:
1. What is the state-space representation of a system?
2. What are the advantages of using state-space representation over transfer function
representation?
3. Define the state vector and explain its significance
4. What is the state transition matrix and why is it important?
5. Explain the physical interpretation of the state transition matrix.
Experiment No: 12

Implementation of PI, PD Controllers.


Aim: To implement PI and PD controllers.

Software Required: SCILAB.

Theory:

PI Controller
A PI controller combines proportional and integral control actions to achieve better
performance. The control law for a PI controller is given by:
𝑡
𝑢(𝑡) = 𝐾𝑝 𝑒(𝑡) + 𝐾𝑖 ∫ 𝑒(𝜏)𝑑𝜏
0

where:
• 𝑢(𝑡) is the control signal.
• 𝐾𝑝 is the proportional gain.
• 𝐾𝑖 is the integral gain.
• 𝑒(𝑡) = 𝑟(𝑡) − 𝑦(𝑡) is the error signal, with 𝑟(𝑡) being the reference input and 𝑦(𝑡)
being the system output.
The Characteristics of PI Controller are:
1. Proportional Term (P): The proportional term provides an output that is proportional
to the current error value. It responds quickly to changes in the error.
2. Integral Term (I): The integral term sums the error over time, which helps to eliminate
the steady-state error. It increases the control action if the error persists for a longer
period.
The Advantages of PI Controller are:
• Eliminates steady-state error for constant inputs.
• Provides a balance between fast response and stability.
The Disadvantages of PI Controller are:
• May introduce overshoot and oscillations.
• Integral action can cause slow response to disturbances.
PD Controller
A PD controller combines proportional and derivative control actions to improve the transient
response of the system. The control law for a PD controller is given by:
𝑑𝑒(𝑡)
𝑢(𝑡) = 𝐾𝑝 𝑒(𝑡) + 𝐾𝑑
𝑑𝑡
where:
• 𝐾𝑝 is the proportional gain.
• 𝐾𝑑 is the derivative gain.
The Characteristics of PI Controller are:
1. Proportional Term (P): Similar to the PI controller, the proportional term provides a
control action proportional to the current error.
2. Derivative Term (D): The derivative term provides a control action proportional to the
rate of change of the error. It predicts future error based on its rate of change and applies
a damping effect to reduce overshoot and improve stability.
The Advantages of PD Controller are:
• Improves transient response by reducing overshoot and damping oscillations.
• Enhances system stability and response speed.
The Disadvantages of PI Controller are:
• Does not eliminate steady-state error.
• Can be sensitive to noise in the error signal, as the derivative term amplifies high-
frequency components.

Program

PI Controllers:
// Define the plant transfer function
s = poly(0, 's');
G = 1 / (s^2 + 3*s + 2); // Example plant

// Define the PI controller transfer function


Kp = 1; // Proportional gain
Ki = 1; // Integral gain
PI = Kp + Ki/s; // PI controller

// Connect the plant and PI controller in a feedback loop


sys = PI * G;
closed_loop_sys = sys / (1 + sys);
// Simulate the closed-loop response
t = 0:0.01:10; // Time vector
y = csim('step', t, closed_loop_sys);

// Plot the response


plot(t, y);
xlabel('Time (s)');
ylabel('Output response');
title('Closed-loop Response with PI Controller');

PD Controller:

// Define the plant transfer function


s = poly(0, 's');
G = 1 / (s^2 + 3*s + 2); // Example plant

// Define the PD controller transfer function


Kp = 1; // Proportional gain
Kd = 1; // Differential gain
PI = Kp + Kd*s; // PD controller

// Connect the plant and PD controller in a feedback loop


sys = PI * G;
closed_loop_sys = sys / (1 + sys);

// Simulate the closed-loop response


t = 0:0.01:10; // Time vector
y = csim('step', t, closed_loop_sys);

// Plot the response


plot(t, y);
xlabel('Time (s)');
ylabel('Output response');
title('Closed-loop Response with PD Controller');

Result:

Conclusion:

• PI Controller: Eliminates steady-state error and improves accuracy for constant


inputs. However, it might introduce overshoot and slower transient response.
• PD Controller: Enhances transient response and stability by reducing overshoot and
damping oscillations. However, it does not eliminate steady-state error and can be
sensitive to noise.

Each controller has its strengths and weaknesses, and the choice between them depends on
the specific requirements of the control system, such as the need for accuracy (PI) or
improved transient response (PD).

Outcomes: At the end of the experiment,


1. The students have knowledge on PI and PD controller.
2. The students will be able to design PI and PD controller.
Viva Questions:
1. What is PI and PD Controller?
2. What is proportional gain, integral gain?
3. What is the advantage of PI controller?
4. What is the advantage of PD controller?
5. What is the disadvantage of PI controller?
6. What is the disadvantage of PD controller?
7. What is proportional band and zero error output voltage?
Experiment No: 13

Implement a PID Controller and hence realize an Error Detector.


AIM: To study the PID controller and hence realize an Error Detector.

Software Required: SCILAB.


Theory:

A PID (Proportional-Integral-Derivative) controller combines the features of P, I, and D


controllers to provide a more comprehensive control strategy that can handle both transient and
steady-state behavior effectively. The control law for a PID controller is given by:

𝑡
𝑑𝑒(𝑡)
𝑢(𝑡) = 𝐾𝑝 𝑒(𝑡) + 𝐾𝑖 ∫ 𝑒(𝜏)𝑑𝜏 + 𝐾𝑑
0 𝑑𝑡

where:

• 𝑢(𝑡) is the control signal.


• 𝐾𝑝 is the proportional gain.
• 𝐾𝑖 is the integral gain.
• 𝐾𝑑 is the derivative gain.
• 𝑒(𝑡) = 𝑟(𝑡) − 𝑦(𝑡) is the error signal, with 𝑟(𝑡) being the reference input and 𝑦(𝑡)
being the system output.

Components of PID Controller:

1. Proportional Term (P): The proportional term provides an output that is proportional
to the current error value. It is responsible for the present error correction.
2. Integral Term (I): The integral term sums the error over time, which helps to eliminate
the steady-state error. It increases the control action if the error persists, addressing past
error correction.
3. Derivative Term (D): The derivative term provides a control action proportional to the
rate of change of the error. It predicts future error based on its rate of change and applies
a damping effect to reduce overshoot and improve stability.

Advantages:
• Comprehensive Control: By combining P, I, and D terms, the PID controller provides
robust control over transient and steady-state behavior.
• Error Elimination: The integral term ensures that steady-state errors are eliminated.
• Improved Stability: The derivative term helps to reduce overshoot and dampen
oscillations, enhancing system stability.

Disadvantages:

• Complex Tuning: Tuning the parameters 𝐾𝑝 , 𝐾𝑖 , and 𝐾𝑑 can be complex and may
require trial and error or advanced methods like Ziegler-Nichols tuning.
• Sensitivity to Noise: The derivative term can be sensitive to high-frequency noise,
which can lead to erratic control signals.

Error Detector

The error detector is a crucial component in a control system that compares the desired
reference input (setpoint) with the actual output of the system to determine the error signal.
The error signal is then used by the controller to adjust the control input to the system.

Working Principle:

• Reference Input (𝒓(𝒕)): This is the desired value or setpoint that the system aims to
achieve.
• System Output (𝒚(𝒕)): This is the actual output of the system.
• Error Signal (𝒆(𝒕)): The error detector calculates the difference between the reference
input and the system output: 𝑒(𝑡) = 𝑟(𝑡) − 𝑦(𝑡)

The error signal indicates how far the system's output deviates from the desired value. The
controller uses this error signal to generate the control input that will minimize the error and
bring the system's output closer to the setpoint.

Role in Control Systems:

• Feedback Loop: The error detector is part of the feedback loop, continuously
monitoring the system's performance and providing real-time error information to the
controller.
• Corrective Action: Based on the error signal, the controller adjusts the control input
to correct the system's output, reducing the error over time.
• Stability and Performance: The accuracy and responsiveness of the error detector are
crucial for the overall stability and performance of the control system.

Programs

// Define the plant transfer function


s = poly(0, 's');
G = 1 / (s^2 + 3*s + 2); // Example plant

// Define the PID controller transfer function


Kp = 1; // Proportional gain
Ki = 1; // Integral gain
Kd = 1; // Derivative gain
PID = Kp + Ki/s + Kd*s; // PID controller

// Connect the plant and PID controller in a feedback loop


sys = PID * G;
closed_loop_sys = sys / (1 + sys);

// Define the time vector


t = 0:0.01:10; // From 0 to 10 seconds with a step of 0.01 seconds

// Simulate the closed-loop response


y = csim('step', t, closed_loop_sys);

// Define the reference input (unit step input)


r = ones(t);

// Realize the error detector (error = reference input - actual output)


e = r - y;

// Plot the output response


figure();
plot(t, y);
xlabel('Time (s)');
ylabel('Output response');
title('Closed-loop Response with PID Controller');

// Plot the error signal


figure();
plot(t, e);
xlabel('Time (s)');
ylabel('Error signal');
title('Error Detector Output');
RESULTS:

Conclusions:

In summary, the PID controller provides a comprehensive control strategy by addressing


present, past, and future error corrections, while the error detector plays a vital role in
generating the error signal that drives the corrective actions of the controller.

Viva Questions:

1. Define PID Controllers


2. Give the comparison between PI, PD and PID Controller.
3. Mention the applications of PID Controller.
Experiment No: 14

Demonstrate the effect of PI, PD and PID controller on the system


response.
Aim: To study the effect of different controllers on the step response of second order system.

Software Required: SCILAB.

Theory:

PID controllers are commercially successful and widely used controllers in Industries. For
example, in a typical paper mill there may be about 1500 Controllers and out of these 90%
would be PID controllers. The PID controller consists of proportional controller, integral
controller and derivative controller.

Depending upon the application on or more combinations of the controllers are used. (Ex: In a
liquid control system where we want zero steady state error, a PI controller can be used and in
a temperature control system where we do not want zero steady state error, a simple P controller
can be used.

The equation of the PID controller in time domain is given by,

m(t) = Kpe(t) + Ki/Ti ∫ e(t) dt + KdTd de(t) /dt

where KP is a proportional gain Ti is the integral reset time and Td is the derivative time of the
PID controller, m(t) is the output of the controller and e(t) is the error signal given by

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

A proportional controller (Kp) will have the effect of reducing the rise time and will reduce,
but never eliminate, the steady-state error. An integral control (Ki) will have the effect of
eliminating the steady-state error, but it may make the transient response worse.

A derivative control (Kd) will have the effect of increasing the stability of the system, reducing
the overshoot, and improving the transient response. Effects of each of controllers Kp, Kd, and
Ki on a closed-loop system are summarized in the table shown below.
PI Controller:

From the block diagram

C(s)/R(s)=(s+Ki) ωn2/s3 + 2ξ ωns2+ ωn2s+Ki ωn2

The characteristic equation is third order, so system also becomes third order reducing SS error
to zero.

PD Controller:

From the block diagram

C(s)/R(s) = ωn2 (1+sTd)/S2 + (2ξ ωn+ ωn2Td)S+ ωn2

Comparing with S2 + 2ξ ωnS+ ωn2, damping ratio increases reducing the peak overshoot in
the response.
PID Controller:

In PID controller, the error signal is given by Ea(s)= Kp E(s)+ sTd E(s) + Ki/s E(s)

Procedure:

1. Consider the open loop transfer function.

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

2. Write the program using SCILAB to simulate step response of the given System.

3. Evaluate the effect of P, PI, PD and PID controllers.

Program:

// Define the plant transfer function


s = poly(0, 's');
G = 1 / (s^2 + 3*s + 2); // Example plant

// Define the PI controller transfer function


Kp_PI = 1; // Proportional gain
Ki = 1; // Integral gain
PI = Kp_PI + Ki/s; // PI controller

// Define the PD controller transfer function


Kp_PD = 1; // Proportional gain
Kd = 1; // Derivative gain
PD = Kp_PD + Kd*s; // PD controller

// Define the PID controller transfer function


Kp_PID = 1; // Proportional gain
Ki_PID = 1; // Integral gain
Kd_PID = 1; // Derivative gain
PID = Kp_PID + Ki_PID/s + Kd_PID*s; // PID controller

// Define the time vector


t = 0:0.01:10; // From 0 to 10 seconds with a step of 0.01 seconds
// Connect the plant with PI controller in a feedback loop
sys_PI = PI * G;
closed_loop_sys_PI = sys_PI / (1 + sys_PI);

// Connect the plant with PD controller in a feedback loop


sys_PD = PD * G;
closed_loop_sys_PD = sys_PD / (1 + sys_PD);

// Connect the plant with PID controller in a feedback loop


sys_PID = PID * G;
closed_loop_sys_PID = sys_PID / (1 + sys_PID);

// Simulate the closed-loop responses


y_PI = csim('step', t, closed_loop_sys_PI);
y_PD = csim('step', t, closed_loop_sys_PD);
y_PID = csim('step', t, closed_loop_sys_PID);

// Plot the responses


clf();
plot(t, y_PI, 'r', t, y_PD, 'g', t, y_PID, 'b');
xlabel('Time (s)');
ylabel('Output response');
title('Closed-loop Response with PI, PD, and PID Controllers');
legend(['PI Controller', 'PD Controller', 'PID Controller']);

Result:
Conclusion:
This demonstration shows how different controllers affect the system's response, highlighting
the trade-offs between stability, speed, and accuracy.

Outcomes: At the end of the experiment,


1. The students have knowledge on PI, PD and PID controller.
2. The students will be able to design PI, PD and PID controller.

Viva Questions:
1. Define PI, PD and PID Controllers
2. Give the comparison between PI and PD Controller.
3. Why differential control is not used alone?
4. Mention the applications of PID Controller.
Institution Mission Vision

Vision
"To become a recognized world class Women Educational Institution, by imparting
professional education to the students, creating technical opportunities through
academic excellence and technical achievements, with ethical values"
Mission
• To support value based education with state of art infrastructure.
• To empower women with the additional skill for professional future carrier
• To enrich students with research blends in order to fulfill the International
challenges
• To create multidisciplinary center of excellence
• To achieve Accreditation standards towards intentional education recognition.
• To establish more Post Graduate & Research course.
• To increase Doctorates numbers towards the Research quality of academics.

You might also like