Dslab Exp 1 - 2 - Merged

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

Experiment – 1

Aim of the experiment :


To analyze the characteristics of the step and ramp response for a first and second order
system.
Question :

Software required:
MATLAB
Theory:
Step response is the time behaviour of the outputs of a general system when its inputs
change from zero to one in a very short time. The concept can be extended to the abstract
mathematical notion of a dynamical system using an evolution parameter. Ramp response
is the time behaviour of the outputs of a general system when its input changes constantly
with respect to time.

Non-Reheat Type Steam Turbine is a first order system with one pole.
Transfer function is given as: K/(Ts+1)
According to the question,
Steady state value at output = 2 p.u.
Steam Input = 3 p.u.
K = Steady state output value / input signal
K = 2/3 = 0.67
In practical scenario, system takes 4 time constants to reach the final value with 98.2%
accuracy.
That implies,
4T = Time to reach steady state value = 2.5sec.
=>T = 2.5/4 = 0.625sec
Transfer function is given as follows:
TF = 0.67/(0.625s+1)
For step response, magnitude of input signal is multiplied with transfer function which gives
us the function of output signal.
For non-reheat type steam turbine,
Code:
>> num = 0.67
num =
0.6700
>> den = [0.625 1]
den =
0.6250 1.0000
>> system = tf(num,den)
system =
0.67
-----------
0.625 s + 1
Continuous-time transfer function.
>>step(3*system)
When sudden change is applied to reheat type steam turbine.
It is a second order system.
TF = 0.67 / (0.625s + 1) (0.625s + 1)
= 0.67 / (0.39s^2 + 1.25s + 1)
Code:
>> num1 = 0.67
num1 =
0.6700
>> den1 = [0.39 1.25 1]
den1 =
0.3900 1.2500 1.0000
>> system2 = tf (num1, den1)
system2 =
0.67
---------------------
0.39 s^2 + 1.25 s + 1
Continuous-time transfer function.
>> step(system2)

Ramp Signal:
Input signal is provided gradually of 2 p.u. over a time of 5seconds.
Command used - lsim(sys,u,t) plots the simulated time response of the dynamic system
model sys to the input history (t,u). The vector t specifies the time samples for the
simulation. For single-input systems, the input signal u is a vector of the same length as t.
For multi-input systems, u is an array with as many rows as there are time samples
(length(t)) and as many columns as there are inputs to system.
For non - reheat steam turbine:
Code:
den2 =0.67
den2 =
0.6700
>> num2= 0.67
num2 =
0.6700
>> den2 = [0.625 1]
den2 =
0.6250 1.0000
>> system3 = tf(num2,den2)
system3 =
0.67
-----------
0.625 s + 1
Continuous-time transfer function.
>> time = 0:0.05:5
>>ramp = (3/5)*time [(3/5) is multiplying factor as it is the ratio of input signal to total time
it is provided.]
>>[b,a] = lsim(system2,ramp,time)
>>plot (a, b)
For reheat steam turbine:
Code:
num4 = 0.67
num4 =
0.6700
>> den4 = [0.39 1.25 1]
den4 =
0.3900 1.2500 1.0000
>> system4 = tf(num4, den4)
system4 =
0.67
---------------------
0.39 s^2 + 1.25 s + 1
Continuous-time transfer function.
>> time = 0:0.05:5
>> ramp = (3/5) *time
>> [b2, a2] = lsim (system4, ramp, time)
>>plot (a2, b2)
Inference:
When there is sudden change in steam input,
In non-reheat turbine, the settling time is found to be 2.45sec with a final value of 2.01 with
an accuracy of 98.2% as compared to reheat type steam turbine of 3.65sec which is a
second order system and the final value of the system found to 0.67.
When gradual change in steam input is applied for a time of 5sec to a value of 3 p.u.
In non-reheat turbine, the final value is found to be 1.78 and in reheat type steam turbine
the final value is found to be 1.5.
Hence, the step and ramp response of both first and second order reaction is inferred here
through non-reheat and reheat type steam turbines.

