real problems

Download Report

Transcript real problems

Solving DEs
etc
Laplace transforming derivatives
f (t )  F ( s )
d
f (t )  sF ( s )  f (0)
dt
d
f (t )  g (t )  G ( s)
dt
2
Etc.
d
d
f (t )  g (t )  sG ( s )  g (0)
2
dt
dt
d

 s  sF ( s)  f (0)   g (t ) 
 dt
 t 0
 s 2 F ( s)  sf (0)  s 2 f (0)
x(t )  2 x(t )  5 x  3,
x(0)  0, x(0)  0
Solving LTI DEs
3
 s 2 X ( s )  sx(0)  x(0)   2  sX ( s)  x(0)   5  X ( s)  
s
3
 s  2s  5 X ( s)  s
3
3
X (s) 

s  s 2  2 s  5  s  s  12  22 


3
A
B
B*

 

s  s  1  2 j  s  1  2 j  s s  1  2 j s  1  2 j
2
x(t )   A  Be  (1 2 j )t  B*e  (1 2 j ) t   (t ) B  B e jB , B*  B e  jB
j (2 t B )
 j (2 t B ) t


e

e
t
x(t )   A  B e 2
 (t )

2


x(t )   A  B e  t 2 cos  2t  B    (t )
A=?, B=?, x(t)=?


3
3
 
A  s
2
 s  s  2s  5   s 0 5


3
B   s  1  2 j 

s
s

1

2
j
s

1

2
j


  s 1 2 j



3
3



 s  s  1  2 j   s 1 2 j  1  2 j  2* 2 j 
 .3354e j 2.6779
t

x(t )   A  B e 2 cos  2t  B    (t )
 .6  .6708e t cos  2t  2.6779   (t )
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
help residue
RESIDUE Partial-fraction expansion (residues).
[R,P,K] = RESIDUE(B,A) finds the residues, poles and
direct term of
a partial fraction expansion of the ratio of two polynomials
B(s)/A(s).
If there are no multiple roots,
B(s)
R(1)
R(2)
R(n)
---- = -------- + -------- + ... + -------- + K(s)
A(s) s - P(1) s - P(2)
s - P(n)
Vectors B and A specify the coefficients of the numerator
and
denominator polynomials in descending powers of s. The
residues
are returned in the column vector R, the pole locations in
column
vector P, and the direct terms in row vector K. The
number of
poles is n = length(A)-1 = length(R) = length(P). The direct
term
coefficient vector is empty if length(B) < length(A),
otherwise
length(K) = length(B)-length(A)+1.
If P(j) = ... = P(j+m-1) is a pole of multplicity m, then the
expansion includes terms of the form
R(j)
R(j+1)
R(j+m-1)
-------- + ------------ + ... + -----------s - P(j) (s - P(j))^2
(s - P(j))^m
Matlab
“residue”
Matlab “residue
• [B,A] = RESIDUE(R,P,K), with 3 input arguments and 2 output
arguments,
•
converts the partial fraction expansion back to the polynomials with
•
coefficients in B and A.
•
•
Warning: Numerically, the partial fraction expansion of a ratio of
•
polynomials represents an ill-posed problem. If the denominator
•
polynomial, A(s), is near a polynomial with multiple roots, then
•
small changes in the data, including roundoff errors, can make
•
arbitrarily large changes in the resulting poles and residues.
•
Problem formulations making use of state-space or zero-pole
•
representations are preferable.
•
Matlab example of ‘Residue’
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
help tf2zp
TF2ZP Transfer function to zero-pole conversion.
[Z,P,K] = TF2ZP(NUM,DEN) finds the zeros, poles, and gains:
(s-z1)(s-z2)...(s-zn)
H(s) = K --------------------(s-p1)(s-p2)...(s-pn)
from a SIMO transfer function in polynomial form:
NUM(s)
H(s) = -------DEN(s)
Vector DEN specifies the coefficients of the denominator in
descending powers of s. Matrix NUM indicates the numerator
coefficients with as many rows as there are outputs. The zero
locations are returned in the columns of matrix Z, with as many
columns as there are rows in NUM. The pole locations are returned
in column vector P, and the gains for each numerator transfer
function in vector K.
For discrete-time transfer functions, it is highly recommended to
make the length of the numerator and denominator equal to ensure
correct results. You can do this using the function EQTFLENGTH in
the Signal Processing Toolbox. However, this function only handles
single-input single-output systems.
See also zp2tf.
Matlab:
“tf2zp”
Example Matlab “tf2zp”
Calculator/Computer Usage
• Be able to use your calculator to
manipulate complex numbers
• Be able to manipulate complex numbers
by hand without your calculator
• Simplest problems by hand with paper
and pencil
• Intermediate problems with calculators
• “real problems” with computers.
Shifting Sinusoidal waveforms
Complex Number Arithmetic
• Rectangular form
• Polar form
• Relationships (to each other, to triangle, to
euler’s identity)
• Adding/subtracting (use retangular form)
• Multiplying/dividing (use polar form)
• Complex conjugate