Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Mannual 2020-21

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

DEPARTMENT OF ELECTRICAL ENGINEERING

CONTROL SYSTEM LABORATORY MANUAL

NATIONAL INSTITUTE OF TECHNOLOGY (NIT) ANDHRA PRADESH


(An Institution of National Importance)

DEPARTMENT OF ELECTRICAL ENGINEERING


TADEPALLIGUDEM– 534101, WEST GODAVARI DIST., A.P., INDIA
राष्ट्रीय प्रौद्योगिकी संस्थान आं ध्रप्रदे श
NATIONAL INSTITUTE OF TECHNOLOGY (NIT) ANDHRA PRADESH
DEPARTMENT OF ELECTRICAL ENGINEERING
III B. Tech (EEE) II- Semester
EE 356 - Control Systems Lab

List of Experiments

1. Time-response of first and second order systems.


a) Simulation of a typical second order system and determination of step response and
evaluation of time- domain specifications.
b) Evaluation of the effect of additional poles and zeroes on time response of second order
system.
2. Frequency-response of second order system.
3. Study of P, PI & PID controller.
4. To study the effect of P, PI, PD and PID controller on the step response of a feedback control system
5.
a) Evaluation of effect of pole location on stability
b) Effect of loop gain of a negative feedback system on stability
6.
a) Effect of open loop and zeroes on root locus contour
b) To estimate the effect of open loop gain on the transient response of closed loop system by using
Root locus
c) Comparative study of Bode, Nyquist and Root locus with respect to Stability.
7. Design and study of lag, lead and Lag-lead compensator networks.
8. DC Position Control
9. DC Motor Speed Control
10.
a) Block diagram reduction technique using MATLAB
b) State model for classical transfer function & vice versa using MATLAB.
Control System Lab
INDEX

S. No Experiment Name Date Hardware /


MATLAB
1. Time response of second order system 20/01/2021 MATLAB
a) Simulation of a typical second order
system and determination of step response
and evaluation of time- domain
specifications.
b) Evaluation of the effect of additional poles
and zeroes on time response of second
order system.
2. Frequency response of a second order system 27/01/2021 MATLAB
3. Study of P, PI, PD, PID Controller 03/02/2021 Hardware
4. Study the effect of P, PI, PD and PID 10/02/2021 Hardware &
controller on the Step response of a feedback MATLAB
control system
5. a) Evaluation of effect of pole location on 17/02/2021 MATLAB
stability.
b) Effect of loop gain of a negative feedback
system on stability
6. a) Effect of open loop and zeroes on root 24/02/2021 MATLAB
locus contour.
b) To estimate the effect of open loop gain
on the transient response of closed loop
system by using Root locus.
c) Comparative study of Bode, Nyquist and
Root locus with respect to Stability.
7. Design and study of lag, lead and Lag-lead 10/03/2021 MATLAB
compensator networks
8. DC position Control 17/03/2021 Hardware
9. DC Motor Speed Control 24/03/2021 Hardware
10. a) Block diagram reduction technique using 31/04/2021 MATLAB
MATLAB

b) State model for classical transfer function


& vice versa using MATLAB
Experiment No:01
TIME RESPONSE OF FIRST AND SECOND ORDER SYSTEM

Aim: To obtain time response of a First order and second order system in case of under
damped, over damped and critically damped systems.
Apparatus Required: PC loaded with MATLAB
Theory:
The time response of control system consists of two parts. Transient response and steady
state response. C (t) = Ctr(t) + Css(t). Most of the control systems use time as its independent
variable. Analysis of response means to see the variation of output with respect to time. The
output of the system takes some finite time to reach to its final value. Every system has a
tendency to oppose the oscillatory behavior of the system which is called damping. The
damping is measured by a factor called damping ratio of the system. If the damping is very
high then there will not be anyoscillations in the output. The output is purely exponential.
Such system is called an over damped system.
If the damping is less compared to over damped case then the system is called a critically
damped system. If the damping is very less then the system is called under damped system.
With no damping system is undamped.

