0% found this document useful (0 votes)
0 views46 pages

Control System Modified

The document outlines a series of experiments for the Control System course at Lakshmi Narain College of Technology, focusing on both open-loop and closed-loop control systems. It includes detailed procedures for studying system responses, simulating various control system behaviors using MATLAB and SIMULINK, and analyzing the effects of feedback and disturbances. Additionally, it provides theoretical background on control systems, including transfer functions, damping ratios, and stepper motor control using microprocessors.

Uploaded by

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

Control System Modified

The document outlines a series of experiments for the Control System course at Lakshmi Narain College of Technology, focusing on both open-loop and closed-loop control systems. It includes detailed procedures for studying system responses, simulating various control system behaviors using MATLAB and SIMULINK, and analyzing the effects of feedback and disturbances. Additionally, it provides theoretical background on control systems, including transfer functions, damping ratios, and stepper motor control using microprocessors.

Uploaded by

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

LIST OF EXPERIMENTS

DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING


LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL
CONTROL SYSTEM

1.Study of open-loop & closed-loop control system.

2. Time response of second order control system.

3. To reduce linear systems block diagram using series, parallel and


feedback configuration using MATLAB.

4. To simulate transfer function and pole- zero mapping using


SIMULINK.

5. To simulate unit ramp response of a control system using


SIMULINK

6. To simulate step response of a control system using MATLAB.

7. To obtain the Root locus plot for the given system using MATLAB

8. To obtain the Nyquist plot for the given system using MATLAB.

9. To obtain the bode plot for the given system using MATLAB.

10. To Transform a given Transfer Function to State Space Model and

from State Space Model to Transfer Function using MATLAB.


DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OF ELECTRICAL
NARAIN COLLEGE &ELCTRONICS
OF TECHNOLOGY, BHOPAL ENGINEERING

EXPERIMENT NO. 1

AIM: Study of open-loop & closed-loop control system.

APPARATUS: Kit, CRO, Connecting Chords.

THEORY:

CLOSED-LOOP CONTROL SYSTEM:

A closed- loop control system is one in which the output signal has a direct effect upon the
control action. That is, closed-loop control systems are feedback control systems. The actuating
error signal, which is the offences between the input signal and feedback signal, (which may be the
output signal or a function of the output signal and its derivatives), is fed to the controller so as to
reduce the error and bring the output of the system to a desired value, In other words, the term
"closed-loop" implies the use of feedback action in order to reduce system error. The input-output
relationship of the closed-loop control system is shown in block diagram.

INPUT OUTPU
T
CONTROLL PROCESS
ER

MEASURING
ELEMENT

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL


DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OF ELECTRICAL
NARAIN COLLEGE &ELCTRONICS
OF TECHNOLOGY, BHOPAL ENGINEERING

In automatic feedback or automatic closed-loop temperature control system, the position of


the dial on the automatic controller nets the desired temperature. The output, the actual
temperature of the hot water, which is measured by the temperature measuring device, is compared
with the desired temperature in order to generate an actuating error signal, In doing this, output
temperature i9s conversed to the same units as the input (set point) by a transducer. (A transducer
is a device which converts a signal from one form into another). The error signal produced in the
automatic controller is amplified, and the output of the controller is amplified and the output of the
controller is sent to the control valve in order to change the valve opening for steam supply so as to
correct the actual water temperature. If there is no error, no change in the valve opening is
necessary.

Numerous closed-loop control system may to found in industry and in homos. Some
examples are – all the servomechanisms, most process control systems, house hold refrigerators,
automatic hot water healers, and automatic home healing systems with thermostatic control.

DIAGRAM

TRANSFER FUNCTION OF CLOSED LOOP CONTROL SYSTEM:

Consider the closed loop system shown as under.

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL


DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OF ELECTRICAL
NARAIN COLLEGE &ELCTRONICS
OF TECHNOLOGY, BHOPAL ENGINEERING

DIAGRAM

Where R (S) ------- Input to the system

Y (S) ------- Output of the system.

E (S) ------- Error signal at any time t.

G (S) ------- Forward transfer function of the loop.

H (S) ------- Feedback transfer function of the loop.

Then E (s) = R (S) – B (S)

= R(S) – H(S). Y (S)

But Y(S) = E(S). G (S)

Y(S)
i.e. ------------- = R (S) – H (S). Y (S)
G (S)

Y (S) G (S)
Or ---------- = --------------------------- ......................... (A)
G (S) 1+ H (S) G (S)

Equation A is the transfer function of closed loop control system.

OPEN LOOP CONTROL SYSTEM :

Open – loop control systems are control systems in which the output has no effect upon the
control action. That is, in an open loop control system, the output is neither measured nor fed back
for comparison with the input. Figure shows the input output relationship of a such system. A
practical example is a washing machine, soaking, washing and rinsing in the washing machine are

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL


DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OF ELECTRICAL
NARAIN COLLEGE &ELCTRONICS
OF TECHNOLOGY, BHOPAL ENGINEERING

operated on the time basis. The machine does not measure the output signal, namely, the
cleanliness of the clothes.

In any open – loop control system the output is not compared with the reference input.
Hence, for each reference input, there corresponds a fixed operating condition. Thus the accuracy
of the system depends, on the calibration. (open – loop control systems must be carefully
calibrated in order to be useful). In the presence of disturbances an open – loop control system will
not per form the desired task. Open – loop control can be used in practice only if the relationship
between the input and output is known and if there are neither internal nor external disturbances.
Clearly such systems are not feed back control systems. Note that any control system which
operates on a time basis is open – loop. For example, traffic control by means of signals operated
on a time basis is another instance of open – loop control.

INPUT plant or process OUTPUT


CONTROLLER

CLOSED LOOP VERSUS OPEN – LOOP CONTROL SYSTEMS :

1) The closed – loop control system is that the use of feedback makes the system response
relatively insensitive to external disturbances and internal variations in system parameters, It is
thus possible to use relatively inaccurate and inexpensive components to obtain the accurate
control of a given plant, where as this is impossible in the open – loop case.

2) From the point of view of stability the open – loop control system is easier to build since
stability is not a major problem. On the other hand, stability is always a major problem in the
closed – loop control system since it may tend to over correct errors which may cause oscillations
of constant or changing amplitude.

3) It should be emphasized that for systems in which the inputs are known ahead of time and
in which there are no disturbances it is advisable to use open – loop control. Closed – loop control
systems have advantages only when unpredictable disturbances and / or unpredictable variations in
system components are present. Note that the output power range partially determines the cost,
weight and size of a servomechanism (or capital investment, manpower etc in business systems).

