Sei sulla pagina 1di 9

UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA

FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING


COMPUTER ENGINEERING DEPARTMENT

LAB MANUAL 01 Introduct on to Contro! En" n##r n" Co$$%nd&

Contro! En" n##r n"

L%' In&tructor( En"r) Ro$%n%

UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA


FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
COMPUTER ENGINEERING DEPARTMENT

Control System:
A control system is an interconnection of components forming a system configuration that will provide a desired system response. Hence, a control system is an arrangement of physical components connected or related in such a manner as to command, regulate, direct, or govern itself or another system. A control system provides an output or response for a given input or stimulus.

LT model structures:
There are three !asic forms to descri!e linear time"invariant #LT $ systems in %ATLA&

Transfer function form:

'ero"pole"gain form:

State space model form:

1$Transfer (unction:
H=tf(num,den) H*+,-./0,/11, 120,23

)$"*+S ,-+ .artial"fraction e/pansion:"


/R,4,50 * RESIDUE.B,A3 finds the residues, poles and direct term of a partial fraction e/pansion of the ratio of two polynomials &#s$0A#s$. f there are no multiple roots, &#s$ *#1$ *#)$ *#n$ """" 1 """""""" 2 """""""" 2 ... 2 """""""" 2 3#s$ A#s$ s " .#1$ s " .#)$ s " .#n$ 4ectors & and A specify the coefficients of the numerator and denominator polynomials in descending powers of s. The residues are returned in the column vector *, the pole locations in column vector ., and the direct terms in row vector 3.

Contro! En" n##r n"

L%' In&tructor( En"r) Ro$%n%

UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA


FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
COMPUTER ENGINEERING DEPARTMENT

5$"T()'. Transfer function to 6ero"pole conversion.:"


/6,4,50 * TF264.NUM,DEN3 finds the 6eros, poles, and gains from a S %7 transfer function in polynomial form: 8-%#s$ H#s$ 1 """""""" ,+8#s$ 4ector ,+8 specifies the coefficients of the denominator in descending powers of s. The 6ero locations are returned in the columns of matri/ ', with as many columns as there are rows in 8-%. The pole locations are returned in column vector ., and the gains for each numerator transfer function in vector 3.

9$"S+* +S Series interconnection of the two LT models.

SYS * SERIES.SYS1,SYS2,OUT4UTS1,IN4UTS23 connects two LT models S:S1 and S:S) in series such that the outputs of S:S1 specified !y 7-T.-TS1 are connected to the inputs of S:S) specified !y 8.-TS).

;$".A*ALL+L .arallel interconnection of two LT models.

<num,den=1parallel#num1,den1,num),den)$ this function gives parallel connection of two LT models. The arguments for the function are num1,num) and den1,den) that are the numerators and denominators of the two function this function returns the num and den as the output. Contro! En" n##r n" L%' In&tructor( En"r) Ro$%n% 5

UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA


FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
COMPUTER ENGINEERING DEPARTMENT

>$"(++,&AC3 (eed!ac? connection of two LT models.:"

S:S 1 (++,&AC3#S:S1,S:S)$ computes an LT model S:S for the closed"loop feed!ac? system To apply positive feed!ac?, use the synta/ S:S 1 (++,&AC3#S:S1,S:S),21$.

@$"T()SS Transfer function to state"space conversion:"


/A,B,C,D0 * TF2SS.NUM,DEN3 calculates the state"space representation: / 1 A/ 2 &u y 1 C/ 2 ,u of the system: 8-%#s$ H#s$ 1 """""""" ,+8#s$ .

from a single input. 4ector ,+8 must contain the coefficients of the denominator in descending powers of s. %atri/ 8-% must contain the numerator coefficients . The A,&,C,, matrices are returned in controller canonical form. This calculation also wor?s for discrete systems.

.rogram A 1 :"
disp#B-et Ta/ila B$ disp#BCreated !y //// B$ disp#B *egA C$

Contro! En" n##r n"

L%' In&tructor( En"r) Ro$%n%

UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA


FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
COMPUTER ENGINEERING DEPARTMENT

num1<) ; 5 >= den1<1 > 11 >= <r,p,?=1residue#num,den$ <num,den=1residue#r,p,?$ printsys#num,den,BSB$ Out,ut (1

