Sie sind auf Seite 1von 70

PARUL UNIVERSITY

FACULTY OF ENGINEERING TECHNOLOGY


DEPARTMENT OF ELECTRICAL ENGINEERING

EXPERIMENT NO. 1
INTRODUCTION TO MATLAB FOR CONTROL SYSTEM

LIST OF EQUIPMENT/SOFTWARE :
PART:1Introduction to MATLAB

Page | 1
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Page | 2
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Page | 3
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Page | 4
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Page | 5
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Page | 6
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Page | 7
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Page | 8
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Page | 9
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXERCISE 1:Use Matlab command to obtain the following


a) Extract the fourth row of the matrix generated by magic(6)
MATLAB CODE:

b) Show the results of ‘x’ multiply by ‘y’ and ‘y’ divides by ‘x’.
Given x = [0:0.1:1.1] and y = [10:21]
MATLAB CODE:

Page | 10
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXERCISE 2: Use MATLAB commands to get exactly as the figure shown below.
x=pi/2:pi/10:2*pi;
y=sin(x);
z=cos(x);

MATLAB CODE:

Page | 11
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Part II: Polynomials in MATLAB

Polynomial Overview:
MATLAB provides functions for standard polynomial operations, such as polynomial roots,
evaluation, and differentiation. In addition, there are functions for more advanced applications, such as
curve fitting and partial fraction expansion.

Partial Fraction Expansion


‘Residue’ finds the partial fraction expansion of the ratio of two polynomials. This is particularly
useful for applications that represent systems in transfer function form. For polynomials b and a,

if there are no multiple roots, where r is a column vector of residues, p is a column vector of pole
locations, and k is a row vector of direct terms.

EXERCISE 3:

MATLAB CODE:

Page | 12
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXERCISE 4:

Page | 13
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

CONCLUSION:

SIGNATURE OF FACULTY

Page | 14
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXPERIMENT NO. 2
INTRODUCTION TO SIMULINK AND VARIOUS BLOCK SETS.

THEORY:
1. Introduction
Simulink is a software package for modeling, simulating, and analyzing dynamic systems. It
supports linear and nonlinear systems, modeled in continuous time, sampled time, or a hybrid of
the two. One can easily build, analyze and visualize models.
Thousands of engineers around the world using it to model and solve real problems. Simulink
provides a graphical user interface (GUI) for building models as block diagrams, using click-and-
drag mouse operations. With this interface, you can draw the models just as you would with
pencil and paper. Knowledge of this tool will serve you well throughout your professional career.

2. Building a model
This example shows you how to build a model using many of the model-building commands and
actions you will use to build your own models. The model integrates a sine wave and displays the
result along with the sine wave.
The block diagram of the model looks like this.

To create the model, first enter Simulink in the MATLAB Command Window the
Simulink Library Browser appears.

To create a new model click the New Model button on the Library Browser's toolbar. Simulink opens a

Page | 15
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

new model window.

To create this model, you need to copy blocks into the model from the following
Simulink block libraries:
 Sources library (the Sine Wave block)
 Sinks library (the Scope block)
 Continuous library (the Integrator block)
 Signal Routing library (the Mux block)
To copy the Sine Wave block from the Library Browser, first expand the Library Browser tree to
display the blocks in the Sources library. Do this by clicking the Sources node to display the
Sources library blocks. Finally, click the Sine Wave node to select the Sine Wave block.
Here is how the Library Browser should look after you have done this.

Now drag a copy of the Sine Wave block from the browser and drop it in the model window.
Page | 16
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Copy the rest of the blocks in a similar manner from theirrespective libraries into the model
window. With all the blocks copied into the model window, the model should look something
like this.

Now it's time to connect the blocks. Connect the Sine Wave block to the top input port of the
Mux block. Similarly connect all the components as shown in thefigure. When all the block are
connected with each other your model should looksomething like this.

Now double-click the Scope block to open its display window. Finally, choose Start from the
Simulation menu and watch the simulation output on the Scope.

Exercise: - Perform the indicated tasks using SIMULINK.