In order to decrease the required power of a system, open – loop control may be used
where applicable. A proper combination of open-loop and closed-loop controls is usually less
expensive and will give satisfactory overall system performance.

PROCEDURE :

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL


DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OF ELECTRICAL
NARAIN COLLEGE &ELCTRONICS
OF TECHNOLOGY, BHOPAL ENGINEERING

(A) MEASUREMENT OF OPEN LOOP GAIN:

1. Make power on to the unit.

2. Connect SP to Open Loop Controller G (S) with K1 ( or K2) gain by connecting SP socket
to K1 (or K2) socket.

3. Set SP to value of 4 volt and measure the output.

4. Change the value of SP and take 2 –3 more readings.

OUTPUT
5. Calculate Open Loop gain G (S) = --------------- = K
INPUT

6. Change Open Loop gain to K2 by connecting SP to K2 & repeats steps 2 to 5.

SP INPUT Y (S)
K 1 g (s)

(B) MEASUREMENT OF FEEDBACK GAIN:

(7) Connect SP to input K1 (or K2) of H (S)


Set SP to say 4 volt.
Measure the voltage at input & output of H (S)

OUTPUT OF H (S)
Feedback gain H(S) = --------------------
INPUT TO H (S)

(C) CLOSED LOOP CONTROL:

(8) Connect SP to summing amplifier at R (S).

Connect E(S) to K1 of G (S) (for gain = 1)

Connect Z point as input at K1 to H(S) (feedback gain = 1)

Connect output of H (S) to summing amplifier by shorting points X1 & X2.

Set SP to say 4 V and measure output voltage Y (S).

Tabulate the result and compare observed value and calculated value.

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL


DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OF ELECTRICAL
NARAIN COLLEGE &ELCTRONICS
OF TECHNOLOGY, BHOPAL ENGINEERING

K1

K1
X1 X2
OBSERVATION TABLE:-

Gain Without feed Back G (s) With feed back H(s)

K1

K2

OPEN LOOP SYSTEM:-

With out disturbance With disturbance

Input

Output

K1

CLOSED LOOP SYSTEM:-

With out disturbance With disturbance

Input

Output

K1

(9) Change the gain of forward controller G(S) and/ or Feedback controller H (S) and note the
input & output voltage. Tabulate the result.

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL


DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OF ELECTRICAL
NARAIN COLLEGE &ELCTRONICS
OF TECHNOLOGY, BHOPAL ENGINEERING

(D) EFFECT OF LOAD DISTURBANCE:

Adjust load disturbance to say + 1 V.

Connect Load disturbance to system by shorting points L1 & L2.

Note the output voltage for closed loop system for disturbance of + 1 V.

Now make connections for open loop controller as in part A and short points L1 and L2 for
providing load disturbance.

Note the effect of + 1 volt load disturbance on output of open loop controller.

Compare the percentage change in output for given load disturbance for open-loop and closed-
loop. Comment on the result.

RESULT: Forward gain =


Feedback gain =

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL


DEPARTMENT OF ELECTRICAL
DEPARTMENT AND ELECTRONICS
OF ELECTRICAL ANDENGINEERING
ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

EXPERIMENT NO -2

TITLE :
1. Time response of second order control system

OBJECT: Find out the response of step input for second order system.

EQUIPMENT:
CRO, Function generator, RLC network representing second order system.

THEORY: RLC network shown in figure 1 represents a second order system. When
step input is applied to series combination of RLC network
And output is obtained across capacitor. This output varies as the response
of a second order system. From figure 1: Ei(s) =
(R+SL+ 1/CS) I(s)
= (LCS2 + RCS + 1) I(s)/CS
And Eo(s) = (1/CS) I(s)
Therefore;
Eo (s) = 1
Ei (s) (LCS 2 + RCS + 1 )
= 1/LC
(S2 + (R/L) S + 1/LC)
Comparing with standard second order transfer function:

Eo (s) = Wn2
Ei (s) = (S2 + 2WnS + Wn2 )
Natural frequency of oscillation:
Wn = 1

LC

Damping Ratio (  ) = R C
2 L

Maximum Overshoot = e - 

1- 
Damped frequency of oscillations
Wd=Wn 1- 2
% Overshoot = Vomax - Vi * 100
Vi
DEPARTMENT OF ELECTRICAL
DEPARTMENT AND ELECTRONICS
OF ELECTRICAL ANDENGINEERING
ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

To determine the output supply step voltage at input terminals of RLC network.
Observe the output response on CRO. Damping and Natural frequency of oscillation can be
varied by change of R and C. Take the observations for <1, =1 &, >1 and draw the
waveforms. Observe the waveform for RL, RC, and LC circuit also

OBSERVATIONS:
1. R = 10 K ohms variable.
2. L = 2.98 Henry  3H.
3. c = 0. 25  farad.
tr  Time corresponding to output becoming equal to input for first time .
tp  Time corresponding to maximum overshoot .
ts  Setting time .

REPORT: Show the waveform across R, L and C.

QUESTIONS :
1. What is the time response when output is taken across ‘ R in a RLC circuit.
1. Draw the root locations in s plane.
2. Draw the time response when  = 0 &  > 1.
DEPARTMENT OF ELECTRICAL
DEPARTMENT AND ELECTRONICS
OF ELECTRICAL ANDENGINEERING
ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

NAME OF STUDENT: DATE:


ROLL NO.: DATE OF SUBMISSION:
SCH. NO.:
OBJECT: Direction, speed and step rate control of stepper motor using microprocessor.

EQUIPMENT: D.C . Stepper motor, microprocessor 85/9 kit, power supply, connecting
cables.

THEORY: Stepper motor is a device which converts digital pulses into precise angular or
linear steps of desired value. Stepping rate is governed by frequency of switching and not
of supply voltage. The stepping action is caused by sequential switching of supply to the
two phases of the motor. All stepper motors are of bifilar type with six leads. Each of the
two phases of the motor has double winding with a center tap switching. Switching of
supply from one side to another of a phase causes reversal of magnetic polarity without
actually reversing the polarity of supply. Four step input sequence gives 1.8 (full) after the
eight step input sequence gives 0.9(half) step function. Proper switching Sequence/Logic
will move the shaft in one direction.

A pulse input two phase clock (instead of continuous pulses) will move the shaft of motor
by one step for every pulse, thus number of steps to be moved can be precisely controlled.

When there is no pulse input, the rotor will remain locked up in the position in which the
last step was taken since at any time two windings are always energized which lock the
rotor electro magnetically.

Stepping motors can be programmed in three parameters namely:

a) Direction
b) Speed and
c) Number of Steps.

To change the direction of rotation read the sequence upward.