1<x<∞ --- Over damped system.


x=1 --- Critically
damped system. 0<x<1 ---
Under damped system.
x=0 --- Undamped system.

Time domain specifications: Delay time Td = (1 + 0.7x)/ wn


Rise Time Tr =(Π – θ)/ wd
Peak overshoot time = Tp = Π/ wd
% Mp = exp( - Πx/sqrt(1-x2))
Settling Time Ts = 4/xwn (2% tolerance)

Procedure:

Open the MATLAB command window.


1) Click on file-new-M file to open the MATLAB editor window.
2) In the given MATLAB editor window enter the program to obtain the step response.

% step response of a second order system


wn = input(‘enter the natural frequency’);
x = input(‘enter damping ratio’);
num = [wn*wn];
den = [1 2*x*wn wn*wn];
sys = tf (num, den)
step(sys);

3) Save the file in work directory.


4) Run the program and enter the respective value for natural frequency,
damping ratio and time
5) The graphs displayed are according to the above values

6) The values of wd, td, theta, tr, ts, Mp can be obtained by


a) Right click on the figure window and select grid to get grids on the curve.
b) Right click on the figure window and select characteristics and
enable peak response, settling time & rise settling
c) Repeat the steps 5,6,7 for different values of x.

Graph:

Tabular Columns :

Time Domain From MATLAB By Calculation


Specifications
Rise Time
Peak Time
Settling Time
Max. Overshoot

1b) Evaluation of the effect of additional poles and zeros on time response of second
order system.
MATLAB program to evaluate the effect of additional poles and zeros on time response of
second order system
For the second order system, if we add a pole it changes to third order.
To study the effect of additional poles,

Location of poles Effect on time response


-R
-1/R
-5R

To study the effect of additional zeros,


Location of zeros Effect on time response
-R
-1/R
-5R
Result:
Experiment No.2
FREQUENCY RESPONSE OF A SECOND ORDER SYSTEM

Aim: To determine frequency response of a second order system and evaluation of


Frequency domain specifications using MATLAB.

Theory:
The frequency response of a system or a component is normally performed by keeping the
amplitude A fixed and determining B and Φ for a suitable range of frequencies where steady
state output may be represented as c(t) = B sin(wt + Φ) The ease and Accuracy of
measurements are some of the advantages of the frequency response method. Without the
knowledge of transfer function, the frequency response of stable open loop system can be
obtained experimentally or the systems with very large time constants, the frequency
response test is cumbersome to perform. We can use the data obtained from measurements
on the physical system without deriving its mathematical model. Nyquist, bode, Nichols etc
are some of the frequency response methods. For difficult cases, such as conditionally stable
systems, Nyquist Plot is probably the only method to analyse stability.

𝑤2
G(s) = 𝑠2 +2𝑔𝑤𝑛 𝑠+𝑤2
𝑛 𝑛

Resonance Frequency ωr = ωn √ (1- 2ζ 2)

Resonance Peak M R = 1/2ζ √ (1- ζ 2)

Bandwidth ώb = ωn √ (1- ζ 2)+ √ (1- ζ 2)+1

Procedure:
Procedure:
1) Open the MATLAB command window.
2) Click on file/new/M file to open the MATLAB editor window. In MATLAB editor
window enter the program
3) Save the program as .M file.
4) Execute the program by selecting run.
5) Obtain the Specifications from the plot.

Theoretical Calculations:

Program:
numerator= [100]
denominator= [1 10 100]
sys=tf(numerator, denominator)
[Mr,wr]= getPeakGain(sys);
wb=bandwidth(sys)
bode(sys)
margin(sys)
grid
Graph:

Observations

Parameter Practical Values Theoretical values


ωr
Mr

ωb
ωgc
ωpc
PM
GM

Result:
Experiment No: 03
Study of P, PI, PD, PID Controller

Objective: Study of P, PI, PD, PID Controller

