0% found this document useful (0 votes)
85 views3 pages

Lag Compensator Date:: EX - NO

The document describes designing a lag compensator for a closed loop system using MATLAB. It provides the theory behind manipulating transfer functions, state space, and ZPK models. The procedure involves writing a MATLAB program to enter values for the uncompensated system, gain, phase margin, and safety margin. The program designs the compensator by placing poles in a Butterworth configuration. The closed loop pole locations are verified, showing the lag compensator is successfully designed.

Uploaded by

Raja Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views3 pages

Lag Compensator Date:: EX - NO

The document describes designing a lag compensator for a closed loop system using MATLAB. It provides the theory behind manipulating transfer functions, state space, and ZPK models. The procedure involves writing a MATLAB program to enter values for the uncompensated system, gain, phase margin, and safety margin. The program designs the compensator by placing poles in a Butterworth configuration. The closed loop pole locations are verified, showing the lag compensator is successfully designed.

Uploaded by

Raja Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

EX.

NO: LAG COMPENSATOR


DATE:

AIM:
To design a lag compensator for a closed loop system using MATLAB.

APPARATUS:
Software: MATLAB

THEORY:
We can manipulate TF, SS, and ZPK models using the arithmetic and model
interconnection
operations described in Operations on LTI Models and analyze them using the model analysis
functions, such as bode and step. FRD models can be manipulated and analyzed in much the
same way you analyze the other model types, but analysis is restricted to frequency-domain
methods.

Using a variety of design techniques, you can design compensators for systems specified
with TF, ZPK, SS, and FRD models. These techniques include root locus analysis, pole
placement, LQG optimal control, and frequency domain loop-shaping. For FRD models, you can
either: Obtain an identified TF, SS, or ZPK model using system identification techniques. Use
frequency-domain analysis techniques.

Other Uses of FRD Models:


FRD models are unique model types available in the Control System Toolbox collection
of LTI model types, in that they don't have a parametric representation. In addition to the
standard operations you may perform on FRD models, you can also use them to: Perform
frequency domain analysis on systems with nonlinearities using describing functions. Validate
identified models against experimental frequency response data.

PROCEDURE:
Write the program in MATLAB editor and save it
Enter the values of numerator and denominator of the uncompensated system given when
asked during execution
Also enter the values of kv, phase margin and margin of safety
bode (g) returns the bode plot of gain adjusted but uncompensated system
MATLAB PROGRAM:

clc;
clear all;
close all;
%% Set up an SS model
A = [0 1
4 -2];
B = [0
1];
C = [1 1];
D = 0;
%% Convert to transfer function
[num,den] = ss2tf(A,B,C,D,1);
sys_tf= tf(num,den)
zpk(sys_tf)
pzmap(sys_tf)
hold
%% Test controllability and observability
CtrlTEstMatrix= ctrb(A,B)
rank(obsrbTestMatrix)
obsrbTestMatrix= obsv(A,C)
rank(obsrbTestMatrix)
%% Place the poles to Butterworth configuration
p = roots([ sqrt(2) 1])
% K = acker(AA,B,p) % this method is not numerically
% reliable and starts to break down rapidly for problems of
% order grater than 5
K = place(A,B,p)
% check the closed-loop pole locations
eig(A-B*K)
pzmap(1,poly(eig(A-B*K)));
OUTPUT

RESULT:

Thus the LAG compensator for a closed system is designed successfully and their output is
verified using MATLAB.

You might also like