SPEED CONTROL OF STEPPER MOTOR:

The program initializes the 8255 (P1) in order to make port A as output port. The PA0 to
PA3 is connected through buffer and driving circuit to the winding of stepper motor. The
codes for clockwise movement of stepper motor are FA, F6, F5 and F9. (refer switching
sequence). In case of anticlockwise movement if stepper motor, output codes are F9, F5, F6
and F4.The delay routine is called to generate the delay (max. of about 1 sec.) between the
steps. This delay can be changed to make faster steps. The minimum delay depends upon
the maximum speed of the stepper motor specified.
DEPARTMENT OF ELECTRICAL
DEPARTMENT AND ELECTRONICS
OF ELECTRICAL ANDENGINEERING
ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

The speed for steps can be varied by changing the content at 2031-20-32 and 20-
37-2038. These values are taken by register pair DE and a corresponding delay is
generated. Both the delays are added to give the final delay. The individual delay
can be calculated by (24N + 17).  basic machine cycle, N#0.Where N is number
stored in D register pair.

Starting address of program: 2000

ADDRESS OBJECT LABEL MNEMONICS OPERAND REMARKS

2000 3E 80 MV1 A, 80 Initialize all ports as


out ports.

2002 D3 03 OUT 03
2004 3E FA MV1 A, FA
2006 D3 00 OUT 00 Output code for step 0
2008 CD 30 20 CALL DELAY R Delay between 2steps
200B 3E F6 MV1 A, F6
200D D3 00 OUT 00 Output code for step 1
200F CD 30 20 CALL DELAY Delay between 2steps
2012 3E F5 MV1 A, F5
2014 D3 00 OUT 00 Output code for step 2
2016 CD 30 20 CALL DELAY R Delay between 2 steps
2019 3E F9 MV1 A, F9
201B D3 00 OUT 00 Output code for step3
201D CD 30 20 CALL DELAY Delay between 2steps
2020 C3 04 20 JMP START Start

DELAY ROUTINE:
2030 11 00 00 LXI 0, 0000 Generate a delay
2033 CD BC 03 CALL DELAY
2036 11 00 00 LXI D, 0000 Generate a delay
2039 CD BC 03 CALL DELAY
203C C9 RET
The above program is to rotate the motor at particular speed as defined at the addresses
2031 and 203A by the contents of ‘DE’ registers. To change the speed of the motor change
the contents on addresses 2031 and 203A

To move the motor in the reverse direction, change the contents at addresses mentioned
below:

ADDRESS FORWARD REVERSE

2005 FA F9
DEPARTMENT OF ELECTRICAL
DEPARTMENT AND ELECTRONICS
OF ELECTRICAL ANDENGINEERING
ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

200C F6 F5
2013 F5 F6
201A F9 FA

INSTRUCTIONS:

1. Connect the vinytics interfacing module cable from 8255-I-J2-connector to


stepper motor interface. Enter the programme from 2000 location & make
sure that it has been entered properly
.
2. Connect +5V and GND to the module and stepper motor 13-pin connector
and +12V and GND from PS-V power supply.

3. The 13-pin connector details are as follows:

PIN NO. SIGNAL

1, 12 GND
2, 11 +12V for stepper motor
Voltage 5 – 30V
13 AMPLIFIED OUTPUT OF PA0
10 AMPLIFIED OUTPUT FOR PA1
7 AMPLIFIED OUTPUT OF PA2
4 AMPLIFIED OUTPUT OF PA3

4. Execute the programme from 2000 the motor will move with a constant
speed in one direction. Make the changes as described above to change
direction of the stepper motor.
To change the speed of the stepper motor change the locations as
follows:

LOCATION PRESENT CONTENT NEW CONTENT

2030 110000 110020


2036 110000 110020
this change will make the motor to rotate faster.

5. Observe the waveforms at output pins PA!, PA2, PA3 with respect to
waveform at pin PA0.
DEPARTMENT OF ELECTRICAL
DEPARTMENT AND ELECTRONICS
OF ELECTRICAL ANDENGINEERING
ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

QUESTIONS:

1. Justify the waveforms obtained at pins PA0, PA1, PA2 & PA3?

2. Suggest the modifications to be carried out to control the


stepper motor through the pins PA4 to PA7 of port A of
8255.

3. Write about few applications of stepper motor.


EXPERIMENT NO:3
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL
AIM: To reduce linear systems block diagram using series, parallel and feedback configuration
using MATLAB.

SOFTWARE USED: MATLAB Simulink

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
such configuration is “series”.

U(s) System 1 System 2 Y(s)


G1(s) G2(s)

The series command is implemented as shown below:

Y s 
T s  
U s 
 sys G 1 s   sys1 G 2 s   sys2

[sys]= series (sys1,sys2)

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.

System 1
G1(s)
The U(s) Y(s)

System 2
G2(s)

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, EC IV SEM (EC-404 CONTROL SYSTEM) Page 1


MATLAB command for implementing a parallel configuration is “parallel” as shown below:
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

Y s 
T s  
U s 
 sys G 1 s   sys1 G 2 s   sys2

[sys]= parallel (sys1, sys2)

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.

U(s) System 1 Y(s)


Gc(s) G(s)

The MATLAB command for implementing a feedback system is “feedback” as shown below:

Y s 
T s    sys Gc sGs  sys1 +1- positive feedback
U s  -1-negative feedback (by default)

[sys]= feedback (sys1,[1],sign)

When H(s) is non-unity or specified, such a system is said to be a non-unity feedback system as
shown below:

U(s) Y(s)
System 1
G(s)

System 2
H(s)

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, EC IV SEM (EC-404 CONTROL SYSTEM) Page 2


A non-unity feedback system is implemented in MATLAB using the same “feedback” command
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
as shown:
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

Y s 
T s    sys G s   sys1 H s   sys 2 +1- positive feedback
U s  -1-negative feedback (by default)

[sys]= feedback (sys1,sys2,sign)

Example 1: Given a unity feedback system as shown in the figure, obtain the overall transfer
function using MATLAB.

R(s) Ea(s) s 1 U(s) Y(s)


Gc s   G s  
1
2
s2 500s

Result is:

Example 2: Given a non-unity feedback system as shown in the figure, obtain the overall transfer
function using MATLAB:

Gs  
R(s) Ea(s) 1 Y(s)
500s 2

s 1
H s  
s2

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, EC IV SEM (EC-404 CONTROL SYSTEM) Page 3


The result is as shown below:
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

Exercise 1: For the following multi-loop feedback system, obtain the closed loop transfer function.

H2

R(s) Y(s)
G1 G2 G3 G4

H1

H3

1 1 s2  1 s 1 s 1