Durgadutta das
1901106296
EE – Sec – A
Group – A2
Experiment – 2
Aim: Design a compensator according to the requirements of the system.
Question:

Software Used: MATLAB


Theory:
Control system compensation is the strategy used by the control system designers to
improve system dynamic performance through the addition of dynamic elements in order
to mitigate some of the undesirable features of the control elements present in the system.
Types of compensation:
1. Lag Compensator is an electrical network which produces a sinusoidal output having the
phase lag when a sinusoidal input is applied.
2. Lead compensator is an electrical network which produces a sinusoidal output having
phase lead when a sinusoidal input is applied.
3. Lag-Lead compensator is an electrical network which produces phase lag at one
frequency region and phase lead at other frequency region. It is a combination of both the
lag and the lead compensators.
G(s)H(s) = 300 / s(s+4) (s2 + 4s + 20)
= 300 / s^4 + 8s^3 + 36s^2 + 80s
A. For realization of transfer function using electrical Equipment.
The transfer function is found out to be cascaded system of three differential equations.
G(s)H(s) = 300 / s(s+4) (s^2+4s+20)
= k1/s ; k2 / s+4 ; k3 / s^2 + 4s + 20
First consider:
K3 / s2+4s+20
It is similar to the voltage ratio transfer function when R, L, C are connected in series and
output voltage being taken across the capacitor. The general transfer function of such a
system is given as:
1 / LC3
s2+ R2s / L + 1 / LC3
Comparing, we have:
R2 / L = 4; 1 / LC3 = 20 Assuming L=10H
 k3=20
 R2= 40Ω
 C3=5mF
Now considering,
K2 / s+4
It is similar to the voltage ratio transfer function when R, C are connected in parallel and
output voltage being taken across the parallel circuit. The general transfer function of such
a system is given as:
1 / C2
S+1/R1C2
Comparing we have:
R1C2=1/4, k2=1/C2
Assuming R1=10Ω
C2=25mF
k2=40
Now considering,
K1 / s
It is similar to the voltage ratio transfer function when output voltage being taken across
the capacitor. The general transfer function of such a system is given as:

1 / sC1
Comparing we have:
k1=1/C1
Also, k1 x k2 x k3=300
 k1 x 40 x 20 = 300
 k1= 0.375
 C1= 1/0.375 =2.67F
Therefore, the circuit parameters are:
C1=2.67F
C2=25mF
C3=5mF
R1=10Ω
R2=40Ω
L=10H
Here is the circuit diagram in MATLAB.

B. Code to check for initial stability using bode plot with Unity Feedback system.
>> num = 300
num =
300
>> den = [1 8 36 80 0 ]
den =
1 8 36 80 0
>> sys = tf (num, den)
sys=
300
---------------------------
s^4 + 8 s^3 + 36 s^2 + 80 s
Continuous-time transfer function.
Bode(sys)
Output of following system is given as:

We inferred from the above bode plot that, the gain and phase margin is negative.
Hence, the system is unstable.
Theoretical calculation of gain margin and phase margin is done.
Since phase margin is negative, lead compensation is required for the system to be stable.
C. We have calculated the parameters required for the compensation theoretically as
follows:

Code after adding lead compensation to the system:


lead_compensator_sys = tf([1 2.846],[1 4.545])
lead_compensator_sys =
s + 2.846
s + 4.545
Continuous-time transfer function.
>> compensated_system = system2*lead_compensator_sys
compensated_system =
300 s + 853.8
s^5 + 12.55 s^4 + 72.36 s^3 + 243.6 s^2 + 363.6 s
Continuous-time transfer function.
>> margin(compensated_system)
D.Bode Plot after compensation:

Since the gain margin and phase margin of the system now is positive, the system is defined
as stable system and is now closed loop stable.

It is also evident from the Nyquist plot.