Apparatus Required
1. PID kit 1 No.
2. Patch Cord 16" 20 No.
3. Mains Cord 1 No.
4. TechBook Power Supply 1 No

Objective: Study of Proportional controller.


Procedure:

1. Connections for Proportional controller are as shown in the figure.


2. After making, all required connection on board which on the power supply and start the
experiment.
3. Ground PV and inputs of summing block which are not in use.
4. Set +1.0V at test point +10V set point output.
5. Apply set point to proportional input.
6. Check the output of proportional block with digital voltmeter given on board.
7. Vary slowly the Kp value, observe the change in the output, and find out the
proportional band that is PB = 100/Kp.
Objective: Study of Proportional + Integrator (PI)

Procedure:
1. Connections for Proportional + Integrator (PI) controller are as shown in the figure.
2. After making, all required connection on board which on the power supply and start the
experiment.
3. Ground PV and inputs of summing block which are not in use.
4. Apply square wave to the set point (SP).
5. Check the output of summer block ∑ of summing block on CRO that will look like as
shown in figure.
6. Vary slowly the KP & KI value and observe the changes in the output.
Objective: Study of Proportional + Derivative (PD)

Procedure:
1. Connections for Proportional + Derivative (PD) controller are as shown in the figure.
2. After making, all required connection on board which on the power supply and start the
experiment.
3. Ground PV and inputs of summing block which are not in use.
4. Apply square wave to the set point (SP).
5. Check the output of summer block ∑ of summing block on CRO that will look like as
shown in figure.
6. Vary slowly the KP & KD value and observe the changes in the output.
Objective: Study of Proportional + Integrator + Derivative (PID)
Procedure:
1. Connections for Proportional + Integrator + Derivative (PID) controller are as shown in
the figure.
2. After making, all required connection on board switch on the power supply and start the
experiment.
3. Ground PV and inputs of summing block which are not in use.
4. Apply square wave to the set point (SP).
5. Check the output of summer block ∑ of summing block on CRO that will look like as
shown in figure.
6. Vary slowly the KP, KI & Kd value and observe the changes in the output.
Objective: Study of Proportional + Integrator + Derivative (PID) in close loop
Procedure:
1. Connections for Proportional + Integrator + Derivative (PID) controller are as shown in
the figure.
2. After making, all required connection on board Switch on the power supply and start
the experiment.
3. Ground inputs of summing block which are not in use.
4. Apply square wave to the set point (SP).
5. Check output of summing block on CRO, you will find that after adjusting Kp, Ki &
Kd output signal will be same as input applied at SP of error detector.

Result:
Experiment No: 04
Study the effect of P, PI, PD and PID controller on the
step response of a feedback control system
Objective: To Implement PID Controller to closed loop second order system with unit
step input.

Apparatus Required:
1. PID kit 1 No.
2. Patch Cord 16" 20 No.
3. Mains Cord 1 No.
4. TechBook Power Supply 1 No
Procedure:
1. The Connections for Proportional + Integrator + Derivative (PID) with second order
system are as shown in the figure.
2. After making, all required connection on board which on the power supply and start the
experiment.
3. Ground inputs of summing block which are not in use.
4. Check the transient response of IInd order system output on Digital storage oscilloscope,
you will observe the response. You can easily observe the effect of PID by adjusting Kp,
Ki & Kd knobs.

Note: Repeat the same experiment in Simulation for P, PI, PD, PID implementation.
Effect of each controller on the closed loop response are summarized below:
CL Response Rise time Overshoot Settling time Steady state
error
KP=
KP= KI=
KP= KD=
KP= KI= KD=
KP= KI= KD=
(Ziegler–Nichols)

Result:
Experiment No:05
a) Evaluation of effect of pole location on stability
b) Effect of loop gain of a negative feedback system on stability