where G1  s  10 ; G 2  s  1 ; G 3  2
s  4s  4 
; G 4  s  6 ; H1  s  2 ; H 2  2 ; H 3  1

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, EC IV SEM (EC-404 CONTROL SYSTEM) Page 4


EXPERIMENT NO: 4
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL
AIM: To simulate transfer function and pole- zero mapping using SIMULINK.

SOFTWARE USED: MATLAB Simulink

TRANSFER FUNCTION:
The transfer function of a control system can be defined as the ratio of Laplace transform of
output to the Laplace transform of the input, assuming initial conditions to be zero. That is,
𝐶 (𝑠 ) 𝑛 (𝑠 ) 𝑎0 𝑠 𝑛 + 𝑎1 𝑠 𝑛−1 +. . . +𝑎𝑛
𝐺 (𝑠 ) = = =
𝑅 (𝑠) 𝑑 (𝑠) 𝑏0 𝑠 𝑚 + 𝑏1 𝑠 𝑚−1 +. . . +𝑏𝑚
where C(s), n(s), R(s) and d(s) are the Laplace transforms of numerator & denominator
polynomials respectively.

Input Output
R(s)
G(s) C(s)

In MATLAB, the ‘tf’ command is used to represent the transfer function as follows:
sys = tf (num, den)
It creates a continuous-time transfer function with numerator and denominator specified by
num and den.

Another way of creating a transfer function is by using the zero-pole-gain model, in order to
create a transfer function in factored form. The advantage of this model in comparison to the
previous one is that it gives us a straight-forward way of finding the zeros and the poles of
any system. A zero-pole-gain model has the following form:
(𝑠 − 𝑧1 )(𝑠 − 𝑧2 ) … (𝑠 − 𝑧𝑛 )
𝐻 (𝑠 ) = 𝐾
(𝑠 − 𝑝1 )(𝑠 − 𝑝2 ) … (𝑠 − 𝑝𝑛 )
where k= gain of the system. For a zero-pole-gain model
sys = zpk(z,p,k)
where variable z and p are arrays, containing the zeros and the poles of the system
respectively and variable k is the gain, which is a constant. In case of no zeros in transfer
function, just input z = [ ].
Following commands can also be used:
[z,p,k] = tf2zp(num,den);
sys = zpk(z,p,k)

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, EC IV SEM (EC-404 CONTROL SYSTEM ) Page 1


Command tf2zp(num,den) takes as input the numerator and the denominator of the transfer
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
function and
LAKSHMI returns
NARAIN variables
COLLEGE OFz,p,k containing BHOPAL
TECHNOLOGY, the zeros, poles and the gain respectively.
Then, we simply take the factored form with the command zpk(z,p,k).
On the other hand, let variable sys contain a transfer function created by zpk(z,p,k). In order
to convert to the tf model (polynomial form) we can use
sys tf = tf(sys)
Alternatively,
[num,den] = zp2tf(z,p,k);
sys = tf(num,den)
Commands used for the transfer function to pole-zero conversion and vice versa
Command Description
[z,p,k]=tf2zp (num,den) Convert transfer function to pole- zero
[num, den]= zp2tf (z,p,k) Convert pole- zero to transfer function

Problem:
1. Create the following transfer function using tf(num,den) and then convert from tf model
(polynomial form) to zpk model (factored form).
𝑠+1
𝐻 (𝑠 ) =
𝑠2 + 3𝑠 + 1
Solution:
num = [1 1];
den = [1 3 1];
sys = tf(num,den) % Create transfer function
syszpk = zpk(sys) % Convert to zpk model
Program Result:
sys =
s+1
-------------
s^2 + 3 s + 1

Continuous-time transfer function.

syszpk =
(s+1)
-------------------
(s+2.618) (s+0.382)

Continuous-time zero/pole/gain model.

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, EC IV SEM (EC-404 CONTROL SYSTEM ) Page 2


2. Create the following transfer function using zpk(z,p,k) and then convert from zpk model to tf
DEPARTMENT
model. OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, 𝑠BHOPAL
+2
𝐺 (𝑠 ) =
( 𝑠 + 1)2 (𝑠 + 3)
Solution:
z = -2;
p = [-1 -1 -3];
k = 1;
sys = zpk(z,p,k) % Create zpk model
systf = tf(sys) % Convert to tf model

Else: A=zpk([-2],[-1 -1 -3],1)


B=tf(A)

Program Result:
sys =
(s+2)
-------------
(s+1)^2 (s+3)

Continuous-time zero/pole/gain model.

systf =
s+2
---------------------
s^3 + 5 s^2 + 7 s + 3

Continuous-time transfer function.

POLE ZERO MAPPING:


Some of the most basic characteristics that play an important role in system analysis are of
course the poles and the zeros of a system. In order to obtain these, one can use the following
commands:

pole(sys) Poles of the transfer function


zero(sys) Zeros of the transfer function
Returns the natural frequency and damping factor of each pole in
[w,z,p]=damp(sys)
the vector p
pzmap(sys) Pole-Zero map of the transfer function

Problem:
Find the poles and zeros of the following transfer function and plot them in the Complex
plane.
𝑠+2
𝐻 (𝑠 ) =
( 𝑠 + 1)2 (𝑠 + 3)
Solution:
z=[-2]; % This is the same as z=-2
p=[-1 -1 -3];
k=1;

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, EC IV SEM (EC-404 CONTROL SYSTEM ) Page 3


sys=zpk(z,p,k) % Command tf(sys) can also be used
DEPARTMENT
pole(sys); OF ELECTRICAL
% in ANDthe
order to obtain ELECTRONICS
poles ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL
zero(sys); % in order to obtain the zeros
pzmap(sys); grid
Program Result:
sys =
(s+2)
-------------
(s+1)^2 (s+3)
Continuous-time zero/pole/gain model.

Pole Zero Mapping

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, EC IV SEM (EC-404 CONTROL SYSTEM ) Page 4


EXPERIMENT NO:5
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL
AIM: To simulate unit ramp response of a control system using MATLAB.

SOFTWARE USED: MATLAB

THEORY:
MATLAB doesn’t have a ramp command like ‘step’ command. But, there is a relation between step
and ramp functions. The Laplace transform of ramp function is 1/s 2, which can be obtained by
dividing the Laplace transform of step function by ‘s’. Hence the ramp response can be obtained by
dividing the given T.F. by ‘s’ and then evaluating it using “step’ function.

PROBLEM STATEMENT:
Example 1: Determine the unit-ramp response of the following system using MATLAB and lsim
command.
Cs  25