Lead compensator design characteristics:
Inference:
1. We inferred the stability analysis of open loop transfer function.
2. The system is found to be unstable since gain and phase margin is less than zero.
3. Since the phase margin less than zero, lead compensation is required to make the system
stable.
4. Characteristics of lead compensation is calculated theoretically and the factor is
multiplied with the original system.
5. Stability analysis is done using Bode Plot and Nyquist plot since the gain margin I kept
constant in the system.
6. After the compensation is applied to the system,
GM and PM are found to be positive and the system is stable as closed loop also.
7. It was also realised to make a transfer function realization with the help of electrical
equipment.

Durgadutta das
190110296
EE – Sec – A
Group – A2
EXPERIMENT - 3
AIM OF THE EXPERIMENT: To analyze the effect of P, PI and PID on the given system.

QUESTION:-
Find the response and comment on the various time response specification of the following
system
(i) without any controller
(ii) with P controller
(iii) with PI controller
(iv) with PID controller

SOFTWARE REQUIRED: MATLAB

(i) Step response of the system:-


MATLAB Code:
>> num=[0 1];
>> den=[1 9 23 15];
>> sys=tf(num,den);
>> sys2=feedback(sys,1);
>> step(sys2);
Final value Settling time Percentage steady Overshoot
state error percentage
0.0625 4.12 93.7 0

INFERENCE:
The system is stable but has very high steady state error about 93.7%.And the settling time is
also high. To get a satisfactory response upto a mark we used controllers in the system as the
system is closed loop stable .and designed the controllers with the help of Ziegler -Nichols
table.

ku is the critical gain(kcr).and Tu is the critical time constant(Tcr).

To find the values of kcr and Tcr:

Characteristics equation = 1+G(s)H(s)


= s3+9s2+23s+15+k
To find the value of
k:
s3 1 23
s2 9 15+k
s1 207-15-k 0
9
0
s 15+k
Now
207-15-k = 0
9
207-15-k = 0
K= 192
Putting the value of k in the characteristic equation we
get,s3+9s2+23s+207=0
 s=4.74j
 jwcr=4.74j
 wcr=4.74
Hence we get wcr = 4.74rad/sec
Tcr=2 x 3.142/4.74 = 1.32 sec

(ii) P controller
This is just a gain block attached at the front of the system in the forward region.
Proportional control, in engineering and process control, is a type of linear feedback control
system in which a correction is applied to the controlled variable which is proportional to the
difference between the desired value and the measured value.

Removing the sign of proportionality we have,

Where Kp is proportional constant also known as controller gain


To find the value of kp for P controller from ziegler nichols method we get
Kp= 0.5 x kcr = 0.5 x 192 = 96

MATLAB code:
>> num=[0 96];
>> den=[1 9 23 15];
>> sys=tf(num,den);
>> sys2=feedback(sys,1)
>>Step(sys2);

kp Final value Settling time Percentage steady


state error
80 0.842 5.6 15.8
96 0.865 6.3 13.5
100 0.87 6.97 13
110 0.88 8.25 12

Inference:
Using P controller steady state error reduced to 13.5% but not completely zero. Settling time
increased to 6.3 seconds, and now there is a overshoot of 55.4%.as we will increase the value
of kp the value of final value will increase but settling time will also increase.so here we can
not get both to be satisfactory. We have to make a compromise between steady state error
and settling time here.
To increase the final value up to the mark we added a integral controller to the proportional
block .integral controller can not be used alone as this makes the system unstable and makes
it oscillatory although its reduces the steady state error.

(iii) With PI controller:-


PI is the combination of proportional controller and integral controller.
Here ki comes to play, which is the integral controller constant.
In integral controllers the output (also called the actuating signal) is directly proportional to
the integral of the error signal.
Removing the sign of proportionality we have,

Where Ki is an integral constant also known as controller gain. The integral controller is
also known as reset controller.
To find the value of kp and ki for pi controller we again used Ziegler Nichols table ,
Kp= 0.45 x k = 86.4
Ti= 0.8 x Tcr = 1.056
Ki = kp/Ti = 81.81