AIM: Evaluation of effect of pole location and loop gain of a negative feedback system on
stability
Apparatus: PC loaded with MATLAB
Procedure:
1. Open MATLAB
2. Create new script
3. Enter code run the program and obtain the required details
4. Observe the plots and note the values
5. Save and compare the observations
Theoretical Calculation:
Program:
Result:
Experiment No.06
a) Effect of open loop and zeroes on root locus contour
b) To estimate the effect of open loop gain on the transient response of closed loop
system by using Root locus
c) Comparative study of Bode, Nyquist and Root locus with respect to Stability

AIM: To Find the Effect of open loop and zeroes on root locus contour
Apparatus: PC loaded with MATLAB

Theory:
Root locus technique is used to find the roots of the characteristic’s equation. This
technique provides a graphical method of plotting the locus of the roots in the s plane as a
given parameter usually gain is varied over the complete range of values. This method
brings in to focus the complete dynamic response of the system. By using root locus
method, the designer can predict the effects location of closed loop poles by varying the
gain value or adding open loop poles and/or open loop zeroes. The closed loop poles are
the roots of the characteristic equation.

Various terms related to root locus technique that we will use frequently in this article.

1. Symmetry of Root Locus: Root locus is symmetric about the x axis or the real axis.
2. Characteristic Equation Related to Root Locus Technique: 1 + G(s)H(s) = 0 is known as
characteristic equation. Now on differentiating the characteristic equation and on
equating dk/ds equals to zero, we can get break away points.
3. Break away Points: Suppose two root loci which start from pole and moves in opposite
direction collide with each other such that after collision they start moving in different
directions in the symmetrical way. Or the breakaway points at which multiple roots of
the characteristic equation 1 + G(s)H(s)= 0 occur. The value of K is maximum at the
points where the branches of root loci break away. Break away points may be real,
imaginary or complex.
4. Break in Point: Condition of break in to be there on the plot is written below: Root locus
must be present between two adjacent zeros on the real axis.
5. Centre of Gravity: It is also known centroid and is defined as the point on the plot from
where all the asymptotes start. Mathematically, it is calculated by the difference of
summation of poles and zeros in the transfer function when divided by the difference of
total number of poles and total number of zeros. Centre of gravity is always real & it is
denoted by σA. Where N is number of poles & M is number of zeros.

6. Asymptotes of Root Loci: Asymptote originates from the centre of gravity or centroid and
goes to infinity at definite some angle. Asymptotes provide direction to the root locus
when they depart break away points.
7. Angle of Asymptotes: Asymptotes makes some angle with the real axis and this angle
can be calculated from the given formula,
Where p = 0, 1, 2 (N-M-1)
8. Angle of Arrival or Departure: We calculate angle of departure when there exists
complex poles in the system. Angle of departure can be calculated as 180- {(sum of
angles to a complex pole from the other poles)- (sum of angle to a complex pole from
the zeros)}.
9. Intersection of Root Locus with the Imaginary Axis: In order to find out the point of
intersection root locus with imaginary axis, we have to use Routh Hurwitz criterion. First,
we find the auxiliary equation then the corresponding value of K will give the value of
the point of intersection.

Procedure:

1.open the MATLAB and create a new file and open it


2.Run the code by entering it and by entering root locus
3.Repeat it by adding poles and zeroes
4.Observe the effect of pols and zeroes on root locus contour
𝟑𝟔
Transfer fuction: 𝟑 𝟐
𝐬 +𝟔𝐬 +𝟏𝟏𝐬+𝟔

Theoretical Calculation:

Program:
Experiment No: 6(B)
To estimate the effect of open loop gain on the transient response of closed loop
system by using Root locus.

AIM: To estimate the effect of open loop gain on the transient response of closed loop
system by using Root locus
Apparatus: PC loaded with MATLAB
Procedure:
1. Open MATLAB Command window
2. Click on new script file and enter the code
3. Obtain root locus plots for different values of K and compare them
4. Observe how the open loop gain effects the transient response of the closed loop
system
5. Save the waveforms and exit the MATLAB window
Experiment No: 6(C)

Comparative study of Bode, Nyquist and Root locus with respect to Stability