R s  s 2  5s  25
Steps: 1) Obtain the ramp response by dividing the system T.F. by ‘s’. The new T.F. can be written as
25 25

s(s  5s  25)
2
s  5s 2  25s
3

2) Define the numerator and denominator polynomial coefficients.


3) Define/print the transfer function named sys1 using tf command.
4) Define the time vector t=0: dt: t
5) Obtain the step response using the ‘step’ command using following syntax:
y=step(sys1,t)
This will return the output response y and the time vector t used for simulation. The output and input
ramp response can be plotted w.r.t. time using plot command.

Program:
% Program to plot the Ramp Response
clc;
clear;
n1 = [25]; % Define num and den coefficients of modified TF
d1 = [1 5 25 0];
[n2, d2]=feedback(n1,d1,1,1);
sys2 = tf(n2, d2); % Write transfer function
[y, t] = step(sys2); % Obtain step response
plot(t,y, '-s'); % Plot response y w.r.t t with solid line style and square marker
axis([0 2 0 2]); % Define scales for x and y axis
hold on;
plot(t,t,'--*'); % Plot the input ramp signal with dashed line style and * marker
grid on;
xlabel('Time (sec)');
ylabel('Magnitude');
title ('Plot of Unit Ramp Response');

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, EC IV SEM (EC-404 CONTROL SYSTEM) Page 1


DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

Example 2: Determine the unit-ramp response of the following system using MATLAB and lsim
command.
Cs  1

R s  3s 2  2s  1
PROGRAM:
clc;
clear all;
close all;
num = [0 0 1];
den = [3 2 1];
t = 0:0.1:10;
r = t;
y = lsim(num, den, r, t);
plot(t, r,'-', t, y, 'O')
grid
title('Unit-ramp response')
xlabel('t Sec')
ylabel('Unit-ramp input and output')
text(1.0, 4.0, 'Unit-ramp input')
text(5.0, 2.0, 'Output')

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, EC IV SEM (EC-404 CONTROL SYSTEM) Page 2


EXPERIMENT NO:6
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL
AIM: To simulate step response of a control system using MATLAB.

SOFTWARE USED: MATLAB

THEORY:
The general expression of transfer function of a second order control system is given as
𝐶 (𝑠 ) 𝜔𝑛2
= 2
𝑅 (𝑠) 𝑠 + 2𝜁𝜔𝑛 𝑠 + 𝜔𝑛2
Here, ζ and ωn are damping ratio and natural frequency of the system respectively.
There are number of common terms in transient response characteristics and which are:
1. Delay time (td) is the time required to reach at 50% of its final value by a time response
signal during its first cycle of oscillation.
1 + 0.7ζ
𝑡𝑑 =
𝜔𝑛

2. Rise time (tr) is the time required to reach at final value by a under damped time response
signal during its first cycle of oscillation. If the signal is over damped, then rise time is
counted as the time required by the response to rise from 10% to 90% of its final value.
1 √1 − ζ2 𝜋−𝛽
𝑡𝑟 = 𝑡𝑎𝑛−1 (− )=
𝜔𝑑 ζ 𝜔𝑑

3. Peak time (tp) is simply the time required by response to reach its first peak i.e. the peak of
first cycle of oscillation, or first overshoot.
𝜋 𝜋
𝑡𝑝 = =
𝜔𝑑 𝜔𝑛 √1 − ζ2

4. Maximum overshoot (Mp) is straight way difference b of time response and magnitude of
its steady state. Maximum overshoot is expressed in terms of percentage of steady-state value
of the response. As the first peak of response is normally maximum in magnitude, maximum
overshoot is simply normalized difference between first peak and steady state value of a
response.
2
𝑀𝑝 = 𝑒 −𝜋ζ/√1−ζ
2
%𝑀𝑝 = 𝑒 −𝜋ζ/√1−ζ 𝑥100%
5. Settling time (ts) is the time required for a response to become steady. It is defined as the
time required by the response to reach and steady within specified range of 2-5% of its final
value.
4
𝑡𝑠 = (2% 𝐶𝑟𝑖𝑡𝑒𝑟𝑖𝑜𝑛)
ζωn

6. Steady-state error (ess) is the difference between actual output and desired output at the
infinite range of time.
𝑒𝑠𝑠 = lim [𝑟(𝑡) − 𝑐 (𝑡)]
𝑡→∞

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, EC IV SEM (EC-404 CONTROL SYSTEM) Page 1


DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

Fig. (a) Time response specification curve