MATLAB code:
>> num=[86.4 81.81];
>> den=[1 9 23 15 0];
>> sys=tf(num,den);
>> sys2=feedback(sys,1);
>> step(sys2)

Time response:

Final value kp ki Settling time Overshoot


percentage
1 84(from 81(from 14.2 70
Ziggler Ziggler
Nichols) Nichols)
1 84 60 9.62 59.7
1 84 40 7.7 49.3
1 84 30 7.6 43.9
1 84 20 9.35 39

Inference:
Using PI controller steady state error was completely eliminated but peak overshoot and
settling time further increased. We can not reduce the overshoot here as per our choice to a
lower value because this will increase the settling time after a certain overshoot.so to reduce
the overshoot we have to introduce another block which is the derivative controller into the
system.

(iv) With PID controller


Pid controller is a combination of p ,I and d controller. Here kd comes to play.
In a derivative controller the output (also called the actuating signal) is directly proportional
to the derivative of the error signal.

Removing the sign of proportionality we have,

Where, Kd is proportional constant also known as controller gain. The derivative controller
is alsoknown as the rate controller
To find kp, ki, kd we again used Ziegler Nichols method
Kp=0.6 x k=115.2
Ti = 0.5 x Tcr =0.66 Ki = kp/Ti = 174.54
Td = 0.12 x Tcr = 0.1584
Kd = Td x kp = 18.24

MATLAB code:
>> num=[18.24 115.2 174.54];
>> den=[1 9 23 15 0];
>> sys=tf(num,den);
>> sys2=feedback(sys,1);
>> step(sys2);
Inference:-
With PID controller steady state error is still absent and settling time reduces. But the
overshoot is still 48%.Which is not a satisfactory response.so we should adjust the value of
kp,ki and kd so that the overshoot percentage decreases nearly to 20% and the settling time
is also less with zero steady state error.

Now we customly adjust the value of kp,ki and kd to get our desired value:-
kp ki kd Percentage Settling time
overshoot
115.2(from 174(from ziegler 18.24(from 48.3 3.56
ziegler nicholes nicholes method) ziegler nicholes
method) method)
115.2 174 20 44.7 2.81
115.2 174 25 36 2.01
100 150 25 28.9 2.04
80 120 25 19 1.98
60 80 25 10.4 2.66
Here kp=60, ki=80 and kd=25
At these values of kp, ki and kd the percentage overshot is only 10.4% and settling time is 2.66
seconds.

Inference:-
In the above experiment we used controllers to get a better response. Using P controller
,only steady state error was reduced to a considerable value but not completely eliminated
,then using PI controller steady state error was completely eliminated, but the peak
response and settling time were still high and then using PID controller the settling time
and overshoot was reduced and both transient state stability and steady state stability was
achieved by further increasing the value of kd and decreasing the value of kp and ki.

Name: Durgadutta Das


Branch: Electrical Engineering
Regd. No.: 1901106296
Section: A
Group: A2
EXPERIMENT:-4
AIM OF THE EXPERIMENT:-
Simulation of half-wave uncontrolled rectifier with R, RL, RLE load and calculation of Form
factor, Ripple factor, Mean, RMS and THD

SOFTWARE USED: MATLAB

SIMULATION:
Simulation block required:
Sl no. Name Specification Quantity
1 AC voltage source 230V A.C source 1
2 Diode RON=0.001Ω 1
LON=0H
VF=0.8V
RS=500
CS=250e-9
3 R-load R=10Ω 1
4 RL-load R=10Ω,L=10e-3 1
5 RLE- load R=10Ω,L=10e-3,E=100V 1
6 Scope ___ 1
7 Power gui Solver 1
8 Current measurement block Ammeter 2
9 Voltage measurement block Voltmeter 2
10 THD block ___ 1
11 Mean block ___ 1
12 RMS block ___ 1
13 Display ___ 3
Simulation diagram:

Simulation diagram for R-load


Simulation diagram for RL-load

Simulation diagram for RLE-load

PLOTS:
Graphical plot of rectifier with R-load

Graphical plot of rectifier with RL-load


Graphical plot of rectifier with RLE-load

TABULATION:
Load R L E RMS Mean Form Ripple THD
(in Ω) (in H) (in V) (in V) (in V) factor factor (in %)

R 10 0 0 155 98.62 1.57 1.21 0.4366

RL 10 10e-3 0 155.5 96.29 1.615 1.268 0.4079

RLE 10 10e-3 100 171.6 151.8 1.13 0.52 0.6071


THD ANALYSIS:-

R load THD analysis

RL load THD analysis


RLE Load TDH analysis

CALCULATION:
INFERENCE:

From the above experiment we studied the output waveforms of a half-wave uncontrolled
rectifier with various types of loads and obtained the followings:
• When an L load in introduced in the circuit the output voltage becomes (-)ve for some
period of time.
• When an external battery (E) is introduced in the circuit, the output voltage is obtained
only for the part when the source voltage is greater than E.
• By connecting display we got the RMS , Mean of output voltage and THD value from
input side.
• The RMS values were 155V, 155.5V and 171.6V in case of a R, RL and RLE load
respectively.
• The THD(%ge) values were 0.4366%, 0.4079% and 0.6071%in case of a R, RL and RLE
load respectively.
• The Mean values were 98.62V, 96.29V and 151.8V in case of a R, RL and RLE load
respectively.
• The Form factor values were calculated to be 1.57, 1.615 and 1.13 in case of a R, RL and
RLE load respectively.
• The Ripple factor values were calculated to be 1.21, 1.268 and 0.52 in case of a R, RL and
RLE load respectively.

Durgadutta das
Regd no:-1901106296
Branch:-Electrical
SEC:-A(A2)
EXPERIMENT: 04( II)

AIM OF THE EXPERIMENT:


Simulation of single phase full-wave uncontrolled rectifier with R, RL, RLE load with analysis
of FFT plot and calculation of form factor, ripple factor and THD.
SOFTWARE USED:
MATLAB

SIMULATION:
Simulation blocks required: Single Phase AC voltage source
Diode
Series RLC branch
DC Voltage Source
Ground
Powergui
Scope
Display
Current measurement block
Voltage measurement block
THD block
Mean block
RMS block

SIMULATION DIAGRAM:

Simulation circuit diagram for R load


Simulation circuit diagram for RL load

Simulation circuit diagram for RLE load


PLOT:-
(R load graph)

(RL load graph)

(RLE load Graph)


FFT ANALYSIS:

(With R load)

(with RL load)
( With RLE load )

OBSERVATION TABLE:

Load R L E RMS Mean Form Ripple THD


(in Ω) (in H) (in V) (in V) (in V) factor factor (in %)

R 10 0 0 228.5 205.4 1.11 0.48 0.32

RL 10 10e-3 0 218.5 196.4 1.112 0.486 11.08

RLE 10 10e-3 100 220.4 202.8 1.086 0.42 18.65


CALCULATION:
INFERENCE:
From the above experiment we studied the output waveforms of a single phase full-wave
uncontrolled rectifier with various types of loads and obtained the followings:
• When an L load in introduced in the circuit the output voltage becomes -ve for some
period of time.
• When an external battery (E) is introduced in the circuit, the output voltage is obtained
only for the part when the source voltage is greater than E.
• The Form factor values were calculated to be 1.112, 1.120 and 1.088 in case of a R, RL
and RLE load respectively.
• The Ripple factor values were calculated to be 0.48, 0.50 and 0.42 in case of a R, RL and
RLE load respectively.

Durgadutta das
Regd no:-1901106296
Branch:-Electrical
Sec:-A(A2)

You might also like