You are on page 1of 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%

1

direct.den) H*+.. Hence.. &#s\$ *#1\$ *#)\$ *#n\$ """" 1 """""""" 2 """""""" 2 .-+ ./0.4. and the direct terms in row vector 3. 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.B.23 )\$"*+S .A3 finds the residues. 120. poles and direct term of a partial fraction e/pansion of the ratio of two polynomials &#s\$0A#s\$./11. the pole locations in column vector . Contro! En" n##r n" L%' In&tructor( En"r) Ro\$%n% ) . 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. A control system provides an output or response for a given input or stimulus.#1\$ s " . f there are no multiple roots. regulate.#n\$ 4ectors & and A specify the coefficients of the numerator and denominator polynomials in descending powers of s.artial"fraction e/pansion:" /R.50 * RESIDUE.-. 2 """""""" 2 3#s\$ A#s\$ s " .UNIVERSITY OF ENGINEERING AND TECHNOLOGY. a control system is an arrangement of physical components connected or related in such a manner as to command.. or govern itself or another system. The residues are returned in the column vector *.#)\$ s " .

+8#s\$ 4ector ..-TS).num) and den1. 9\$"S+* +S Series interconnection of the two LT models.NUM.num). and the gains for each numerator transfer function in vector 3. .arallel interconnection of two LT models.den=1parallel#num1.A*ALL+L .den) that are the numerators and denominators of the two function this function returns the num and den as the output. The 6ero locations are returned in the columns of matri/ '.DEN3 finds the 6eros.SYS2. Contro! En" n##r n" L%' In&tructor( En"r) Ro\$%n% 5 .den)\$ this function gives parallel connection of two LT models.\$".den1.4. and gains from a S %7 transfer function in polynomial form: 8-%#s\$ H#s\$ 1 """""""" . Transfer function to 6ero"pole conversion.IN4UTS23 connects two LT models S:S1 and S:S) in series such that the outputs of S:S1 specified !y 7-T.UNIVERSITY OF ENGINEERING AND TECHNOLOGY. TAXILA FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING COMPUTER ENGINEERING DEPARTMENT 5\$"T()'.OUT4UTS1. The arguments for the function are num1. poles. The pole locations are returned in column vector .-TS1 are connected to the inputs of S:S) specified !y 8. SYS * SERIES. <num. with as many columns as there are rows in 8-%.:" /6.SYS1.50 * TF264.+8 specifies the coefficients of the denominator in descending powers of s.

D0 * TF2SS. use the synta/ S:S 1 (++.21\$.B.+8 must contain the coefficients of the denominator in descending powers of s. This calculation also wor?s for discrete systems.+8#s\$ . @\$"T()SS Transfer function to state"space conversion:" /A. from a single input.&. %atri/ 8-% must contain the numerator coefficients .C.u of the system: 8-%#s\$ H#s\$ 1 """""""" .&AC3#S:S1. TAXILA FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING COMPUTER ENGINEERING DEPARTMENT >\$"(++.&AC3 (eed!ac? connection of two LT models. . The A. matrices are returned in controller canonical form.S:S).&AC3#S:S1..C.UNIVERSITY OF ENGINEERING AND TECHNOLOGY.NUM.S:S)\$ computes an LT model S:S for the closed"loop feed!ac? system To apply positive feed!ac?.:" S:S 1 (++. 4ector .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% 9 .DEN3 calculates the state"space representation: / 1 A/ 2 &u y 1 C/ 2 .

p.p. 5 >= den1<1 > 11 >= <r.oles of the function is 1 B\$ Contro! En" n##r n" L%' In&tructor( En"r) Ro\$%n% .p.BSB\$ Out.den\$ disp#B'eros of the function is 1 B\$ disp#6\$ disp#B.ut (1 .?=1tf)6p#num.den\$ <num. 5 >= den1<1 > 11 >= <6. TAXILA FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING COMPUTER ENGINEERING DEPARTMENT num1<) .D ? 1 5D num 1 < 1 =D den 1 < m ! ? =D tutorialEtf 1 tf#num.den. .den=1residue#r.UNIVERSITY OF ENGINEERING AND TECHNOLOGY.?\$ printsys#num.rogram A 5 :" num1<) .rogram A ): m 1 )D ! 1 .?=1residue#num. den\$ 7utput: .

:" num11<1G= Contro! En" n##r n" L%' In&tructor( En"r) Ro\$%n% > .= den)1<1 . TAXILA FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING COMPUTER ENGINEERING DEPARTMENT disp#p\$ disp#BFain of the function is 1 B\$ disp#?\$ 7utput:" .den1.rogram A9:" num11<1G= den11<1 ) 1G= num)1<.den)\$ printsys#num.BSB\$ 7utput .UNIVERSITY OF ENGINEERING AND TECHNOLOGY.rogram A .= <num.num).den.den=1series#num1.

num).den1.rogram A @ :" num1<) 1 1 )= den1<1 9 H )= <a.= <num.den\$ printsys#num.den=1parallel#num1.!.den.den=1feed!ac?#num1.H 91= num)1<.BSB\$ 7utput:" .UNIVERSITY OF ENGINEERING AND TECHNOLOGY. 91= <num.BSB\$ 7utput:" .den.den1.= den)1<1 .den.c.num).BSB\$ 7utput:" Contro! En" n##r n" L%' In&tructor( En"r) Ro\$%n% @ . 9@ 1 ) HI = den)1<1 . TAXILA FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING COMPUTER ENGINEERING DEPARTMENT den11<1 ) 1G= num)1<.den)\$ printsys#num.rogram A > :" num11<1G )G 5G 91 @H = den11<1 ) 1G 9@ .den)\$ printsys#num.d=1tf)ss#num.

B. HSS=ss(A. TAXILA FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING COMPUTER ENGINEERING DEPARTMENT .rogramAH: A=[-3.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. B=[1.!ot u& n" t7# tr%n&8#r 8unct on( Contro! En" n##r n" L%' In&tructor( En"r) Ro\$%n% H . 1].u!&# r#&.D) St#. the transfer function must !e multiplied !y the magnitude of the impulse. 0]. I\$. C=[0.on&# u& n" t7# tr%n&8#r 8unct on: %ATLA& can also plot the impulse response of a transfer function. 2.C. -1. (or steps with magnitude other than one.UNIVERSITY OF ENGINEERING AND TECHNOLOGY. 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. D=0. Bod# . r#&. 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. &ecause the transfer function is in the form of output over input. 0]. use step(transferfunction) where transferfunction is the name of the transfer function of the system.

&.UNIVERSITY OF ENGINEERING AND TECHNOLOGY. C. 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% I . 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.. 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. and . The synta/ for the !ode plot function in %ATLA& is: !ode#transfer function\$ where transfer function is the name of the transfer function system.