Вы находитесь на странице: 1из 45

LAB REPORT: CONTROL

SYSTEM

Submitted by: Anmol Ganjoo


Submitted to : Prof. Abinash Singh
Sid : 17104030
Branch: Electrical
Subject :Control System
Subject code : EEN 210
INDEX DATE
EXPERIMENT 1 10/1/19
EXPERIMENT2 10/1/19
EXPERIMENT3 17/1/19
EXPERIMENT4 24/1/19
EXPERIMENT5 31/1/19
EXPERIMENT6 7/2/19
EXPERIMENT7 14/2/19
EXPERIMENT8 21/2/19
EXPERIMENT9 21/2/19
EXPERIMENT10 4/4/19
EXPERIMENT11 11/4/19

EXPERIMENT:1
AIM: To study various Laplace transformations
Theory:The Laplace transform is an integral transform perhaps
second only to the Fourier transform in its utility in solving physical
problems. The Laplace transform is particularly useful in solving linear
ordinary differential equations such as those arising in the analysis of
electronic circuits.

The Laplace transform (not to be confused with the Lie


derivative, also commonly denoted ) is defined by

(1)
where is defined for . The unilateral Laplace transform is
almost always what is meant by "the" Laplace transform,
although a bilateral Laplace transform is sometimes also defined
as
(2)
The unilateral Laplace transform is implemented in the Wolfram
Language as LaplaceTransform[f[t], t, s] and the inverse Laplace transform
as InverseRadonTransform.
The inverse Laplace transform is known as the Bromwich integral,
sometimes known as the Fourier-Mellin integral (see also the related
Duhamel's convolution principle).
A table of several important one-sided Laplace transforms is given below.

conditions
1
In the above table, is the zeroth-order Bessel function of the
first kind, is the delta function, and is the Heaviside step
function.
The Laplace transform has many important properties. The
Laplace transform existence theorem states that, if is piecewise
continuous on every finite interval in satisfying
(3)
for all , then exists for all . The Laplace transform
is also unique, in the sense that, given two functions and
with the same transform so that
(4)
then Lerch's theorem guarantees that the integral
(5)
vanishes for all for a null function defined by
(6)
The Laplace transform is linear since
(7)
(8)
(9)
The Laplace transform of a convolution is given by
(10)
Now consider differentiation. Let be continuously
differentiable times in . If , then
(11)
This can be proved by integration by parts,
(12)
(13)
(14)
(15)
Continuing for higher-order derivatives then gives
(16)
This property can be used to transform differential equations into
algebraic equations, a procedure known as the Heaviside
calculus, which can then be inverse transformed to obtain the
solution. For example, applying the Laplace transform to the
equation
(17)
gives
(18)
(19)
which can be rearranged to

(20)
If this equation can be inverse Laplace transformed, then the
original differential equation is solved.
The Laplace transform satisfied a number of useful properties.
Consider exponentiation. If for (i.e., is the
Laplace transform of ), then for . This follows
from
(21)
(22)
(23)
The Laplace transform also has nice properties when applied to
integrals of functions. If is piecewise continuous and ,
then
EXPERIMENT - 2
Aim:
To determine the step response of first order transfer function
using MATLAB/SIMULINK & programming
Software Required:
MATLAB
Theory:
The transfer function is defined as the ratio of the output and
the input in the Laplace domain. It describes the dynamic
characteristics of the system.

General rules to develop a transfer function


1. Make unsteady state balance.
2. Make steady state balance 2.
3. Subtract the steady state equation from the unsteady state
equation.
4. Transform the resulting equation into the Laplace domain.
5. Rearrange the equation to get the ratio of the (out/in) in one
side and the other parameters in the other side (the resulting is
the transfer function).

Procedure
1. Open the MATLAB window.
2. Open a blank script.
3. Write the code as written below in script 1 & 2.
4. Make the block diagram to simulate the results.
Run the scripts and observe the results

Methods Used:-

1) Block Simulation:

Script

s=tf('s')
G=1/(s+3)
step(G);

