Você está na página 1de 122

Control Systems Lab

CONTROL SYSTEMS
LAB
II YEAR I SEM

Gokaraju Rangaraju Institute of Engineering & Technology


Bachupally

Control Systems Lab

GOKARAJU RANGARAJU INSTITUTE OF


ENGINEERING AND TECHNOLOGY
(Autonomous Institute under JNTU Hyderabad)

CERTIFICATE
This is to certify that it is a bonafide record of practical work done in
the Control systems Laboratory in I sem of II year during the year
2011-2012

Name:
Roll No:
Branch:

Signature of staff member

Control Systems Lab


LIST OF EXPERIMENTS

1 .TRANSFER FUNCTION FROM ZEROS AND POLES


2. ZEROS AND POLES FROM TRANSFER FUNCTION
3. CHARACTERISTICS OF SYNCHROS
4.TIME RESPONSE OF SERIES RLC CIRCUITS
5.STATE MODEL FROM TRANSFER FUNCTION
6.STATE MODEL FROM ZEROS AND POLES
7.ZEROS AND POLES FROM STATE MODEL
8.STEP RESPONSE OF A TRANSFER FUNCTION
9.IMPULSE RESPONSE OF A TRANSFER FUNCTION
10.RAMP RESPONSE OF A TRANSFER FUNCTION
11. STEP RESPONSE OF A STATE MODEL
12.IMPULSE REPONSE OF A STATE MODEL
13.RAMP RESPONSE OF A STATE MODEL
14.TRANSFER FUNCTION OF A DC GENERATOR
15.TRANSFER FUNCTION OF A DC MOTOR
16.TIME RESPONSE OF SECOND ORDER
17.ROOT LOCUS FROM A TRANSFER FUNCTION
18. BODE PLOT FROM A TRANSFER FUNCTION
19. PID CONTROLLER
20.LAG COMPENSATOR
21. LEAD COMPENSATOR
22. LAG- LEAD COMPENSATOR
23. DETERMINATION OF TRANSFER FUNCTION OF DC MOTOR
24. HYSTERETIC CONTROL OF SPEED AND CURRENT OF DC MOTOR, OUTPUT TO KEEP ARMATURE
CURRENT WITHIN LIMITS USING LabVIEW
25. BANG BANG SPEED CONTROL OF DC MOTOR
26. SPEED CONTROL OF DC MOTOR USING PID CONTROLLER WITH A TACHO FEEDBACK
27. EXPERMENTAL DETERMINATION OF FREQUENCY RESPONSE OF SPEED CONTROL OF A DC MOTOR
AND TO OBTAIN THE TRANSFER FUNCTION OF THE SYSTEM USING LABVIEW
28.NYQUIST PLOT FROM TRANSFER FUNCTION
29. AC VARIABLE SPEED DRIVE FOR 3 PHASE INDUCTION MOTORS FROM 0.25KW TO 7.5KW , 0.33HP TO
10HP.
30. MILLENIUM PLC APPLICATIONS

Control Systems Lab


1 .TRANSFER FUNCTION FROM ZEROS AND POLES

AIM:
To obtain a transfer function from given poles and zeroes using matlab

PROCEDURE:

Write matlab program in the matlab editor document.


Then save and run the program.
Give the required input.
The syntax zp2tf(z,p,k) and tf(num,den) solves the given input poles and zeros and
gives the transfer function.
zp2tf forms transfer function polynomials from the zeros, poles, and gains of a system in
factored form.

Now find the output theoretically for the given transfer function and compare it with the output
obtained practically

MATLAB PROGRAM:
z=input(enter zeroes)
p=input(enter poles)
k=input(enter gain)
[num,den]=zp2tf(z,p,k)
tf(num,den)

EXAMPLE:
Given poles are -3.2+j7.8,-3.2-j7.8,-4.1+j5.9,-4.1-j5.9,-8 and the zeroes are -0.8+j0.43,-0.8j0.43,-0.6 with a gain of 0.5

Control Systems Lab

PRACTICAL CALCULATIONS:
Enter zeros

num =

Z=

den =

Enter poles
P=
Enter gain

Transfer function=

K=
RESULT:
Theoretical value =

Practical value

Hence theoretical value = practical value


Therefore,the transfer function is obtained from the given poles and zeroes.

Viva Questions:
1. what is meant by transfer function?
2. what is s-domain. What is the significance of real axis and imaginary axis in s-domain?
3. what happen to the transfer function at zero of the transfer function?
4. what happens to the transfer function at pole of the transfer function?

Control Systems Lab


2. ZEROS AND POLES FROM TRANSFER FUNCTION

AIM:
To obtain zeros and poles from a given transfer function using MATLAB.

PROCEDURE:

Type the program in the MATLAB editor that is in M-file.


Save and run the program.
Give the required inputs in the command window of MATLAB in matrix format.
tf2zp converts the transfer function filter parameters to pole-zero-gain form.
[z,p,k] = tf2zp(b,a) finds the matrix of zeros z, the vector of poles p, and the associated
vector of gains k from the transfer function parameters b and a:
The numerator polynomials are represented as columns of the matrix b.
The denominator polynomial is represented in the vector a.
Note down the output of the program that is zeros, poles and gain obtained in MATLAB.
The zeros, poles and gain are also obtained theoretically.

Both the transfer functions are compared.

MATLAB PROGRAM:
num = input(enter the numerator of the transfer function)
den = input(enter the denominator of the transfer function)
[z,p,k] = tf2zp(num,den)

PRACTICAL RESULT:
enter the numerator of the transfer function

num =

enter the denominator of the transfer function

den =

z=

p=

Control Systems Lab

RESULT:
1.The
zeros, poles and gain are found from the transfer function theoretically
and by using MATLAB.
2. Theoretically, Zeros are
Poles are
Gain
Practically, Zeros are
Poles are

Gain is
3. The zeros, poles and gain are found to be equal both theoretically and practically.

Viva Questions:
1. what is the significance of s in the transfer function.
2. if s=+j, what do and signify.
3. what do you meant by time-domain?
4. what do you mean by frequency-domain.

Control Systems Lab


3. CHARACTERISTICS OF SYNCHROS
AIM:
To study the characteristics of synchros.
APPARATUS:
Synchro transmitter and receiver set.

CIRCUIT DIAGRAM

PROCEDURE:
STUDY OF SYNCHRO TRANSMITTER
1. Switch on the supply to the synchro transmitter.
2. Note the line voltages of stator terminals by using the multimeter for different angular
positions of rotor of transmitter.
3. Tabulate the line voltages Vs1s2,Vs2s3,Vs3s1 across different angular positions of rotor.
4. Plot the graph of line voltages Vs angular position.

STUDY OF SYNCHRO TRANSMITTER AND RECEIVER PAIR


1. Connect stator terminals of transmitter s1,s2,s3 to that of rotor terminals s1,s2,s3 .
2. Switch on rotor exitation switches sw1 and sw2 .
3. Rotate the transmitter rotor in steps of 30 degreesand note the corresponding angular
position of rotor of receiver in tabular form.
4. Plot the graph of angular position of transmitter Vs receiver.

Control Systems Lab


OBSERVATION TABLE:
STUDY OF SYNCHRO TRANSMITTER:
S.No.
Angular
Vs1s2
Positions
1
0
2

30

60

90

120

150

180

210

240

10

270

11

300

12

330

Vs2s3

Vs3s1

CHARACTERISTICS OF SYNCHRO TRANSMITTER


80
60
40
20
0
-20

50

100

150

200

-40
-60
-80

250

300

350

Control Systems Lab


STUDY OF SYNCHRO TRANSMITTER AND RECEIVER PAIR:
S.No.
Angular position of transmitter
Angular position of receiver
1

30

28

60

60

90

90

120

118

150

149

180

178

210

206

240

240

10

270

268

11

300

299

12

330

330

C HA R A C T E R IS T IC S OF S Y NC HR O
T R A NS MIT T E R A ND R E C E IVE R
400
300
200

Y -V alues

100
0
0

50

100

150

200

250

300

RESULT:
1. Characteristics of synchro transmitter were plotted.
2. Characteristics of synchro transmitter and receiver pair were plotted.
Viva Questions:
1. What are the applications of synchro.
2. Explain working principle of synchro.

10

350

Control Systems Lab


4.TIME RESPONSE OF SERIES RLC CIRCUITS
Aim:- To obtain the time response of series RLC circuit using Breadboard
APPARATUS:Semiconductor trainer module containing:
Breadboard
Resistor(330ohms)
Inductor
Capacitor(0.01uf)
Connecting wires
CIRCUIT DIAGRAM:-

PROCEDURE:-

1.
2.
3.
4.
5.

Connect the circuit as shown in figure


Apply a sinusoidal voltage of 5v p-p
Input 5v p-p is applied to series RLC circuit
Connect output terminals across capacitor
Connect output to channelA of CRO and
observe the waveforms
6. Findout time p-p risetime, falltime.
THEORETICAL CALCULATIONS:PRACTICAL:-