AIM: Comparative study of Bode, Nyquist and Root locus with respect to Stability

Theory:
One of the most useful representation of transfer function is a logarithmic plot which
consists of two graphs, one giving the logarithm of [G (jw)] and the other phase angle of
G(jw) both plotted against frequency in logarithmic scale. These plots are called bode
plots. The main advantage of using bode diagram is that the multiplication of magnitudes
can be converted into addition. Bode plots are a good alternative to the Nyquist plots.

Frequency response specifications:

1.Gain cross over frequency wgc = It is the frequency at which magnitude of G (jw) H (jw)
is unity i.e. 1.
2.Phase cross over frequency wpc = It is the frequency at which phase angle of G(jw) H(jw)
is - 180o
3.Gain margin G.M = It is defined as the margin in gain allowable by which gain can be
increased till system reaches on the verge of instability. Mathematically it is defined as the
reciprocal of the magnitude of the G(jw) H(jw) measured at phase cross over frequency.
4.Phase margin P.M = Amount of additional phase lag which can be introduced in the system
till system reaches on the verge of instability. Mathematically it can be defined as
P.M = 180o + ∟G(jw)H(jw) at w=wgc

Theoretical Calculation:

Procedure:

1. Open MATLAB command window and open new script file


2. Enter the code for different transfer functions to plot bode plot.
3. Tabulate the observations gain margins, phase margin, and different observations for
different plots.
4. Compare the stability between the different tables and exit from MATLAB

𝟏𝟎
1. Transfer fuction: 𝐬(𝟏+𝟎.𝟒𝐬)(𝟏+𝟎.𝟏𝐬)

𝟑𝟔
2. Transfer fuction: 𝐬𝟑+𝟔𝐬𝟐+𝟏𝟏𝐬+𝟔
Experiment No.07
Design and study of lag, lead and Lag-lead compensator networks

AIM: To Design and study of lag, lead and Lag-lead compensator networks.
Apparatus: PC with MATLAB software.
Theory:

Procedure:
1. Consider uncompensated system G(s).
2. Design the lead, lag and lag-lead compensators for given specifications.
3. Plot the time response and frequency responses for compensated and
uncompensated systems.
4. Compare the theoretical values with practical values.
Design of Lead Compensator:
Design a lead compensator for a unity feedback system with an open-loop transfer
function
𝑲
G(s) = 𝒔(𝒔+𝟏)
For the specifications of Kv = 10 s-1 and φ = 35º
Design of Lag Compensator:
Compensate the system with the open – loop transfer function
𝑲
G(s) = 𝒔(𝒔+𝟏)(𝒔+𝟓)
To meet the following specifications:
• Damping Ratio g = 0.3
• Settling time ts = 12s
• Velocity error constant Kv ≥ 8 s-1
Design of Lag – Lead Compensator:
The open – loop transfer function of a unity feedback control system is a given by
𝑲
G(s) = 𝒔(𝟏+𝟎.𝟓𝒔)(𝟏+𝟎.𝟏𝒔)
Compensate the system to meet the following specifications:
• Velocity error constant K ≥ 25 s -1
v
• Phase Margin φ ≥ 60 º
s
• Band width w = 10 rad/s
b
Result:
Experiment No - 08
Position Control
Objective: To observe the position control system for different values of the forwardgain at
different values of angular position commands.
Equipments needed:
1. Scientech 2453 DC Position Control
2. Additional unit Motor Cabinet for Scientech 2453.
3. DIN Cable.
Procedure:
1. Connect the Motor Cabinet to the Scientech 2453 DC Position Control throughDIN cable at
the connector provided in the motor block on the board.
2. Connect the power supply to Scientech 2453 DC Position Control.
3. Switch “On” the supply.
4. Set Toggle switch to upwards i.e. to Reference input.
5. Set the angular positioning command through the pointer as shown on the boardthat will be
the reference angle for the DC motor.
6. Observe the voltage value at the reference input before Error block.
7. Now set the forward gain through the knob provided in the controller block on theboard at
maximum position.
8. Observe the response at different values of angular command and feedback in thefeedback
block on the board.