G = tf( [2,3] , [4,5] );


step(G);

Conclusion:

In first order transfer function the maximum value of power


of ‘s’ is 1 in numerator as well as denominator. The plot of
step response is observed as shown above
EXPERIMENT - 3

Aim:
To plot the characteristics of step response for second order
transfer function using MATLAB/SIMULINK
Software Required:
MATLAB
Theory:
The transfer function is defined as the ratio of the output and
the input in the Laplace domain. It describes the dynamic
characteristics of the system.

General rules to develop a transfer function


1. Make unsteady state balance.
2. Make steady state balance 2.
3. Subtract the steady state equation from the unsteady state
equation.
4. Transform the resulting equation into the Laplace domain.
5. Rearrange the equation to get the ratio of the (out/in) in one
side and the other parameters in the other side (the resulting is
the transfer function).

Procedure
1. Open the MATLAB window.
2. Open a blank script.
3. Write the code as written below in script 1 & 2.
4. Make the block diagram to simulate the results.
5. Run the scripts and observe the results.
Methods Used:-
1) Block Simulation:
s = tf('s');
G = 1/((s^2)+s+20);
step(G);

Script

s = tf('s');
G = 1/((s^2)+5*s+12);
step(G);
G = tf([2,4],[5,6,7]);
step(G);

EXPERIMENT - 4
Aim:
To study what is stepinfo command and observe its effect on
the plot.
Software Required:
MATLAB
Theory:
S= stepinfo(sys)computes the step-response characteristics
for a dynamic system model sys. The function returns the
characteristics in a structure containing the fields:
 Rise Time:
Time it takes for the response to rise from 10% to 90% of the
steady-state response.
 Settling Time:
Time it takes for the error |y(t) - yfinal| between the
response y(t) and the steady-state response yfinal to fall to
within 2% of yfinal.
 Settling Min:
Minimum value of y(t) once the response has risen.
 Settling Max:
Maximum value of y(t) once the response has risen.
 Overshoot:
Percentage overshoot, relative to yfinal .
 Undershoot:
Percentage undershoot.
 Peak:
Peak absolute value of y(t).
Peak Time:
Time at which the peak value occurs.
Procedure:
1) Open the MATLAB window.
2) Open a blank script.
3) Write the code as written below in script.
4) Run the script and observe the results.
Script of Step-info:

s = tf('s');
G = 1/((s^2)+7*s+12);
step(G);

Result:

Parameters found:
Rise Time: 0.0347
Settling Time: 2.9242
Settling Min: 0.0415
Settling Max: 0.2172
Overshoot: 600.0000
Undershoot: 0
Peak: 1
Peak Time: 0

Conclusion:
This function is very useful as it gives various parameters of
the given transfer function directly through simulation in a
very short period of time, giving an advantage of saving of
time that we will spend on finding the parameters by
calculations.
Moreover it gives us the peak points and the time at which the
function is achieving that value. So this command is very
useful.
EXPERIMENT - 5
Aim:
To study the effect of damping factor in second order transfer
function using MATLAB
Software Required:
MATLAB
Theory:
The damping ratio is a system parameter, denoted by ζ (zeta),
that can vary from undamped (ζ = 0), underdamped (ζ < 1),
Critically damped (ζ = 1) to overdamped (ζ > 1).
The different cases depending upon the value of damping
ratio are:
Undamped
Is the case where corresponds to the undamped simple
harmonic oscillator, and in that case the solution looks like ,
as expected.
Underdamped
If s is a pair of complex values, then each complex solution
term is a decaying exponential combined with an oscillatory
portion that looks like. This case occurs for, and is referred to
as underdamped.
Overdamped
If s is a pair of real values, then the solution is simply a sum
of two decaying exponentials with no oscillation. This case
occurs for, and is referred to as overdamped.
Critically damped
The case where is the border between the overdamped and
Under damped cases, and is referred to as critically damped.
This turns out to be a desirable outcome in many cases where
engineering design of a damped oscillator is required.
Procedure:
1. Open the MATLAB window.
2. Open a blank script.
3. Write the code as written below in script 1 to 5.
4. Make the block diagram to simulate the results.
5. Run the scripts and observe the results.