(a) Find the step response of the following transfer function.
G(s)= 1/(1+s)

Page | 17
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

(b) Differentiate the ramp function and check the result on the scope.

(c) Amplify sine wave using gain block.

(d) Explain briefly the function of each block you have used.

Page | 18
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

(e) Also explain in which library or sub-library this block is present

CONCLUSION:

SIGNATURE OF FACULTY

Page | 19
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXPERIMENT NO. 3
ANALYSIS DIFFERENT INPUT SIGNALS TO CONTROL SYSTEM.

PROGRAM :1 Obtain the unit impulse, step and ramp response of the following closed loop transfer
function using default values of time. The transfer function is given by
36
G(s) = 2
s + 3s + 36
MATLAB CODE:
(A) Impulse Response

(B) Step Response

Page | 20
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

(C) Ramp Response

PROGRAM :2 Obtain the unit impulse, step and ramp response of the following closed loop transfer
function for user defined time for 0 to 2 sec. with interval of 0.005 sec. The transfer function is given by
36
G(s) = 2
s + 3s + 36
MATLAB CODE:
(A) Impulse Response

Page | 21
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

(B) Step Response

(C) Ramp Response

Page | 22
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

PROGRAM: 3 Obtain the ramp response of the system represented by transfer function given below
using lsim command.

36
𝐺(𝑠) =
𝑠2 + 3𝑠 + 36
MATLAB CODE:

PROGRAM: 4 Obtain the time response of the system whose transfer function given below for input
e-0.5t.
36
G(s) =
s2
+ 3s + 36
MATLAB CODE:

Page | 23
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

PROGRAM: 5
(a). Obtain the unit impulse response for the following system

MATLAB CODE:

Page | 24
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

(b) Obtain the unit step response for the following system

MATLAB CODE:

Page | 25
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

(c) Explain why the results in a. and b. are same?

CONCLUSION:

SIGNATURE OF FACULTY

Page | 26
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXPERIMENT NO. 4
ANALYSE LINEAR TIME-INVARIANT SYSTEMS AND REPRESENTATION.

THEORY:
The spring force is assumed to be either linear or can be approximated by a linear function Fs(x)= Kx,
B is the friction coefficient, x(t) is the displacement and F (t) is the applied force:

The differential equation for the above Mass-Spring system can be derived as follows

Transfer Function:
Applying the Laplace transformation while assuming the initial conditions are zeros, we get

Then the transfer function representation of the system is given by

Linear Time-Invariant Systems in MATLAB:


Control System Toolbox in MATLAB offers extensive tools to manipulate and analyze linear time-
invariant (LTI) models. It supports both continuous- and discrete-time systems. Systems can be single-
input/single-output (SISO) or multiple-input/multiple-output (MIMO). You can specify LTI models as:

Transfer functions (TF), for example,


Examples of Creating LTI Models
Building LTI models with Control System Toolbox is straightforward. The following sections show simple
examples. Note that all LTI models, i.e. TF, ZPK and SS are also MATLAB objects.
Example of Creating Transfer Function Models
You can create transfer function (TF) models by specifying numerator and denominator coefficients. For
example,
>>num = [1 0];
>>den = [1 2 1];
>>sys = tf(num,den)

Page | 27
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Example of Creating Zero-Pole-Gain Models:


To create zero-pole-gain (ZPK) models, you must specify each of the three components in vector format.
For example,
>>sys = zpk([0],[-1 -1],[1])

produces the same transfer function built in the TF example, but the representation is now ZPK. This
example shows a more complicated ZPK model.
>>sys=zpk([1 0], [-1 -3 -.28],[.776])

Plotting poles and zeros of a system:


pzmap Compute pole-zero map of LTI models

Description:

Page | 28
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Ex.1 Obtain the transfer function for a given numerator and denominator coefficients
n = [5,15,10],d = [1,7,20,24,0]
MATLAB CODE:

Ex.2 Find the locations of zeros and poles and plot the pole zero map of the system whose
2𝑠 2 + 8𝑠+6
transfer function is 𝐺(𝑠) =
𝑠 4 + 6𝑠 3 +12𝑠 2 +24𝑠
MATLAB CODE:

Page | 29
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

CONCLUSION:

SIGNATURE OF FACULTY

Page | 30
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXPERIMENT NO. 5
WRITE A MATLAB PROGRAM FOR REDUCTION OF BLOCK DIAGRAM.

Introduction: In the previous lab we modeled this system mathematically. In this lab we are required to
model this system in block diagram format. In block diagram representation each part of the system is
shown with its necessary feed-forward and feedback connections.

Series configuration:

Note:

Example 1: Given the transfer functions of individual blocks generate the system transfer function of the
block combinations.

MATLAB CODE:

Page | 31
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Parallel configuration:

Note:

Example 2: Given the transfer functions of individual blocks generate the system transfer function of the
block combinations.

G1(s)=s+1/s+2
G2(s)=1/500s2
MATLAB CODE:

Page | 32
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Feedback configuration:

Unity feedback system:

Note:

Non-Unity feedback system:

Note:

Page | 33
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

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

MATLAB CODE:

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

MATLAB CODE:

Page | 34
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

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

MATLAB CODE:

Page | 35
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise 2: Consider the feedback system depicted in the figure below


(a). Compute the closed-loop transfer function using the ‘series’ and ‘feedback’ functions
(b). Obtain the closed-loop system unit step response with the ‘step’ function and verify that final value of
the output is 2/5.

MATLAB CODE:

CONCLUSION:

SIGNATURE OF FACULTY

Page | 36
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXPERIMENT NO. 6
PLOTTING RESPONSE OF FIRST ORDER CIRCUIT AND SECOND ORDER
CIRCUITS WITH THE HELP OF MATLAB PROGRAMMING.

Overview First Order Systems:


An electrical RC-circuit is the simplest example of a first order system. It comprises of a resistor and
capacitor connected in series to a voltage supply as shown below on Figure.

The time it takes the capacitor to charge depends on the time constant of the system, which is defined as the
time taken by the voltage across the capacitor to rise to approximately 63% of the supply voltage. For a.
given RC-circuit, this time constant is T=RC. Hence its magnitude depends on the values of the circuit
Components.
The RC circuit will always behave in this way, no matter what the values of the components. That is, the
voltage across the capacitor will never increase indefinitely. In this respect we will say that the system is
passive and because of this property it is stable.

For the RC-circuit as shown in Fig. the equation governing its behavior is given by

----------------------------------------------------------- (1)

The constant is the time constant of the system and is defined as the time required by the system output
i.e. T=RC.Vc(t) to rise to 63% of its final value (which is E). Hence the above equation (1) can be
expressed in terms of the time constant as:

Obtaining the transfer function of the above differential equation, we get

where T is time constant of the system and the system is known as the first order system. The performance
measures of a first order system are its time constant and its steady state.

Page | 37
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise 1:
a) Given the values of R and C, obtain the unit step response of the first order system which is explained
above.
a. R=2KΩ and C=0.01F
b. R=2.5KΩ and C=0.003F
b) Verify in each case that the calculated time constant (T=RC) and the one measured from the figure as
. 63% of the final values are same.
c) Obtain the steady state value of the system.
MATLAB CODE:
a)

Page | 38
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

b)

c)

Overview Second Order Systems:


Consider the following Mass-Spring system shown in the Figure. Where K is the spring constant, B is the
friction coefficient, x(t) is the displacement and F(t) is the applied force:

The differential equation for the above Mass-Spring system can be derived as follows

Applying the Laplace transformation we get

provided that, all the initial conditions are zeros. Then the transfer function representation of the system is
given by

The above system is known as a second order system.

The generalized notation for a second order system described above can be written as

With the step input applied to the system, we obtain

for which the transient output, as obtained from the Laplace transform

Page | 39
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

where 0 < ζ < 1. The transient response of the system changes for different values of damping ratio, ζ.
Standard performance measures for a second order feedback system are defined in terms of step response
of a system. Where, the response of the second order system is shown below.

Described as following:
Rise Time:

Peak Time:

Overshoot:

Settling Time:

Page | 40
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise 2:
Effect of damping ratio ζ on performance measures. For a single-loop second order feedback system given
below

Find the step response of the system for values of ωn = 1 and ζ = 0.1, 0.4, 0.7, 1.0 and 2.0. Plot all the
results in the same figure window and fill the following table.
MATLAB CODE:

ζ Rise time Peak Time % Overshoot Settling time Steady state value
0.1
0.4
0.7
1.0
2.0

Page | 41
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

CONCLUSION:

SIGNATURE OF FACULTY
Page | 42
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXPERIMENT NO. 07
SIMULATION OF ARMATURE CONTROL DC MOTOR.

Theory:

The Emf equation becomes,

Taking Laplace Transform on both sides


We have,

Therefore

-----------------------------------------(1)

----------------------------------------------------------------------------------(2)
By equating (1) & (2),

Page | 43
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

BLOCK DIAG:
Armature Control

Simulation:

Page | 44
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Result:

CONCLUSION:

SIGNATURE OF FACULTY

Page | 45
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXPERIMENT NO. 08
OBTAIN THE ROOT LOCUS PLOT FOR THE SYSTEM USING MATLAB.
Theory:
In the following, we provide brief description of powerful MATLAB commands for root locus analysis.
The reader may wonder why the instructors emphasize learning of hand calculations when powerful
MATLAB commands are available. For a given set of open-loop poles and zeros, MATLAB immediately
plots the root loci. Any changes made in the poles and zeros, immediately result in new root loci and so on.

Depending on our background and aptitude, we may, after a while, begin to make some sense of the
patterns. May be we finally begin to formulate a set of rules that enables us to quickly make a mental
sketch of the root locus the moment the poles and zeros appear. In other words, by trial-and-error, we find
the rules of the root locus.

Through the systematic formulation of set of rules of the root locus, we look for the clearest, and simplest
explanation of the dynamic phenomena of the system. The rules of the root locus give us a clear and precise
understanding of the endless patterns that can be created by an infinite set of characteristic equations. We
could eventually learn to design without these rules, but our level of skill would never be as high or our
understanding as great

RULE FOR CONSTRUCTING ROOT LOCUS:

Page | 46
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise 1:Sketch the root locus of unity feedback system having G(s)=K/s(s+2)(s+4) where the
value of k is 48
MATLAB CODE:

Exercise 2:Sketch the root locus of unity feedback system having G(s)=K/s(s+2)(s2+6s+25) where
The value of k is 11.55.
MATLAB CODE:

Page | 47
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise 3:Sketch the root locus of unity feedback system having G(s)=K(s+7)/(s+2)(s+6) where
The value of k is -8
MATLAB CODE:

CONCLUSION:

SIGNATURE OF FACULTY

Page | 48
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXPERIMENT NO. 9
OBTAIN THE BODE PLOT FOR THE SYSTEM USING MATLAB.

INTRODUCTION:
Bode plots were first introduced by H.W. Bode, when he was working at Bell labs in the United States. Now before I
describe what are this plots it is very essential here to discuss a few advantages over other stability criteria.

Advantages of Bode Plot:


1. It is based on the asymptotic approximation, which provides a simple method to plot the logarithmic
magnitude curve.
2. The multiplication of various magnitude appears in the transfer function can be treated as an addition, while
division can be treated as subtraction as we are using a logarithmic scale.
3. With the help of this plot only we can directly comment on the stability of the system without doing any
calculations.
4. Bode plots provides relative stability in terms of gain margin and phase margin.
5. It also covers from low frequency to high frequency range.

Keeping all these points in mind we are able to draw the plot for any kind of system. Now let us
discuss the procedure of making a bode plot:
1. Substitute the s = jω in the open loop transfer function G(s) × H(s).
2. Find the corresponding corner frequencies and tabulate them.
3. Now we are required one semi-log graph chooses a frequency range such that the plot should start with the
frequency which is lower than the lowest corner frequency. Mark angular frequencies on the x-axis, mark
slopes on the left hand side of the y-axis by marking a zero slope in the middle and on the right hand side
mark phase angle by taking -180 degrees in the middle.
4. Calculate the gain factor and the type or order of the system.
5. Now calculate slope corresponding to each factor.