R=330ohms

V=5volts

Tr=0.3Usec

L=0.1mh

Tp=0.5Usec

C=0.01uf

Ts=0.8Usec
RESULT:Hence the series RLC circuit risetime,Falltime total time obtained.
Viva Questions:
1. what do you meant by damping?
2. what is resonance?
3. what are time domain specifications? elaborate.

11

Control Systems Lab


5.STATE MODEL FROM TRANSFER FUNCTION
AIM:
To obtain the state model from the given transfer function.
MATLAB PROGRAM:
num=input(enter the numerator of the transfer function)
den=input(enter the denominator of the transfer function)
ss(tf(num,den))
EXAMPLE:
Obtain the state model from the transfer function given below:

PROCEDURE:

Type the program in the MATLAB editor that is in M-file.


Save and run the program.
Give the required inputs in the command window of MATLAB in matrix format.
The command ss(tf(num,den)) converts the given transfer function into a state model.
Note down the output obtained in MATLAB.
The state model is also obtained theoretically.
Both the state models are compared.

PRACTICAL RESULT:
enter numerator of transfer function[

num =

enter denominator of transfer function[

den =

a=

12

Control Systems Lab


b=
RESULT:
1. The state model is obtained from the given transfer function both theoretically and
practically by using MATLAB.
Practically, the state model is
A=

B=

C=

;D =
2. Both the state models are verified.

Viva questions:
1. What is a state model?

13

Control Systems Lab


6.STATE MODEL FROM ZEROS AND POLES
AIM:
To obtain a state model from given poles and zeros using MATLAB.
PROCEDURE:

Open the MATLAB window and open a new MATLAB editor.


Write the MATLAB program in the MATLAB editor.
Save and run the MATLAB program.
Enter the given poles, zeros and gain as input in matrix format.
The syntax [A,B,C,D]=zp2ss(z,p,k) solves zeroes, poles and gain given in the
matrix format as input and gives the output in the form of a state model.
This syntax transforms the given zeros, poles and gain into a state model.
Note down the output state model obtained practically by using the syntax
[A,B,C,D]=zp2ss(z,p,k) .
Now find the state model theoretically for the given poles, zeros and gain.
Compare the theoretically obtained state model from the given poles, zeros and
gain with the one obtained practically. Write the result based on the comparison
between thoretical and practical result.

MATLAB PROGRAM:
z=input('enter zeros')
p=input('enter poles')
k=input('enter gain')
[A,B,C,D]=zp2ss(z,p,k)
EXAMPLE:
zeros are:

poles are:

gain=

THEORETICAL CALCULATIONS:
Given,zeros =
Given, poles=

X(s)=

14

Control Systems Lab


X(t)=
Let

;
=

Y(s)=
Y(t)=
Therefore,
A=
B=
C=
D=
PRACTICAL RESULT:
enter zeros
z=
enter poles
p=
enter gain

k=
A=
B=
C=
D=
Result:
State model for the given poles, zeros and gain is obtained both theoretically and practically. It
is found that both the theoretical result and practical result are different. The result obtained are
as follows.
Theoretical Result:
Practical Result:

15

Control Systems Lab


7.ZEROS AND POLES FROM STATE MODEL
AIM:
To obtain poles and zeros from a given state model using MATLAB
MATLAB PROGRAM:
A=input('enter matrix A')
B=input('enter matrix B')
C=input('enter matrix C')
D=input('enter matrix D')
[z,p,k]=ss2zp(A,B,C,D)
EXAMPLE:
A=

B=

C=

D=

PROCEDURE:

Open the MATLAB window and open a new MATLAB editor.


Write the MATLAB program in the MATLAB editor.
Save and run the MATLAB program.
The state model is given as input and entered in matrix format.
The syntax [z,p,k]=ss2zp(A,B,C,D) solves the given state model entered in
matrix format as input and gives the output in the form of poles, zeros and gain.
This syntax transforms the given state model into poles, zeros and gain.
Note down the output zeros, poles and gain obtained practically by using the
syntax [z,p,k]=ss2zp(A,B,C,D).
Now find the poles, zeros and gain theoretically for the given state model
Compare the theoretically obtained poles, zeros and gain from the given state
model with the one obtained practically. Write the result based on the comparison
between theoretical and practical result.

RESULT:
Zeros, poles and gain for the given state model is obtained both theoretically and practically. It is
found that both the theoretical result and practical result are equal. The result obtained are as
follows.
Practical Result:
Theoretical Result:

16

Control Systems Lab


8.STEP RESPONSE OF A TRANSFER FUNCTION
AIM:
To obtain the step response of a transfer function of the given system using MATLAB.
MATLAB PROGRAM:
num = input(enter the numerator of the transfer function)
den = input(enter the denominator of the transfer function)
step(num,den)
EXAMPLE:
Obtain

the

step

response

of

the

transfer

function

given

below:

PROCEDURE:
Type the program in MATLAB editor that is in M-file.
Save and run the program.
Give the required inputs in the command window of MATLAB in matrix format.
step calculates the unit step response of a linear system.
Zero initial state is assumed in state-space case.
When invoked with no output arguments, this function plots the step response on the
screen.
step (sys) plots the response of an arbitrary LTI system.
This model can be continuous or discrete, and SISO or MIMO.
The step response of multi-input systems is the collection of step responses for each input
channel.
The duration of simulation is determined automatically based on the system poles and
zeroes.
Note down the response of the transfer function obtained in MATLAB.
The response of the transfer function is also obtained theoretically.
Both the responses are compared.

17

Control Systems Lab

TABULAR FORM

C(T)

0
1
2
3
4
5
6

Y -Values
0.045
0.04
0.035
0.03
0.025
0.02
0.015
0.01
0.005
0
-0.005 0

YValues

10

18

12

Control Systems Lab


RESULT: The step response of a transfer function for a given system isobtained both
theoretically and by using Matlab.
Viva Questions:
1. what is meant by step response of a control system?
2. how to test a control system to obtain step response?

19

Control Systems Lab

20

Control Systems Lab


9.IMPULSE RESPONSE OF A TRANSFER FUNCTION
AIM:
To obtain the impulse response of a transfer function of the given system using MATLAB.
MATLAB PROGRAM:
num = input(enter the numerator of the transfer function)
den = input(enter the denominator of the transfer function)
impulse(num,den)
EXAMPLE:
Obtain the impulse response of the transfer function given below:
T(S)=
PROCEDURE:

Type the program in the MATLAB editor that is in M-file.


Save and run the program.
Give the required inputs in the command window of MATLAB in matrix format.
impulse calculates the impulse response of a linear system.
The impulse response is the response to the Dirac input, (t) for continuous time systems
for discrete time systems.
and to a unit pulse at
Zero initial state is assumed in the state space case.
When invoked without left hand arguments, this function plots the impulse response on
the screen.
impulse(sys) plots the impulse response of an arbitrary LTI model sys.
This model can be continuous or discrete, SISO or MIMO.
The impulse response of multi-input systems is the collection of impulse responses for
each input channel.
The duration of simulation is determined automatically to display the transient behaviour
of the response.
Note down the response of the given transfer function obtained in MATLAB.
The response of the transfer function is also obtained theoretically.
Both the responses are compared.

T
0
1
2
3

C(t)

21

Control Systems Lab


TABULAR FORM:

4
5

THEORETICAL RESULT:

22

Control Systems Lab

RESULT:
The impulse response of a transfer function for a given system is obtained both theoretically and
by using MATLAB.
Viva Questions:
1. What do you meant by impulse response of a control system?

23

Control Systems Lab

24

Control Systems Lab


10.RAMP RESPONSE OF A TRANSFER FUNCTION
AIM:
To obtain the ramp response of a transfer function of the given system using MATLAB.
MATLAB PROGRAM:

num = input(enter the numerator of the transfer function)


den = input(enter the denominator of the transfer function)
sim(num,den,u,t)
EXAMPLE:
Obtain the ramp response of the transfer function given below:

PROCEDURE:
Type the program in the MATLAB editor that is in M-file.
Save and run the program.
Give the required inputs in the command window of MATLAB in matrix format.
lsim simulates the (time) response of continuous or discrete linear systems to arbitrary
inputs.
When invoked without left-hand arguments, lsim plots the response on the screen.
lsim(sys,u,t) produces a plot of the time response of the LTI model sys to the input time
history t,u.
The vector t specifies the time samples for the simulation and consists of regularly spaced
time samples.
t = 0:dt:Tfinal
The matrix u must have as many rows as time samples (length(t)) and as many columns
as system inputs.
Each row u(i,:) specifies the input value(s) at the time sample t(i).
Note down the response of the transfer function obtained in MATLAB.
The response of the transfer function is also obtained theoretically.
Both the responses are compared.

25

Control Systems Lab

Y-Values
0.03
0.025
0.02
0.015
Y-Values

0.01
0.005
0
0

0.1

0.2

0.3

0.4

0.5

0.6

RESULT:
PRACTICAL RESULT:

RESULT: The ramp response of a transfer function for a given system is


obtained both theoretically and by using Matlab.
Viva Questions:
1. what do you meant by ramp response?

26

Control Systems Lab

27

Control Systems Lab


11. STEP RESPONSE OF A STATE MODEL
AIM:
To find the step response of a state model for a given system using MATLAB.
MATLAB PROGRAM:
A=input(enter matrix A)
B=input(enter matrix B)
C=input(enter matrix C)
D=input(enter matrix D)
Step(A,B,C,D)

EXAMPLE:
Obtain the step response of the state model for the given system.
T.F.=
PROCEDURE:
1. Step calculates the unit step response of a linear system. Zero initial state is assumed in
the state-space case.
2. When invoked with no output arguments, this function plots the step response on the
screen.
3. Step(sys) plots the step response of an arbitrary LTI model sys. This model can be
continuous or discrete, and SISO or MIMO.
4. The duration of simulation is determined automatically based on the system poles and
zeros.
5. You can specify either a final time t = Tfinal (in seconds), or a vector of evenly spaced
time samples of the form
t = 0:dt:Tfinal
6. For discrete systems, the spacing dt should match the sample period. For continuous
systems, dt becomes the sample time of the discretized simulation model (see
"Algorithm"), so make sure to choose dt small enough to capture transient phenomena.
7. To plot the step responses of several LTI models sys1,..., sysN on a single figure, use
step(sys1,sys2,...,sysN)

28

Control Systems Lab


step(sys1,sys2,...,sysN,t)
8. All systems must have the same number of inputs and outputs but may otherwise be a
mix of continuous- and discrete-time systems.
9. This syntax is useful to compare the step responses of multiple systems

PRACTICAL RESULT:

PRACTICAL RESULT:

29

Control Systems Lab


RESULT:
Thus obtained the step response of the state model using MATLAB and verified theoretically
and practically.
Viva Questions:
1. Define step signal?

30

Control Systems Lab

31

Control Systems Lab


12.IMPULSE REPONSE OF A STATE MODEL
AIM:
To obtain the impulse response of a state model for a given system.
MATLAB PROGRAM:
A=input('enter matrix A')
B=input('enter matrix B')
C=input('enter matrix C')
D=input('enter matrix D')
impulse(A,B,C,D)
PROCEDURE:
1. Impulse calculates the unit impulse response of a linear system.
2. Zero initial state is assumed in the state-space case. When invoked without left-hand
arguments, this function plots the impulse response on the screen.
3. Impulse(sys) plots the impulse response of an arbitrary LTI model sys. This model can be
continuous or discrete, and SISO or MIMO.
4. The duration of simulation is determined automatically to display the transient behavior
of the response.
5. Impulse(sys,t) sets the simulation horizon explicitly. You can specify either a final time t
= Tfinal (in seconds), or a vector of evenly spaced time samples of the formt = 0:dt:Tfinal
6. For discrete systems, the spacing dt should match the sample period. For continuous
systems, dt becomes the sample time of the discretized simulation model (see
"Algorithm"), so make sure to choose dt small enough to capture transient phenomena.
7. To plot the impulse responses of several LTI models sys1,..., sysN on a single figure, use
impulse(sys1,sys2,...,sysN)
impulse(sys1,sys2,...,sysN,t)
EXAMPLE:
Transfer function.=

32

Control Systems Lab

Y-Values
0.04
0.02
Y-Values
0
0

0.5

1.5

2.5

-0.02

PRACTICAL GRAPH:

0.03

0.025

0.02

0.015

0.01

0.005

-0.005

-0.01

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

RESULT:
The impulse response of a state model for a given system is obtained both theoritically and
practically and verified graphically.
Viva questions:
1. Define impulse signal.

33

Control Systems Lab

34

Control Systems Lab


13.RAMP RESPONSE OF A STATE MODEL
AIM:
To obtain ramp response of a state model for a given system.
MATLAB PROGRAM:
t=0:0.01:10;
u=t
A=input('enter matrix A')
B=input('enter matrix B')
C=input('enter matrix C')
D=input('enter matrix D')
lsim(A,B,C,D,u,t)
PROCEDURE:
1. lsim simulates the (time) response of continuous or discrete linear systems to arbitrary
inputs.
2. When invoked without left-hand arguments, lsim plots the response on the screen.
3. lsim(sys,u,t) produces a plot of the time response of the LTI model sys to the input time
history t,u.
4. The vector t specifies the time samples for the simulation and consists of regularly spaced
time samples. t = 0:dt:Tfinal
5. The matrix u must have as many rows as time samples (length(t)) and as many columns
as system inputs. Each row u(i,:) specifies the input value(s) at the time sample t(i) .
6. The LTI model sys can be continuous or discrete, SISO or MIMO. In discrete time, u
must be sampled at the same rate as the system (t is then redundant and can be omitted or
set to the empty matrix).
7. In continuous time, the time sampling dt=t1-t2 is used to discretize the continuous model.
8. If dt is too large (undersampling), lsim issues a warning suggesting that you use a more
appropriate sample time, but will use the specified sample time.
9. lsim(sys,u,t,x0) further specifies an initial condition x0 for the system states. This syntax
applies only to state-space models.

EXAMPLE:
Transfer function.=

35

Control Systems Lab

Y-Values
0.08
0.06
0.04
0.02
0
-0.02 0

Y-Values

0.2

0.4

0.6

PRACTICAL GRAPH

10
9
8
7
6
5
4
3
2
1
0

10

RESULT:
The ramp response of a state model for a given system is obtained both theoritically and
practically and verified graphically.

36

Control Systems Lab


14.TRANSFER FUNCTION OF A DC GENERATOR
AIM:
To find the transfer function of a DC Generator.
APPARATUS :
Prime Mover
Ammeters (0-2A and 0-20A)
Voltmeters (0-300V)
NAME PLATE DETAILS :
Power
Armature voltage
Armature current
Field voltage
Field current
Speed
Wound

Generator
2.2KW
220V
10A
220V
.64A
1500rpm
Shunt

Motor
2.2KW
220V
11.6A
220V
.6A
1500rpm
Shunt

PROCEDURE:
Make the connections as per circuit diagram. Keep variable AC in minimum position by
gradually increasing the output . Start the motor and bring the speed upto rated rpm i.e.
1500 rpm.
To find ,magnetization characteristics If vs Vg has to be found. Vsc the straight line in
position to find Kg =

Find resistance Rf found using the circuit. Measure the voltage across Z while current I is
also noted.
To find If of the generator first the Is is denoted by V-I. Then Xf and Lf can be found.
Then the transfer function can be obtained from relation T.F =

OBSERVATIONS:
s.no

Eg (V)

14

30

If (A)

37

Control Systems Lab


3

60
90

120

150

180

200

210

10

220

GRAPH SHOWING O.C.C OF A DC GENERATOR

RESULT:
The transfer function of a dc generator is hence determined. It is found to be

38

Control Systems Lab

39

Control Systems Lab


15.TRANSFER FUNCTION OF A DC MOTOR
AIM:

To determine the transfer function of a DC Motor.


Interaction between mechanical and electrical quantities of a motor.
Measuring time response of a DC motor and comparing with time response obtained
through transfer function.

PROCEDURE:
Switch ON S1 and S2 and keep S3 OFF.
Start the motor and gradually rise the speed upto the rated value i.e. 1500 rpm.
Switch OFF S1 and press stop watch simultaneously . Note down the time taken by motor
speed to fall to 900 rpm. i.e. N = 600rpm.
Stop the motor
Switch ON S1 and S2 and keep S3 OFF.
Start the motor again and raise the speed up to 1500 rpm.
Switch off S2 and press stop watch. Note T corresponding to N = 600rpm.
Stop the motor.
Switch ON S1 and S2 and keep S3 OFF.
Start the motor again and raise the speed up to 1500 rpm.
Note down Vs and Is.
Switch OFF S2 and ON S3 and press stop watch simultaneously.
Note the values until the speed falls to 900 rpm.
At 900 rpm also note the values of Va and Ia.

40

Control Systems Lab

OBSERVATIONS :
Case 1 : When S1 , S2 are ON and S3 is OFF
N1 = 600rpm T1 =

sec

Case 2: When S1 is OFF , S2 are ON and S3 is OFF


N2 = 600rpm T2 =

sec

Case 3: When S1 is ON, S2 are OFF and S3 is ON.


N3 = 600rpm T3 =

sec.

Speed (rpm)

Time (sec)

1500
1455
897
347
139
60
35
17

THEORETICAL CALCULATIONS:
Wmech + Wiron = J.N.

Wmech = J.N.

watts =

watts =

41

Control Systems Lab

Wcu = V.I + I2Ra = J.N.

V1 =

V, V2 =

V. I1 =

A , I2 =

V ; Iavg =

Hence, Vavg =

A.

J.(271.43) = 87.33. Hence, J = 0.32

Rate of change of speed =

Retardation Power =

63 % of 1500 rpm =

rpm

Time taken to reach 900 rpm is time constant T = .


Hence B =

Kt = Kb =

( where w =

Transfer Function =

.)

RESULT:
Hence the transfer function of a dc motor is found using Retardation Process. The
transfer function is found to be

42

Control Systems Lab

43

Control Systems Lab


16.TIME RESPONSE OF SECOND ORDER
AIM:
To obtain the time response of a given second order system with its damping frequency.

MATLAB PROGRAM:
wn=input('enter value of undamped natural frequency')
z=input('enter value of damping ratio')
n=[wn*wn]
p=sqrt(1-z^2)
wd=wn*p
h=[p/z]
k=atan(h)
m=pi-k;
tr=[m/wd]
tp=[pi/wd]
q=z*wn
ts=[h/q]
r=z*pi
f=[r/p]
mp=exp(-f)
num=[0 0 n]
den=[1 2*z*wn n]
s=tf(num,den)
hold on
step(s)
impulse(s)

44

Control Systems Lab


hold off
PROCEDURE:
1.Time response of the system is being found when we give the values of natural undamped
frequency and damping ratio.
2.When we give these values first rise time ,peak time,peak overshoot,transfer function are being
calculated.
3.Then step(s) And impulse(s) generates time response of the system.
5.The hold function determines whether new graphics object are added to the graph or replaces
objects in the graph.
6.hold on retains the current plot and certain axes properties so that subsequent graphing
command add to the existing graph.
7.hold off resets axes properties to their defaults before drawing new plots.hold off is the default.
PRACTICAL GRAPH:

45

Control Systems Lab

GRAPH:

RESULT:
The time response of a second order system for step and impulse inputs is found both
theoretically and practically by using MATLAB and both are found to be equal
VIVA Questions:
1. what is time response?
2. the closed transfer function of a second order system is given by (200)/(s+20s+200).
Determine the damping ratio and natural frequency of oscillation.
3. what will be the nature of response of a second order system with different types of
damping?

46

Control Systems Lab

47

Control Systems Lab


17.ROOT LOCUS FROM A TRANSFER FUNCTION
AIM:
To plot the root locus for a given transfer function of the system using MATLAB.
MATLAB PROGRAM:
num=input(enter the numerator of the transfer function)
den=input(enter the denominator of the transfer function)
h=tf(num,den)
rlocus(h)

PROCEDURE:

Write matlab program in the matlab specified documents.


Then save the program to run it.
The input is to be mentioned.
The syntax h=tf(num,den) gives the transfer function and is represented as h.
The syntax rlocus(h) plots the rootlocus of the transfer function h.
Generally the syntax is of the form
rlocus(sys)
rlocus(sys,k)
rlocus(sys1, sys2, .)
[r,k] = rlocus(sys)
r = rlocus(sys,k)

rlocus(sys) calculates and plots the root locus of the open loop SISO model sys.
Now we have to solve it theoretically.
Now we have to compare the practical and theoretical ouputs to verify each other
correctly.

EXAMPLE:
Transfer function =
PRACTICAL:
enter the numerator of the transfer function

num=

enter the denominator of the transfer function

den=

48

Control Systems Lab


Transfer function :
RESULT:
The root locus of the given transfer function is obtained both theoretically and practically using
MATLAB.

V IVA Questions:
1. What is root locus?
2. What is the necessary condition for stability?
3. How the roots of characteristic equation related to stability?

49

Control Systems Lab

50

Control Systems Lab


18. BODE PLOT FROM A TRANSFER FUNCTION
AIM:
To obtain bode plot for a given transfer function of the system using matlab.
MATLAB PROGRAM:
num=input('enter the numerator of the transfer function')
den=input('enter the denominator of the transfer function')
h=tf(num,den)
[gm pm wcp wcg]=margin(h)
bode(h)
PROCEDURE:

Write the matlab program in the matlab editor.


Then save and run the program.
Give the required inputs.
The syntax "bode(h)" solves the given input transfer function and gives the bode plot,
where num,den are the numerator and denominator of the transfer function.
Now plot the bode plot theoretically for the given transfer function and compare it with the
plot obtained practically.

EXAMPLE:
Transfer function=
PRACTICAL CALCULATIONS:
enter the numerator of the transfer function
num =
enter the denominator of the transfer function
den =
Transfer function:
gm =

pm =

wcp =

wcg =

51

Control Systems Lab


RESULT:
Bode plot is obtained for the given transfer function of the system using
matlab and verified with theoretically and practically obtained plots.

Viva Questions:
1. What is bode plot?
2. what are the advantages of bode plot?
3. what is frequency response?

52

Control Systems Lab

53

Control Systems Lab


19. PID CONTROLLER
AIM:
To control the closed loop system using PID controller.
MATLAB PROGRAM:
num=input('enter the numerator of the transfer function')
den=input('enter the denominator of the transfer function')
h=tf(num,den)
[gm pm wcp wcg]=margin(h)
km=10*(gm/20)
wm=wcp
kp=0.6*km
ki=(kp*wm)/pi
kd=(kp*ki)/(4*wm)
h1=tf([1,0],[1])
g=(kp+(kd*h1)+(ki/h1))*h
bode(g)
PROCEDURE:
1) Note down the given transfer function.
2) Sketch the bode plot for the given transfer function by Factor the transfer function into
pole-zero form.
3) Find the frequency response from the Transfer function.
4) Use logarithms to separate the frequency response into a sum of decibel terms
5) Use w=0 to find the starting magnitude.
6) The locations of every pole and every zero are called break points. At a zero breakpoint,
the
7) Slope of the line increases by 20dB/Decade. At a pole, the slope of the line decreases by
8) 20dB/Decade.
9) At a zero breakpoint, the value of the actual graph differs from the value of the starightline graph by 3dB. A zero is +3dB over the straight line, and a pole is -3dB below the
straight line.
10) Sketch the actual bode plot as a smooth-curve that follows the straight lines of the
previous point, and travels through the breakpoints
11) If A is positive, start your graph (with zero slopes) at 0 degrees. If A is negative, start
your graph with zero slope at 180 degrees (or -180 degrees, they are the same thing).
(1 decade before
12) For every zero, slope the line up at 45 degrees per decade when w=
the Break frequency). Multiple zeros means the slope is steeper
13) For every pole, slope the line down at 45 degrees per decade when w =
before the break frequency). Multiple poles means the slope is steeper.
14) Find out the gain margin, phase margin, wcp and wcg