Overdamped Response

Critically damped Response


Undamped
Underdamped

Comparison of different type of dampings


Conclusion:

There are two important observations that we


make through this experiment:
1) When we decrease the value of zeta in overdamped
response the peak value of the response is attained
faster as compare to the case when the value of zeta
is more.
2) When we keep value of zeta as small as possible in
case of critically damped function we observe more
& more oscillations in the response rather than we
keep the value of zeta larger.
EXPERIMENT - 6
Aim:
To plot the poles and zeroes of a given transfer function.
Software Required:
MATLAB
Theory:
Poles and Zeros of a transfer function are the frequencies
for which the value of the denominator and numerator of
transfer function becomes zero respectively. The values of
the poles and the zeros of a system determine whether the
system is stable, and how well the system performs. Control
systems, in the most simple sense, can be designed simply
by assigning specific values to the poles and zeros of the
system.
Let us have a look at the differences between Poles and Zeros and
their effects for a given function:

1. Definition:
 Poles are the roots of the denominator of a transfer function.
 Zeros are the roots of the nominator of a transfer function.
2. Determination:
 Poles are determined by equating D(s) with 0 and solving for s.
 Zeros are determined by equating N(s) with 0 and solving for s.
3. Amount:
 The number of poles is always greater or equal to the Zeros.
 The numbers of Zeros are lesser or equal to Poles.

Determination of output:
 Poles in a transfer function explain that the output has reached
to infinity.
 Whereas, the zeros in a transfer function indicate that the
output has reached to zero.
4. Effect of Additional Poles and Zeros In first order systems:
 Additional Poles delay the response of a system.
 Left half-plane zeros speed up the response of a system and
the right half-plane cause the response to go in the opposite
direction.
5. Effect of Additional Poles and Zeros in Second order systems:
 Additional Poles in a dominantly second order system
decrease the number of oscillations.
 Additional Zeros in a dominantly second order system
increases the number of oscillations.

Procedure:
1. Open the MATLAB window.
2. Open a blank script.
3. Write the code as written below in script.
4. Run the script and observe the
results.

Script-

s=tf('s')
p=(s+2)/(s^2+2*s+4)
pzmap(p)

Result:
Conclusion:
Poles and Zeroes decide the stability of a given
transfer function, so study of poles and zeroes are
important.

EXPERIMENT NO.-7

Aim: To simulate P, PI, PD Control for first and second order


system
Theory:
P Controller:
P controller is mostly used in first order processes with single
energy storage to stabilize the unstable process. The main
usage of the P controller is to decrease the steady state error of
the system. As the proportional gain factor K increases, the
steady state error of the system decreases. However, despite
the reduction, P control can never manage to eliminate the
steady state error of the system. As we increase the
proportional gain, it provides smaller amplitude and phase
margin, faster dynamics satisfying wider frequency band and
larger sensitivity to the noise. We can use this controller only
when our system is tolerable to a constant steady state error.
In addition, it can be easily concluded that applying P controller
decreases the rise time and after a certain value of reduction
on the steady state error, increasing K only leads to overshoot
of the system response. The more lags (higher order), the more
problem it leads. Plus, it directly amplifies process noise.

P-I Controller:
P-I controller is mainly used to eliminate the steady state error
resulting from P controller. However, in terms of the speed of
the response and overall stability of the system, it has a
negative impact. This controller is mostly used in areas where
speed of the system is not an issue. Since P-I controller has no
ability to predict the future errors of the system it cannot
decrease the rise time and eliminate the oscillations. If applied,
any amount of I guarantees set point overshoot.

P-D Controller:
The aim of using P-D controller is to increase the stability of the
system by improving control since it has an ability to predict the
future error of the system response. In order to avoid effects of
the sudden change in the value of the error signal, the
derivative is taken from the output response of the system
variable instead of the error signal. Therefore, D mode is
designed to be proportional to the change of the output
variable to prevent the sudden changes occurring in the control
output resulting from sudden changes in the error signal. In
addition D directly amplifies process noise therefore D-only
control is not used.