Exercise 1:Construct the Bode plot for unity feedback control system. G(s)=2000/s(s+1)(s+1000)
MATLAB CODE:

Page | 49
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise 2:Construct the Bode plot for T,F. G(s)=36(1+0.2s)/s2(1+0.05s)(1+0.01s)


MATLAB CODE:

Exercise 3:Construct the Bode plot for system. G(s)H(s)=Ke0.01s/s(1+s)(1+0.1s)


MATLAB CODE:
Page | 50
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

CONCLUSION:

SIGNATURE OF FACULTY

Page | 51
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXPERIMENT NO. 09
OBTAIN THE NYQUIST PLOT FOR THE SYSTEM USING MATLAB.

INTRODUCTION:
The stability analysis of a feedback control system is based on identifying the location of the roots of the
characteristic equation on s-plane. The system is stable if the roots lie on left hand side of s-plane. Relative stability
of a system can be determined by using frequency response methods like Nyquist plot and Bode plot. Nyquist
criterion is used to identify the presence of roots of a characteristic equation in a specified region of s-plane. To
understand Nyquist plot we need to know about some of the terminologies. Contour : Closed path in a complex
plane is called contour.

Nyquist path or Nyquist contour:


The Nyquist contour is a closed contour in the s-plane which completely encloses the entire right hand half of s-
plane. In order to enclose the complete RHS of s-plane a large semicircle path is drawn with diameter along jω axis
and centre at origin. The radius of the semicircle is treated as infinity.

Nyquist Encirclement:
A point is said to be encircled by a contour if it is found inside the contour.

Steps of drawing the Nyquist path:

Page | 52
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise 1:Sketch the Nyquist plot for open loop T.F. G(s)=10/(s+2)(s+4)
MATLAB CODE:

Page | 53
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise 2:Sketch the Nyquist plot for open loop T.F. G(s)=(s+2)/(s+1)(s-1)
MATLAB CODE:

Page | 54
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise 3:Sketch the Nyquist plot for open loop T.F. G(s)=60/(s+1)(s+2)(s+5)
MATLAB CODE:

CONCLUSION:

SIGNATURE OF FACULTY

Page | 55
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXPERIMENT NO. 11
BASIC CONCEPT OF STATE SPACE AND ITS CONVERSION.

INTRODUCTION:
1. State in State Space Analysis: It refers to smallest set of variables whose knowledge at t=t0 together
with the knowledge of input for t ≥ t0 gives the complete knowledge of the behavior of the system at
any time t ≥ t0.
2. State Variables in State Space analysis: It refers to the smallest set of variables which help us to
determine the state of the dynamic system. State variables are defined by x1(t), x2(t)........Xn(t).
3. State Vector: Suppose there is a requirement of n state variables in order to describe the complete
behavior of the given system, then these n state variables are considered to be n components of a
vector x(t). Such a vector is known as state vector.
4. State Space : It refers to the n dimensional space which has x1 axis, x2 axis .........xn axis.

STATE SPACE EQUATION:

Where A, B, C and D are matrices, x is the state vector, y is the output vector and u is the input vector. The
above representation can be obtained from the differential equation or transfer function of the system under
considerations.

MATLAB has built-in functions tf2ss (transfer function to state space) and ss2tf (state space to transfer
function) to convert transfer function model into state space representation and vice versa. Following
examples demonstrate the use of both of these functions.

Exercise 1: Convert given transfer function into state space

MATLABCODE:

Page | 56
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise 2: Convert given transfer function into state space

MATLABCODE:

Exercise 3: Find the transfer functions of the state space Form.

MATLABCODE:

Eigen Value: The eign values are the roots of the denominator polynomial of a transfer function. The built
function eig(A) computes the eign values of the system

Exercise 4: Find the eign values of the system with

Page | 57
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

MATLAB CODE:

State Transition Matrix : The state transition matrix Φ(t) can be computed using the built function
expm(A*t).

Exercise 5: - Find the state transition matrix of the following systems