NOTE: Error in command and output calibrated dial of + 5 degree is permissible.

Observations:

S.No Reference Actual Angular position +


Angular position Correction Factor
1. 30 25+5
2. 60 55+5
3. 90 85+5
4. 150 145+5
5. 180 175+5
6. 210 205+5
7. 240 235+5
8. 270 265+5
9. 300 295+5
10. 330 325+5
11. 350 345+5

Result:
Experiment No - 09
DC Motor Speed Control

Experiment No – 09(A)
Objective: Study of effect of loading on the speed of the Motor in the open loop(Eddy Current
Brake)
Equipments Required:
1. Scientech 2457 Techbook
2. Techbook power supply
3. Mains cord
4. Additional unit Motor Cabinet for Scientech 2457.
5. Digital Storage oscilloscope (DSO)
6. DIN Connector Cable.

Procedure:
• Connect the Motor Cabinet to the Scientech 2457 DC Motor Speed Controlthrough DIN
Connector cable.
• Turn the square wave toggle switch in “OFF” position.
• Turn the Feedback toggle switch in “Open” position.
• Connect the Techbook power supply to the Scientech 2457. Touch over thepower LED to
turn ON the power.
• Connect a Digital Storage oscilloscope (DSO) between the test point “Pulse”and GND.
• Rotate the “Variable Reference” pot at the maximum position and observe the waveform at the
“Pulse” test point on the Digital Storage oscilloscope (DSO). The waveform is as shown in the
figure.

• Rotate the knob on the Motor cabinet and bring the magnet closer to the rotatingwheel of the DC
Motor.
• Observe the waveform on the Digital Storage oscilloscope (DSO). The frequency at the “Pulse”
test point will start to decrease and the speed of the Motor will also start to reduce.
• This Phenomenon is known as Eddy Current Brake.

Experiment 9(B)
Objective: Effect of loading on the speed of the Motor in the closed loop

Procedure:
• Connect the Motor Cabinet to the Scientech 2457 DC Motor Speed Control through
DIN Connector cable.
• Turn the square wave toggle switch in OFF position.
• Turn the Feedback toggle switch in Close position.
• Connect the Techbook power supply to the Scientech 2457. Touch over thepower
LED to turn ON the power.
• Connect a Digital Storage oscilloscope (DSO) between the point VMotor andGND.
• Rotate the “Variable Reference” pot at some middle position so that the waveform viewed
in the Digital Storage oscilloscope (DSO) is as shown in figure.
• Rotate the knob on the Motor cabinet and bring the magnet closer to the rotatingwheel of the
DC Motor.

• The speed of the DC Motor gets reduced when the magnet is brought near the wheel. This is
due to the eddy current effect.

• Observe the waveform on the Digital Storage oscilloscope (DSO). As the magnet is brought
near the wheel, the duty cycle of the pulse increases indicating that the controller is trying to
maintain the speed of the Motor that is reduced by the eddy current effect. Repeat the above
procedure for different “Variable Reference” input.
Experiment 9(C)
Objective: Study the speed control of a DC Motor.

Procedure:
• Connect the Motor Cabinet to the Scientech 2457 DC Motor Speed Controlthrough DIN
Connector cable.
• Turn the square wave toggle switch in OFF position.
• Turn the Feedback toggle switch in Close position.
• Connect the Techbook power supply to the Scientech 2457. Touch over thepower LED
to turn ON the power.
• Connect a Digital Storage oscilloscope (DSO) between the point VMotor andGND.
• Now vary the “Variable Reference” potentiometer and observe the speedvariation of the
Motor.
• A pulse appears on the Digital Storage oscilloscope (DSO) whose duty cyclevaries as the
variable reference pot is moved.
• When the pot is at maximum position, the pulse is as shown in figure below. Atthis position
the Motor is at its maximum speed.

