034IN "Fundamentals of Automatic Control" - Introduction to MATLAB

Part 4L-1 - The Laplace Transform

Table of Contents

Introduction

In this live script, we illustrate how to use the Matlab Symbolic Toolbox to determine the Laplace transform of a causal function of time and the inverse Laplace transform corresponding to a given rational, strictly proper or simply proper function of the complex variable s.
The importance of managing the Laplace transform will soon become clear (refer to Part 2 of the class material)!
Please refer also to the LAPLACE_TRANSFORM document in the MS Teams course file repository.
What you will learn:

The Laplace Transform

Introduction and Motivations

What is a transform?
Why use transforms?
So, what is the Laplace transform?

Motivations

We’ll use Laplace transforms to solve differential equations and integro-differential equations.
Examples:
rlc-circuit.png
[refer to the class material Part 2, pp. 28-30]

Causal Functions

Example: The Heaviside Function

This is the first example of a causal function:
heaviside_function.png
The Heaviside function is defined in the Symbolic Math Toolbox and it corresponds to the MATLAB function heaviside.
Pay attention: by default, the definition of this function in the Symbolic Math Toolbox is different:
clear
 
sympref('default');
disp(heaviside(sym([-10, -1/10000, 0, +1/10000, 10])))
tVALs = (-2:1e-2:2); % refer to Part 3 of "Introduction to MATLAB"
plot(tVALs, heaviside(sym(tVALs)), 'LineStyle', 'none', 'Marker','o', 'MarkerSize', 6, ...
'MarkerEdgeColor','r', 'MarkerFaceColor','r')
grid on; xlabel('time t [s]'); ylabel('f(t)');
title('Heaviside Function')
ylim([-0.25, 1.25])
Note the function value at (recall the default configuration of the Symbolic Math Toolbox, analyzed at the beginning of the live script Introduction to MATLAB Part 4 - Symbolic Math Computations ).
To adapt the Heaviside function, we have to modify the toolbox configuration preferences, as follows:
sympref('HeavisideAtOrigin', 1); % forcing the setting for the Heaviside function
 
disp(heaviside(sym([-10, -1/10000, 0, +1/10000, 10])))
Now the behavior of the Heaviside function is in accordance with the definition .
% tVALs = (-2:1e-2:2);
plot(tVALs, heaviside(sym(tVALs)), 'LineStyle', 'none', 'Marker','o', 'MarkerSize', 4, ...
'MarkerEdgeColor','b', 'MarkerFaceColor','b')
grid on; xlabel('time t [s]'); ylabel('f(t)');
title('Heaviside Function')
ylim([-0.25, 1.25]);

Another Example

Usually we will use the Heaviside function to emphasize that we are considering a causal function:
causalfunExample.png
How do you do this in MATLAB?
syms t
f_causal(t) = 3*sin(4*t+pi/3)*heaviside(t)
f_causal(t) = 
tVALs = (-2:1e-3:2);
plot(tVALs, f_causal(sym(tVALs)), 'LineStyle', 'none', 'Marker','o', 'MarkerSize', 4, ...
'MarkerEdgeColor','g', 'MarkerFaceColor','g')
grid on; xlabel('time t [s]'); ylabel('f(t)');
title('A Causal Function')
ylim([-3.25, 3.25]);

The Unilateral or One-Sided Laplace Transform

Definition

Given a causal function , the Laplace transform of is the function defined by
for those for which the integral makes sense.

Existence

Which class or classes of functions possess a Laplace transform?
Piecewise continuous function jump discontinuities and no vertical asymptotes.
Examples:
The function defined by
is piecewise continuous on .
clear t tVALs
syms t
 
assume(t>0)
f_pc(t) = symfun(piecewise( (0<=t & t<=1), t^2, ...
(1<t & t<=2), 3-t, ...
2<t , t+1 ), t);
 
