Course materials · Control Engineering II

Laplace Transform

English translation

Learning objectives

Directly verify that the solution obtained by transforming a time-domain differential equation satisfies the original problem.

Checking that simplification preserves values

Starting conditions

D=x2−2x+1x2−3x+2D=\frac{x^2-2x+1}{x^2-3x+2}: simplify by cancellation. For value comparisons, use x∈{0,3}x\in\{0,3\}.

Procedure

  1. Simplify D by cancellation, and separately identify the x values that make the original denominator 0.
  2. At x∈{0,3}x\in\{0,3\}, check that the values before and after cancellation agree. Explain why x∈{1,2}x\in\{1,2\} cannot be checked in the same way.

Results to retain

import sympy as sym
x=sym.symbols('x')
D=(x**2-2*x+1)/(x**2-3*x+2)
print('약분:',sym.cancel(D))
print('원래 분모의 근:',sym.solve(x**2-3*x+2,x))
# TODO: Compare values at x=0,3 and explain the two excluded points.

Record results and self-check

Original expression before cancellation:

Expression after cancellation:

Excluded x values:

Value difference at the two points:

Points to check

Laplace transform and inverse transform

Starting conditions

Transform f(t)=e−2tf(t)=e^{-2t} for t>0, then take its inverse transform.

Procedure

  1. Use sym.laplace_transform and inverse_laplace_transform to obtain the transform and inverse transform.
  2. Compare the original and recovered function values at t∈{.5,1,2}t\in\{.5,1,2\}.
  3. Explain how the pole −2 of the transformed expression relates to the time-domain decay term e−2te^{-2t}.

Results to retain

import sympy as sym
t=sym.symbols('t',positive=True);s=sym.symbols('s')
f=sym.exp(-2*t)
F=sym.laplace_transform(f,t,s,noconds=True)
restored=sym.inverse_laplace_transform(F,s,t)
print(F,restored)
# TODO: Check the differences at the three specified times.

Record results and self-check

Function:

F(s):

Inverse transform:

Maximum numerical error:

Points to check

Differential equations with initial conditions

Starting conditions

ẏ+2y=1\dot y+2y=1; compare y(0)=0 with y(0)=1. The input is a unit step for t≥0.

Procedure

  1. Write the Laplace transform of the derivative term and substitute the initial condition to obtain (s+2)Y(s)=1s+y(0)(s+2)Y(s)=\frac1s+y(0).
  2. Divide both sides of this equation by s+2s+2 to obtain Y(s)Y(s). Substitute each initial condition, take the inverse transform, and plot both y(t)y(t) over 0≤t≤40\le t\le4 s together.
  3. For each y(t)y(t), calculate dydt+2y−1\frac{dy}{dt}+2y-1 and y(0)−y0y(0)-y_0. Record both residuals for each initial condition and determine whether they are 0.

Results to retain

import sympy as sym
t=sym.symbols('t',positive=True); s=sym.symbols('s')
for y0 in [0,1]:
    Y=(1/s+y0)/(s+2)
    y=sym.inverse_laplace_transform(Y,s,t)
    print(y0,y)
# TODO: Add residual checks and plots.

Record results and self-check

y(0):

Y(s):

Initial-value residual:

ODE residual:

Steady-state value:

Points to check