EC-404controlsystem (1)
EC-404controlsystem (1)
LAB MANNUAL
EC 404
CONTROL SYSTEM
BACHLOR OF ENGINEERING (B.E.)
BACHLOR OF TECHNOLOGY (B.TECH.)
Index
S. No. Particulars Page No.
1 Vision and Mission of the Institute
2 Vision and Mission of the Department
3 Programme Educational Objective (PEOs)
4 Programme Specific Outcomes (PSOs)
5 Programme Outcomes (POs)
6 Course Outcomes (COs)
7 CO-PO Matrix
8 CO-PSO Matrix
9 University Scheme
10 Syllabus
11 Academic Calendar
12 List of EXPERIMENT NO:-s
13 Lab Time Table (Individual & Class)
14 Laboratory Plan
15 Lab Manual
Laboratory Manual
16 Important Viva questions
17 Attendance Record
18 Internal Assessment Record of attainment of Course Outcomes
20
VISION
MISSION
To establish state of art infrastructure and facilities, this will pave the way for
dissemination of technical knowledge with passion and commitment.
To impart industry relevant skill based training and aid in overall development of
students.
Laboratory Manual
To foster research and consultancy in collaboration with Institutes of National repute
and industry, so that students can come up with innovative technology, that caters to
the needs of the society.
VISION
MISSION
M2 To provide multiple options so that students can maximize on their career choices.
Laboratory Manual
Programme Educational Objective (PEOs)
Laboratory Manual
Programme Specific Outcomes (PSOs)
Graduate will be able to analyze complex designs and provide solutions in the
PSO1
domains of Communication systems, antennas and Signal processing using acquired
analytic knowledge and Modern Design and automation tools
Laboratory Manual
Programme Outcomes (POs)
Engineering Graduates will be able to:
Laboratory Manual
sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practices.
9. Individual and teamwork: 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.
Laboratory Manual
CONTROL SYSTEM LABORATORY
EC404.1 Evaluate the transfer function of control system using block diagram and signal flow graph.
Determine the frequency-domain responses of first and second-order systems using standard
EC404.2
test signals.
EC404.4 Design the system and reduced steady state error using compensation circuit.
Laboratory Manual
CO Vs PO
CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
1 3 3 3 3 3 1
2 3 3 2 2 3 3 1 2 1
3 3 2 2 2 3 3 1 1
4 3 3 3 3 3 3 3 3
5 3 3 2 3 3 3 3 2
CO Vs PSO
CO PSO1 PSO2
1 3 1
2 2 1
3 3 2
4 3 3
5 1 1
Laboratory Manual
SCHEME
Laboratory Manual
CONTROL SYSTEM LAB
Control System performance analysis and applications of MATLAB in Control system performance analysis &
design.
Laboratory Manual
LIST OF EXPERIMENT
S. No Name of EXPERIMENT NO:- Page No. Course
Outcome
To obtain transfer function of control system using block
1 CO1
diagram using MATLAB.
Study of evaluation of the transfer function of control system
2 CO1
using signal flow graph.
To draw graph of output response of first and second order
3 CO2
Open & Close loop system for by using Linear System
Simulator.
To obtain step, ramp, impulse response of first and second
4 CO2
order system using MATLAB.
To analyze the stability of linear systems using Bode plot using
5 CO3
MATLAB.
To analyze the stability of linear systems using Root locus using
6 CO3
MATLAB.
Design of PID Controller for a given systems.
7 CO4
Laboratory Manual
LABORATORY PLAN
Planned Date
Exp. CO Actual Date of HOD
EXPERIMENT NO:- of Remarks
No. Completion Verification
Completion
Laboratory Manual
To analyze the stability of linear Systems
5 using Bode plot using MATLAB. CO3
Laboratory Manual
EXPERIMENT NO: - 1
AIM :
To obtain transfer function of control system using block diagram using MATLAB.
APPARATUS REQUIRED:
Computer, MATLAB software
THEORY:
Series configuration: If the two blocks are connected as shown below then the blocks are said to be in series. It
would like multiplying two transfer functions. The MATLAB command for the such configuration is “series”
Given the transfer functions of individual blocks generate the system transfer function of the block
combinations.
Parallel configuration: If the two blocks are connected as shown below then the blocks
are said to be in parallel. It would like adding two transfer functions.
PROCEDURE:
1. The MATLAB command for implementing a parallel configuration is “parallel” as shown below:
Given a unity feedback system as shown in the figure, obtain the overall transfer function using MATLAB:
Laboratory Manual
Figure 1.5: Unity feedback system
Figure1.6: Code
RESULT:
Laboratory Manual
EXPERIMENT NO:- 2
AIM :
Study of evaluation of the transfer function of control system using signal flow graph.
APPARATUS REQUIRED:
Computer, MATLAB software
THEORY:
Signal-flow graphs are another method for visually representing a system. Signal Flow Diagrams are especially
useful, because they allow for particular methods of analysis, such as Mason's Gain Formula.
Signal flow diagrams typically use curved lines to represent wires and systems, instead of using lines at right-
angles, and boxes, respectively. Every curved line is considered to have a multiplier value, which can be a
constant gain value, or an entire transfer function. Signals travel from one end of a line to the other, and lines
that are placed in series with one another have their total multiplier values multiplied together (just like in block
diagrams).
MASON'S RULE
Mason's rule is a rule for determining the gain of a system. Mason's rule can be used with block diagrams, but it
is most commonly (and most easily) used with signal flow diagrams.
If we have computed our delta values (above), we can then use Mason's Gain Rule to find the complete gain of
the system:
Where M is the total gain of the system, represented as the ratio of the output gain (yout) to the input gain (yin)
of the system. Mk is the gain of the kth forward path, and Δk is the loop gain of the kth loop.
PROCEDURE:
1. Let us consider the following signal flow graph to identify these nodes.
The nodes present in this signal flow graph are y1, y2, y3 and y4.
y1 and y4 are the input node and output node respectively.
y2 and y3 are mixed nodes.
Laboratory Manual
3. There will be six nodes (y1, y2, y3, y4, y5 and y6) and eight branches in this signal flow graph. The gains of
the branches are a12, a23, a34, a45, a56, a42, a53 and a35.
4. To get the overall signal flow graph, draw the signal flow graph for each equation, then combine all these
signal flow graphs and then follow the steps given below
Step 1 − Signal flow graph for y2=a13y1+a42y4y2=a13y1+a42y4 is shown in the following figure.
Step 2 − Signal flow graph for y3=a23y2+a53y5y3=a23y2+a53y5 is shown in the following figure.
Step 3 − Signal flow graph for y4=a34y3y4=a34y3 is shown in the following figure.
Step 4 − Signal flow graph for y5=a45y4+a35y3y5=a45y4+a35y3 is shown in the following figure.
Laboratory Manual
Step 5 − Signal flow graph for y6=a56y5y6=a56y5 is shown in the following figure.
Step 6 − Signal flow graph of overall system is shown in the following figure.
RESULT:
……………………………………………………………………………………...
Laboratory Manual
EXPERIMENT NO:- 3
AIM :
To draw graph of output response of first and second order Open & Close loop system for by using Linear
System Simulator.
APPARATUS REQUIRED:
Computer, MATLAB software.
THEORY :
A dynamic system of desired configuration may be constructed by a suitable interconnection of the basic blocks
available. To avoid unnecessary complications, these blocks are all pre-wired, they all have fixed transfer
functions and handle signals referred to a common ground.
Error detector cum gain: The block has three inputs (e1, e2, e3) and one output (e0) which are related by the
expression:
e0= -K(e1+e2+e3)
where K is the gain. The value of K may be varied from 0 to 10 by a ten turn potentiometer having a calibrated
dial. This block may be used as simple error detector in a multiple loop system or simply as an adder.
Integrator: The integrator block has an approximate transfer function of the form –K1/s and is used in
simulating type-1 systems having a pole at the origin. Nominal value of K1 is 10.
Time Constant: two time constant blocks in the system have transfer functions of the form –K2/ (sT+1) each.
The second block has a X5 option which results in higher gain if necessary. Nominal values of K2=K3 and
T1=T2 are 10 and 1msec respectively.
Disturbance adder: this is two input (e1, e2) one output block (e0) having a defining equation of the form:
e0= - (e1+e2).
The block can have applications similar to the error detector.
Amplifier: While completing the feedback path, one might need to invert the signal, for second order system,
so that the resulting system is a negative feedback system. The amplifier here is a unity gain inverting amplifier
used specifically for this purpose.
SPECIFICATIONS:
There are three built-in sources in the unit with the following nominal specifications:
Square wave Frequency 40-90 Hz (variable) : Amplitude 0-2 Volt (p-p) (variable)
Triangular wave Frequency 40-90 Hz (variable) : Amplitude 0-2 Volt (p-p) (variable)
Trigger wave Frequency 40-90 Hz (variable) : Amplitude ± 5V (approx.)
PROCEDURE:
Open loop response:
As a first step, the open loop transfer function of all the blocks viz. integrator, time constant, amplifier and error
detector/adder are to be determined EXPERIMENT NO:-ally. All measurements are done with the help of
measuring DSO and the signal source is in the built-in-square wave generator in each case.
Error detector cum variable gain:
Apply a 100mV square wave signal to any of the three inputs.
Set the gain setting potentiometer to 10.0
Measure the p-p output voltage and note its gain. Calculate the gain, this is the maximum value of gain possible
for this block.
Laboratory Manual
This section may be tested exactly in the same manner as error detector except that there are only two inputs
and there is no gain setting potentiometer.
Amplifier:
Apply a 1 V p-p square wave input. Measure the p-p output voltage and notice its sign. Save the waveform.
Integrator:
Apply 1V p-p square wave input of known frequency. Measure the p-p output voltage of the triangular wave
and also notice its phase. Calculate the gain constant K of the integrator.
Time constant:
Apply a 100mV p-p square wave of known frequency. The frequency should be selected towards the lower end.
Find the time t=T at which the response reaches 63.2% from the wave form. This is the time constant. Find the
steady state value of the response from the trace. The value of K is given by the ratio of p-p steady state output
to the p-p input amplitude.
Closed loop response:
First order system:
1. There are two types of first order closed loop system can be formed, one using normal time constant and
other using X5 time constant.
2. Connect 1V p-p square wave signal to the REF point. Connect the output of gain to normal time constant.
The output of time constant should be connected directly to the feedback node of the error detector.
3. Connect one channel of DSO with REF point and other channel at time constant output.
4. Vary the gain, and observe the effect at the output of time constant. Trace the wave forms
and calculate maximum overshoot (MP), rise time (t r), peak time (tP), settling time (t S), delay time (t d) and
steady state error (eSS).
Where
Maximum overshoot (MP) = First peak value – Ref value
Delay time (td) = that time when the response reaches 50% of the ref value.
Rise time (tr) = that time when the response reaches 90% of the ref value.
Peak time (tP) = that time when the response reaches its first peak value.
Settling time (t S) = that time when the response comes 5% tolerance of ref value.
Steady state error (eSS) = ref value – response at t(∞).
Repeat the above steps for X5 time constant.
Laboratory Manual
Figure 3.2: Second order type 0 system
Observe all the effects and make the tabulation and save the wave forms.
Try for time constant X5 also
Disturbance Rejection:
Connect the second order system as shown in the fig. below.
Laboratory Manual
Figure 3.4: Second order system with disturbance
Apply a low frequency disturbance signal (sinewave of 1 V) from function generator at N1 and see its
effect on output. Save the wave form.
Now apply the same disturbance signal at N2, and observe its effect on the output. Save the wave form
and conclude the result.
OBSERVATION TABLE:
Sl. no Gain (K) MP td tr tP tS eSS
RESULT :
....................................................................................................................................................................................
....................................................................................................................................................................................
..........................................................................................
Laboratory Manual
EXPERIMENT NO:- 4
AIM :
To obtain step, ramp, impulse response of first/second order system using MATLAB.
APPARATUS REQUIRED:
Computer, MATLAB software.
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.
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.
B=input(‘enter denominator’);
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);
SAMPLE GRAPH:
Laboratory Manual
Figure 4.1: Second order Step response
IMPULSE RESPONSE:
RAMP RESPONSE:
Laboratory Manual
Figure 4.4: First order Step response
IMPULSE RESPONSE
RAMP RESPONSE
RESULT :
....................................................................................................................................................................................
....................................................................................................................................................................................
..........................................................................................
Laboratory Manual
EXPERIMENT NO:- 5
AIM :
To analyze the stability of linear systems using Bode plot using MATLAB
APPARATUS REQUIRED:
Computer, MATLAB software.
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.
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.
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)
MATLAB PROGRAM:
%Draw the Bode Plot for the given transfer function G(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);
grid;
Gain_Margin_dB=20*log10(Gm)
Laboratory Manual
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;
SAMPLE GRAPH:
Laboratory Manual
Figure 5.1: Output response
Gain_Margin_dB =15.5630
Phase_Margin = 76.8410
Gaincrossover_Frequency = 0.3374rad/sec
Resonant_PeakdB = 10.4672
Bandwidth = 0.5356
RESULT :
....................................................................................................................................................................................
....................................................................................................................................................................................
..........................................................................................
Laboratory Manual
EXPERIMENT NO:- 6
AIM :
To analyze the stability of linear systems using Root locus using MATLAB.
APPARATUS REQUIRED:
Computer, MATLAB software.
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.
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);
G(s)=1/(S^3+8S^2+17S)') grid;
SAMPLE GRAPH:
Laboratory Manual
Figure 5.1: Output response
RESULT:
...........................................................................................................................................................................................
...........................................................................................................................................................................................
..........................................................................................
Laboratory Manual
EXPERIMENT NO:- 7
AIM –
Design of PID Controller for a given systems.
APPARATUS REQUIRED:
Computer, MATLAB software.
OBJECTIVE OF THE EXPERIMENT NO:-
To design a PID controller for the following first order and second order system,
3.6
1.
𝑆+10
5
2.
𝑆 2 +6𝑆+5
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.
PROCEDURE:
1. Implement the understanding of effects of Proportional, Integral and Derivative Gains over the system
response.
BLOCK DIAGRAM:
Laboratory Manual
Figure 7.1: Block diagram of PID controllers
SAMPLE GRAPH:
Laboratory Manual
Figure 7.2: First order uncontrolled open loop response
Laboratory Manual
Figure 7.5: Second order controlled open loop response
RESULT:
...........................................................................................................................................................................................
...........................................................................................................................................................................................
..............................................................................................
Laboratory Manual
EXPERIMENT NO:- 8
AIM :
Analyze the output response of PID control system using MATLAB.
APPARATUS REQUIRED:
Computer, MATLAB software.
THEORY:
PID Tuning Toolbox Can be use the PID tuning toolbox to determine the parameter of controller depend on the
system form MATLAB or SIMULINK as following step:
Use the PID Tuner to interactively design a SISO PID controller in the feed-forward path of single-loop,
unity-feedback control configuration The PID Tuner automatically designs a controller for your plant. You
specify the controller type (P, I, PI, PD, PDF, PID, PIDF) and form (parallel or standard). You can analyze the
design using a variety of response plots, and interactively adjust the design to meet your performance
requirements.
To launch the PID Tuner, use the pidTuner command:
pidTuner(sys,type)
where sys is a linear model of the plant you want to control, type is a string indicating the controller type to
design.
PROCEDURE:
1. Build the Simulink block represent the closed loop system
Laboratory Manual
Figure8.2: Output without PID controller
Figure 8.3: Block diagram of closed loop system with PID controller
5. Choose the controller type , click apply and click tune The PID tuner window will appear and can follow the
steps.
Laboratory Manual
6. Right-click on the plot and select Characteristics > Rise Time to mark the rise time as a blue dot on the plot.
Select Characteristics > Settling Time to mark the settling time. To see tooltips with numerical values, click
each of the blue dots.
7. Slide the Response time slider to the right to try to improve the loop performance. The response plot
automatically updates with the new design
8. Moving the Response time slider far enough to meet the rise time requirement of less than 1.5 s results in
more oscillation. Additionally, the parameters display shows that the new response has an unacceptably long
settling time
9. To achieve the faster response speed, the algorithm must sacrifice stability.
10. Analyze and note final results.
SAMPLE GRAPH:
RESULT:
………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………
………………………………….
Laboratory Manual
EXPERIMENT NO:- 9
AIM :
State space model for classical transfer function using MATLAB.
APPARATUS REQUIRED:
Computer, MATLAB software.
THEORY:
Find the transfer function of the system with state space representation
First find (sI-A) and the Φ=(sI-A)-1 (note: this calculation is not obvious. Details are here). Rules for
inverting a 3x3 matrix are here.
To make this task easier, MatLab has a command (ss2tf) for converting from state space to transfer function.
PROCEDURE:
1. Write the following code on MATLAB command window
Laboratory Manual
>> % First define state space system
>> [n,d]=ss2tf(A,B,C,D)
n =
0 0 1.0000 5.0000
d =
>> mySys_tf=tf(n,d)
2. Thus the State space model is converted in to classical transfer function using MATLAB.
Transfer function:
s + 5
----------------------
s^3 + 2 s^2 + 4 s + 3
Laboratory Manual
b = [0 2 3; 1 2 1];
a = [1 0.4 1];
[A,B,C,D] = tf2ss(b,a)
6. The system is excited with a unit impulse in the positive direction. Compute the time evolution of the system
using the transfer function. Plot the response.
bf = [1 -(1+cos(dt)) cos(dt)];
af = [1 -2*cos(dt) 1];
yf = filter(bf,af,u);
stem(t,yf,'o')
xlabel('t')
SAMPLE GRAPH :
Figure9.1: Output
RESULT :
...........................................................................................................................
Laboratory Manual
EXPERIMENT NO:- 10
AIM :
Design of Compensating Networks of lead and lag using MATLAB.
APPARATUS REQUIRED:
Computer, MATLAB software.
THEORY:
Lead and lag compensators are used quite extensively in control. A lead compensator can increase the stability
or speed of reponse of a system; a lag compensator can reduce (but not eliminate) the steady-state error.
Depending on the effect desired, one or more lead and lag compensators may be used in various combinations.
PROCEDURE :
Design of a Phase-Lag Compensator Using MATLAB
The desired phase margin is 60 o .
10
1. 𝐺𝑃 (𝑠) = 𝑠 2+ 2𝑠
Figure 10.1:
2. 1 0.917
3. o 0.0917
4. p o / | G p ( j0.917) | 1013.9 / 20 0.0917 / 4.9545
5. Transfer function:
10.71 s + 1
-----------
53.05 s + 1
Laboratory Manual
Figure10.2: Code
SAMPLE GRAPH:
RESULT:
………………………………………………………………………………………………………………………
………………………………………………………………………………………
Laboratory Manual