The Padé approximant of order [m, n] approximates the function f(x) around x = x0 as
The Padé approximant is a rational function formed by a
ratio of two power series. Because it is a rational function, it is
more accurate than the Taylor series in approximating functions with
poles. The Padé approximant is represented by the Symbolic Math Toolbox™ function
When a pole or zero exists at the expansion point x = x0, the accuracy of the Padé approximant decreases. To increase accuracy, an alternative form of the Padé approximant can be used which is
pade function returns the alternative
form of the Padé approximant when you set the
The Padé approximant is used in control system theory to model time delays in the response of the system. Time delays arise in systems such as chemical and transport processes where there is a delay between the input and the system response. When these inputs are modeled, they are called dead-time inputs. This example shows how to use the Symbolic Math Toolbox to model the response of a first-order system to dead-time inputs using Padé approximants.
The behavior of a first-order system is described by this differential equation
Enter the differential equation in MATLAB®.
syms tau a x(t) y(t) xS(s) yS(s) H(s) tmp F = tau*diff(y)+y == a*x;
Find the Laplace transform of
F = laplace(F,t,s)
Assume the response of the system at
t = 0 is
subs to substitute for
y(0) = 0.
F = subs(F,y(0),0)
To collect common terms, use
F = simplify(F)
For readability, replace the Laplace transforms of
F = subs(F,[laplace(x(t),t,s) laplace(y(t),t,s)],[xS(s) yS(s)])
The Laplace transform of the transfer function is
Divide both sides of the equation by
subs to replace
F = F/xS(s); F = subs(F,yS(s)/xS(s),H(s))
Solve the equation for
H(s). Substitute for
a dummy variable, solve for the dummy variable using
and assign the solution back to
F = subs(F,H(s),tmp); H(s) = solve(F,tmp)
The input to the first-order system is a time-delayed step input.
To represent a step input, use
the input by three time units. Find the Laplace transform using
step = heaviside(t - 3); step = laplace(step)
Find the response of the system, which is the product of the transfer function and the input.
y = H(s)*step
To allow plotting of the response, set parameters
their values. For
y = subs(y,[a tau],[1 3]); y = ilaplace(y,s);
Find the Padé approximant of order
[2 2] of
the step input using the
Order input argument
stepPade22 = pade(step,'Order',[2 2])
Find the response to the input by multiplying the transfer function and the Padé approximant of the input.
yPade22 = H(s)*stepPade22
Find the inverse Laplace transform of
yPade22 = ilaplace(yPade22,s)
To plot the response, set parameters
their values of
yPade22 = subs(yPade22,[a tau],[1 3])
Plot the response of the system
y and the
response calculated from the Padé approximant
hold on grid on fplot([y yPade22],[0 20]) title('Pade Approximant for dead-time step input') legend('Response to dead-time step input',... 'Pade approximant [2 2]',... 'Location', 'Best')
[2 2] Padé approximant does not
represent the response well because a pole exists at the expansion
0. To increase the accuracy of
there is a pole or zero at the expansion point, set the
Relative and repeat the steps. For
stepPade22Rel = pade(step,'Order',[2 2],'OrderMode','Relative')
yPade22Rel = H(s)*stepPade22Rel
yPade22Rel = ilaplace(yPade22Rel)
yPade22Rel = subs(yPade22Rel,[a tau],[1 3])
fplot(yPade22Rel,[0 20],'DisplayName','Relative Pade approximant [2 2]')
The accuracy of the Padé approximant can also be increased
by increasing its order. Increase the order to
[4 5] and
repeat the steps. The
[n-1 n] Padé approximant
is better at approximating the response at
t = 0 than
[n n] Padé approximant.
stepPade45 = pade(step,'Order',[4 5])
yPade45 = H(s)*stepPade45
yPade45 = subs(yPade45,[a tau],[1 3])
yPade45 = ilaplace(yPade45)
yPade45 = vpa(yPade45)
fplot(yPade45,[0 20],'DisplayName','Pade approximant [4 5]')
The following points have been shown:
Padé approximants can model dead-time step inputs.
The accuracy of the Padé approximant increases with the increase in the order of the approximant.
When a pole or zero exists at the expansion point,
the Padé approximant is inaccurate about the expansion point.
To increase the accuracy of the approximant, set the
Relative. You can also use increase the order
of the denominator relative to the numerator.