Simulation:
%% P control code
Kp = 300;
C = pid(Kp)
s = tf('s');
P = 1/(s^2 + 10*s + 20);
T = feedback(C*P,1)

t = 0:0.01:2;
step(T,t);
hold on

%% PD code
Kp = 300;
Kd = 10;
C = pid(Kp,0,Kd)
T = feedback(C*P,1)
t = 0:0.01:2;
step(T,t)

%% PI code
Kp = 30;
Ki = 70;
C = pid(Kp,Ki)
T = feedback(C*P,1)
t = 0:0.01:2;
step(T,t)
legend('P control','PD control','PI control')
grid on
title(' P,PI,PD Control second order system')

Result:
EXPERIMENT:8

AIM:-To simulate PID controller for first and second


order system.
APPARATUS REQUIRED: MATLAB
THEORY:

The output of a PID controller, which is equal to the control


input to the plant, is calculated in the time domain from the
feedback error as follows:

(1)
First, let's take a look at how the PID controller works in a
closed-loop system using the schematic shown above. The
variable ( ) represents the tracking error, the difference
between the desired output ( ) and the actual output ( ). This
error signal ( ) is fed to the PID controller, and the controller
computes both the derivative and the integral of this error
signal with respect to time. The control signal ( ) to the plant is
equal to the proportional gain ( ) times the magnitude of the
error plus the integral gain ( ) times the integral of the error
plus the derivative gain ( ) times the derivative of the error.
This control signal ( ) is fed to the plant and the new output ( )
is obtained. The new output ( ) is then fed back and compared
to the reference to find the new error signal ( ). The controller
takes this new error signal and computes an update of the
control input. This process continues while the controller is in
effect.
The transfer function of a PID controller is found by taking the
Laplace transform of Equation (1).

(2)
where = proportional gain, = integral gain, and =
derivative gain

SCRIPT:
Kp = 350;
Ki = 200;
Kd = 50;
C = pid(Kp,Ki,Kd)
P = 1/(s^2 + 10*s + 20);
T = feedback(C*P,1);
t = 0:0.01:2;
step(T,t)
legend('PID Control for second order system')
title('PID controler for second order system')
grid on

SIMULATION DIAGRAM:

s+3
2s2 +6s+1
Transfer Fcn2

In1 Out1

s+3 Scope1
Subsystem
2s2 +6s+1
Step Transfer Fcn

s+3
In1 Out1
2s2 +6s+1
Transfer Fcn1
Subsystem1

s+3
2s2 +6s+1
Transfer Fcn3

In1 Out1

Subsystem2

s+3
In1 Out1
2s2 +6s+1
Transfer Fcn4
Subsystem3
GRAPH FOR PID SIMULATION:
PID Controller simulation

1.4

1.2

0.8
Amplitude

0.6

0.4

0.2

0
0 2 4 6 8 10 12 14 16 18 20
Time

RESULTS: The PID CONTROLLER WAS STUDIED.


EXPERIMENT:9

AIM:
To plot root locus of a given Transfer function.

THEORY :
The root locus of an (open-loop) transfer function is a plot
of the locations (locus) of all possible closed-loop poles with
some parameter, often a proportional gain , varied between 0
and . The figure below shows a unity-feedback architecture,
but the procedure is identical for any open-loop transfer
function , even if some elements of the open-loop transfer
function are in the feedback path.

(1)The closed-loop transfer function in this case is:

and thus the poles of the closed-loop system are values


of such that .
(2)If we write , then this equation can be rewritten
as:

(3)
Let be the order of and be the order of (the order of
the polynomial corresponds to the highest power of ).
We will consider all positive values of . In the limit as , the
poles of the closed-loop system are solutions of (poles
of ). In the limit as , the poles of the closed-loop system
are solutions of (zeros of ).
No matter our choice of , the closed-loop system has poles,
where is the number of poles of the open-loop transfer
function . The root locus then has branches, each branch
starts at a pole of and approaches a zero of . If has
more poles than zeros (as is often the case), and we say
that has zeros at infinity. In this case, the limit
of as is zero. The number of zeros at infinity is , the
number of open-loop poles minus the number of open-loop
zeros, and is the number of branches of the root locus that go
to "infinity" (asymptotes).
Since the root locus consists of the locations of all possible
closed-loop poles, the root locus helps us choose the value of
the gain to achieve the type of performance we desire. If any
of the selected poles are on the right-half complex plane, the
closed-loop system will be unstable. The poles that are closest
to the imaginary axis have the greatest influence on the closed-
loop response, so even if a system has three or four poles, it
may still behave similar to a second- or a first-order system,
depending on the location(s) of the dominant pole(s).

SCRIPT:
s=tf(‘s’)
g=10/(s*s+10*s+20)
step(g)
rlocus(g)
figure

GRAPH:
Root Locus
15

10

5
Imaginary Axis

-5

-10

-15
-20 -15 -10 -5 0 5 10
Real Axis
EXPERIMENT: 10

AIM:
To study bode plot of a given transfer function

THEORY:
A Bode Plot is a useful tool that shows the gain and phase
response of a given LTI system for different frequencies. Bode
Plots are generally used with the Fourier Transform of a given
system. To get the magnitude gain plot, we must first transit
the transfer function into the frequency response by using the
change of variables:

|𝑀𝑎𝑔| = 20 ∗ log(𝑇(𝑤)) 𝑑𝐵
The phase angle of the open loop transfer function in degrees
is -
ϕ=∠G(jω)H(jω)
Plot of Magnitude and Phase of open loop system can
comment on stability of a closed loop system

SCRIPT:
s=tf('s')
g=10/((s^2)+3s)
step(g)
bode(g)

GRAPH:
EXPERIMENT:11

AIM: To study and plot the Nyquist plot

THEORY:

A Nyquist plot is a parametric plot of a frequency response used in


automatic control and signal processing. The most common use of
Nyquist plots is for assessing the stability of a system with feedback. In
Cartesian coordinates, the real part of the transfer function is
plotted on the X axis. The imaginary part is plotted on the Y axis. The
frequency is swept as a parameter, resulting in a plot per frequency.
The same plot can be described using polar coordinates, where gain
of the transfer function is the radial coordinate, and the phase of the
transfer function is the corresponding angular coordinate. The Nyquist
plot is named after Harry Nyquist, a former engineer at Bell
Laboratories.
Assessment of the stability of a closed-loop negative feedback system
is done by applying the Nyquist stability criterion to the Nyquist plot of
the open-loop system (i.e. the same system without its feedback
loop). This method is easily applicable even for systems with delays and
other non-rational transfer functions, which may appear difficult to
analyze by means of other methods. Stability is determined by looking
at the number of encirclements of the point at (−1,0). The range of
gains over which the system will be stable can be determined by
looking at crossings of the real axis.
The Nyquist plot can provide some information about the shape of the
transfer function. For instance, the plot provides information on the
difference between the number of zeros and poles of the transfer
function[2] by the angle at which the curve approaches the origin.
When drawn by hand, a cartoon version of the Nyquist plot is
sometimes used, which shows the linearity of the curve, but where
coordinates are distorted to show more detail in regions of interest.
When plotted computationally, one needs to be careful to cover all
frequencies of interest. This typically means that the parameter is
swept logarithmically, in order to cover a wide range of values.

SCRIPT:
S=tf(‘s’)
G= (s+3) /(s^2+10*s+ 40)
Nyquist(G)
GRAPH:

Nyquist Diagram
0.08
20 dB 10 dB 6 dB 4 dB 2 dB 0 dB -2 dB -4 dB -6 dB -10 dB -20 dB

0.06

0.04

0.02
Imaginary Axis

-0.02

-0.04

-0.06

-0.08
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4
Real Axis

Вам также может понравиться