PROBLEM STATEMENT: For the closed loop system defined by
𝐶 (𝑠 ) 100
= 2
𝑅 (𝑠) 𝑠 + 12𝑠 + 100
Plot the unit step response curve and find time domain specifications.
PROGRAM:
clc;
clear all;
close all;
num=input('enter the numerator coefficients ---->’);
den=input('enter the denominator coefficients ---->’);
system=tf(num,den);
system
step(system)
grid on;
wn=sqrt(den(1,3));
zeta= den(1,2)/(2*wn);
wd=wn*sqrt(1-zeta^2);
disp('Delay time in seconds is')
td=(1+0.7*zeta)/wd
disp('Rise time in seconds is')
theta=atan(sqrt(1-zeta^2)/zeta);
tr=(pi-theta)/wd
disp('Peak time in seconds')
tp=pi/wd
disp('Peak overshoot is');
mp=exp(-zeta*pi/sqrt(1-zeta^2))*100
disp('settling time in seconds is');

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, EC IV SEM (EC-404 CONTROL SYSTEM) Page 2


ts=4/(zeta*wn)
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
PROGRAM RESULT:
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL
enter the numerator coefficients---->100
enter the denominator coefficients---->[1 12 100]
Transfer function:
100
----------------
s^2 + 12 s + 100
Delay time in seconds is
td =
0.1775
Rise time in seconds is
tr =
0.2768
Peak time in seconds
tp =
0.3927
Peak overshoot is
mp =
9.4780
settling time in seconds is
ts =
0.6667

LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, EC IV SEM (EC-404 CONTROL SYSTEM) Page 3


DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OFOF
NARAIN COLLEGE ELECTRICAL &ELCTRONICS
TECHNOLOGY, BHOPAL ENGINEERING

EXPERIMENT NO. 7

STABILITY ANALYSIS OF LINEAR SYSTEMS

(Root Locus Plot)


AIM

To obtain the Root locus plot for the given system whose transfer function is given as

G(S)= K
s(s+3)(s2+3s+11.25)

APPARATUS REQUIRED
Mat lab Software

THEORY

ROOT LOCUS PLOT :


The characteristic of the transient response of a closed-loop system is related to the location of
the closed loop poles. If the system has a variable loop gain, then the location of the closed-loop
poles depend on the value of the loop gain chosen. A simple technique known as “Root Locus
Technique” used for studying linear control systems in the investigation of the trajectories of the
roots of the characteristic equation.
This technique provides a graphical method of plotting the locus of the roots in the s-plane as a
given system parameter is varied over the complete range of values(may be from zero to
infinity). The roots corresponding to a particular value of the system parameter can then be
located on the locus or the value of the parameter for a desired root location can be determined
form the locus. The root locus is a powerful technique as it brings into focus the complete
dynamic response of the system . The root locus also provides a measure of sensitivity of roots
to the variation in the parameter being considered. This technique is applicable to both single as
well as multiple-loop systems.

PROCEDURE:
1. Write a Program to (or using SIMULINK) obtain the Root locus plot for the given
system.
2. Access the stability of given system using the plots obtained.

PROGRAM

%ROOT LOCUS OF THE SYSTEM%


num=[0 0 0 0 1]
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OFOF
NARAIN COLLEGE ELECTRICAL &ELCTRONICS
TECHNOLOGY, BHOPAL ENGINEERING

den=[1 6 20.25 33.75 0]


sys=tf(num,den)
rlocus(sys)
v=[-10,10,-8,8];
axis(v)
xlabel('Real Axis')
ylabel('Imaginary Axis')
title('Root Locus of the sytem ')
title('Root Locus Plot of the system K/s(s+3)(s^2+3s+11.25))')
MANUAL CALCULATIONS

1. Number of poles =4, zeros = 0, number of root locus branches =4. Starting points s=0, -3
& 1.5+ j3.
2. Pole – zero plot is as follows
Section between 0 and -3 is part of root locus. One breakway point is between s=0 and
s=-3.
3. Angle of asymptotes are 45,135,225 and 315 degrees
4. Centroid = -1.5
5. Three Breakway points are -1.5,-1.5 + j 1.8371
6. Intersection with imaginary axis s= + j2.37.
7. Angle of departure -90, +90.
8. Root locus is plotted.
9. Stability for 0< K<82.26 system is stable.
K=82.26 system is marginally stable.
K>82.26 system is unstable

OUTPUT
num =
0 0 0 0 1
den =
1.0000 6.0000 20.2500 33.7500 0
Transfer function:
1
---------------------------------
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OFOF
NARAIN COLLEGE ELECTRICAL &ELCTRONICS
TECHNOLOGY, BHOPAL ENGINEERING

s^4 + 6 s^3 + 20.25 s^2 + 33.75 s

GRAPH(from Simulation)
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OFOF
NARAIN COLLEGE ELECTRICAL &ELCTRONICS
TECHNOLOGY, BHOPAL ENGINEERING

VIVA QUESTIONS

1. Define root locus technique.


2. What are the conditions of stability in root locus criteria.
3. What is the advantage of root locus technique.
4. Which method of stability analysis is more advantageous?
5. How the stability of unstable is improved?
6. What are the methods to improve the stability.
7. What is the use of compensators.
8. What do you mean by Root-Loci?
9. What is complementary Root Loci?
10. What are contours?
11. State the basic properties of Root Locus.
12. How would you find the number of branches of Root Loci?
13. How are the break away points of the root locus determined?
14. How is the point of intersection of the asymptotes with real axis found out.

REFERENCE

1. NAGRATH & GOPAL,” Control Systems”.


2. MATLAB User Manual .
3. Control Systems by Nagoor gani
4. Control system Engineering by S .P .Eugene Xavier and J.Joseph Cyril babu.
5. Control system Engineering by R.Ananda Natarajan and P.Ramesh babu.

RESULT:

Thus the Root Locus plot is drawn for the given transfer function using matlab and verified
manually.
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OFOF
NARAIN COLLEGE ELECTRICAL &ELCTRONICS
TECHNOLOGY, BHOPAL ENGINEERING

EXPERIMENT NO. 8

STABILITY ANALYSIS OF LINEAR SYSTEMS


(Nyquist Plot)
AIM

To obtain the Nyquist plot for the given system whose transfer function is given as
G(S)= 50
(s+4)(s2+3s+3)
and to find out whether the system is stable or not.

APPARATUS REQUIRED

Mat lab Software

THEORY

POLAR PLOTS OR NYQUIST PLOTS:


The sinusoidal transfer function G(jω) is a complex function is given by
G(jω) = Re[ G(jω)] + j Im[G(jω)] or
G(jω) = │G(jω) │ ∟G(jω) = M ∟Φ -----------(1)
From equation (1), it is seen that G(jω) may be represented as a phasor of magnitude M
and phase angle Φ. As the input frequency varies from 0 to ∞, the magnitude M and phase angle
Φ changes and hence the tip of the phasor G(jω) traces a locus in the complex plane. The locus
thus obtained is known as
POLAR PLOT.

The major advantage of the polar plot lies in stability study of systems. Nyquist related the
stability of a system to the form of these plots. Polar plots are referred as NYQUIST PLOTS.
NYQUIST stability criterion of determining the stability of a closed loop system by
investigating the properties of the frequency domain plot of the loop transfer function G(s) H(s).
Nyquist stability criterion provides the information on the absolute stability of a control system
as similar to Routh- Hurwitz criterion. Not only giving the absolute stability, but indicates
“Degree of Stability” i.e “Relative Stability” of a stable system and the degree of instability of
an unstable system and indicates how the system stability can be improved. The Nyquist stability
citerion is based on a Cauchy’s Residue Theorem of complex variables which is referred to as
the “principle of argument”.
Let Q(s) be a single –valued function that has a finite number of poles in the s-plane. Suppose
that an arbitrary closed path Гq is chosen in the s-plane so that the path does not go through any
one of the poles or zeros of Q(s); the corresponding Гq locus mapped in the Q(s) plane will
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OFOF
NARAIN COLLEGE ELECTRICAL &ELCTRONICS
TECHNOLOGY, BHOPAL ENGINEERING

encircle the origin as many times as the difference between the number of the zeros and the
number of poles of Q(s) that are encircled by the s-plane locus Гq.
The principle of argument is given by
N= Z - P
Where N – number of encirclemnts of the origin made by the Q(s) –plane locus Гq.
Z – number of zeros of Q(s) encircled by the s-plane locus Гq in the s-plane.
P - number of poles of Q(s) encircled by the s-plane locus Гq in the s-plane.

ALGORITHM
1. Write a Program to (or using SIMULINK) obtain the Nyquist plot for the given system.
2. Access the stability of given system using the plots obtained.

PROGRAM

%NYQUIST PLOT
%Enter the numerator and denominator of the transfer function
num=[0 0 0 50]
den=[1 7 12 12]
sys=tf(num,den)
%Specify the frequency range and enter the command
nyquist(sys)
v=[-3 5 -7 7]
axis(v)
xlabel('Real Axis');
ylabel('Imaginary Axis');
title('Nyquist Plot of the sytem 50/(s+4)(s^2+3s+3)')
%To determine the Gain Margin,Phase Margin, Gain crossover frequency and
%phase cross over frequency
[Gm,Pm,Wcp,Wcg]=margin (sys)

v=
-3 5 -7 7
Gm =
1.4402
Pm =
11.1642
Wcp =
3.4643
Wcg =
2.9533

MANUAL CALCULATIONS:

NYQUIST PLOT
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OFOF
NARAIN COLLEGE ELECTRICAL &ELCTRONICS
TECHNOLOGY, BHOPAL ENGINEERING

VIVA QUESTIONS
1. What is polar plot?
2. What is Nyquist plot?
3. Define the conditions of stability in polar plot.
4. What is the use and advantage of polar plot.

REFERENCE
1. NAGRATH & GOPAL,” Control Systems”.
2. MATLAB User Manual .
3. Control Systems by Nagoor gani
RESULT:

Thus the Nyquist plot is drawn for the given transfer function using matlab and verified
manually
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OFTECHNOLOGY,
NARAIN COLLEGE OF ELECTRICAL &ELCTRONICS
BHOPAL ENGINEERING

EXPERIMENT NO. 9

STABILITY ANALYSIS OF LINEAR SYSTEMS(Bode Plot)


AIM
To obtain the bode plot for the given system whose transfer function is given as

G(S)= 242(s+5)
s(s+1)(s2+5s+121)
and to find out whether the system is stable or not.

APPARATUS REQUIRED

MATLAB Software

THEORY

A Linear Time-Invariant Systems is stable if the following two notions of system


stability are satisfied
 When the system is excited by Bounded input, the output is also a Bounded
output.
 In the absence of the input, the output tends towards zero, irrespective of the
initial conditions.
The following observations are general considerations regarding system stability and are
If all the roots of the characteristic equation have negative real parts, then the impulse
response is bounded and eventually decreases to zero, then system is stable.
 If any root of the characteristic equation has a positive real part, then system is
unstable.
 If the characteristic equation has repeated roots on the jω-axis, then system is
unstable.
 If one are more non-repeated roots of the characteristic equation on the jω-axis,
then system is unstable.

BODE PLOT :
Consider a Single-Input Single-Output system with transfer function

C(s) b0 sm + b1 sm-1 + ……+ bm


=
R(s) a0 sn + a1sn-1 + ……+an

Where m < n.
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OFTECHNOLOGY,
NARAIN COLLEGE OF ELECTRICAL &ELCTRONICS
BHOPAL ENGINEERING

 Rule 1 A system is stable if the phase lag is less than 180˚ at the frequency for
which the gain is unity (one).
 Rule 2 A system is stable if the gain is less than one (unity) at the frequency for
which the phase lag is 180˚.
The application of these rules to an actual process requires evaluation of the gain and
phase shift of the system for all frequencies to see if rules 1 and 2 are satisfied. This is
obtained by plotting the gain and phase versus frequency. This plot is called BODE
PLOT. The gain obtained here is open loop gain.

The stability criteria given above represent Limits of Stability. It is well to design a
system with a margin of safety from such limits to allow for variation in components and
other unknown factors. This consideration leads to the revised stability criteria, or more
properly, a Margin of Safety provided to each condition. The exact terminology is in
terms of a Gain Margin and Phase Margin from the limiting values quoted.
 If the phase lag is less than 140˚ at the unity gain frequency, the system is stable.
This then, is a 40˚ Phase Margin from the limiting values of 180˚.
 If the gain is 5dB below unity (or a gain of about 0.56) when the phase lag is
180˚, the system is stable. This is 5dB Gain Margin.

ALGORITHM
1. Write a Program to (or using SIMULINK) obtain the Bode plot for the given system.
2. Access the stability of given system using the plots obtained.

PROGRAM

%BODE PLOT OF THE SYSTEM%


%Enter the numerator and denominator of the transfer function
num=[0 0 0 242 1210];
den=[1 6 126 121 0];
sys=tf(num,den)
%Specify the frequency range and enter the command
w=logspace(-2,4,1000);
bode(sys,w)
xlabel('Frequency')
ylabel( ' Phase angle in degrees Magnitude of G(s)')
title('Bode Plot of the system 242(s+5)/s(s+1)(s^2+5*s+121)')
%To determine the Gain Margin,Phase Margin, Gain crossover frequency and
%Phase cross over frequency
[ Gm, Pm, Wcp, Wcg ]= margin (sys)
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OFTECHNOLOGY,
NARAIN COLLEGE OF ELECTRICAL &ELCTRONICS
BHOPAL ENGINEERING

PROCEDURE TO OBTAIN BODE PLOT

1. Rewrite the sinusoidal transfer function in the time constant form by replacing s by jω
2. Identify the corner frequencies associated with each factor of the transfer function.
3. Knowing the corner frequencies draw the asymptotic magnitude plot. This plot
consists of straight line segments with line slope changing at each corner frequency
by +20db/decade for a zero and -20db/decade for a pole. For a complex conjugate
zero or pole the slope changes by + 40db/decade.
4. Draw a smooth curve through the corrected points such that it is asymptotic to the line
segments. This gives the actual log-magnitude plot.
5. Draw phase angle curve for each factor and add them algebraically to get the phase
plot.
MANUAL CALCULATIONS

i)The sinusoidal transfer function G (jω) is obtained by replacing s by jω in the given s domain
transfer function

G(jω)= 242(jω +5)


jω (jω +1)( jω 2+5 jω +121)
On comparing the quadratic factor of G(s) with standard form of quadratic
factor , ζ and ωn can be evaluated.

s2+5s+121 = s2+2ζωns + ωn2


On comparison
ωn2 = 121 2ζωn= 5
ωn =11 rad/sec ζ = 0.227

G(jω)= 10(1+0.2jω)
jω (1+jω)( 1+0.4 jω -0.0083ω 2)

ii)CORNER FREQUENCIES
The corner frequencies are ωc1=1rad/sec ωc2= 5 rad/sec and ωc3=11rad/sec
Choose a low frequency ωl such that ωl< ωc1 and choose a high frequency ωh> ωc3.
Let ωl=0.5 rad/sec and ωh=100 rad/sec