at time t=4

MATLAB CODE:

CONCLUSION:

SIGNATURE OF FACULTY
Page | 58
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXPERIMENT NO. 12
SIMULATION OF CONTROL SYSTEM REPRESENTED IN STATE SPACE FORM.

Controllability of a linear system: For the system to be completely controllable it is necessary and
sufficient that the controllability matrix S has a rank of n. where n is order of the system.
The controllability matrix is given by:

Observability of a linear system: For the system to be completely observable it is necessary and
sufficient that the Observability Matrix V has a rank of n, where n is the order of the system. The:
Observability matrix is given by

Page | 59
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise 2: In order to determine the controllability of the system given below

MATLAB CODE:

Exercise 3: In order to determine the Observability of the system given below

MATLABCODE:

Page | 60
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise 4: Create Simulation Model For state space equation.

Solution:

Simulation Model:

Page | 61
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Response:

CONCLUSION:

SIGNATURE OF FACULTY

Page | 62
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

EXPERIMENT NO. 13
ANALYSIS EFFECT OF P, PD, PI, PID CONTROLLER ON SYSTEMS.

INTRODUCTION: Consider the following unity feedback system:

Plant: A system to be controlled.


Controller: Provides excitation for the plant; Designed to control the overall system behavior.
The three-term controller: The transfer function of the PID controller looks like the following:

KP = Proportional gain
KI = Integral gain
KD = Derivative gain
First, let's take a look at how the PID controller works in a closed-loop system using the schematic.
shown above. The variable (e) represents the tracking error, the difference between the desired input
value (R) and the actual output (Y). This error signal (e) will be sent to the PID controller, and the
controller computes both the derivative and the integral of this error signal. The signal (u) just past the
controller is now equal to the proportional gain (KP) times the magnitude of the error plus the integral
gain (KI) times the integral of the error plus the derivative gain (KD) times the derivative of the error

This signal (u) will be sent to the plant, and the new output (Y) will be obtained. This new output (Y) will
be sent back to the sensor again to find the new error signal (e). The controller takes this new error signal
and computes its derivatives and its internal again. The process goes on and on.
Example Problem:

Page | 63
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Exercise:
M= 1kg
b = 10 N.s/m
k = 20 N/m
 F(s) = 1
Plug these values into the above transfer function

The goal of this problem is to show you how each of K Kand K contributes to obtain
 Fast rise time

 Minimum overshoot

 No steady-state error
(1) Open-loop step response:
MATLAB CODE:

PLOT:

Page | 64
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

NOTE:

(2) Proportional control:

Let proportional gain Kp=300


MATLAB CODE:

PLOT:

Page | 65
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

NOTE:

(3) Proportional-Derivative control:

Let take Kp=300 and Ki=10


MATLAB CODE:

PLOT:

Page | 66
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Note:

(4) Proportional-Integral control:

Let Reduce K to 30 and Ki =70


MATLAB CODE:

PLOT:

Page | 67
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Note:

(5) Proportional-Integral-Derivative control:

After several trial and error runs, the gains Kp=350, Ki=300, and Kd=50 provided the desired response.
To confirm, enter the following commands to an m-file and run it in the command window. You should
get the following step response.
MATLAB CODE:

PLOT:

Page | 68
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

The characteristics of P, I, and D controllers:


The proportional controller (Kp) will have the effect of reducing the rise time and will reduce, but never
eliminate, the steady state error. An integral controller (Ki) will have the effect of eliminating the steady
state error, but it may make the transient response worse. A derivative control (Kd) will have the effect of
increasing the stability of the system, reducing the overshoot and improving the transient response.

Effect of each controller Kp,Ki & Kd on close loop system are summarized below

CL Response Rise Time Overshoot Settling time S-S Error


Kp
Ki
Kd

CONCLUSION:

SIGNATURE OF FACULTY

Page | 69
PARUL UNIVERSITY
FACULTY OF ENGINEERING TECHNOLOGY
DEPARTMENT OF ELECTRICAL ENGINEERING

Page | 70

Das könnte Ihnen auch gefallen