.rogram A ):
m 1 )D ! 1 ;D ? 1 5D num 1 < 1 =D den 1 < m ! ? =D tutorialEtf 1 tf#num, den$

7utput: .rogram A 5 :"


num1<) ; 5 >= den1<1 > 11 >= <6,p,?=1tf)6p#num,den$ disp#B'eros of the function is 1 B$ disp#6$ disp#B.oles of the function is 1 B$

Contro! En" n##r n"

L%' In&tructor( En"r) Ro$%n%

UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA


FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
COMPUTER ENGINEERING DEPARTMENT

disp#p$ disp#BFain of the function is 1 B$ disp#?$

7utput:"

.rogram A9:"
num11<1G= den11<1 ) 1G= num)1<;= den)1<1 ;= <num,den=1series#num1,den1,num),den)$ printsys#num,den,BSB$

7utput

.rogram A ; :"
num11<1G= Contro! En" n##r n" L%' In&tructor( En"r) Ro$%n% >

UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA


FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
COMPUTER ENGINEERING DEPARTMENT

den11<1 ) 1G= num)1<;= den)1<1 ;= <num,den=1parallel#num1,den1,num),den)$ printsys#num,den,BSB$

7utput:"

.rogram A > :"


num11<1G )G 5G 91 @H = den11<1 ) 1G 9@ ;H 91= num)1<; 9@ 1 ) HI = den)1<1 ; 91= <num,den=1feed!ac?#num1,den1,num),den)$ printsys#num,den,BSB$

7utput:"

.rogram A @ :"
num1<) 1 1 )= den1<1 9 H )= <a,!,c,d=1tf)ss#num,den$ printsys#num,den,BSB$

7utput:"
Contro! En" n##r n" L%' In&tructor( En"r) Ro$%n% @

UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA


FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
COMPUTER ENGINEERING DEPARTMENT

.rogramAH:
A=[-3, -1; 2, 0]; B=[1; 0]; C=[0, 1]; D=0; HSS=ss(A,B,C,D) St#, r#&,on&# u& n" t7# tr%n&8#r 8unct on( 7nce the transfer function is entered into %ATLA& it is easy to calculate the response to a step input. To calculate the response to a unit step input, use step(transferfunction) where transferfunction is the name of the transfer function of the system. (or steps with magnitude other than one, calculate the step response using: step(u * transferfunction) where u is the magnitude of the step and transfer function is the name of the transfer function of the system. I$,u!&# r#&,on&# u& n" t7# tr%n&8#r 8unct on: %ATLA& can also plot the impulse response of a transfer function. &ecause the transfer function is in the form of output over input, the transfer function must !e multiplied !y the magnitude of the impulse. The synta/ for plotting the impulse response is: impulse(u * transferfunction) where u is the magnitude of the impulse and transfer function is the name of the transfer function of the system. Bod# ,!ot u& n" t7# tr%n&8#r 8unct on(

Contro! En" n##r n"

L%' In&tructor( En"r) Ro$%n%

UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA


FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
COMPUTER ENGINEERING DEPARTMENT

%ATLA&Js !ode command plots the freKuency response of a system as a !ode plot. The synta/ for the !ode plot function in %ATLA& is: !ode#transfer function$ where transfer function is the name of the transfer function system. LAB TAS5( (ind the unit step response and the step response when u 1 9 of tutorialEtf using %ATLA& (ind the impulse response of tutorialEtf with an input of u 1 ) using %ATLA& (ind !ode plot of the freKuency response of the system tutorialEtf using %ATLA& (ind A, &, C, and ,, the state space vectors of tutorialEtf using %ATLA&: ,raw the following model in simulin? and chec? the result.

Contro! En" n##r n"

L%' In&tructor( En"r) Ro$%n%

Potrebbero piacerti anche