You are on page 1of 33

Math Fundamentals

Ch 2-1 through Ch 2-5


Complex Variables
Fourier Transforms
Laplace Transforms
Inverse Laplace Transforms
Partial Fraction Expansion.
Linear Time Invariant Differential Equations.
Ch 5-1, 5-2
State Space Analysis.
10/7/2013 1 MIE 312 M. Brown
Complex Variables

Re (s)
Im (s)
s = x + j y
For the spatial relationship,



Where ,

With complex conjugate


u
| |
= + = = + Z
|
\ .
2 2 1
tan
j
y
s x jy s e x y
x
1 j =
s x jy =
Complex variables follow algebraic rules such that if 1 1 1 2 2 2
and s 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 j
s s s e s e s s e
u u u u +
= =
( )( )
( )( )
( )( )
1 1 2 2 1 1 2 2
1 1 1 1 2
2 2 2
2 2 2 2 2 2 2
2 2
2
x jy x jy x jy x jy
s x jy s s
s x jy x jy x jy
x y
s
+ +
+
= = = =
+ +
+
1
1 2
2
1 1 ( ) 1
2 2
2
j
j
j
s e s
s
e
s s
s e
u
u u
u

= =
= = =
2 3
1 1 1, , j j j
10/7/2013 2 MIE 312 M. Brown
Useful Exponential and Series Expansions
( )
( )
( )
( )
u u
u
u u
u u u
u u u
u u u
u u u
u u u
u
u u u
u u
u u u
u u u
u u


= = + +
= + + + + +
= + = + +
= + =
= = +
+ =
3 5 7
2 3 4
2 4 6
2 2
1
sin , sin
2 3! 5! 7!
1
2! 3! 4!
1
cos , cos 1
2 2! 4! 6!
1
e cos sin , sin
2
1
e cos sin , cos
2
cos sin 1
j j
j j
j j j
j j j
e e
j
e
e e
j e e
j
j e e
10/7/2013 3 MIE 312 M. Brown
Fourier Series and Transform
In the study of control systems, the principal goal is to design
a system such that the response of the system meets the
functional specifications.

Therefore the designer must understand the methods in
describing a function in the time and frequency domains or
s-plane so that the behavior of the system can be analyzed.

10/7/2013 4 MIE 312 M. Brown
Fourier Series
A function in the time domain can be represented by a sum of exponential
functions over the entire interval -<t< such that the new function is
periodic.










( )
o
jn t
n
n
f t X e
e

=
=

10/7/2013 5 MIE 312 M. Brown
Fourier Series and Transform
Consider a time function x(t) described by a discrete set of exponential time
domain functions;

where and is a

series of amplitudes.
For a periodic function existing within the time interval [-T/2, T/2], The
Fourier transform is given as

Where represents the amplitude of the component of frequency
,
Which can be expanded for a non-periodic function with frequency domain
transform

and inverse time domain transform

( )
2 2
o
jn t
n
n
T T
x t X e t
e

=
= < <

2
o
T
t
e =
n
X
/ 2
/ 2
1
( ) ( )
o
T
jk t
k o
T
X k x t e dt
T
e
e

=
}
k
X
o
ke k < <
( ) ( )
j t
F x t e dt
e
e

=
}
1
( ) ( )
2
j t
x t F e d
e
e e
t

=
}
10/7/2013 6 MIE 312 M. Brown
Fourier Transform
( ) ( ) f t F e
10/7/2013 7 MIE 312 M. Brown
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
j
st
j
F s f t e dt
f t F s e ds
j
o
o
t


+

=
=
}
}







The Laplace Transform expresses a causal function f(t) as a
continuous sum of exponentials of complex frequencies.
Sufficient conditions for existence are the function f(t) must
be piecewise continuous and of exponential order.

10/7/2013 8 MIE 312 M. Brown
Existence of the Laplace Transformation
Given a time varying function f(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 numbers M and exist
so that , then f(t) is said to be an
exponential function and exists for all and the integral
exists as well.



.
( ) { } ( ) ( )
}

= =
0
dt e t f s F t f
st
( ) { } ( ) ( )
}
+

= =
e o
e o t
j
j
st
dt e s F
j
t f s F
2
1
1
( )
0
st
f t e dt

}
( )
o

<
}
0
t
f t e dt
( ) for all 0
t
f t Me t
o
< >
0 t >
10/7/2013 9 MIE 312 M. Brown
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 10 MIE 312 M. Brown
Basic Rules of Transformations
Given that
Scaling
Time shifting: For t
0
> 0,
Frequency shifting:

Linearity property:
Time differentiation:

Time integration:


Frequency integration:

( ) { } ( ) { }
1
f t F s


( )
1 s
f at F
a a
| |

|
\ .
( ) ( )
0
0
st
f t t F s e


( ) ( )
at
f t e F s a

+
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) s F a s F a t f a t f a then s F t f and s F t f
2 2 1 1 2 2 1 1 2 2 1 1
+ +
( ) ( ) ( ) ( )
1 2 1
0 0 0
m
m m m m
m
d f
s F s s f s f f
dt


( )
( )
0
(0)
t F s
f
f t dt
s s
+
}
( )
( )ds s F
t
t f
s
}

10/7/2013 11 MIE 312 M. Brown


Examples

Determine the Laplace transform of the following command
signals:

Impulse function:


step function:

ramp function:


sinusoidal function:

0, 0
( )
1, 0
for t
f t
for t
<

=

>

0, 0
( )
, 0
for t
f t
At for t
<

=

>

0, 0
( )
sin , 0
for t
f t
A t for t e
<

=

>

0
0
0 0
( )
( ) 1
for t
t
t dt
o
o
+

=

=

}
10/7/2013 12 MIE 312 M. Brown
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



0
lim ( ) (0 ) lim ( )
s
t
f t f sF s
+
+

= =
0
lim ( ) lim ( )
t s
f t sF s

=
10/7/2013 13 MIE 312 M. Brown
Laplace transforms of common signals encountered in
control engineering

10/7/2013 14 MIE 312 M. Brown
10/7/2013 15 MIE 312 M. Brown
Laplace Transform Examples
2
3 0
( )
0 0
t t
e e t
f t
t

+ >
=

<



( ) cos
at
f t e t e

=
Determine the Laplace Transform for the following signals;
10/7/2013 16 MIE 312 M. Brown
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 , z
i
is referred to as the zeros of the
system and p
i
are the poles of the system. For the case that
the poles are either real or complex, but distinct, the transfer
function can be written in terms of partial fractions as


1 2
1 2
1 2
1 2
( )
( )
( )
n n
n
n n n
n
b s b s b Y S
F s
U S
s a s a s a


+ + +
= =
+ + +
1
1
( )
( )
( )
m
i
i
n
i
i
s z
F s K
s p
=
=

[
[
m n s
3 1 2
1 2 3
( )
n
n
C C C C
F s
s p s p s p s p
= + + +

10/7/2013 17 MIE 312 M. Brown
Inverse Laplace transform by Partial
Fraction expansion
The set of constants C
i
are determined by multiplying both
sides of the above equation by the corresponding pole and
solving for the constant. For example to determine C
1
the
following method would be applied


And evaluate the expression at s = p
1
with results

For the case of repeated roots consider the function with
three repeated roots, with partial fraction expansion given by

( ) ( ) ( ) ( ) ( )
3 1 2
1 1 1 1 1
1 2 3
( )
n
n
C C C C
s p F s s p s p s p s p
s p s p s p s p
= + + +

( )
1
1 1
( )
s p
C s p F s
=
=
( ) ( )
= + + + + +


3 1 2 4
2 3
1 2
1 1
( )
n
n
C C C C C
F s
s p s p s p
s p s p
10/7/2013 18 MIE 312 M. Brown
Inverse Laplace transform by Partial
Fraction expansion
Set s = p
1
, and C
3
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
=
=
( ) ( )
( )
(

(
(
= + + +
(

(

3
3
1
1 1 1 2
( ) 2
n
n
C s p
d d
s p F s C s p C
ds ds s p
( )
1
3
2 1
( )
s p
d
C s p F s
ds
=
(
=
(

( )
1
1
1
( ) , 0, , 1
!
i
k
k i
i
s p
d
C s p F s i k
i
ds

=
(
(
= =
(
(

(

10/7/2013 19 MIE 312 M. Brown
Examples
2
3
( )
3 2
s
F s
s s
+
=
+ +
2
3
( )
( 1)( 2)
s
F s
s s
+
=
+ +


2
1
( )
( 1)
F s
s s s
=
+ +

10/7/2013 20 MIE 312 M. Brown
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
( ) t u ky y c y m = + +

( )
( )
k cs ms
s U
s Y
+ +
=
2
1
n
k
m
e =
2
n
c
m

e
=
( )
( )
e
e e
= =
+ + + +
2
2 2 2
1 1
2
n
n n
Y s
U s k ms cs k s s
10/7/2013 21 MIE 312 M. Brown
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.5
Response
time (sec)
D
i
s
p
l
a
c
e
m
e
n
t
2
( ) 2 10
( )
( ) 2 10
Y s s
H s
U s s s
+
= =
+ +
10/7/2013 22 MIE 312 M. Brown
Solution of an Ordinary Differential
Equation
= 2 0, y y y
= = (0) 1 and (0) 0 y y

+ + = +
2 3
5 6 3 ,
t t
y y y e e
= = (0) 0 and (0) 0. y y
2
2 1
( )
3 3
t t
y 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
{ }
o
=
=

=

1 0
( )
0 0
t
t
t
2
( ) 3
t t
y t e e

= +



2 3 2 3
1 2
1
( ) 3
30
t t t t
y t c e c e te e

= + + +

10/7/2013 23 MIE 312 M. Brown


State Space Representation Example
For the ODE

Define the state variables


In state variable form:

Given the matrix form as
2 3 0 y 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 +D y
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 24 MIE 312 M. Brown
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 +D y
10/7/2013 25 MIE 312 M. Brown
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 +D y
10/7/2013 26
2 3 0 y y y + + =
MIE 312 M. Brown
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.1
response to initial displacement x(0)=0.1
time (sec)
D
i
s
p
l
a
c
e
m
e
n
t
10/7/2013 27 MIE 312 M. Brown
System Velocity
x
1
is the displacement
x
2
is 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.1
response to initial displacement x(0)=0.1
time (sec)
A
m
p
l i t
u
d
e
Displacement
Velocity
| | | |
1 1
2 2
1 0 , 0 1
x x
y v
x x
( (
= =
( (

10/7/2013 28
= u
= u
x Ax +B
Cx +D y
MIE 312 M. Brown
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'; %Velocity
plot(t,x1,t,x2)
title('Response to Forcing Function 10sin(5t)');
ylabel('Amplitude');xlabel('time')

2 3 10sin5 y 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)
A
m
p
l
i
t
u
d
e
time
Velocity
10/7/2013 29 MIE 312 M. Brown
DC motor Transfer Function
5/12/2012 30
u

e
t
K e
i K T
=
=
u
u u


K V Ri
dt
di
L
Ki b J
= +
= +
( )
( )
( ) I( )
I( ) ( ) ( )
s Js b s K s
Ls R s V s Ks s
O
O
+ =
+ =
( )( )
2
) (
) (
K R Ls b Js
K
s V
s W
+ + +
=
Torque Equation:
System Equations:
Transfer Function:
10/7/2013 30 MIE 312 M. Brown
DC Motor State Space Formulation
5/12/2012 31
u
u u


K V Ri
dt
di
L
Ki b J
= +
= +
1
b K
i
J J
di K R
i V
dt L L L
u = u +
= u +
1
2
2
3
3
x
x
x
x i
di
x
dt
u
u
u
=
=
=
=
=
1 2
2 2 3
3 2 3
1
x x
b K
x x x
J J
K R
x x x V
L L L
=
= +
= +
= + u x Ax B
= + u y x D C
10/7/2013 31 MIE 312 M. Brown
2 DOF State Space
10/7/2013 32 MIE 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
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 ordinary
differential 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 33 MIE 312 M. Brown

You might also like