tVALs = (0:1e-3:3); % 3001 values in [0, 3]
plot(tVALs, f_pc(sym(tVALs)), 'LineStyle','none', 'Marker','square',...
'MarkerSize',4, 'MarkerFaceColor','b', 'MarkerEdgeColor','b');
grid on;
xlabel('time t [s]'); ylabel('f_{pc}(t)');
title('A Piecewise Continuous Function')
The function defined by
is NOT piecewise continuous on .
f_Npc(t) = symfun(piecewise( (0<=t & t<=2), 1/(2-t), ...
2<t , t+1 ), t);
 
tVALs = (0:1e-2:3);
plot(tVALs, f_Npc(sym(tVALs)), 'LineStyle','-',...
'Color', 'm', 'LineWidth', 3);
grid on;
xlabel('time t [s]'); ylabel('f_{Npc}(t)');
title('A NOT Piecewise Continuous Function')

For details on the commands symfun and piecewise, refer to
help piecewise
--- help for sym/piecewise --- sym/piecewise - Conditionally defined expression or function This MATLAB function returns the piecewise expression or function pw whose value is val1 when condition cond1 is true, is val2 when cond2 is true, and so on. Syntax pw = piecewise(cond1,val1,cond2,val2,...) pw = piecewise(cond1,val1,cond2,val2,...,otherwiseVal) Input Arguments cond - Condition symbolic condition | symbolic variable val - Value when condition is satisfied number | vector | matrix | multidimensional array | symbolic number | symbolic variable | symbolic vector | symbolic matrix | symbolic multidimensional array | symbolic function | symbolic expression otherwiseVal - Value if no conditions are true number | vector | matrix | multidimensional array | symbolic number | symbolic variable | symbolic vector | symbolic matrix | symbolic multidimensional array | symbolic function | symbolic expression Output Arguments pw - Piecewise expression or function symbolic expression | symbolic function Examples Define and Evaluate Piecewise Expression Define Piecewise Function Set Value When No Condition Is True Plot Piecewise Expression Assumptions and Piecewise Expressions Differentiate, Integrate, and Find Limits of Piecewise Expression Elementary Operations on Piecewise Expressions Extract Expressions and Conditions from Piecewise Modify or Extend Piecewise Expression Solve System of Equations with Piecewise Expressions See also and, assume, assumeAlso, assumptions, if, in, isAlways, not, or Introduced in Symbolic Math Toolbox in R2016b Documentation for sym/piecewise
 
help symfun
symfun - Create symbolic functions This MATLAB function creates the symbolic function f. Syntax f(inputs) = formula f = symfun(formula,inputs) f = symfun(fM) Input Arguments formula - Function body symbolic expression | vector of symbolic expressions | matrix of symbolic expressions inputs - Input argument or arguments of function symbolic variable | array of symbolic variables fM - Symbolic matrix function to convert symbolic matrix function Output Arguments f - Symbolic function symfun object Examples Create and Define Symbolic Functions Return Body and Arguments of Symbolic Function Combine Two Symbolic Functions Convert Symbolic Matrix Function to Symbolic Function See also argnames, formula, matlabFunction, sym, syms, symvar Introduced in Symbolic Math Toolbox in R2012a Documentation for symfun

Remark on Laplace Transform and Impulses

Examples of Laplace Transforms

Exponential Function

clear variables
 
syms t s
 
ft = exp(t)*heaviside(t);
 
Fs = laplace(ft, t, s)
Fs = 

Unit Step Function - the Heaviside Function

clear variables
 
syms t s
 
ht = heaviside(t);
 
Hs = laplace(ht, t, s)
Hs = 

Important Remark: On Using the Heaviside Function Notation For Causal Functions

As pointed out in the Laplace transform documentation
Laplace_heaviside_uniilateral_trtnsform.png
It means that
clear variables
 
syms t s
 
ft1(t) = exp(t)*heaviside(t)
ft1(t) = 
ft2(t) = exp(t)
ft2(t) = 
 
Fs1 = laplace(ft1, t, s)
Fs1 = 
Fs2 = laplace(ft2, t, s)
Fs2 = 

Laplace Transforms Properties

Linearity

clear variables
 
syms t s
syms f(t) g(t)
syms F(s) G(s)
syms a
 
 
omogeneityL = laplace(a*f(t))
omogeneityL = 
omogeneityL = subs(omogeneityL, laplace(f(t)), F(s))
omogeneityL = 
superpositionl = laplace(f(t)+g(t), t, s);
superpositionl = subs(superpositionl, [laplace(f(t)), laplace(g(t))], [F(s), G(s)])
superpositionl = 
An example:
clear variables
 
syms t s
f(t) = 1*heaviside(t);
g(t) = exp(t);
 
F(s) = laplace(f(t), t, s);
G(s) = laplace(g(t), t, s);
disp([F, G])
L(s) = laplace(3*f(t)+2*g(t), t, s)
L(s) = 
L(s) = collect(L, s)
L(s) = 
L(s) = simplify(L)
L(s) = 
For details about the commands subs, collect, and simplify:
help sym/subs
subs - Symbolic substitution This MATLAB function returns a copy of s, replacing all occurrences of match with replacement, and then evaluates s. Substitute Symbolic Scalar Variables and Functions snew = subs(s,match,replacement) snew = subs(s,replacement) snew = subs(s) Substitute Symbolic Matrix Variables and Functions sMnew = subs(sM,matchM,replacementM) sMnew = subs(sM,replacementM) sMnew = subs(sM) Input Arguments s - Symbolic input symbolic scalar variable | symbolic expression | symbolic equation | symbolic function | symbolic array | symbolic matrix | structure match - Scalar variable to substitute symbolic scalar variable | symbolic function | symbolic expression | symbolic array | cell array replacement - New replacement value number | symbolic number | symbolic scalar variable | symbolic function | symbolic expression | symbolic array | structure | cell array sM - Symbolic input symbolic matrix variable | symbolic matrix function | symbolic expression | symbolic equation | symbolic condition matchM - Matrix variable or function to substitute symbolic matrix variable | symbolic matrix function | symbolic expression | cell array replacementM - New replacement value number | symbolic number | symbolic matrix variable | symbolic matrix function | symbolic expression | symbolic array | cell array Examples Single Substitution Default Substitution Variable Evaluate Expression with New Values Multiple Substitutions Substitute Scalars with Arrays Substitute Symbolic Scalar Variables in Structure Array Substitute Multiple Scalars with Arrays Substitutions in Equations Substitutions in Functions Substitute Variables with Corresponding Values from Structure Substitution Involving First-Order and Second-Order Derivatives Substitute Symbolic Matrix Variables with Arrays Characteristic Polynomial of Matrix Substitute Variables in Symbolic Matrix Function Substitute Symbolic Matrix Variables and Matrix Functions in Equation Evaluate Expression Involving Symbolic Matrix Variables See also double, lhs, rhs, simplify, subexpr, vpa Introduced in Symbolic Math Toolbox before R2006a Documentation for subs
help sym/collect
sym/collect - Collect coefficients of identical powers This MATLAB function collects the coefficients of identical powers of the default variable in the symbolic input P. Syntax C = collect(P) C = collect(P,expr) Input Arguments P - Input expression symbolic expression | symbolic function | symbolic vector | symbolic matrix expr - Expression in terms of which you collect coefficients symbolic number | symbolic variable | symbolic expression | symbolic function | symbolic vector | string array | character vector | cell array of character vectors Examples Collect Coefficients of Identical Powers of Default Variable Collect Coefficients of Identical Powers of Specified Variable Collect Coefficients in Terms of i and pi Collect Coefficients in Terms of Symbolic Expressions and Functions Collect Coefficients for Each Element of Matrix Collect Coefficients in Terms of Function Calls Collect Coefficients of Rational Function See also combine, expand, factor, horner, numden, rewrite, simplify, simplifyFraction, symvar Introduced in Symbolic Math Toolbox before R2006a Documentation for sym/collect
 
help sym/simplify
sym/simplify - Algebraic simplification This MATLAB function performs algebraic simplification of expr. Syntax S = simplify(expr) S = simplify(expr,Name=Value) Input Arguments expr - Input expression symbolic expression | symbolic function | symbolic vector | symbolic matrix Name-Value Arguments All - Option to return equivalent results false (default) | true Criterion - Simplification criterion "default" (default) | "preferReal" IgnoreAnalyticConstraints - Simplification rules false (default) | true Seconds - Time limit for the simplification process Inf (default) | positive number Steps - Number of simplification steps 1 (default) | positive number Examples Simplify Expressions Simplify Matrix Elements Get Simpler Results for Logarithms and Powers Get Simpler Results Using More Simplification Steps Get Equivalent Results for Symbolic Expression Separate Real and Imaginary Parts Avoid Imaginary Terms in Exponents Simplify Units Get Simpler Result by Expanding Expression See also collect, combine, expand, factor, horner, numden, rewrite, simplifyFraction, Simplify Symbolic Expression Introduced in Symbolic Math Toolbox before R2006a Documentation for sym/simplify

Transform of a Derivative

If the causal function is continuous at , then
clear variables
 
syms t s
syms f(t) dot_f(t)
syms F(s)
 
dot_f(t) = diff(f(t), 1); % the 1st derivative
Dot_F(s) = laplace(dot_f, t, s)
Dot_F(s) = 
Dot_F(s) = subs(Dot_F(s), laplace(f(t), t, s), F(s))
Dot_F(s) = 
An example:
clear variables
 
syms t s
syms f(t) dot_f(t)
syms F(s) DotF(s)
 
f(t) = 2*(exp(t)-1); % causal symbolic function of time t
 
Let's verify the continuity of at :
f0left = limit(f, t, 0, 'left')
f0left = 
0
f0right = limit(f, t, 0, 'right')
f0right = 
0
f(0) % the value of f(t) when t=0
ans = 
0
F(s) = laplace(f, t, s) % Laplace transform of f(t)
F(s) = 
dot_f(t) = diff(f,t,1) % the 1st derivative of f(t)
dot_f(t) = 
DotF(s) = laplace(dot_f(t), t, s) % the Laplace transform of dot_f
DotF(s) = 
% the Laplace transform of the derivative of f(t)
DotF_ALT(s) = laplace(diff(f, t, 1), t, s)
DotF_ALT(s) = 
% the Laplace transform, applying the derivative property "by hand"
DotF_ALT2(s) = collect( (s*F(s)-f(0)), s)
DotF_ALT2(s) = 
For details about the command diff:
help diff
diff - Differences and approximate derivatives This MATLAB function calculates differences between adjacent elements of X. Syntax Y = diff(X) Y = diff(X,n) Y = diff(X,n,dim) Input Arguments X - Input array vector | matrix | multidimensional array | table | timetable n - Difference order 1 (default) | positive integer scalar | [] dim - Dimension to operate along positive integer scalar Output Arguments Y - Difference array scalar | vector | matrix | multidimensional array | table | timetable Examples Differences Between Vector Elements Differences Between Matrix Rows Multiple Differences Differences Between Matrix Columns Approximate Derivatives with diff Differences Between Datetime Values See also gradient, prod, cumsum, sum Introduced in MATLAB before R2006a Documentation for diff Other uses of diff

Higher-Order Derivatives

Examples:
clear variables
 
syms t s
syms f(t) dot_f(t) ddot_f(t)
 
dot_f(t) = diff(f, 1); % the 1st derivative
ddot_f(t) = diff(f, 2); % the 2nd derivative
Dot_F(s) = laplace(dot_f, t, s)
Dot_F(s) = 
DDot_F(s) = laplace(ddot_f, t, s)
DDot_F(s) = 
Given the causal function
clear variables
 
syms t s
syms f(t) dot_f(t) ddot_f(t)
 
f(t) = 2*(exp(3*t)-1)
f(t) = 
dot_f(t) = diff(f, 1) % the 1st derivative
dot_f(t) = 
ddot_f(t) = diff(f, 2) % the 2nd derivative
ddot_f(t) = 
DDot_F(s) = laplace(ddot_f, t, s)
DDot_F(s) = 
 
DDotF_ALT(s) = s^2*laplace(f, t, s)-s*f(0)-dot_f(0)
DDotF_ALT(s) = 
collect(DDot_F, s)
ans(s) = 

Transform of an Integral

Let be the running integral of a causal function :
where .
An example:
clear variables
 
syms t s tau
 
assume(tau >=0)
assumptions
ans = 
 
syms f(t) g(t)
 
f(t) = heaviside(t);
F(s) = laplace(f, t, s)
F(s) = 
assumeAlso(t>0)
g(t) = int(f(tau), tau, 0, t)
g(t) = 
t
G(s) = simplify(laplace(g(t), t, s))
G(s) = 

Multiplication by t

Let be a causal function and define . Then , where
Examples:
clear variables
 
syms t s
f(t) = exp(t);
g(t) = t*exp(t);
 
F(s) = laplace(f, t, s);
G(s) = laplace(g, t, s)
G(s) = 
 
G_ALT = -diff(F, s, 1)
G_ALT(s) = 
clear variables
 
syms t s
f(t) = exp(t);
F(s) = laplace(f, t, s);
f1(t) = t*exp(t);
g1(t) = t^2*exp(t);
F1(s) = laplace(f1, t, s);
G1(s) = laplace(g1, t, s)
G1(s) = 
 
G1_ALT = -diff(F1, s, 1)
G1_ALT(s) = 
 
G1_ALT_ALT = -diff(-diff(F, s, 1), s, 1)
G1_ALT_ALT(s) = 

Exponential Scaling (Frequency Shifting)

Let be a causal function, with Laplace transform , and let g(t) be defined as ( a is a scalar value)
An example:
clear variables
 
syms t s omega
 
f(t) = cos(omega*t)
f(t) = 
 
g(t) = exp(-t)*f(t)
g(t) = 
 
F(s) = laplace(f, t, s)
F(s) = 
 
G(s) = laplace(g, t, s)
G(s) = 
subs(F(s), omega, 1)
ans = 
collect(subs(G(s), omega, 1))
ans = 

Time Shifting (Time Delay)

An example:
clear variables
syms t s
 
a = sym(2); % the first delay term
b = sym(5); % the second delay term
 
f(t) = heaviside(t-a)-heaviside(t-b)
f(t) = 
% let's plot the pulse
tVALs = (-2:1e-3:10);
plot(tVALs, f(sym(tVALs)), 'LineStyle', 'none', 'Marker', 'square',...
'MarkerSize', 4, 'MarkerFaceColor', '#0072BD', 'MarkerEdgeColor', '#0072BD');
 
% fplot(f, [-2, 10], 'LineWidth', 3);
grid on
title('a rectangular pulse from t=2 to t=5')
xlabel('time t [s]');
ylabel('pulse f(t)');
ylim([-0.2, 1.2]);
 
% the corresponding Laplace transform
F(s) = collect(laplace(f, t, s), s)
F(s) = 
Another example:
clear variables
 
syms t s
f(t) = ( 3 * exp(-0.75*t) * sin(16*t+pi/3) )*heaviside(t)
f(t) = 
 
T = sym(1.5); % the delay
 
% the delayed function
g(t) = f(t-T) % <<<<<<<-- Pay attention to the notation! <<<<<<<--
g(t) = 
g_ALT(t) = ( 3*exp(-0.75*(t-T)) * sin(16*(t-T)+pi/3) )* heaviside(t-T)
g_ALT(t) = 
% let's draw both the functions f and g
tVALs = (-1:1e-3:5);
plot(tVALs, f(sym(tVALs)), 'LineStyle', 'none', 'Marker', 'square',...
'MarkerSize', 4, 'MarkerFaceColor', '#0072BD', 'MarkerEdgeColor', '#0072BD');
hold on; grid on;
plot(tVALs, g(sym(tVALs)), 'LineStyle', 'none', 'Marker', 'square',...
'MarkerSize', 2, 'MarkerFaceColor', '#D95319', 'MarkerEdgeColor', '#D95319');
hold off
xlabel('time t [s]');
ylabel('f(t) and g(t)');
legend('f(t)', 'g(t)','Location', 'best', 'FontSize', 14)
title('A causal function vs. a delayed causal function')
ylim([-2.75, 3.25])

Convolution

The convolution of causal functions and is the causal function , defined as follows:

The Inverse Laplace Transform

Given a Laplace transform , the unique corresponding causal function can be recovered via:
where σ is large enough that is defined for .
Luckily, we do not use that formula! Instead, we will use the Symbolic Math Toolbox command ilaplace!
help ilaplace
--- help for sym/ilaplace --- sym/ilaplace - Inverse Laplace transform This MATLAB function returns the Inverse Laplace Transform of F. Syntax f = ilaplace(F) f = ilaplace(F,transVar) f = ilaplace(F,var,transVar) Input Arguments F - Input symbolic expression | symbolic function | symbolic vector | symbolic matrix var - Independent variable s (default) | symbolic variable | symbolic expression | symbolic vector | symbolic matrix transVar - Transformation variable t (default) | x | symbolic variable | symbolic expression | symbolic vector | symbolic matrix Examples Inverse Laplace Transform of Symbolic Expression Default Independent Variable and Transformation Variable Inverse Laplace Transforms Involving Dirac and Heaviside Functions Inverse Laplace Transform as Convolution Inverse Laplace Transform of Array Inputs Inverse Laplace Transform of Symbolic Function If Inverse Laplace Transform Cannot Be Found See also fourier, ifourier, iztrans, laplace, ztrans, rewrite Introduced in Symbolic Math Toolbox before R2006a Documentation for sym/ilaplace

Important Remark

The functions in the time domain , with which we will deal, will always be
Thus, the corresponding Laplace transforms will always be rational polynomial functions
Furthermore, the degree of the numerator polynomial will be less than that of the denominator polynomial: .

Laplace Transform: Zeros and Poles

Given a Laplace transform as a rational polynomial function, taking in evidence the roots of both the polynomials, we define

Computation of the Inverse Laplace Transform "by Hand": Sum of Partial Fractions

For the sake of completeness, we present the classical approach for determining the inverse Laplace transform.
Starting from a Laplace transform that is a strictly proper rational function, it is always possible to express the function as a sum of partial fractions:
where and .
Owing to the linearity of the inverse Laplace transform, the time domain function we are looking for will be the linear combination of elementary exponential functions:
How to calculate the coefficients?
Luckily, we do not use that formula! Instead, we will use the Symbolic Math Toolbox commands partfrac & ilaplace!

An Example using partfrac

Given the Laplace transform
determine the corresponding partial fraction decomposition:
clear variables
 
syms t s
 
F(s) = (5*s+3)/(s^3+5*s^2+8*s+4)
F(s) = 
 
Fpart_frac = partfrac(F, s)
Fpart_frac(s) = 

The Inverse Laplace Transform using MATLAB: Examples

A First Example

Given the Laplace transform
determine the corresponding causal function (i.e., the inverse Laplace transform)
clear variables
 
syms t s
 
F(s) = (5*s+3)/(s^3+5*s^2+8*s+4)
F(s) = 
 
We can simplify and factorize the rational expression, by applying the command simplify
F(s) = simplify(F)
F(s) = 
The inverse Laplace transform can be determined as follows:
f(t) = ilaplace(F, s, t)
f(t) = 

Important Remark on Notation

As pointed out previously in this live script, often in the evaluation of Laplace transforms and inverse transforms the symbolic math engine does not insert any Heaviside function.

More Examples

Given the Laplace transform
determine the corresponding causal function (i.e., the inverse Laplace transform).
Note: According to the Laplace transform properties, this is the Laplace transform of a delayed causal function.
clear variables
 
syms t s
 
F(s) = (2/(s^2+2*s+2))*exp(-2*s)
F(s) = 
 
f(t) = ilaplace(F, s, t)
f(t) = 
Note: This time the Heaviside function is needed!
Given the Laplace transform
determine the corresponding causal function
clear variables
 
syms t s
 
F(s) = (sym(2*sym(sqrt(3))+4)*s^3+sym(6*sym(sqrt(3))+20)*s^2+sym(14*sym(sqrt(3))+92)*s+sym(10*sym(sqrt(3))+108))/(s^4+4*s^3+26*s^2+44*s+85)
F(s) = 
 
f(t) = ilaplace(F, s, t)
f(t) = 
 
ft1 = simplify(ilaplace(F, s, t), 10)
ft1 = 
 
ft2 = simplify(ilaplace(F, s, t), 100)
ft2 = 

Zeros and Poles of a Rational Laplace Transform

Consider a Laplace transform that is a rational function of the complex variable s as, for example
How to determine zeros and poles of the rational function in MATLAB?
clear variables
 
syms t s
 
F(s) = (5*s+3)/(s^3+5*s^2+8*s+4)
F(s) = 
To find the poles of simply sue the command poles:
pSET = poles(F, s)
pSET = 
What about the order of each pole?
[pSET, Np_SET] = poles(F, s) %
pSET = 
Np_SET = 
How to determine the zeros of a rational Laplace transform? There is no devoted command. You have to use the solve command:
zSET = solve(F, s)
zSET = 
Thus you obtain a symbolic vector containing the zeros, each one with its multiplicity.

Important Remark on Zeros of a Rational Laplace Transform

Pay attention: the command solve provides explicit solution usually for polynomial equations up to the degree 2. If you want an explicit solution of a polynomial equation with higher degree, you have to use the following syntax for the command solve:
G(s) = 3*((s+3)^3*(s-1))/((s+10)^2*(s-5)^3)
G(s) = 
 
[pSET, nSET] = poles(G, s)
pSET = 
nSET = 
 
zSET = solve(G, s, "MaxDegree",4)
zSET = 
For details, refer to
doc sym/solve

Theorems on the Laplace Transform

Initial Value Theorem

Given a Laplace transform that is a strictly proper rational function, the following property holds

An Application Example

Given the Laplace transform , determine without computing the inverse Laplace transform:
clear variables
syms s t
 
F(s) = (5*s+3)/(s+1)/(s+2)^2
F(s) = 
 
f0 = limit(s*F, s, +Inf)
f0 = 
0
Let's verify:
f(t) = ilaplace(F,s, t)
f(t) = 
f(0)
ans = 
0

Final Value Theorem

Given a Laplace transform that is a rational function,

Important Remark

Pay attention to the assumptions about the poles of the Laplace transform! They are crucial!

Application Example

Given the Laplace transform , determine, if possible,
clear variables
syms s t
 
F(s) = (5*s+3)/s/(s+1)/(s+2)^2;
Let's verify if the Final Value Theorem's assumptions are met:
[pF, n_pF] = poles(F, s) % poles and corresponding multiplicity
pF = 
n_pF = 
% --- 1st check: is there a pole at s=0? ---
pole0ID = isAlways(pF==sym(0));
if any(pole0ID)
pole0 = true;
p0M = isAlways(n_pF(pole0ID)==1);
else
pole0 = false;
p0M = false;
end
if (pole0 && p0M) || ~(pole0)
p0OK = true;
else
p0OK = false;
end
% --- 1st check: is there a pole at s=0? ---
 
 
% ---- 2nd check: Do all the remaining poles have negative real part? ----
if pole0
poles2analyse = not(pole0ID);
else
poles2analyse = true(size(pF));
end
pN_OK = all(isAlways(real(pF(poles2analyse))<sym(0)));
% final check
 
if (pN_OK && p0OK)
disp('The Final Value Theorem''s assumptions are met!');
disp('You can apply the Final Value Theorem!')
 
limf_infty = limit(s*F, s , 0)
 
% let's verify, by comparison with the inverse Laplace transform
f(t) = ilaplace(F, s, t);
f2infty = limit(f, t, +Inf)
 
else
disp('*** The Final Value Theorem''s assumptions are NOT met! ***');
disp('*** You CANNOT apply the Final Value Theorem! ***')
end
The Final Value Theorem's assumptions are met!
You can apply the Final Value Theorem!
limf_infty = 
f2infty =