2.9.  INVERSION WITH PARTIAL FRACTION EXPANSION USING MATLAB [6]

Having presented the fundamentals of MATLAB in Section 2.8, let us now return to the problem we addressed in Section 2.7 on obtaining the inverse Laplace transform using partial fraction expansion. However, in this section, we will obtain the partial fraction expansion using MATLAB.

Table 2.2. Commands and Functions used by MATLAB [6]

Commands and Matrix Functions Description
angle Phase angle
ans Answer when expression is not assigned
asin Arcsine
atan Arctangent
axis Manual axis scaling on plots
bode Plot Bode diagram (available only with Control System
Toolbox, and the Student Edition of MATLAB)
clear Remove items from memory and clear workspace
clg Clear graph’s screen
conj Complex conjugate
conv Multiplication; convolution
cos Cosine
cosh Hyperbolic cosine
cov Covariance
deconv Division; deconvolution
det Determinant
disp Display text or matrix
end Terminates scope or “for,” “while,” and “if” statements
exit Terminates program
exp Exponential base e
eye Identity matrix
figure Opens new graphic window by creating figure object
grid Draws grid lines for 2-D and 3-D plots
help Online help for MATLAB functions and m-files
hold Hold the current graph
home Sends the cursor “home” to the upper left of the screen
imag Imaginary part
inf Infinity
inv Matrix inverse
length Length of vector
linspace Generate linearly spaced vectors
log Natural logarithm
loglog Log–log scale plot
log 10 Common logarithm (base 10)
logspace Generate logarithmically spaced vectors
max Maximum elements of a matrix
mean Average or mean value of vectors and matrices
menu Generate a menu of choices for user input
meshgrid Generate X and Y arrays for 3-D plots
min Minimum elements of a matrix
nyquist Plot Nyquist frequency response (available only with the Control System Toolbox and, the Student Edition of MATLAB)
pi Provide pi (π)
plot Linear 2-D plot
plot3 Plots lines and point in 3-space
polar Polar coordinate plot
poly Characteristic polynomial
polyfit Polynomial curve fitting
prod Product of the elements
quit Terminate MATLAB
real Real part
residue Partial-fraction expansion
rlocus Plot root locus (available only with the MCSTD Toolbox and with the Student Edition of MATLAB)
roots Polynomial roots
save Save workspace variables on disk
semilogx; semilogy Semi-logarithmic 2-D plot (x-axis or y-axis logarithmic)
sin Sine
sinh Hyperbolic sine
size Matrix dimensions
ss2tf State-space to transfer function conversion
step Plot unit step response (available only with the Control System Toolbox, and the Student Edition of MATLAB)
sum Sum of the elements
tan Tangent
tanh Hyperbolic tangent
text Add text to plot by creating text object
tf2ss Transfer function to state-space conversion
title Graph title
trace Trace of a matrix
type List file
what Directory listing of m-files
who List directory of variables in memory
xlabel x-axis label
ylabel y-axis label

Let us consider the following transfer function:

Image

We wish to first find its partial fraction expansion, prior to obtaining its Laplace transform using Table 2.1.

In order to use MATLAB’s command “residue” (num,den) for obtaining the partial fraction expansion, we must first describe this problem in MATLAB format where row vectors “num” and “den” specify the coefficients of the numerator and denominator of the transfer function as follows:

num = [4  24  12]

  den  = [1  5  6   0].

Table 2.3. Commands used by the Modern Control System Theory and Design Toolbox

poly_add — add two polynomials
polysbst — substitution of a polynomial variable with a polynomial
polyder — derivative of a polynomial (supplied with MATLAB)
Polynomial utilities polyintg — integral of a polynomial
polymag — locate roots of a polynomial that generate a given magnitude
polyangl — locate roots of a polynomial that generate a given angle
rootmag — locate roots of a polynomial that are at given magnitude
rootangl — locate roots of a polynomial that are at given angle
crossing — interpolates the index of specified values from a data set
Interpolation utilities
crosses — interpolates the value of a data set at specified indices
crosser — iterates the solution of a function to a specified value
margins — analytic calculations of all the phase and gain margins
rlpoba — root locus point of break-away/break-in
Control utilities rlaxis — real axis portion of the root locus
wpmp — maximum feedback frequency location
nichgrid — Nichols grid at user requested inputs
Nonlinear Functions (using the describing function implementation) back_lsh — backlash response
dead_zn — deadzone response
relays — hysteresis response
sbplot — subplot replacement
Compatibility Functions frz_axis — axis replacement

The command residue (num, den) provides the residue r, the poles p, and the direct term k:

[r, p, k] = residue (num,den).

Applying this command for this problem, we obtain the following result:

r =    2.0000
       −8.0000
       10.0000

p =     0          
        −3.0000
        −2.0000

k =      0.          

Therefore, the partial fraction expansion of the transfer function Y(s) is given by:

Image

Therefore, the inverse Laplace transform is obtained as follows using Table 2.1:

y(t) = (2 − 8e−3t + 10e−2t)U(t).

If we use the following command,

[num,den] = residue (r, p, k)

where r, p, and k are given from the previous MATLAB output, then MATLAB converts the partial-fraction expansion back to the original polynomial ratio of Y(s) as follows:

num = 4.0000    24.0000    12.0000
               den = 1.0000     5.0000      6.0000   0.0000.

Therefore,

Image

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.190.101