Upload
iamzura-abdullah
View
213
Download
0
Embed Size (px)
Citation preview
7/29/2019 Control System Using MATLAB (12.10.2012)
1/3
Chapter 2: Modelling in the frequency domain
Ch2p1
Bit strings will be used to identify parts of this tutorial on the computer output. Bit strings arerepresented by the text enclosed in apostrophes, such as ab. Comments begin with % and
are ignored by MATLAB. Numbers are entered without any other characters. Arithmetic canbe performed using the proper arithmetic operator. Numbers can be assigned using a left-hand argument and an equals sign. Finally, we can find the magnitude andangle of a
complex number, Q usingabs(Q)and angle(Q), respectively.
Ch2p2
Polynomials in s can be represented as row vectors containing the coefficients. Thus3 2
1 7 3 23P s s s can be represented by the vector shown below with elements separated by a
space or comma. Bit strings can be used to identify each section of this tutorial.
Ch2p3
Running the previous statements causes MATLAB to display the results. Ending thecommand with a semicolon suppresses the display. Typing an expression without a left-handassignment and without a semicolon causes the expression to be evaluated and the result
displayed. EnterP2in the MATLAB Command Window after execution.
7/29/2019 Control System Using MATLAB (12.10.2012)
2/3
Ch2p4
An F(s) in factored form can be represented in polynomial form. Thus 3 2 5 6P s s s
can be transformed into a polynomial using poly(V), where Vis a row vector containing the
roots of the polynomial and poly(V)forms the coefficients of the polynomial.
Ch2p5
We can find roots of polynomials using the roots(V)command. The roots are returned as
a column vector. For example, find the roots of 4 3 25 7 9 3 2 0s s s s
Ch2p6
Polynomials can be multiplied together using the conv(a,b)command (standing forconvolve). Thus, 3 2 4 3 25 ( 7 10 9)( 3 6 2 1)P s s s s s s s is generated as follows:
7/29/2019 Control System Using MATLAB (12.10.2012)
3/3
Ch2p7
The partial-fraction expansion for ( ) ( ) / ( )F s b s a s can be found using the
[K, p, k ]= residue (b, a) command (K = residue; p = roots of denominator; k =
direct quotient, which is found by dividing polynomials prior to performing a partial fraction
expansion). We expand 2 2
( ) 7 9 12 / 7 10 100F s s s s s s s
as an example. Using the resultsfrom MATLAB yields
( ) 0.2554 0.3382 / 5.0 8.6603 0.2554 0.3382 / 5.0 8.6603
0.5280 / 7 0.0171 /
F s i s i i s i
s s
Ch2p8
Solve for y(t).