You are on page 1of 16

EXPT.NO:1 DATE:09.07.

2012 AIM:

INTRODUCTION TO MATLAB & RUNNING PROGAMS IN MATLAB

To execute simple programs in Matlab.

1A)MATRIX OPERATION
Check the matrix operation addition, subtraction, division and multiplication and also find the inverse, transpose, rank and eigen values of given matrices , A=[2 4 6; 7 10 3; 10 13 1], B=[5 6 2; 3 5 2; 2 1 3].

PROGRAM:

OUTPUT:

1B)QUADRATIC EQUATION
Write a program to solve the roots of quadratic equation using MATLAB X2+5x+6=0 5x2+6x+3=0 8x2+7x+4=0

PROGRAM:

OUTPUT:

1C)MESH EQUATION

Use MATLAB to solve simultaneous equation of three mesh current equation and also calculate power 11i1-5i2+0.1i3=45 -5i1+10i2-2i3=1 0.1i1-2i2-13i3=43

PROGRAM:

OUTPUT:

1D)POLE ZERO PLOT

Obtain the pole, zero, gain & pole-zero plot of the following transfer function G(s)=4s2+36s+35/s4+16s3+13s2+40s+24

PROGRAM:

OUTPUT:

GRAPH:

RESULT:
Thus the simple programs hve been done by using MATLAB programming and the outputs have been verified.

EXPT.NO:2A

DATE:16.07. 2012 AIM:

BODE PLOT

To write a program for plotting a bode plot for the following transfer function and obtain gain margin, phase margin, gain cross over frequency and phase cross over frequency G(s)=20/s(1+3s)(1+4s)

PROGRAM:

OUTPUT:

GRAPH:

RESULT:
Thus the bode plot for the given transfer function and the required gain cross over frequency and phase margin have been obtained by using MATLAB programming.

EXPT.NO:2B DATE:16.07. 2012 ROOT LOCUS

AIM:
To write a program to sketch root locus of the system whose transfer function is G(s)=k/s(s+2)(s+4). Describe the value of k to that damping ratio is 0.5.

PROGRAM:

OUTPUT:

GRAPH:

RESULT:
Thus the root locus of has been designed by was executed in MATLAB .

EXPT.NO:3A DATE:23.07.2012

DESIGN OF LAG COMPENSATOR VIA BODE PLOT IN MATLAB

AIM:
To design a lag compensator via Bode plot using MATLAB for the given system with open loop transfer function G(s) =K/ (s(s+4)(s+80) it is desired to have a.) Phase margin to be atleast 33 b) Kv = 30 sec-.l

PROCEDURE:
1. The open loop gain K is calculated to meet the Steady state error specifications. 2. The Bode plot of uncompensated system is drawn. 3. The phase margin of uncompensated system is found from the plot. If it does not satisfy the specifications. Then lag compensator is required 4. The phase margin of compensated system is chosen as n == d + ; where =additional phase lag to compensate for shift.in gain cross over frequency. d =desired phase margin.
5. The

new gain cross over frequency wgcn is found corresponding to the phase Margin n. 6. The parameter of the compensator is determined. It is given by the magnitude of G(jw) at new cross over frequency. Agcn= 20log10 =10*Agcn/20 . .
7.

The zero of -l/T the compensator Zc= wgcn/10. The pole -l/ T is calculated. 8. The transfer function of compensated system is given by G(S) = (s+1/T)/(s+1/( t)) 9. The open loop transfer function of the system is determined by G0(s)=Gc(s)*G(s)/
10.

The

phase

margin

of

compensated

system

is

calculated.. If it satisfies the requirement then the design is accepted otherwise the design is repeated by choosing a new value of .

PROGRAM:

OUTPUT: GRAPH:

RESULT:
Thus the lag compensator has been designed by using bode plot techniques and designed program was executed by MATL

EXPT.NO:3B

DESIGN OF LEAD COMPENSATOR VIA BODE

DATE:30.07. 2012 AIM :

PLOT IN MATLAB

To design a lead compensator with Bode plot using Matlab for the given system with open loop transfer system G(s) = K/ s(s+1)(s+5) To satisfy the constant Kv>= 50 following specifications (b) Phase margin >=20 (a) Velocity error

PROCEDURE:
1. The open loop gain of uncompensated system is determined to meet the requirement of the error constant. 2. The Bode plot is drawn for the uncompensated system. 3. The phase margin of the uncompensated system is determined from the Bode plot. 4. The amount of angle to be contributed by the lead network is calculated using the formula n == d u + . d : Desired phase margin. u : Phase margin of uncompensated system . : Additional phase lead to compensate for shift in gain cross over frequency.
5. The transfer function at the compensator is determined.

If m is more than 60 then the compensator is /2=(1-sin m)/(1+sin m) 6. From the Bode plot the frequency at which the magnitude of G(jw) is -20 log (1/ ) is determined. The zero of the compensator zc = wm . 7. The transfer function of compensator Gc(s) = [s+1/T]/ [s+1/T]. 8. The open loop transfer function of compensated system is given as G0(s) = 1/( Gc(s)*G(s)).

9.

The phase margin of the compensated system is determined. If it satisfies the requirement, then the design is accepted. Otherwise the design procedure is repeated by choosing a new value for .

PROGRAM:

OUTPUT:

GRAPH:

RESULT:
Thus the lead compensator has been designed by using bode plot techniques and designed program was executed by MATLAB.

You might also like