University of the District of Columbia
Control Systems Lab
Experiment #3
Laplace transform
L = laplace(F) is the Laplace transform of the sym F with default independent variable t. The default
return is a function of s. If F = F(s), then laplace returns a function of z: L = L(z).
By definition, L(s) = int(F(t)*exp(-s*t),t,0,inf).
L = laplace(F,z) makes L a function of z instead of the default s:
laplace(F,z) L(z) = int(F(t)*exp(-z*t),t,0,inf).
L = laplace(F,w,u) makes L a function of u instead of the default s (integration with respect to w).
laplace(F,w,u) L(u) = int(F(w)*exp(-u*w),w,0,inf).
Examples:
syms a t y
f = exp(-a*t);
h1=laplace(f)
pretty(h)
1
----a + s
laplace(f, y)
syms t s
h2=laplace(dirac(t - 3), t, s)
syms a s t w x F(t)
laplace(t^5)
laplace(exp(a*s))
returns 120/s^6
returns -1/(a-z)
laplace(sin(w*x),t) returns w/(t^2+w^2)
laplace(cos(x*w),w,t) returns t/(t^2+x^2)
laplace(x^(3/2),t) returns (3*pi^(1/2))/(4*t^(5/2))
laplace(diff(F(t))) returns s*laplace(F(t),t,s) - F(0)
Inverse Laplace transform in MATLAB
F = ilaplace(L) is the inverse Laplace transform of the sym L with default independent variable s. The
default return is a function of t. If L = L(t), then ilaplace returns a function of x:
F = F(x).
By definition, F(t) = int(L(s)*exp(s*t),s,c-i*inf,c+i*inf)
where c is a real number selected so that all singularities
of L(s) are to the left of the line s = c, i = sqrt(-1), and
the integration is taken with respect to s.
F = ilaplace(L,y) makes F a function of y instead of the default t:
ilaplace(L,y) F(y) = int(L(y)*exp(s*y),s,c-i*inf,c+i*inf).
F = ilaplace(L,y,x) makes F a function of x instead of the default t:
ilaplace(L,y,x) F(y) = int(L(y)*exp(x*y),y,c-i*inf,c+i*inf),
integration is taken with respect to y.
Examples:
syms s
f1 = 1/s^2;
h3=ilaplace(f1)
t
syms s
f2=1/(s*(s+1)^2)
h4=ilaplace(f2)
1 - t*exp(-t) - exp(-t)
syms s
f3=(3*s+2)/(s^2+2*s+10)
h5=ilaplace(f3)
pretty(h5)
/
sin(3 t) \
exp(-t) | cos(3 t) - -------- | 3
\
9
/
syms s t w x y f(x)
ilaplace(1/(s-1))
returns exp(t)
ilaplace(1/(t^2+1))
returns sin(x)
ilaplace(t^(-5/2),x)
returns (4*x^(3/2))/(3*pi^(1/2))
ilaplace(y/(y^2 + w^2),y,x)
returns cos(w*x)
ilaplace(laplace(f(x),x,s),s,x) returns f(x)
ASSIGNMENT
Find the Laplace transform corresponding to problems of 3.3, 3.4 as well as the inverse Laplace
corresponding to problems 3.7 and 3.8 of the text book. charles L. phillips fourth edition
3.3. (a) Draw a simulation diagram for the system described by the transfer function
s
Y(S)
= G(S) =
U(s)
$3+1
(b) From the simulation diagram write a set of state equations for the system of (a).
3.4. (a) Consider the closed-loop control system in Figure P3.4(a), and its simulation diagram in
part (b) of the figure. Write the state equations for the control system, from the simulation
diagram
(b) Find G (s), the compensator transfer function, and Gy(s), the plant transfer function,
directly from the simulation diagram.
(c) Find the closed-loop transfer function Y(s)/U(s).
(d) Show that the denominator of the closed-loop transfer function is equal to det(sI - A).
using A from (a).
(e) Verify the results of (d) by finding the A of Mason's gain formula. Note that, in this prob-
lem the denominator of the closed-loop transfer function has been calculated by three dif-
ferent procedures.
(f) Modify the MATLAB program of Example 3.4 to verify the closed-loop transfer function.
Compensator
U(s)
Plant
Gels)
Y\s)
Gols)
(a)
Compensator - Gls)
Plant - Gols)
2
U(s) 1
4
2
1
Yls)
3
-5
(b)
Figure P3.4 Control system for Problem 3.4.
transfer functions in (e).
3.7. Consider the motor in the steel-rolling system of Example 3.3. In this problem we use the same
motor for a position control system, that is, the motor is not used for speed control.
(a) Choosing the state variables to be x1 = 1, X2 = 0, X3 = d0/dt, and the output y = 0, write the
state equations for the motor.
(b) Draw a simulation diagram for (a). Note that when using the laws of physics, the state
model is neither the control canonical nor the observer canonical form.
(c) Using Mason's gain formula and the simulation diagram of (b), verify the transfer function
(s)/E,(s) developed in Section 2.7.
3.8. The equations for the circuit of Figure P3.8 are developed in Example 2.2, Section 2.2.
(a) Express these equations in the state variable format, using the variables x(t) = (t) =
dt, u(t) = v. (1), and y(t) = v2 (1).
ſiceydt.
(b) Draw a simulation diagram for these state equations.
(e) Verify the transfer function calculated in Example 2.3, using Mason's gain formula that
is, show that
Y(s) R, Cs + 1
U(s) (R+R) Cs +1
(d) Verify the transfer funtion in (c) using (3-42).
iſt)
R
w
R2
}
V,(t)
Vat)
Figure P3.8
Purchase answer to see full
attachment