Control System Simulation PDF
Control System Simulation PDF
PREAMBLE:
Control Systems simulation Lab consists of multiple workstations, each equipped with an
oscilloscope, digital multi-meter, PID trainers, control system trainers and stand alone inverted-
pendulum, ball and beam control, magnetic-levitation trainers. This lab also covers the
industrial implementation of advanced control systems via different computer tools such as
The aim of this Control system laboratory is to provide sound knowledge in the basic concepts
of linear control theory and design of control system, to understand the methods of
representation of systems and getting their transfer function models, to provide adequate
knowledge in the time response of systems and steady state error analysis, to give basic
knowledge is obtaining the open loop and closed–loop frequency responses of systems and to
understand the concept of stability of control system and methods of stability analysis. It helps
the students to study the compensation design for a control system. This lab consist of DC,AC
servomotor, synchros, DC position control, PID controller kit with temperature control, lead lag
OUTCOME
After the completion of this course student able solve the control system problems by using
the programs through MATLAB.
Determination of transfer function useful to design the systems.
Introducing of MATLAB in control systems solutions
3 List of Experiments:
rd
10. Transfer function analysis of 3 order using simulink
TEXT BOOKS :
T1 : B. C. Kuo “Automatic Control Systems” 8th edition– by 2003– John wiley and son’s.,
T2 : I. J. Nagrath and M. Gopal, “Control Systems Engineering” New Age International (P)
Limited, Publishers, 2nd edition.
REFERENCE BOOKS :
R1 : Katsuhiko Ogata “Modern Control Engineering” Prentice Hall of India Pvt. Ltd., 3rd
edition, 1998.
R2 : N.K.Sinha, “Control Systems” New Age International (P) Limited Publishers, 3rd
Edition,1998.
Week of
S.no Name of the experiment
Experiment
rd
10. Transfer function analysis of 3 order using simulink Week #10
11. Stability analysis using bode plote using matlab Week #11
12. Stability analysis using root locus using matlab Week #12
Week #13
13. Stability analysis using nyquist plot using matlab
6 Experiment write up
SYNTAX USED:
REPRESENTATION
S.NO TYPE OF SOURCE DECLARATION FORMAT
OF SOURCE
Draw an Integrator Circuit Using OP-AMP. For this circuit apply the Step Response
whose values are T1=0, V1=0V, T2=1NS, V2=-1V, T3=1mS, V3=-1V,
T4=1.0001mS, V4=1V, T5=2mS, V5=1V, T6=2.0001mS, V6=-1V, T7=3mS, V7=-1V,
CIRCUIT DIAGRAM:
PROGRAM:
VIN1 1 0 PWL(0 0 1NS -1V 1MS -1V 1.0001MS 1V 2MS 1V +2.0001MS -1V 3MS -1V 3.0001MS 1V
4MS 1V)
R1 1 2 2.5K
RF 2 4 1MEG
RX 3 0 2.5K
RL 4 0 100K
C1 2 4 0.1UF
XA1 2 3 4 0 OPAMP
.SUBCKT OPAMP 1 2 7 4
RI 1 2 2MEG
GB 4 3 1 2 0.1M
R1 3 4 10K
C1 3 4 1.5619UF
EA 4 5 3 4 2E+5
RO 5 7 75
.ENDS OPAMP
.PROBE
.END
OUTPUT:
SYNTAX USED:
REPRESENTATION
S.NO TYPE OF SOURCE DECLARATION FORMAT
OF SOURCE
Draw a Differentiator Circuit Using OP-AMP. For this circuit apply the Step Response
whose values are T1=0, V1=0V, T2=1MS, V2=1V, T3=2mS, V3=0V,
T4=3mS, V4=1V, T5=4mS, V5=0V respectively. It consists of resistances and Capacitors whose
Values are R1=100Ω, Rf=10KΩ, Rx=10KΩ,RL=100KΩ and the capacitance value as 0.4μF. Plot the
transient response from 0 to 4mseconds with an increment of 50μsecond.
CIRCUIT DIAGRAM:
PROGRAM:
R1 1 2 100
RF 3 4 10K
RX 5 0 10K
RL 4 0 100K
C1 2 3 0.4UF
XA1 3 5 4 0 OPAMP
.SUBCKT OPAMP 1 2 7 4
RI 1 2 2MEG
GB 4 3 1 2 0.1M
R1 3 4 10K
C1 3 4 1.5619UF
EA 4 5 3 4 2E+5
RO 5 7 75
.ENDS OPAMP
.TRAN 10US 4MS
.PROBE
.END
OUTPUT:
AIM: To simulate saw tooth wave and sine wave by using MATLAB.
PROGRAM:
clear all;
close all;
clc;
t1=0:25;
t=[];
for i=1:n,t=[t,t1];
end;
subplot(2,1,1);
plot(t);
subplot(2,1,2);
stem(t);
OUTPUT:
MODEL GRAPH:
PROGRAM:
clear all;
close all;
clc;
t1=0:0.05:n;
x=sin(2*pi*t1);
subplot(1,2,1);
plot(t1,x);
subplot(1,2,2);
stem(t1);
OUTPUT:
PROGRAM:
clear all;
close all;
clc;
t1=0:0.1:m/2;
t2=m/2:-0.01:0;
t=[];
for i=1:n;
t=[t,t1,t2];
end;
subplot(1,2,1);
plot(t);
subplot(1,2,2);
stem(t);
OUTPUT:
MODEL GRAPH:
RESULT: Analysis triangular wave has been successfully completed.
B) Simulation of ramp wave by using MATLAB.
PROGRAM:
clear all;
close all;
clc;
t=0:1:210;
y=t;
subplot(1,2,1);
plot(t,y);
subplot(1,2,2);
stem(t,y)
OUTPUT:
MODEL GRAPH:
RESULT: Analysis of ramp wave has been successfully completed
.
6.4 Unity and Non Unity Feedback System using MATLAB
Aim: To simulation of unity and non unity feedback transfer function using MATLAB.
Theory:
Feedback configuration: If the blocks are connected as shown below then the blocks are said
to be in feedback. Notice that in the feedback there is no transfer function H(s) defined. When
not specified, H(s) is unity. Such a system is said to be a unity feedback system.
When H(s) is non-unity or specified, such a system is said to be a non-unity feedback system as shown
below:
The MATLAB command for implementing a feedback system is “feedback” as shown below:
When H(s) is non-unity or specified, such a system is said to be a non-unity feedback system as shown
below:
Block diagram:
Program:
Result:
b) simulation of non unity feedback system
Block diagram
Result:
6.5. Block diagram reduction technique using MATLAB
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”.
The MATLAB command for implementing a parallel configuration is “parallel” as shown below:
Blockdiagram:
Program:
Result:
6.6. Simulation of P, PD, PI, PID controller
Aim: To simulate the P, PD, PI, PID controller for unit step input.
Theory:
Controller: Provides excitation for the plant; Designed to control the overall system behavior.
The three-term controller: The transfer function of the PID controller looks like the following
KP = Proportional gain
KI = Integral gain
KD = Derivative gain
First, let's take a look at how the PID controller works in a closed-loop system using the
schematic shown above. The variable (e) represents the tracking error, the difference between the
desired input value (R) and the actual output (Y). This error signal (e) will be sent to the PIDcontroller,
and the controller computes both the derivative and the integral of this error signal.The signal (u) just
past the controller is now equal to the proportional gain (KP) times themagnitude of the error plus the
integral gain (KI) times the integral of the error plus thederivative gain (KD) times the derivative of the
error.
Program:
Model graph;
Observation:
Result:
6.7.Simulation of DC Motor characteristics using MATLAB
THEORY:
This experiment will illustrate the characteristics of the D.C. motor used in the Modular Servo and show
how it can be controlled by the Servo Amplifier.
The motor is a permanent magnet type and has a single armature winding. Current flow through the
armature is controlled by power amplifiers as in figure so that rotation in both directions is possible by
using one, or both of the inputs. In most of the later assignments the necessary input signals are
provided by a specialized Pre-Amplifier Unit PA150C, which connected to Inputs 1 and 2 on SA150D
As the motor accelerates the armature generates an increasing 'back-emf' Va tending to oppose the
driving voltage Vin. The armature current is thus roughly proportional to (Vin - Va). If the speed drops
(due to loading) Va reduces, the current increases and thus so does the motor torque. This tends to
oppose the speed drop. This mode of control is called 'armature-control' and gives a speed proportional
to Vin as in figure.
SIMULINK DIAGRAM:
RESULT:
6.8.Simulation of poles and zeros of a transfer function
Aim: To simulate the Poles and zeros of the given transfer function.
Theory:
To obtain the poles and zeros of the system use the MATLABcommand “pole” and“zero” respectively as
shown in example 5. You can also use MATLABcommand “pzmap” to obtain the same.
Transfer function:
Program:
ng1=[1];
dg1=[1 10];
sysg1=tf(ng1,dg1);
ng2=[1];
dg2=[1 1];
sysg2=tf(ng2,dg2);
ng3=[1 0 1];
dg3=[1 4 4];
sysg3=tf(ng3,dg3);
p1=pole(sysg1)
z1=zero(sysg1)
p2=pole(sysg2)
z2=zero(sysg2)
p3=pole(sysg3)
z3=zero(sysg3)
Output:
6.9.STATE MODEL FOR CLASSICAL TRANSFER FUNCTION &
AIM:
To find state model for classical transfer function and transfer function from
state model using MATLAB.
THEORY:
COMMAND 4: PAUSE: With this command the execution will be stopped and it waits
for the enter key.
COMMAND 7: R-LOCUS: Syntax: r locus (Variable): With this we can plot the root
locus of any transfer function. That means in the above syntax the
variable is nothing but a transfer function.
COMMAND 8: BODE: Syntax: Bode (Variable): With this command we can get bode
plot of the given transfer function.
COMMAND 9: MARGIN: Syntax: Margin (Variable): With this command we can get
gain and phase margin of a bode plot of the given transfer function.
COMMAND10: SS: Syntax: Variable1= SS(Variable2): With this command we can get
state space model for the given transfer function. Variable 2 is a
transfer function and variable 1 holds the SS model.
PROCEDURE:
1. Write the programme in MATLAB text editor using mat lab instructions for state
model of classical transfer function and for transfer function from state model.
CIRCUIT DIAGRAM:
GRAPHS
o
NW
(r.p.m)
PROGRAM 1:
DISP [S1,S2,S3,S4 ];
PROGRAM 2:
Num = input (“Enter numerator polynomial values in the form of matrix array” );
H = tf (num,den);
P = SS(H);
[a,b,c,d] = SS data(P);
RESULT:
The state model for classical transfer function and transfer function from state
model are obtained using MATLAB software.
6.10. TRANSFER FUNCTION ANALYSIS OF 3rd ORDER USING
SIMULINK
AIM: To Simulate the transfer function of 3rd order system using SIMULINK.
CIRCUIT DIAGRAM:
OUTPUT:
AIM: To find out the Simulation of stability analysis of Linear Time Invariant
using MATLAB.
BODE PLOT for 2nd , 3rd ,4th & 5th order systems:
25
The transfer function is G(s) = . Plot the bode
s 4 s 25
2
plot.(p.517)
Program:
num=[0 0 25];
den=[1 4 25];
bode(num,den)
Program:
bode(num,den)
4( 2 s 1)
The transfer function is G(s)= . obtain the Bode
s 2 ( s 2 0 .4 s 4 )
plot(p.611)
Program:
num=[0 0 0 8 4];
bode(num,den)
num=[0 0 0 40 24 3.2];
bode(num,den)
Result: Bode plot is plotted for the given transfer function is plotted using
ROOT LOCUS for 2nd , 3rd ,4th & 5th order systems:
K ( s 2)
The transfer function is G(s) = . Obtain the Root Locus
( s 3)( s 4)
plot.
Program:
num=[0 1 2 ];
den=[1 7 12];
rlocus(num,den)
v=[-6 6 6 -6];
axis(v);
grid;
K ( s 0 .4 )
The transfer function is G(s) = . Obtain the Root Locus
s 2 ( s 3 .6 )
plot. (p.400)
Program:
num=[0 0 1 0.4];
rlocus(num,den)
grid;
K ( s 3)
The transfer function is G(s) = .. Obtain Root
s ( s 1)( s 2 4 s 16)
locus plot. (p.360)
Program:
num=[0 0 0 1 3];
den=[1 5 20 16 0];
rlocus(num,den)
v=[-6 6 -6 6];
axis(v); axis(‘square’);
grid;
Program:
num=[0 0 0 1 2 4];
rlocus(num,den)
v=[-7 3 -5 5];
axis(v); axis(‘square’);
grid;
Result: Root Locus Plot is plotted for the given transfer function is plotted
NYQUIST PLOT for 2nd , 3rd ,4th & 5th order systems:
1
The transfer function is G(s) = . Obtain the Root Locus
s 0.8s 1
2
plot. (p.532)
Program:
num=[0 0 1];
nyquist(num,den)
v=[-2 2 -2 2];
axis(v);
grid;
20( s 2 s 0.5)
The transfer function is G(s) = . Draw a Nyquist
s( s 1)( s 10)
plot using MATLAB. (p.600)
Program:
num=[0 20 20 10];
den=[1 11 10 0];
nyquist(num,den)
grid;
100( s 0.1)
The transfer function is G(s) = . Draw a
( s 10)( s 3 3S 2 2S 10)
Nyquist plot using MATLAB. (p.600)
Program:
den=[1 13 32 26 60];
nyquist(num,den)
grid;
Exp 1:
Exp 2:
1. What is a synchro?
2. What is the use of synchro?
3. What is the constructional difference between synchro transmitter & synchro
receiver?
4. What is the relation between a synchro & a transformer?
5. Where do we get maximum e m f in a synchro?
6. When we will get maximum e m f in a synchro?
7. What is the phase different between three voltages induced in the stator of
synchro and why ?
8. How do you determine zero position of synchro
9. what is the error voltage induced ?
Exp 3:
1. What is a servomotor?
2. What are the applications of servomotor?
3. How do you load the D.C Servomotor?
4. Why a servomotor should not be switched on load?
5. What are the elements used as feedback
6. What are the general input and o/p parameters of D.C. servomotor
7. What is the element used as error detector in the given circuit.
Exp 4:
What is a servomotor?
2. What are the applications of servomotor?
3. How can we get the feed back characteristics of D.C Servomotor?
4. How do you load the D.C Servomotor?
5. Why a servomotor should not be switched on load?
6. What is a mathematical model ? What is its importance?
7. How do you define transfer function? What is its significance?
8. What are Kb, KT
Exp 5:
Exp 6:
2. What is the formula magnitude of phase lead circuit lag network & loss?
3. What is the difference between lag network & low pass filter?
Exp 8:
Exp 9:
1. What is MATLAB?
1. What is MATLAB?
Exp 11:
1. What is a servomotor?
2. What are the applications of servomotor?
3. How can we get the feed back characteristics of A.C Servomotor?
4. How do you load the A.C Servomotor?
5. Why a servomotor should not be switched on load?
6. How can a A.C servomotor be controlled?
9. Sample Question paper of the lab external
2 write a program for saw tooth wave and sine wave using matlab
3 write a program for triangular wave and ramp wave using matlab
4 write a program for Unity and non unity feedback system using matlab
9 write a program for State model for classical transfer function &vice
versa using matlab
10 write a program for Transfer function analysis of 3rd order using simulink
11 write a program for Stability analysis using bode plote using matlab
12 write a program for Stability analysis using root locus using matlab
13 write a program for Stability analysis using nyquist plot using matlab
10. Applications of the laboratory
5) plot the locus diagram for second and higher order system using simulation
11. Precautions to be taken while conducting the lab
SAFETY – 1
1. The voltage employed in electrical lab are sufficiently high to endanger human life.
2. Compulsorily wear shoes.
3. Don’t use metal jewelers on hands.
4. Do not wear loose dress
Don’t switch on main power unless the faculty gives the permission
12. Code of Conduct
2. Students who turn up late to the labs will in no case be permitted to perform the
experiment scheduled for the day.
3. After completion of the experiment, certification of the staff in-charge concerned in the
observation book is necessary.
4. Students should bring a notebook of about 100 pages and should enter the
readings/observations/results into the notebook while performing the experiment.
5. The record of observations along with the detailed experimental procedure of the
experiment performed in the immediate previous session should be submitted and
certified by the staff member in-charge.
6. Not more than three students in a group are permitted to perform the experiment on a
set up.
7. The group-wise division made in the beginning should be adhered to, and no mix up of
student among different groups will be permitted later.
8. The components required pertaining to the experiment should be collected from Lab-
in-charge after duly filling in the requisition form.
9. When the experiment is completed, students should disconnect the setup made by
them, and should return all the components/instruments taken for the purpose.
10. Any damage of the equipment or burnout of components will be viewed seriously either
by putting penalty or by dismissing the total group of students from the lab for the
semester/year.
11. Students should be present in the labs for the total scheduled duration.
12. Students are expected to prepare thoroughly to perform the experiment before coming
to Laboratory.
13. Procedure sheets/data sheets provided to the students’ groups should be maintained
neatly and are to be returned after the experiment.
13. Graphs if any.