• Now rotate the pot towards minimum position. The duty cycle of the pulse will also decrease.
This is as shown by the figure.
• When the pot is almost at the minimum, the speed of the Motor is too low andthe signal on
Digital Storage oscilloscope (DSO) is as shown in Fig.

• Beyond this point the Motor will stop and there will be no signal to drive the Motor.

S.No Voltage Reading in Volts Speed in RPM


0.62 382
1.
0.85 735
2.
1.25 1290
3.
1.56 1690
4.
1.88 2012
5.
2.43 2430
6.

Result:
Experiment No – 10(A)
Block diagram reduction technique using MATLAB

Aim: simulation of multi feedback system

SOFTWARE REQUIRED: MATLAB – Personal Computer with MATLAB

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

The series command is implemented as shown below

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

The MATLAB command for implementing a parallel configuration is “parallel” as shown below:
Block diagram:

Program:

Theoretical calculations:
Compare the theoretical calculations for the above block diagram with MATLAB
All the transfer functions are given in the program.
Theoretical Calculations MATLAB
Block Diagram T.F= T.F=

Result:
Experiment No – 10(B)

STATE MODEL FOR CLASSICAL TRANSFER FUNCTION &


VICE VERSA USING MATLAB

AIM: To find state model for classical transfer function and transfer from state model using
MATLAB

PROCEDURE:
1. Write the programme in MATLAB text editor using mat lab instructions for state model
of classical transfer function and for tranfer function from state model.
2. Run the programs.
3. Note down the outputs.

PROGRAM 1:
𝟎 𝟐 𝟎
𝑨=[ ] B=[ ] C= [𝟏 𝟎]
𝟏 −𝟏 𝟏
a=input (‘Enter the values of a matrix’);
b=input(‘Enter the values of b matrix’);
c=input(‘Enter the values of c matrix’);
d=input(‘Enter the values of d matrix’);
[num,den]=SS2 tf (a,b,c,d,1)
Transfer function=tf (num,den);

PROGRAM 2:
𝟐
𝑻. 𝑭 =
(𝐬 − 𝟏)(𝐬 + 𝟐)

num = input(‘Entre numerator polynomial values in the form of matrix array’);


den1=input(‘Enter denominator 1 values’);
den2=input(‘enter denominator 2 values’);
den=conv(den1,den2);
H=tf(num,den);
P=SS(H);
[a,b,c,d]=SS data(P);
PROGRAM3: Controllability and Observability

% State Space Representation


% x' = Ax + Bu
% y = Cx + Du
% Check Controllability and Observability of a 3rd order System
% Given -------------------------------------------------------------------
MatrixA = [-3 -1 0;2 0 0;0 -1 -1];
MatrixB = [1;0;1];
MatrixC = [1 0 1];
MatrixD = 0;
% Objective ---------------------------------------------------------------
% 1) To Find Controllable Matrix Qc, its rank and check controllability
% 2) To Find Observable Matrix Qb, its rank and check observability
% Controllable Matrix -----------------------------------------------------
Qc = ctrb(MatrixA,MatrixB);
rankQc = rank(Qc);
disp('Controllable Matrix is Qc = ');
disp(Qc);
if(rankQc == rank(MatrixA))
disp('Given System is Controllable.');
else
disp('Given System is Uncontrollable');
end
% Observable Matrix -------------------------------------------------------
Qb = obsv(MatrixA, MatrixC);
rankQb = rank(Qb);
disp('Observable Matrix is Qb = ');
disp(Qb);
if(rankQb == rank(MatrixA))
disp('Given System is Observable.');
else
disp('Given System is Unobservable');
end
% End of Program ----------------------------------------------------------

Observations:

Compare the Theoretical calculations with MATLAB.


Theoretical Calculations MATLAB
Program 1 T.F= T.F=
Program 2 A= B= C= D= A= B= C= D=
Program 3 Controllability matrix = Controllability matrix =
Observable Matrix= Observable Matrix=

RESULT:

You might also like