Term Corner Slope db/dec Change in slope


Frequency db/dec
rad/sec
10 __ -20 __

1 1 -20 -20-20= - 40
(1+jω)
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OFTECHNOLOGY,
NARAIN COLLEGE OF ELECTRICAL &ELCTRONICS
BHOPAL ENGINEERING

(1+0.2jω) 5 20 -40-20 = -20


1 11 -40 -40-20 = -60
( 1+0.4 jω -0.0083ω 2)

iii)MAGNITUDE PLOTS

Calculate A at ωl, ωc1, ωc2, ωc3, and ωh


Let A= | G(jω)| in db
At ω= ωl A= 20 log(10/0.5)=26.03db
ω= ωc1 , A=20log(10/1)=20db
ω= ωc2 A= -40log(5/1)+20=-7.96 db
ω= ωc3 A = -20log(11/5) - 7.96 = -14.80 db
ω= ωh A = -60log(100/11)-14.80 = - 72.3 db
These values are plotted in the semilog graph sheet taking frequency along the logarithmic scale
and magnitude in db along the linear scale

iv)PHASE PLOT
The phase angle of G(jω) as a function of ω is given by
Φ = ‹G(jω) = tan-1 0.2ω -90 – tan-1 ω – tan-1 0.04ω/(1 – 0.0083ω2)
Ω tan-1 0.2ω tan-1 ω tan-1 {0.04ω/ Φ = ‹G(jω)
(1 – 0.0083ω2)}
0.5 507 26.56 1.15 -112
1 11.3 45 2.31 -126.01
5 45 78.96 14.04 -138
10 63.43 84.29 63.44 -174.3
11 65.5 84.8 85.8 -195.4
20 75.96 87.14 180-19.98=160 -261.18
50 84.3 88.85 180-6=174 -268.55
100 87014 89.43 180-2.9=177.1 -269.3

