Upload
jo-johnson
View
223
Download
0
Embed Size (px)
Citation preview
7/27/2019 L1 Math Fundamentals
1/33
Math Fundamentals
Ch 2-1 through Ch 2-5 Complex Variables
Fourier Transforms
Laplace Transforms Inverse Laplace Transforms
Partial Fraction Expansion.
Linear TimeInvariant Differential Equations.
Ch 5-1, 5-2
State Space Analysis.
10/7/2013 1MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
2/33
Complex Variables
Re (s)
Im (s)
s = x + j yFor the spatial relationship,
Where ,
With complex conjugate
2 2 1tanjy
s x jy s e x y x
1j
s x jy
Complex variables follow algebraic rules such that if 1 1 1 2 2 2ands x jy s x jy
1 2 1 2 1 2
1 2 1 2 1 2 1 2 1 2
s s x x j y y
s s x x y y j x y y x
1 2 1 2( )1 2 1 2 1 2
j j js s s e s e s s e
1 1 2 2 1 1 2 21 1 1 1 22 2 2
2 2 2 2 2 2 2 2 2 2
x jy x jy x jy x jys x jy s s
s x jy x jy x jy x y s
1
1 2
2
1 1 ( )1
2 22
jj
j
s e sse
s ss e
2 31 1 1, ,j j j
10/7/2013 2MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
3/33
Useful Exponential and Series Expansions
3 5 7
2 3 4
2 4 6
2 2
1sin , sin2 3! 5! 7!
12! 3! 4!
1
cos , cos 12 2! 4! 6!
1e cos sin , sin
2
1e cos sin , cos
2
cos sin 1
j j
j j
j j j
j j j
e ej
e
e e
j e ej
j e e
10/7/2013 3MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
4/33
Fourier Series and Transform
In the study of control systems, the principal goal is to designa system such that the response of the system meets the
functional specifications.
Therefore the designer must understand the methods indescribing a function in the time and frequency domains or
s-plane so that the behavior of the system can be analyzed.
10/7/2013 4MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
5/33
Fourier Series A function in the time domain can be represented by a sum of exponential
functions over the entire interval -
7/27/2019 L1 Math Fundamentals
6/33
Fourier Series and Transform
Consider a time function x(t) described by a discrete set of exponential timedomain functions;
where and is a
series of amplitudes.
For a periodic function existing within the time interval [-T/2, T/2], TheFourier transform is given as
Where represents the amplitude of the component of frequency
,
Which can be expanded for a non-periodic function with frequency domaintransform
and inverse time domain transform
( )2 2
ojn t
n
n
T Tx t X e t
2
oT
nX
/ 2
/ 2
1( ) ( ) o
Tjk t
k oT
X k x t e dtT
kX
ok k
( ) ( ) j tF x t e dt
1( ) ( )
2
j tx t F e d
10/7/2013 6MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
7/33
Fourier Transform
( ) ( )f t F
10/7/2013 7MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
8/33
Laplace Transform
Since control systems do not operate in the minus infinity
time range, the single sided Fourier Transform with damping
is referred to as the Laplace Transform such that
where s = + j
10/7/2013 8
0( ) ( )
1( ) ( )
2
st
jst
j
F s f t e dt
f t F s e dsj
The Laplace Transform expresses a causal functionf(t) as a
continuous sum of exponentials of complex frequencies.
Sufficient conditions for existence are the functionf(t) must
be piecewise continuous and of exponential order.
10/7/2013 8MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
9/33
Existence of the Laplace Transformation
Given a time varying functionf(t), 0 < t < a Laplace
Transform exists such that
With Inverse
For the Laplace Transform to exist, the integral
must be finite. The integral will be finite, provided that
, and real positive finite numbersM and exist
so that , thenf(t) is said to be anexponential function and exists for all and the integral
exists as well.
.
0
dtetfsFtf st
j
j
stdtesFj
tfsF2
11
0
stf t e dt
0
tf t e dt
( ) for all 0tf t Me t
0t
10/7/2013 9MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
10/33
Fourier and Laplace Transform relationship
=
Complex Fourier Transform
(Bilateral Laplace Transform)
s = +j .f(t) exists in the interval
t
=
Ordinary Fourier Transform
s = j . f(t) exists in the
interval t =
Laplace Transform
s = + j . f(t) exists as a
casual function , t > 0
10/7/2013 10MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
11/33
Basic Rules of Transformations
Given that
Scaling
Time shifting: For t0 > 0,
Frequency shifting:
Linearity property:
Time differentiation:
Time integration:
Frequency integration:
1f t F s
1 sf at Fa a
00
stf t t F s e
at
f t e F s a
sFasFatfatfathensFtfandsFtf 221122112211
1 2 10 0 0m
m m m mm
d fs F s s f s f f
dt
0
(0)t F s ff t d t
s s
dssFt
tf
s
10/7/2013 11MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
12/33
Examples
Determine the Laplace transform of the following commandsignals:
Impulse function:
step function:
ramp function:
sinusoidal function:
0, 0( )
1, 0
for tf t
for t
0, 0( )
, 0
for tf t
At for t
0, 0
( )sin , 0
for tf t
A t for t
0
0
0 0
( )( ) 1
for t
tt dt
10/7/2013 12MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
13/33
Development of Important Properties
Initial Value Theorem: As t 0, the signal in the s- plane is related
as s such that
Which states that it is always possible to determine the initial value
of the time function from its Laplace transform.
Final Value Theorem: The final value of a signal as t is related
to the value of the Laplace transform of the function as s 0, such
that
0lim ( ) (0 ) lim ( )
stf t f sF s
0lim ( ) lim ( )t s
f t sF s
10/7/2013 13MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
14/33
Laplace transforms of common signals encountered in
control engineering
10/7/2013 14MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
15/33
10/7/2013 15MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
16/33
Laplace Transform Examples
23 0( )
0 0
t te e t
f t
t
( ) cosatf t e t
Determine the Laplace Transform for the following signals;
10/7/2013 16MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
17/33
Inverse Laplace transform by Partial
Fraction expansion
Given a rational function
By factoring the polynomials the function can be expressed as
the product of the factors such as
Where F(s) is the transfer function representing any physical
system . When , ziis referred to as the zeros of the
system andpiare the poles of the system. For the case that
the poles are either real or complex, but distinct, the transferfunction can be written in terms of partial fractions as
1 21 2
1 21 2
( )( )
( )
n nn
n n nn
b s b s bY SF s
U S s a s a s a
1
1
( )( )
( )
m
ii
n
ii
s zF s K
s p
m n
31 2
1 2 3
( ) n
n
CC C CF s
s p s p s p s p
10/7/2013 17MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
18/33
Inverse Laplace transform by Partial
Fraction expansion
The set of constants Ci are determined by multiplying bothsides of the above equation by the corresponding pole and
solving for the constant. For example to determine C1 the
following method would be applied
And evaluate the expression at s = p1with results
For the case of repeated roots consider the function with
three repeated roots, with partial fraction expansion given by
31 2
1 1 1 1 11 2 3
( )n
n
CC C C
s p F s s p s p s p s ps p s p s p s p
1
1 1 ( ) s pC s p F s
31 2 4
2 31 21 1
( ) n
n
CC C C C F s
s p s p s ps p s p
10/7/2013 18MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
19/33
Inverse Laplace transform by Partial
Fraction expansion
Set s = p1, and C3 follows as
To determine the remaining constants related to the repeated
root, differentiate equation with respect to the Laplace
variable s.
Then
In general
1
3
3 1 ( )s p
C s p F s
33 1
1 1 1 2( ) 2n
n
C s pd ds p F s C s p C
ds ds s p
1
3
2 1 ( )s p
dC s p F s
ds
1
1
1( ) , 0, , 1
!
ik
k i i
s p
dC s p F s i k
i ds
10/7/2013 19MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
20/33
Examples
2
3( )
3 2
sF s
s s
2
3( )
( 1)( 2)
sF s
s s
21( )
( 1)F s
s s s
10/7/2013 20MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
21/33
Transfer function of spring-damper-mass
system
Given the differential equation for a typical spring (spring constant k)
damper (damping constant c) system with mass m; from Newtons law, the
equation can be written as
Where u(t) is a forcing function on the system. The Laplace Transform for
the system equation (Output/Input) is written as:
In general, define the natural frequency as and
damping ratio
10/7/2013 21
tukyycym
kcsmssUsY
2
1
n
k
m
2 n
c
m
2
2 2 2
1 1
2
n
n n
Y s
U s kms cs k s s
10/7/2013 21MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
22/33
Matlab Example
For a unit step function input
num=[2 10];
den=[1 2 10];
sys=tf(num,den)
t=0:0.01:8;
step(sys,t); %U(s)=1/s
title('Response');
xlabel('time');ylabel('Displacement');0 1 2 3 4 5 6 7 8
0
0.5
1
1.5Response
time (sec )
Displacement
2( ) 2 10( )( ) 2 10
Y s sH sU s s s
10/7/2013 22MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
23/33
Solution of an Ordinary Differential
Equation
2 0,y y y (0) 1 and (0) 0y y
2 35 6 3 ,t ty y y e e (0) 0 and (0) 0.y y
22 1( )3 3
t ty t e e
( ) 3 ( ) 2 ( ) 2 ( ) ( ),y t y t y t u t u t 0 0 0(0) , (0) , and (0)y y y y u u
With unit impulse input
1 0( )
0 0
tt
t2( ) 3t ty t e e
2 3 2 31 2
1( ) 3
30
t t t t y t c e c e te e
10/7/2013 23MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
24/33
State Space Representation Example
For the ODE
Define the state variables
In state variable form:
Given the matrix form as
2 3 0y y y
1
2
2
x y
x y
x y
2 2 1
1 2 1 1
2 1 2 2 2
2 3 0
0 1
3 2 3 2
x x x
x x x x
x x x x x
= u
= u
x Ax + B
Cx+Dy
A is the state matrix .
B is the input matrix .
C is the output matrix .
u is the input vector .
y is the output vector. D is the transmission matrix
10/7/2013 24MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
25/33
Block Diagram of State Space Model
A
B
D
C
+
+
y(t)
+
u(t) dt( )x t ( )x t
= u
= u
x Ax + B
Cx+Dy
10/7/2013 25MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
26/33
State Space Representation Example
With state variables:
The state formulation becomes
1 1 1 1
2 2 2 2
1
2
0 1,
3 2
1 0
x x x x
x x x x
x
x
x x
y
1
2
2
x y
x y
x y
= u
= u
x Ax + B
Cx+Dy
10/7/2013 26
2 3 0y y y
MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
27/33
MatLab Representation
Applying initial conditions such
that x(0) = 0.1m,
A= [0 1;-3 -2];C = [1 0];
x0 = [0.1 ; 0];
sys = ss(A,[],C,[]);
initial(sys,x0);
title('response to initial displacement x(0)=0.1');
ylabel('Displacement');
xlabel('time');
0 1 2 3 4 5 6-0.02
0
0.02
0.04
0.06
0.08
0.1response to initial displacement x(0)=0.1
time (s ec)
Displa
cement
10/7/2013 27MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
28/33
System Velocity
x1 is the displacementx2is the velocity
The output vectors become
Matlab code
A= [0 1;-3 -2];Cy = [1 0]; Cv=[0 1]; %Displacement x0 = [0.1 ; 0]
sysd = ss(A,[],Cy,[]); %Cy represents Displacement
sysv= ss(A[],Cv,[]); %Cv represents Velocity
initial(sysd,sysv,x0);
title('response to initial displacement x(0)=0.1');
ylabel('Amplitude')
xlabel('time')
1
2
2
x y
x y
x y
0 1 2 3 4 5 6-0.1
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
0.1response to initial displacement x(0)=0.1
time (s ec)
Amplitude
Displacement
Velocity
1 12 2
1 0 , 0 1x x
y vx x
10/7/2013 28
= u
= u
x Ax + B
Cx+Dy
MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
29/33
System Response with forcing function
For the following system equation
A= [0 1;-3 -2]; B=[0;10]; D=[0;0]
C= [1 0;0 1] %[Displacement; Velocity]
sys = ss(A,B,C,D);
t=0:0.01:5;
U = sin(5*t);
[Y,T,X] = lsim(sys,U,t);
x1=[1 0 ]*X'; %Displacement
x2=[ 0 1 ]*X'; %Velocityplot(t,x1,t,x2)
title('Response to Forcing Function 10sin(5t)');
ylabel('Amplitude');xlabel('time')
2 3 10sin5y y y t
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-3
-2
-1
0
1
2
3
Response to Forcing Function 10sin(5t)
Amplitude
time
Velocity
10/7/2013 29MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
30/33
DC motor Transfer Function
5/12/2012 30
e
t
Ke
iKT
KVRidt
diL
KibJ
( ) I( )
I( ) ( ) ( )
s Js b s K s
Ls R s V s Ks s
2)()(
KRLsbJs
K
sV
sW
Torque Equation:
System Equations:
Transfer Function:
10/7/2013 30MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
31/33
DC Motor State Space Formulation
5/12/2012 31
KVRidt
diL
KibJ
1
b KiJ J
di K R i V
dt L L L
1
2
2
3
3
x
x
x
x idi
xdt
1 2
2 2 3
3 2 31
x x
b Kx x x
J J
K Rx x x VL L L
ux Ax B
+ uy x DC
10/7/2013 31MIE 312 M. Brown
7/27/2019 L1 Math Fundamentals
32/33
2 DOF State Space
10/7/2013 32MIE 312 M. Brown
1 1 3 2
2 1 4 2
2 1 4 2
x y x y
x y x y
x y x y
7/27/2019 L1 Math Fundamentals
33/33
Runge-Kutta numerical soln
An alternate method to the Controls Tool Box is the Runge-Kutta Algorithm
ODE45 in Matlab follows. ODE45 is designed to solve first order ordinarydifferential equations. Open an M-file and save as any name you want. In
this case the file is named mike.m
function dx = mike(t,x)
dx = zeros(2,1); % designates a column vector
dx(1) = x(2) ;
dx(2) = -3*x(1) - 2*x(2) ;
In the Matlab command window or generate an m-file, enter the following
x0 = [0.1 ; 0]; %initial displacement in radians
[T,X] = ode45(@mike,[0 6],x0); % @mike is the call to the M-file and [0 6]
% is the time span.
plot(T,X(:,1)); title('response to initial displacement x(0)= 0.1')
ylabel('Displacement'); xlabel('time') End of lecture
10/7/2013 33MIE 312 M Brown