54

(1 decade

Control Systems Lab


15) From those calculate km,wm,kp,ki,kd
16) Already transfer function h1 is given. Now find out the transfer function g and sketch
bode plot for g by repeating steps from 2 -13.
THEORITICAL CALCULATIONS:
Given Transfer function =
A=

0.01
0.1
1
5
7
10
100
Phase plot:
= -90 -

(w

0.01
0.1
1
5
7
10
100

For the above transfer function


Gain margin =
Phase margin =

55

Control Systems Lab


Wcp =
Wcg =
Now
Km = 10 x
=
Wm = wcp =
Kp = 0.6 x km =
Ki = (kp x km)/pi
=
Kd = (kp x ki)/(4 x wm)
=
Transfer function h1 = s
g = [kp + (kd x h1) + (ki/h1)] x h
=
Bode plot for transfer function g:
Magnitude Plot:
A=
W
0.01
0.1
1
5
7
10
50
100
200
500
1000

Phase Plot:

56

Control Systems Lab


=

W
0.01
0.1
1
5
7
10
50
100
200
500
1000

PRACTICAL CALULATIONS:
enter the numerator of the transfer function[ ]
num =

enter the denominator of the transfer function[

den =

Transfer function:
gm =
pm =
wcp =
wcg =
km =
wm =
kp =
ki =

57

Control Systems Lab


kd =
Transfer function:
s
Transfer function:

Bode Diagram
100

Magnitude (dB)

50
0
-50
-100
-150
-200
0

Phase (deg)

-90
-180
-270
-360
-2

10

-1

10

10

10

10

10

Frequency (rad/sec)

RESULT:
The closed loop system of a given transfer function is controlled using matlab and is verified
theoretically.
VIVAB QUESTIONS:
1. what is PID controller?
2. sketch the ramp response of PID controller.

58

Control Systems Lab

59

Control Systems Lab


20.LAG COMPENSATOR
AIM: To design a lag compensator for a closed loop system
MATLAB PROGRAM:
num= input (enter the numerator)
den= input (enter the denominator)
h= tf (num, den)
kv= input (enter kv)
phm= input (enter phase margin)
h1= tf ([1 0], [1])
m= dcgain (h1*h)
g= k*h
[mag, phase, w]= bode (g)
e= input (enter margin of safety)
bode (g)
theta= phm+e;
bm= theta-180;
wcm= input (enter wcm corresponding to bm)
a= input (enter gain corresponding to wcm)
beta= 10^(a/20)
w2= wcm/4
tou= 1/w2
w1= 1/(beta*tou)
g1= (h1+w2)/(h1+w1)
g2= g1*g
[gm1 pm1 wcg1 wcp1]= margin(g2)
bode (g2)

60

Control Systems Lab


hold
bode (g)
if ( (wcg1<wcg)//(wcp1<wcp) )
disp (network is not lag compensator)
else
disp (network is not lag compensator)
end
PROCEDURE:

Write the program in matlab editor and save it


Enter the values of numerator and denominator of the uncompensated system given when
asked during execution
Also enter the values of kv, phase margin and margin of safety
bode (g) returns the bode plot of gain adjusted but uncompensated system
bode (g2) returns the bode plot of compensated sytem

EXAMPLE:
Given open loop transfer function G(s)=

it is designed to compensate the system so

that static velocity error constant kv= 5 sec-1. The phase margin is at least 40 and gain margin is
10 db
Practical graph:

61

Control Systems Lab


Bode Diagram
100

Magnitude (dB)

50
0
-50
-100
-150
-90

Phase (deg)

-135
-180
-225
-270
-2

10

10

-1

10

10

10

Frequency (rad/sec)

RESULT:

Hence, the lag compensation of the system is obtained and is verified theoretically

62

Control Systems Lab

63

Control Systems Lab


21. LEAD COMPENSATOR
AIM: To design a lead compensator for a closed loop system

MATLAB PROGRAM:
z
bm=theta-180;
wcm=input('enter wcm corresponding to bm')
w1=wcm*sqrt(alpha)
w2=wcm/sqrt(alpha)
g1=tf([1/w1 1],[1/w2 1])
g2=g1*g
[mag3, phase3, w3]=bode(g2)
bode(g2)
hold
bode(g)
PROCEDURE:

Write the program in matlab editor and save it


Enter the values of numerator and denominator of the uncompensated system given when
asked during execution
Also enter the values of kv, phase margin and margin of safety
bode (g) returns the bode plot of gain adjusted but uncompensated system
bode (g2) returns the bode plot of compensated sytem

EXAMPLE:
is designed to compensate for the system so that the static velocity error constant
is 20 sec-1 and phase margin is 50 and gain margin is atleast 10 db
THEORITICAL CALCULATIONS:
Given that

64

Control Systems Lab


We have
The magnitude and phase plots for open loop transfer function for uncompensated system can be
given as
Mag (db)
46
26
5
-28.12
-68

0.01
0.1
1
10
100

-90.2
-92.86
-116.56
-168.69
-178.85

Any lead compensator will be of the form

The compensated system will have the open loop transfer function as
Given that kv= 20 sec-1

Therefore

Value of

This gain is achieved at a critical frequency


Therefore the critical frequencies for the lead compensator are
Whose values are equal to 4.41 rad/sec and 18.4 rad/sec
Thus the lead compensator is
Where
Therefore the transfer function of compensated system is given by

65

Control Systems Lab

Therefore the open loop transfer function of the compensated system is

Practical graph:
Bode Diagram
50

Magnitude (dB)

-50

-100

Phase (deg)

-150
-45

-90

-135

-180
-1

10

10

1
Frequency10(rad/sec)

10

10

RESULT:
Hence the lead compensation for a given system is obtained and is compared theoretically

66

Control Systems Lab

67

Control Systems Lab


22. LAG- LEAD COMPENSATOR
AIM:
To design lag-lead compensator using closed loop system.
MATLAB PROGRAAM:
num=input('enter the numerator')
den=input('enter the denominator')
h=tf(num,den)
kv=input('enter velocity error')
phm=input('enter the phase margin')
h1=tf([1 0],[1])
m=dcgain(h1*h)
k=kv/m
g=k*h
[mag phase w]=bode(g)
[gm pm wcg wcp]=margin(g)
e=input('enter margin of safety')
bode(g)
theta=phm+e;
bm=theta-180;
wcm=('enter wcm corresponding to bm')
a=input('enter gain corresponding to wcm')
beta=10^(a/20)
w21g=wcm/4
tou=1/w21g
w11g=1/(beta*tou)
g1=(h1+w21g)/(h1+w11g)
theta1d=theta1d*(pi/180);
alpha=(1-sin(theta1d)/(1+sin(theta1d)))
a=-20*log10(1/sqrt(alpha))
wcm1d=input('enter the value of wcmld corresponding to gain a1')
w11d=wcm1d*sqrt(alpha)
w21d=wcm1d/sqrt(alpha)
g3=tf([1/w11d1],[1/w21d 1])
g4=g3*g1*g
[mag3 phase3 w3]=bode(g2)
bode(g)
hold
bode(g4)

68

Control Systems Lab

PROCEDURE:
Numerator of the given transfer function is assigned to num
Denominator of the transfer function is assigned to den
The value of the static velocity constant is assigned to the kv
Margin of the safty is assigned to e
Plot is obtained by in-build function bode()
Wcm values assigned to wcm which is obtained from above bode plot
The gain corresponding to wcm is assigned to a
If wcg1>wcg orr wcp1>wcp, the network is compensated otherwise it is not
compensated.
THEORITICAL CALCULATIONS:
Transfer function=
=
For complex w,
Gain =-40db

MAGNITUDE PLOT:
Factor

Corner frequency

W=1/J

None

Log magnitude in db
=-20log(factor)
0

W=1/(1+J)

-20

W=1/(1+2J)

-60

69

Control Systems Lab


PHASE PLOT:
=-90W(rad/sec)

0.1

0.2

-98.57

-107.02

-161.56

10

-198.43

20

-261.43

20log5=139.8
New phase margin required is=-40+3=-37
Frequency corresponding to -37 is 1.4=wcg
RESULT:
Hence given network is lag-lead compensated.

VIVA QUESTIONS:
1. What is phase margin?

70

Control Systems Lab

71

Control Systems Lab


23. DETERMINATION OF TRANSFER FUNCTION OF DC MOTOR
USING LABVIEW
AIM: To control the speed of the dc motor and find the transfer function of the complete speed
control system using bode plot.
THEORY:
A Bode Plot is a graph of the systems frequency response. By frequency response we mean the
response of a system to sinusoidal input. Any linear system will give a sinusoidal output to a
sinusoidal input . The frequency of the output will be the same as that of the input. We observe
the output by varying the frequency of the input. At low frquencie the magnitude of the output
will be same as that of input. But at higher frequencies the magnitude will normally fall and also
the output will lag from the input. These two aspects are brought about very well by Bode plot It
is usually a combination of a Bode magnitude plot (usually expressed as dB of gain) and a Bode
phase plot.
This is a simple and accurate method for graphing gain and phase-shift plots. A Bode phase plot
is a graph of phase versus frequency, also plotted on a log-frequency axis, usually used in
conjunction with the magnitude plot, to evaluate how much a signal will be phase-shifted. The
magnitude and phase Bode plots can seldom be changed independently of each other changing
the amplitude response of the system will most likely change the phase characteristics and vice
versa.
Bode plots are a very useful way to represent the gain and phase of a system as a function of
frequency. This is referred to as the frequency domain behavior of a system.
LabVIEW (short for Laboratory Virtual Instrumentation Engineering Workbench) is a platform
and development environment for a visual programming language from National Instruments.
The graphical language is named "G". LabVIEW is commonly used for data acquisition,
instrument control, and industrial automation on a variety of platforms including Microsoft
Windows, various flavors of UNIX, Linux, and Mac OS X.
The programming language used in LabVIEW, also referred to as G, is a dataflow programming
language. Execution is determined by the structure of a graphical block diagram (the LV-source
code) on which the programmer connects different function-nodes by drawing wires. These
wires propagate variables and any node can execute as soon as all its input data become
available. Since this might be the case for multiple nodes simultaneously, G is inherently capable
of parallel execution. Multi-processing and multi-threading hardware is automatically exploited
by the built-in scheduler, which multiplexes multiple OS threads over the nodes ready for
execution.
LabVIEW ties the creation of user interfaces (called front panels) into the development cycle.
LabVIEW programs/subroutines are called virtual instruments (VIs). Each VI has three
components: a block diagram, a front panel, and a connector panel. The last is used to represent
the VI in the block diagrams of other, calling VIs. Controls and indicators on the front panel
allow an operator to input data into or extract data from a running virtual instrument. However,

72

Control Systems Lab


the front panel can also serve as a programmatic interface. Thus a virtual instrument can either
be run as a program, with the front panel serving as a user interface, or, when dropped as a node
onto the block diagram, the front panel defines the inputs and outputs for the given node through
the connector pane. This implies each VI can be easily tested before being embedded as a
subroutine into a larger program.
LABVIEW PROGRAM:

73

Control Systems Lab

PROCEDURE:
The hardware connections are made.
The LABVIEW program for speed control of DC motor is written using LABVIEW
software.
The hardware and software are interfaced using DAQ.
Then the motor is made to run at different frequencies by clicking the start button in the
labview program.
The values of actual and set speed are obtained and graphs for Time vs amplitude for
both input and output speed at different frequencies are drawn in the Excel sheet.
The magnitude and phase plots are drawn using these values.
Then the Bode plot is obtained.
Finally the transfer function of the DC motor is obtained.
OUTPUT:
Bode plot for the speed control system:

Magnitude plot

74

Control Systems Lab

Phase plot
Transfer function of the speed control system is:
86.76 x 10^9
___________________________
s(s+1000)(s+400)(s+20)(s+10)
RESULT:
Hence the transfer function of the complete speed control system is obtained.

75

Control Systems Lab

76

Control Systems Lab


24. HYSTERETIC CONTROL OF SPEED AND CURRENT OF DC
MOTOR, OUTPUT TO KEEP ARMATURE CURRENT WITHIN LIMITS
USING LabVIEW

Aim: To control speed and armature current of a dc motor with in two specific limits
using LabVIEW.
Theory:
Hysteretic current control is a method of controlling a power electronic converter so that an
output current is generated which follows a reference current waveform. A Hysteretic current
controller is implemented with a closed loop control. The difference between the desired current,
and the current being injected is used to control the switching of the thyristor circuit. When the
current crosses an upper limit namely upper hysteretic limit, a pulse is produced to decrease the
current. On the other hand when the current crosses the lower hysteretic limit, a pulse is
produced to increase the current. The minimum and maximum values of the current signal are
[i.min] and [i.max]. The range of the current signal, [i.max]-[i.min], directly controls the amount
of ripple in the output current and is called the hysteretic current. Thus the armature current is
forced to stay within the hysteretic current determined by the upper and lower hysteretic limits.
A sensor (proximity sensor) is used to detect the speed pulses of the motor in order to maintain
speed within the limits.
In the speed control of a DC shunt motor, the desired operating state may be a particular speed. If
it is different, an error signal, correspond to the difference between the reference and the actual
speeds, is fed to a voltage controller to change the motor speed so as to reduce the error signal.
When the motor is operating at the desired speed the error signal will be zero and the motor will
maintain that speed. For controlling armature current within the limits the procedure is same.
Programming is done using advanced version of LabVIEW software wherein the entire operation
can be clearly produced and this is done in a computer which is interfaced with the DAQ USB6009 (advanced version of DAQ) using an USB driver. Once the interfacing is done and the
program is sent to DAQ, the speed of the dc motor can be controlled with desired speed and also
the armature current will stay with in the limits.

77

Control Systems Lab

Block Diagram:

LabVIEW Program:

78

Control Systems Lab

Procedure:

A proximity sensor is connected to the shaft of DC motor. From the sensor the signals are
given to the input DAQ.

A waveform generator is connected to the input DAQ to observe the pulses.

From the data pin of input DAQ the pulses are split into two. One sent to frequency pin
of tone measurement. That is used for speed control and another one is used for current control
with in limits.

The output of tone measurement is rps but we need rpm so the frequency signal is
multiplied with 60.

The rpm is compared with some set high value by using comparison greater than or equal
to and the output is given to selector. The selector takes true condition if rpm is greater than or
equal to the set high value and passes numeric constant 0 else it passes the same signal. The
output of selector gives the actual speed signal. This is done for noise elimination.

The reference voltage should be set by using numeric constant and a closed while loop is
used.

A slider is used to adjust the set speed. The slider output is connected to a multiplier
whose another input is a number constant 1.1 and the output gives the upper limit of speed.

The slider output is also connected to another multiplier whose second input is a number
constant 0.9 and the output gives the lower limit of speed.

A comparison greater than or equal to is taken whose inputs are actual speed and upper
limit of speed and output is connected to a selector. It compares where the actual speed is greater
than or equal to the upper limit of speed. If it is greater than or equal to the selector takes the true
condition and the numeric constant representing dv is selected else it selects 0 and the same
signal is passed.

A comparison lesser than or equal to is taken whose inputs are actual speed and lower
limit of speed and output is connected to a selector. It compares where the actual speed is less
than or equal to the lower limit of speed. If it is less than or equal to the selector takes the true
condition and the numeric constant representing dv is selected else it selects 0 and the same
signal is passed.

The outputs of both the selectors are given as inputs to an adder. The output of this adder
is given as input to another adder whose second input is reference voltage.

The current is compared with some set high value by using comparison greater than or
equal to and the output is given to selector. This is the upper limit .The selector takes true
condition if current is greater than or equal to the set high value and passes numeric constant 0
else it passes the same signal. The output of selector gives the actual current signal.

The current is compared with some set value by using comparison lesser than or equal to
and the output is given to selector. This is the lower limit. The selector takes true condition if

79

Control Systems Lab


current is lesser than or equal to the set value and passes numeric constant 0 else it passes the
same signal.

The output of these two selectors given as input to the adder .the output of this adder to
given as input to another adder whose second input is reference voltage.

The output of this adder and output of speed signal adder to given as input to the other
adder. The output of this given to the output DAQ.
After completing connections in LabVIEW program is connect to DAQ using connector. Now
initialize input and output DAQs of LabVIEW and run the program.
Result:
Hence, the speed control and armature current controls of a DC shunt motor within two specified
limits is obtained by using LabVIEW.

80

Control Systems Lab

81

Control Systems Lab


25. BANG BANG SPEED CONTROL OF DC MOTOR
AIM:To control the speed of dc motor within the desired limits using LabVIEW.
THEORY:
This experiment explains about BANG BANG speed control of dc motor using LabVIEW to keep
speed within limit. Here, a power electronic converter is controlled such that an output voltage is
generated which follows a reference voltage waveform .The difference between the desired voltage and
the voltage being injected is used to control the armature voltage using a thyristor converter. When the
speed reaches the lower limit, reference is changed to increase the voltage and hence speed. When the
speed crosses an upper limit, reference is reduced to decrease the speed.
As an extension to this project, the speed is controlled within the specified upper and lower limits
.This type of controlling the speed between the limits is known as bang bang speed control.
BLOCK DIAGRAM:

CIRCUIT DIAGRAM:

82

Control Systems Lab

PROCEDURE:

A proximity sensor is connected to the shaft of DC motor. From the


sensor the signals are given to the input DAQ.

83

Control Systems Lab

A waveform generator is connected to the input DAQ to observe the


pulses.

From the data pin of input DAQ the pulses are sent to frequency pin of
tone measurement.

The output of tone measurement is rps but we need rpm so the frequency
signal is multiplied with 60.

The rpm is compared with some set high value by using comparison greater
than or equal to and the output is given to selector. The selector takes true
condition if rpm is greater than or equal to the set high value and passes
numeric constant 0 else it passes the same signal through dynamic data array.
The output of selector gives the actual speed signal. T his comparison helps in
noise elimination.

The reference voltage should be set by using numeric constant and a closed
while loop is used.

A slider is used to adjust the set speed. The slider output is connected to a
multiplier whose another input is a number constant 1.1 and the output gives
the upper limit of speed.

The slider output is also connected to another multiplier whose second input is
a number constant 0.9 and the output gives the lower limit of speed.

A comparison greater than or equal to is taken whose inputs are actual speed
and upper limit of speed and output is connected to a selector. It compares
where the actual speed is greater than or equal to the upper limit of speed. If it
is greater than or equal to the selector takes the true condition and the numeric
constant representing dv is selected else it selects 0 and the same signal is
passed.

A comparison lesser than or equal to is taken whose inputs are actual speed and
lower limit of speed and output is connected to a selector. It compares where
the actual speed is less than or equal to the lower limit of speed. If it is less
than or equal to the selector takes the true condition and the numeric constant
representing dv is selected else it selects 0 and the same signal is passed.

The outputs of both the selectors are given as inputs to an adder . The output of
this adder is given as input to another adder whose second input is reference
voltage. The output of this adder is connected to shift register of while loop and
also output DAQ.

Stop button is connected as condition to the selector through loop condition


whose inputs are numeric constant 0 and other is the output of the final adder.
This helps us to stop the motor at 0 instead of some other value.The output of

84

Control Systems Lab


this selector is connected to data pin of output DAQ through dynamic data
array.

The output of final adder and a constant 5 are given to a greater than or equal
to comparator whose output is given as condition to selector.This selector takes
constant 5 when the condition is true and the output of adder when condition is
false. The output of this selector is given to data signal of output DAQ. This
helps us to control the value of DAQ less than or equal to 5.

RESULTS AND CONCLUSION


In machine laboratory, coarse and fine are used to control the speed of dc motor.
There should be a person continuously observing whether the speed is lying between
the limits or not. This results in wastage of time and is also laborious. Instead, in this
project, the speed of dc motor was controlled within the desired limits automatically
using LabVIEW software.

85

Control Systems Lab

86

Control Systems Lab


26. SPEED CONTROL OF DC MOTOR USING PID CONTROLLER WITH
A TACHO FEEDBACK
AIM: Speed control of DC motor using PID controller with a Tacho feedback.
Software Used:

LabVIEW

Components Required:
DC Motor
Thyristor Drive
1:1 DC to DC converter
Data Acquisition(DAQ)
Tacho Sensor
5 volts DC Supply
PROCEDURE:

The three phase AC supply is given to a thyristor drive to which DC motor is


connected.

The speed of the DC motor is sensed by a tachosensor which gives the square
wave signal whose frequency is proportional to the speed. This square
wavevoltage signal is given as DAQ input. The tone measurement block in the
labVIEW software finds the frequency which is then multiplied by 60 to get
RPM.The error in speed is fed to PID block whose output is sent as output signal
of DAQ card.

The obtained output voltage signal is given to thyristor drive as reference using
dc/dc isolator. Isolator used is a 1:1 DC-DC converter which is placed to avoid
faults.

Again this controller output is given to DC motor. Hence, it is a closed loop


operation and finally speed of the DC motor is controlled using PID controller
using LabVIEW software.

LABVIEW PROGRAM:
The DAQ input signal is converted into frequency signal using tone measurement which
is in R.P.S. It is multiplied by 60 to get speed in R.P.M. A selector is use to select the original
value if the speed is lesser than 1000(some higher value) and selects zero if it is greater than
1000. This is done to eliminate the noise. This obtained value and some reference sinusoidal
signal are merged and is given to a lvm writer which records the input an output values. Now, the
error is calculated which is the difference between the obtained value and the reference

87

Control Systems Lab


sinusoidal signal and is modulated to get the positive error. This error is individually multiplied
with kp(Proportional constant), ki(integral constant) and kd(Differential constant) and are
proportionated, integrated and differentiated. The obtained proportional, Integral and differential
values are summated which gives the differential voltage voltage (dv). Another selector is used
which selects the positive value of dv if the actual speed is less than the reference sinusoidal
signal and selects the negative dv if it is greater than reference sinusoidal signal. The obtained
value is added with some initial voltage (say 0.5v) and is given to shift register and DAQ output.
Shift register replaces the initial voltage with th obtained voltage and hence it is closed loop
operation.
Hence, speed of the DC motor is controlled using PID controller in a LabVIEW software.
PID CONTROLLER:

where
Pout, Iout,
and Dout
are the
contributions to the output from the PID controller from each of the three terms, as
defined below.
Proportional term:
The proportional term (sometimes called gain) makes a change to the output that is
proportional to the current error value. The proportional response can be adjusted by multiplying
the error by a constant Kp, called the proportional gain.
The proportional term is given by:

where
Pout: Proportional term of output

88

Control Systems Lab


Kp: Proportional gain, a tuning parameter
e: Error = SP PV
t: Time or instantaneous time (the present).
Integral term:
The contribution from the integral term (sometimes called reset) is proportional to both
the magnitude of the error and the duration of the error. Summing the instantaneous error over
time (integrating the error) gives the accumulated offset that should have been corrected
previously. The accumulated error is then multiplied by the integral gain and added to the
controller output. The magnitude of the contribution of the integral term to the overall control
action is determined by the integral gain, Ki.
The integral term is given by:

where
Iout: Integral term of output
Ki: Integral gain, a tuning parameter
e: Error = SP PV
t: Time or instantaneous time (the present)
: a dummy integration variable
Derivative term:
The rate of change of the process error is calculated by determining the slope of the error
over time (i.e., its first derivative with respect to time) and multiplying this rate of change by the
derivative gain Kd. The magnitude of the contribution of the derivative term (sometimes called
rate) to the overall control action is termed the derivative gain, Kd.
The derivative term is given by:

where
Dout: Derivative term of output
Kd: Derivative gain, a tuning parameter
e: Error = SP PV
t: Time or instantaneous time (the present)

89

Control Systems Lab

LabVIEW BLOCK DIAGRAM:

This is the block diagram of a PID controller. The DAQ input signal is converted into
frequency signal using tone measurement which is in R.P.S. It is multiplied by 60 to get speed in
R.P.M. A Selector is use to select the original value if the speed is lesser than 1000(some higher
value) and selects zero if it is greater than 1000. This is done to eliminate the noise. This
obtained value and some reference sinusoidal signal are merged and is given to a lvm writer
which records the input an output values. Now, the error is calculated which is the difference
between the obtained value and the reference sinusoidal signal and is modulated to get the
positive error. This error is individually multiplied with kp(Proportional constant), ki(integral
constant) and kd(Differential constant) and are proportionated, integrated and differentiated. The
obtained proportional, Integral and differential values are summated which gives the differential
voltage voltage (dv). Another selector is used which selects the positive value of dv if the actual
speed is less than the reference sinusoidal signal and selects the negative dv if it is greater than
reference sinusoidal signal. The obtained value is added with some initial voltage (say 0.5v) and
is given to shift register and DAQ output. Shift register replaces the initial voltage with th
obtained voltage and hence it is closed loop operation.
Hence, speed of the DC motor is controlled using PID controller in a labview software.

90

Control Systems Lab


MS-Excel:
It is used to record the speed of the motor with corresponding times. Input speed versus time
graphs and output speed versus time graphs are drawn and checked if both the graphs are similar.

WAVEFORMS:

INPUT WAVEFORMS

OUTPUT WAVEFORMS

91

Control Systems Lab

INPUT AND
OUTPUT WAVEFORMS
Series2 Input
Series4 - output
RESULT:
Speed of the DC motor was controlled using a PID controller and respective input and output
waveforms were drawn.

92

Control Systems Lab

93

Control Systems Lab


27. EXPERMENTAL DETERMINATION OF FREQUENCY RESPONSE
OF SPEED CONTROL OF A DC MOTOR AND TO OBTAIN THE
TRANSFER FUNCTION OF THE SYSTEM USING LABVIEW
AIM: To determine the frequency response (Bode Plot) of speed control of a DC Motor and to
obtain the transfer function of the system using LABVIEW software.
THEORY:
SPEED CONTROL OF DC MOTOR:
Speed control of DC motor can be precisely done using three methods. It is required to obtain the
speed characteristics of a DC shunt motor as a function of armature voltage, field current and
external resistance in the armature circuit. The whole process of speed control is automated by
using LABVIEW
Instability of a DC Motor can be observed in three ways :
1. The Motor speed abruptly becomes zero.
2. The speed of motor keeps oscillating between the minimum and maximum value
continuously and uncontrollably.
3. The speed of Motor abruptly increases to maximum value and keeps running at maximum
speed continuously and uncontrollably.
DEFINITION OF FREQUENCY RESPONSE:
When a sinusoid signal is applied to the system the amplitude of the output obtained will not be
same as that of the amplitude of input signal and there is a phase difference between the input
and output signal.As the frequency of input is increased out put amplitude reduces and phase
shift occurs. This type of response is known as frequency response.
The magnitude and phase relationship between sinusoidal input and the steady state output is
termed as frequency response
BODE PLOT:
It is a logarithmic plot which consists of two graphs, one giving the logarithm of | G(jw) | and the
other phase angle of G(jw) both plotted against frequency in logarithmic scale. These plots are
called Bode plots in honour of H.W.Bode who did the basic work in this area.
The standard procedure is to plot 20log| G(jw) |and phase angle (w) versus log w i.e., frequency
on a logarithmic scale .in this representation ,the unit of magnitude 20 log| G(jw) | is decibel,
abbreviated as db.
LABVIEW PROGRAM TO CONTROL MOTOR SPEED
The proximity sensor senses the speed of the DC motor and generates the square wave form.Its
frequency is found by a function block called tone measurement and multiplied by 60 to get
RPM.

94

Control Systems Lab


To eliminate the noise and to get pure signal from the proximity sensor, the signal is compared
with the maximum speed (here 1200rpm) and if the value of the actual speed is greater than the
maximum speed then the value of zero is assigned The signal thus obtained is then compared
with the desired speed at which the DC motor is required to rotate. Here the actual speed of the
DC motor is compared with the reference speed, if the value of actual speed is greater than the
reference speed then the constant (here dv) at various instance is being subtracted from the
voltage corresponding to actual speed until it attains the reference speed by while loop. Similarly
in case if the actual speed is less than the reference speed then a constant dv is added to the
voltage corresponding to actual speed until it attains the reference speed.
Here the reference speed is given as the input at various frequencies by using simulate signal.
The DAQ (USB 6008/6009) which we are using can hold the voltage values up to 5volts. In case
if the voltage corresponding to different speeds exceeds 5volts separate block diagram has been
constructed in order to restrict output to 5V.
The reference speed and the corresponding voltage, actual speed at corresponding voltage is
then fed to write to frequency block where the input and output graphs at particular speed is
drawn from the graph. The gain of the system is obtained by dividing the output by input and the
phase difference between the input and output at different frequencies is obtained. Thus the
magnitude and phase plot (Bode plot) vs frequencies is obtained from the Bode plot the transfer
function of the system is obtained. From the transfer function the system stability is verified.The
programming for speed control of DC Motor is done as shown below
Blockdiagram:

95

Control Systems Lab

Front panel
THEORITICAL CALCULATIONS:

96

Control Systems Lab


Input graph for frequency of 0.1 HZ

Output graph for frequency of 0.1 HZ


From the graph obtaining by taking input sinusoidal signals of frequency 0.1 HZ, the output
waveform will be also an sinusoidal signals with the same frequency but with different amplitude
and different phase difference.
Here for the frequency of 0.1 HZ ,the gain magnitude can be obtained as follows:
Magnitude Gain is defined as ratio of peak to peak amplitude of output waveform to peak to
peak amplitude of input waveform.
Here input p-p amplitude is
590-210=380
Output p-p amplitude is
599.9-193=407
Hence gain magnitude is
407/380=1.0723
Phase difference between the two signals is four (4) sec (from the graph)
But 10 sec = 360 degrees
4 sec = 144 degrees

97

Control Systems Lab


Similarly for the different frequencies the gain magnitude and phase difference is calculated :

Corner Frequency

Magnitude

Phase

0.001 HZ

1.1058

36

0.01HZ

1.0960

108

0.1HZ

1.0723

144

0.125 HZ

1.043

216

0.25HZ

0.998

540

PRACTICAL WAVEFORM:
THE OBTAINED BODE PLOT ARE:

98

Control Systems Lab


Magnitude P lot
1.12
1.1
1.08
1.06
1.04
1.02
1
0.98
0.96
0.94
0.001Hz

0.01HZ

0.1Hz

0.125HZ

0.25HZ

Magnitude plot

P has e P lot
600

500

400

300

200

100

0
0.001Hz

0.01HZ

0.1Hz

0.125HZ

Phase plot
From the bode plot the transfer function can be obtained

99

0.25HZ

Control Systems Lab


The obtained transfer function from the bode plot is:
G(S) =

318.4*1000

(S+1000)(S+100)(S+10)(S+8)(S+4)

Thus from the transfer function all the poles lie on the left hand side of s-plane .The system is
stable.
RESULT OBTAINED:
The speed control of DC Motor is achieved through LABVIEW at a desired speed.
The Bode plot of the system is obtained.
The transfer function is obtained from the Bode Plot.
System stability of the obtained transfer function is obtained and verified.

100

Control Systems Lab

101

Control Systems Lab


28.NYQUIST PLOT FROM TRANSFER FUNCTION
AIM:
To plot Nyquist plot for a given transfer function of the system.
THEORY:
A nyquist plot is used in automatic control and signal processing for assessing the stability of a
system with feedback. It is represented by a graph in polar coordinates in which the gain and
phase of a frequency response are plotted. The plot of these phasor quantities shows the phase as
the angle and the magnitude as the distance from the origin. This plot combines the two types of
Bode plot magnitude and phase on a single graph with frequencry as a parameter along the
curve.
Nyquist calculates the Nyquist frequency response of LTI models. When invoked without lefthand arguments, nyquist produces a Nyquist plot on the screen. Nyquist plots are used to analyze
system properties including gain margin, phase margin, and stability.
The nyquist stability criterion , provides a simple test for stability of a closed-loop control system
by examining the open-loop system's Nyquist plot. Stability of the closed-loop control system
may be determined directly by computing the poles of the closed-loop transfer function. The
Nyquist Criteria can tell us things about the frequency characteristics of the system. For
instance, some systems with constant gain might be stable for low-frequency inputs, but become
unstable for high-frequency inputs. Also, the Nyquist Criteria can tell us things about the phase
of the input signals, the time-shift of the system, and other important information.
The Nyquist Contour
The nyquist contour, the contour that makes the entire nyquist criterion work, must encircle the
entire right half of the complex s plane. Remember that if a pole to the closed-loop transfer
function (or equivalently a zero of the characteristic equation) lies in the right-half of the s plane,
the system is an unstable system.To satisfy this requirement, the nyquist contour takes the shape
of an infinite semi-circle that encircles the entire right-half of the s plane.
Nyquist Criteria
Let us first introduce the most important equation when dealing with the Nyquist criterion:
Where:
N is the number of encirclements of the (-1, 0) point.
Z is the number of zeros of the characteristic equation.
P is the number of poles of the characteristic equation.
With this equation stated, we can now state the Nyquist Stability Criterion:
Nyquist Stability Criterion
A feedback control system is stable, if and only if the contour
encircle the (-1, 0) point when P is 0.

in the F(s) plane does not

in the F(s) plane encircles


A feedback control system is stable, if and only if the contour
the (-1, 0) point a number of times equal to the number of poles of F(s) enclosed by .

102

Control Systems Lab


In other words, if P is zero then N must equal zero. Otherwise, N must equal P. Essentially, we
are saying that Z must always equal zero, because Z is the number of zeros of the characteristic
equation (and therefore the number of poles of the closed-loop transfer function) that are in the
right-half of the s plane.
MATLAB PROGRAM:
num=input(enter the numerator of the transfer function)
den=input(enter the denominator of the transfer function)
h=tf(num,den)
nyquist(h)
[gm pm wcp wcg]=margin(h)
if(wcp>wcg)
disp(system is stable)
else
disp(system is unstable)
end
PROCEDURE:

Write matlab program in the matlab editor document.


Then save and run the program.
Give the required input.
The syntax tf(num,den) solves the given transfer function and gives poles and zeros of
the function.
nyquist(sys), nyquist calculates the Nyquist frequency response of LTI models. When
invoked without left-hand arguments, nyquist produces a Nyquist plot on the screen.
Nyquist plots are used to analyze system properties including gain margin, phase margin,
and stability. nyquist(sys) plots the Nyquist response of an arbitrary LTI model sys.
This model can be continuous or discrete, and SISO or MIMO. In the MIMO case,
nyquist produces an array of Nyquist plots, each plot showing the response of one
particular I/O channel. The frequency points are chosen automatically based on the
system poles and zeros.
[Gm,Pm,Wcg,Wcp] = margin(sys), margin calculates the minimum gain margin, phase
margin, and associated crossover frequencies of SISO open-loop models. The gain and
phase margins indicate the relative stability of the control system when the loop is closed.

RESULT:

103

Control Systems Lab


Nyquist plot is plotted from given transfer function and it is found to be unstable.

VIVA QUESTIONS:
1. What is nyquist plot?

104

Control Systems Lab

105

Control Systems Lab

29.

106

Control Systems Lab

107

Control Systems Lab

108

Control Systems Lab

109

Control Systems Lab

110

Control Systems Lab

111

Control Systems Lab

112

Control Systems Lab

113

Control Systems Lab

114

Control Systems Lab

115

Control Systems Lab

116

Control Systems Lab

30. MILLENIUM PLC APPLICATIONS:


PROCEDURE:
EDIT MODE:
The block diagram is built in a selected FBD or LADDER NETWORK.
Any editions can be made in this mode.
SIMULATION MODE:
The program is run and results are observed in simulation tool.
MONITORING MODE:
The controller is turned ON.
The program is compiled and loaded to the controller.
The program is run and result can be viewed through the hardware connected to the controller.

1. When start PB is pressed, the output energies. When PB is released, the output still ON
till stop button is pressed.

117

Control Systems Lab


2. When start PB is pressed, Red and green lights come ON. Green light goes off as soon as
push button is released, but red light remains lit.

3. If one input is ON nothing happens


i. If any two inputs are ON, warning light lights UP
ii. If any three lights are ON, Alarm starts
iii. If all four inputs are ON, Fire warning is generated.

118

Control Systems Lab

4. When we press start button, motor 1 should on after 5s, then motor2 should on after
5sec; then motor 3 should on for 5sec.And when we press stop button all motors
(motor1, motor2, motor 3) should stop at a time.

5. When all the lights are turned OFF in buildings. An exit door light is to remain ON for an
additional 10 secs. The parking spot light turns ON and continues to remain for
additional 3 min, after the exit door light goes OFF.

119

Control Systems Lab

6. when start is pressed, master motor should on and coolant motor should on for 5sec
and off for 5sec.when coolant motor on for 5 times then coolant motor stop & lubricant
motor should on for 10sec. when lubricant motor off after 10sec then again coolant
motor should on and continuous cycle until we press the stop button.

120

Control Systems Lab

7. When we press start button output1 should on for 5sec; when output1 goes off then
output2 should on for 5sec; when output2 goes off then output3 should on for 5sec;
and when output3 goes off output4 should on for 5sec.When output4 goes off then
again output1 should on and continuous process; till we press the stop button.

8. TRAFFIC SIGNALS:
9. Condition1:
i. Lane1
ii. Orange
iii. Green

Lane2
Red
Red

Lane3
Red
Red

Lane4
Red
Red

Lane2
Orange

Lane3
Red

Lane4
Red

10. Condition2:
i. Lane1
ii. Red

121

Control Systems Lab


iii. Red

Green

Red

Red

Lane2
Red
Red

Lane3
Orange
Green

Lane4
Red
Red

Lane2
Red
Red

Lane3
Red
Red

Lane4
Orange
Green

11. Condition3:
i. Lane1
ii. Red
iii. Red
12. Condition4:
i. Lane1
ii. Red
iii. Red

122

Você também pode gostar