These values are plotted in the semilog graph sheet taking the same frequency as before along
the logarithmic scale and phase angle in degrees along the linear scale.

OUTPUT (from simulation)

242 s + 1210
-----------------------------
s^4 + 6 s^3 + 126 s^2 + 121 s

Gm = 2.0273

Pm = 41.8270

Wcp = 10.0961
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OFTECHNOLOGY,
NARAIN COLLEGE OF ELECTRICAL &ELCTRONICS
BHOPAL ENGINEERING

Wcg = 3.6322

OUTPUT (from graph)


ωgc= Φgc=3.1rad/sec
Phase margin γ=180+ Φgc = 180-134 = 46 degrees
Gain Margin = 12 db
ωpc = 10.1 rad/sec

BODE PLOT
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT
LAKSHMI OFOF
NARAIN COLLEGE ELECTRICAL &ELCTRONICS
TECHNOLOGY, BHOPAL ENGINEERING

VIVA QUESTIONS:

1. Define stability of Linear Time Invariant System.


2. Give the stability conditions of system using Pole-Zero plot.
3. Define Bode Plot.
4. What is the use of Bode Plot?
5. What are the conditions of stability in bode plot?
6. Define Stability criteria.
7. Define Limits of stability.
8. Define safe regions in stability criteria.
9. Define Phase margin and Gain margin.

REFERENCE

1. NAGRATH & GOPAL,” Control Systems”.


2. MATLAB User Manual .
3. Control Systems by Nagoor gani
4. Control system Engineering by S .P .Eugene Xavier and J.Joseph Cyril babu.
5. Control system Engineering by R.Ananda Natarajan and P.Ramesh babu.

RESULT:
i)The Bode plot is drawn for the given transfer function using MATLAB and verified
manually
ii) The system is stable
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

EXPERIMENT 10

AIM: To Transform a given Transfer Function to State Space Model and from State Space Model to Transfer
Function using MATLAB.

RESOURCES:

1. MATLAB 7 Software
2. Personal Computer.

PROCEDURE:

1. Click on MATLAB icon.


2. From FILE menu click on NEW button and select SCRIPT to open Untitled window.
3. Enter the following program in untitled window.

PROGRAM:

For Transfer Function to State Space Model:

%Transfer Function to State Space Model

Clear all;
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

clc;

disp(‘Transfer Function of given system is : \n’);

Num = [2 3 2];

Den = [2 1 1 2 0];

sys = tf(num,den);

Disp(‘Corresponding State Space Model A,B,C,D are: \n’);

[A,B,C,D] = tf2ss(num,den) A

B
C

PROGRAM:

For State Space Model to Transfer Function:

%State Space Model to Transfer Function Clear all;

clc;

disp(‘A,B,C,D Matrices of given State Space Model are :: \n’); A = [1 2;3 4 ]

B = [1;1]

C = [1 0]
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

D = [0]

[num,den] = ss2tf(A,B,C,D);

Disp((‘And corresponding Transfer Function is : \n ‘);

Sys = tf(num,den);

Sys

7. Save the above program by clicking on SAVE button from FILE menu (or) Ctrl+S
8. Run the program by clicking RUN button (or) F5 and clear the errors (if any).
9. Observe the output from on the MATLAB Command Window.

OUTPUT:

Transfer Function to State Space Model:

Transfer Function of given system is

Transfer Function:

2s^2 + 3s + 2

------------------------------

2s^4 + s^3 + s^2 + 2s

Corresponding State Space Model A, B, C, D are:

A = -0.5000 -0.5000 -1.0000 0

1.0000 0 0 0

0 1.0000 0 0

0 0 1.0000 0
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

B= 1

C= 0 1.0000 1.5000 1.000

D= 0

OUTPUT:

State Space Model to Transfer Function:

A,B,C,D Matrices of given State Space Model are :

A= 1 2

3 4

B=11

C = 1 0

D = 0
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

and corresponding Transfer Function is:

s–2

-----------------

s^2 – 5s -2

PRELAB QUESTIONS:

1. What are the advantages & disadvantages of state space analysis?


2. What are the disadvantages of transfer function?
3. What are the different functions in MATLAB?
4. What is workspace and command window?

LAB ASSIGNMENTS:

8s+1

1. ------------------------------ formulate state space model?


9s^3+s^2+ + 2 s

s^ 4 +s^3+s^2+s + 1

2. ---------------------------- formulate state space model?


9s^3+s^2+ + 2 s

3. ------------------------------ formulate state space model?


9s^3+s^2+ + 2 s
POSTLAB QUESTIONS:
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY, BHOPAL

1. How to call MATLAB in batches?


2. Explain Handle graphics in MATLAB?
3. Explain the following commands:
Acker, Bode, Ctrb, Dstep, Feedback, Impulse, Margin, Place, Rlocus, stairs

RESULT:

Hence, the given transfer function to state space model and state space model to transfer
function is transformed by using MATLAB.

You might also like

pFad - Phonifier reborn

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

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


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy