Laplace Transform - University of Michigan
Download
Report
Transcript Laplace Transform - University of Michigan
Math Review with Matlab:
Laplace
Transform
Application:
Linear Time Invariant (LTI) Systems
S. Awad, Ph.D.
M. Corless, M.S.E.E.
E.C.E. Department
University of Michigan-Dearborn
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Linear Time Invariant (LTI)
Systems
Definition of a Linear Time Invariant System
Impulse Response
Transfer Function
Simple Systems
Simple System Example
Pulse Response Example
Transient and Steady State Example
2
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
System Definition
A system can be thought of as a black box with an input
and an output
Excitation
Input Signal
x(t)
System
Transformation
T
Response
Output Signal
y(t)
The signal connected to the input is called the Excitation
The system performs a Transformation, T, (function) on the input
Given an input excitation, the output signal is called the Response
3
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Differential Equations
Input Signal
x(t)
System
Output Signal
y(t)
dx(t )
dx2 (t )
d M x(t )
0 x(t ) 1
2 2 ... M
M
dt
dt
dt
dy(t )
dy2 (t )
d N y(t )
0 y(t ) 1
2 2 ... N
dt
dt
dt N
Time domain systems are often described using a Differential
Equation
Recall that time domain Differentiation corresponds to Laplace
Transform domain Multiplication by s with subtraction of Initial
Conditions
4
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Linear Systems
A system is Linear if it satisfies the Superposition Principle
( where and are constants ):
T1x1(t) 2 x2 (t) 1Tx1(t)2Tx2 (t)
This can be restated given the excitation and response
relationships:
1 y1(t) T1x1(t) 2 y2 (t) T2 x2 (t)
Then an Excitation of:
x3 (t ) 1x1 (t ) 2 x2 (t )
Results in a Response of:
y3 (t ) 1 y1 (t ) 2 y2 (t )
5
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Time Invariance
A system is time-invariant if its input-output relationship
does not change as time evolves
Tx(t ) y(t )
x(t )
0
0
y(t )
0
t
x(t )
t
y(t )
0
t
t
6
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Impulse Response
The Impulse Response signal, h(t), of a linear system is
determined by applying an Impulse to the Input, x(t),
and determining the output response, y(t)
Due to the properties of a Linear Time Invariant System,
the Impulse Response Completely Characterizes the
relationship between x and y for all x such that:
y(t ) x(t ) * h(t ) x( )h(t )d
Where * denotes the Convolution operation
7
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Laplace Transform
Since Convolution may be Mathematically Intensive,
the Laplace Transform is often used as an aid to analyze
the Linear Time Invariant Systems.
Recall the relationship between Convolution in the TimeDomain and Multiplication in the Laplace TransformDomain
y(t ) x(t ) * h(t )
LT
LT
LT
Y (s) X (s)H (s)
8
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Transfer Function
The Transfer Function, H(s), of a system is the Laplace
Transform of the Impulse Response, h(t)
y(t ) x(t ) * h(t )
Y (s) X (s)H (s)
Y (s)
H (s) LTh(t )
X (s)
The Transfer Function completely specifies the relationship
between the excitation (input) and response (output) in the
Laplace Transform-Domain
9
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Simple Systems
Most systems can be created by combining the
following simple system building blocks:
Linear Operations:
Multiplication
by a Constant
Addition of Signals
Time-Domain Differentiation
Time-Domain Integration
Time-Domain Delay
10
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Linear Operations
Time-Domain
x(t )
k1
x1(t)
k1x(t )
Time-Domain
x1(t) x2 (t)
x2 (t )
Laplace Transform-Domain
Laplace TransformDomain
X1 (s)
X (s)
k1
k1 X (s)
X1(s) X 2 (s)
X 2 (s)
Linear operations have a direct correlation between the Time-Domain
and Laplace Transform-Domain (s-domain) counterparts
11
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Time-Domain Differentiation
Time-Domain Differentiation Operation
Differentiation
x(t )
d
dt
dx(t )
dt
Equivalent Laplace Transform-Domain Operation
Multiplication
X (s)
s
sX (s)
12
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Time-Domain Integration
Time-Domain Integration Operation (no initial conditions)
Integration
x(t )
dt
x(t)dt
Equivalent Laplace Transform-Domain Operation
Division
X (s)
1
s
X (s)
s
13
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Time-Domain Delay
Time-Domain Delay Operation
x(t )
Delay by t0
Operation
x(t t0 )
Equivalent Laplace Transform-Domain Operation
Multiplication
X (s)
e
st 0
est0 X (s)
14
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Examples of LTI Systems
The building blocks described previously can be used to
model and analyze real world systems such as:
Audio Equalizers (band pass filters)
Automatic Gain Controls for a radio
Car Mufflers (mechanical filter)
Suspension Systems (mechanical low pass filter)
Cruise Control (motor speed control)
15
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
System Example
Create a system to implement
the differential equation:
dy(t )
x(t )
y(t )
dt
1) Determine the Transfer Function directly from the
Differential Equation
2) Draw the system in the Time-Domain
3) Draw the system in the Laplace Transform-Domain
4) Write the Transfer Function from the System Diagram
5) Determine the Impulse Response
16
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Directly Determine H(s)
The Transfer Function H(s) can be directly determined
by taking the Laplace Transform of the differential
equation and manipulating terms
dy(t )
x(t )
y(t )
dt
LT
X (s) sY (s) Y (s)
X (s) (s 1)Y (s)
By definition,
H(s) = Y(s) / X(s)
Y (s)
1
H (s)
X (s) s 1
17
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Time-Domain-System
Draw time-domain system representation for:
1) Reorder terms to create a Function for y(t)
2) Start by drawing Input and Output at far ends
3) Draw Differentiation Block connected to y(t)
dy(t )
x(t )
y(t )
dt
dy(t )
y(t ) x(t )
dt
4) Draw Summation Block and its connections
x(t )
+
y(t )
-
dy(t )
dt
18
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Laplace Transform-Domain
The Laplace Transform-Domain System can be drawn by
leaving the linear summation block and replacing the
differentiating block with a multiplication by s
x(t )
+
y(t )
-
Time-Domain
X (s)
+
Laplace Transform
Domain
dy(t )
dt
Y (s)
-
s
19
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Verify H(s)
The Transfer Function H(s) can also be determined by writing
an expression from the Laplace Transform-Domain System
X (s)
+
Y (s)
-
System directly yields:
Y (s) X (s) sY (s)
Reordering terms gives the same
result as taking the Laplace Transform
of the Differential Equation
s
Y (s) sY (s) X (s)
(s 1)Y (s) X (s)
Y (s)
1
H (s)
X (s) s 1
20
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Impulse Response
The Impulse Response of the system, h(t), is simply the
Inverse Laplace Transform of the Transfer Function, H(s)
h(t ) LT 1H (s)
1 1
LT
s 1
t
h(t ) e u(t )
21
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Pulse Response Example
Given a system with an Impulse Response, h(t)=e-2tu(t)
Input Pulse
0
T
Impulse
Response
t
x(t )
u(t ) u(t T )
h(t )
e2t u(t )
Pulse Response
Output
y(t )
h(t ) x(t )
1) Find the Transfer Function for the system, H(s)
2) Find the General Pulse Response,y(t)
3) Plot the Pulse Response for T=1 sec and T=2 sec
22
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Transfer Function
The transfer function of the system is simply the Laplace
Transform of the Impulse Response:
2t
h(t ) e u(t )
LT
1
H (s)
s2
The Transfer Function can be used to find the Laplace
Transform of the pulse response, Y(s), using:
Y (s) H (s) X (s)
23
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Laplace Transform of Input
Given the equation
for a General Pulse
of period T
The general Laplace
Transform is thus:
Combining Terms:
x(t ) u(t ) u(t T )
LT
1 1 sT
X (s) e
s s
1 e
X (s)
s
sT
24
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Determine Y(s)
Y(s) is found using:
Y (s) H (s) X (s)
Substituting for H(s)
and X(s)
1 1 e sT
Y ( s)
s 2 s
1
esT
Y (s)
s(s 2) s(s 2)
Distributing terms
Rewrite in terms of a new Y1(t)
sT
Y (s) Y1 (s) e Y1 (s)
where
1
Y1(s)
s(s 2)
25
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Partial Fraction Expansion
The Matlab function residue can be used to
perform Partial Fraction Expansion on Y1(s)
[R,P,K] = RESIDUE(B,A)
B = Numerator polynomial Coefficient Vector
A = Denominator Polynomial Coefficient Vector
R = Residues Vector
P = Poles Vector
K = Direct Term Constant
rN
bN s N bN 1s N 1 b1s b0
r1
r2
k
s p1 s p2
s pN aN s N aN 1s N 1 a1s a0
26
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Expand Y1(s)
Use residue to perform partial fraction expansion
» B=[0 0 1];A=[1 2 0];
» [R,P,K]=residue(B,A)
R =
-0.5000
0.5000
P =
-2
0
K =
[]
1
1
B
Y1 (s)
2
s(s 2) s 2s 0 A
R1
R
2
s P1 s P2
0.5 0.5
0
s2 s
Y1 (s) K
1
1
Y1 (s)
2s 2(s 2)
27
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
General Solution y(t)
Find y(t) by taking Inverse Laplace Transforms and
substituting y1(t) back into y(t)
1
1
Y1 (s)
2s 2(s 2)
Y (s) Y1 (s) esTY1 (s)
LT-1
LT-1
1 1 2t
y1 (t ) e u(t )
2 2
2t
y(t) y1(t) y1(t T )
2t
y(t ) 1 e u(t ) 1 e u(t T )
1
2
1
2
28
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Matlab Declarations
The General Pulse Response can be verified using Matlab
Variables must be carefully declared using proper syntax
» syms h H t s
» h=exp(-2*t)
2t
h(t ) e u(t )
x(t ) u(t ) u(t T )
» T=sym('T','positive')
» x=sym('Heaviside(t)-Heaviside(t-T)')
Assuming the system to be causal, T must be explicitly
declared as a positive number
The Heaviside function is equivalent to the unit-step
29
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Matlab Verification
» H=laplace(h)
H =
1/(s+2)
2t
2t
y(t ) 1 e u(t ) 1 e u(t T )
1
2
» X=laplace(x)
X =
1/s-exp(-T*s)/s
» Y=H*X
Y =
1/(s+2)*(1/s-exp(-T*s)/s)
» y=ilaplace(Y)
y =
-1/2*exp(-2*t)+1/2+
1/2*Heaviside(t-T)*exp(-2*t+2*T)
-1/2*Heaviside(t-T)
1
2
30
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Matlab Vector Code
NOTE as of Matlab 6, ezplot cannot plot functions containing
declarations of Heaviside or Dirac (Impulse)
The following code recreates the Pulse Response as vectors
for T=1 sec and T=2 sec
t=[0:0.01:4];
% Time Vector
tmax=size(t,2);
% Index to last Time Value
T1=find(t==1);
% Index to 1 second
T2=find(t==2);
% Index to 2 seconds
yexp=0.5*(1-exp(-2*t)); % Base exponential vector
y1T=[zeros(1,T1),yexp(1:tmax-T1)];
y1=yexp-y1T;
% Pulse Response T=1
y2T=[zeros(1,T2),yexp(1:tmax-T2)];
y2=yexp-y2T;
% Pulse Response T=2
31
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Matlab Plots
The response for T=1
and T=2 is plotted
y(t ) 12 1 e2t u(t ) 12 1 e2t u(t T )
subplot(2,1,1);plot(t,y1);
title('Pulse Response T=1');
grid on;
subplot(2,1,2);plot(t,y2);
title('Pulse Response T=2');
xlabel('Time in seconds');
grid on;
32
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Transient and Steady State Example
Determine an equation for the output of a system, y(t),
described by the transfer function H(s) and input x(t)
x(t )
sin( 2t )u(t )
2
H (s) 2
s 2s 2
y(t )
ytrans(t ) yss (t )
From the output y(t):
1. Identify the Transient Response, ytrans(t), of the system
(portion that goes to zero as t increases)
2. Identify the Steady State Response , yss(t), of the system
(portion that repeats for all t)
33
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Laplace Transform of Input
Recall the Laplace
Transform of a general
sine signal with an
angular frequency w0
Find the Laplace
Transform of the
input signal x(t)
wo
LTsin(wot )u(t ) 2
2
s wo
sin( 2t )u(t )
LT
2
X ( s)
2
s 2
x(t )
LT
34
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Roots of Y(s)
Determine an expression for output signal Y(s)
2 2
Y (s) X (s)H (s) 2 2
s 2 s 2s 2
Determine general form for roots (poles) of denominator of Y(s)
2
2
Y (s)
*
(s p1 )(s p1 ) (s p2 )(s p2 )
Purely Imaginary Roots Complex Roots
p1 j 2
p2 1 j
35
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Verify Poles in Matlab
2 2
2 2
Y (s) 2 2
*
s
2
s
2
s
2
(
s
p
)(
s
p
)(
s
p
)(
s
p
1
1
2
2)
» poles=roots( conv( [1 0 2], [1 2 2]) )
poles =
-0.0000
-0.0000
-1.0000
-1.0000
p1 j 2
+
+
-
1.4142i
1.4142i
1.0000i
1.0000i
p1 j 2
p2 1 j
p2 1 j
36
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Partial Fraction Expansion
Note that since poles are complex conjugates,pcoefficients
1 1 j 2e
will also be complex conjugates
j
3
4
2 2
c1
c1
c2
c2
Y (s)
*
(s p1)(s p1 )(s p2 )(s p2 ) s p1 s p1 s p2 s p2
p1 j 2
p2 1 j
c1 (s p1 )Y (s) s p
c2 (s p2 )Y (s) s p
2 2
c1
(s p1 )(s p2 )(s p2* )
2 2
c2
(s p1 )(s p1 )(s p2* )
1
2
s p1
s p2
37
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Find Coefficients in Matlab
2 2
c1
(s p1 )(s p2 )(s p2* )
s p1
2 2
c2
(s p1 )(s p1 )(s p2* )
s p2
» syms s t
» p1=j*2^0.5; p1c=conj(p1); p2=(-1+j); p2c=conj(p2);
» c1=(2*2^0.5)/(s-p1c)/(s-p2)/(s-p2c);
» c1=subs(c1,'s',p1)
c1 =
2
0.3536 + 0.0000i
c1 0.3536
4
» c2=(2*2^0.5)/(s-p1)/(s-p1c)/(s-p2c);
» c2=subs(c2,'s',p2)
c2 =
2
0.3536 - 0.3536i
c 0.3535 j0.3536
38
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Inverse Laplace
Take Inverse Laplace Transform of Y(s)
c
c
c
c
1
1
1
1
2
2
y(t ) LT Y (s) LT
s p1 s p1 s p2 s p2
y(t ) c1e c e u(t ) c2e c e u(t )
* p1*t
1
p1t
* p2*t
2
p2t
Reduce terms by combining complex conjugates
y(t ) 2 Re c1e
p1t
u(t) 2 Rec e u(t)
p2t
2
39
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Substitute Values
When substituting coefficients, it is useful to use the
polar representation to simplify cosine conversions
y(t ) 2 Re c1e
p1t
u(t) 2 Rec e u(t)
p2t
2
2 j
c1 0.3536
e
4
1 j 4
c2 0.3535 j0.3536 e
2
p1 j 2
p2 1 j
y(t )
2 j j
2 Re
e e
4
j
1
2t
4 ( 1 j ) t
u(t ) 2 Re e e
u(t )
2
40
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Steady State and Transient
Responses
The complex signal can be converted into a function of cosines
2 j j
y(t ) 2 Re
e e
4
j
1
2t
4 ( 1 j )t
u(t ) 2 Re e e
u(t )
2
2
t
y(t )
cos 2t u(t ) e cos t u(t )
2
4
Steady State Response
(Repeats as t increases)
2
yss (t )
cos 2t u(t )
2
Transient Response
(Goes to 0 at t increases)
ytrans e cos t u(t )
4
t
41
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Matlab Verification
Matlab can be used to determine Inverse Laplace Transform
Result will have transient and steady state component
Result will appear different but be mathematically equivalent
» X=(2^0.5)/(s^2+2); H=2/(s^2+2*s+2);
2 2
» Y=X*H; y=ilaplace(Y);
Y (s) 2 2
» y=simplify(y); pretty(y)
s 2 s 2s 2
Steady State
1/2
1/2
- 1/2 2
cos(2
t) +
1/2
1/2
1/2 2
exp(-t) cos(t) + 1/2 2
exp(-t) sin(t)
Transient
42
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Verify Equivalence
The Hand and Matlab steady state results are equivalent
because a phase shift of is the same as negating the cosine
2
yHss (t )
cos 2t u(t )
2
2
yMss (t ) cos 2t u(t )
2
The Hand and Matlab transient results are equivalent by
applying the relationship:
cos(x) sin( x) 2 cos x 4
yHtrans e cos t u(t )
4
t
2 t
yMtrans
e cos(t ) sin(t )u(t )
2
43
X(s) Laplace Transform: Linear Time Invariant Systems
Math Review with Matlab
U of M-Dearborn ECE Department
Summary
Laplace Transform is a useful technique for analyzing
Linear Time Invariant Systems
Impulse Response and its Laplace Transform, the
Transfer Function, are used to describe system
characteristics
Simple System Blocks for multiplication, addition,
differentiation, integration, and time shifting can be used
to describe many real world systems
Matlab can be used to determine the Transient and
Steady-State Responses of a complex system
44