DynamicSystems - Maple Programming Help

Home : Support : Online Help : Science and Engineering : Dynamic Systems : Simulation Tools : DynamicSystems/ImpulseResponse

DynamicSystems

 ImpulseResponse
 compute the impulse-response of a system

 Calling Sequence ImpulseResponse( sys, opts )

Parameters

 sys - System; linear system opts - (optional) equation(s) of the form option = value; specify options for the ImpulseResponse command

Options

 • format = charfcn or piecewise

Used with a discrete system and the matrix method to select the format of the output. If charfcn, then use the charfcn procedure to represent an impulse. If piecewise, then, if required, the return value is a piecewise expression. The default is charfcn.

 • method = function or matrix

Select the method used to compute the impulse response. If function, then the impulse response is computed from a transfer-function model of the system using an inverse transformation. If matrix, then the impulse response is computed from a state-space model of the system. The function method is the default for frequency-domain based models (TF, Coeff, and ZPK), the matrix method is the default for time-domain based models (DE and SS).

Description

 • The ImpulseResponse command computes the impulse response of sys, a System object.
 • The ImpulseResponse command returns an algebraic Matrix, except in the case when the option format=piecewise is selected, as described under Options, and the output may be a piecewise expression of Matrices.
 • Two methods are provided for computing the impulse response of a system.
 • The function method generates a transfer-function model of sys, then computes the inverse Laplace transformation or the inverse z-transformation, for continuous and discrete system, respectively.
 • The matrix method generates a state-space model of sys, then computes the impulse response from the state-transition matrix.

For a continuous system the impulse response is C . exp(A*t) . B + D*Dirac(t).

For a discrete system the impulse response is (C . A^(q-1) . B)(1 - charfcn[0](q)) + D*charfcn[0](q).

Examples

 > $\mathrm{with}\left(\mathrm{DynamicSystems}\right):$
 > $\mathrm{sys}≔\mathrm{NewSystem}\left(⟨⟨\frac{s}{{s}^{2}+{\mathrm{ω}}^{2}},\frac{s+1}{{s}^{2}+3}⟩⟩\right):$
 > $\mathrm{imp}≔\mathrm{ImpulseResponse}\left(\mathrm{sys}\right)$
 ${\mathrm{imp}}{:=}\left[\begin{array}{c}{\mathrm{cos}}{}\left({\mathrm{ω}}{}{t}\right)\\ {\mathrm{cos}}{}\left(\sqrt{{3}}{}{t}\right){+}\frac{{1}}{{3}}{}\sqrt{{3}}{}{\mathrm{sin}}{}\left(\sqrt{{3}}{}{t}\right)\end{array}\right]$ (1)

Use inttrans[laplace] to compute the transfer-functions from the impulse response.

 > $\mathrm{with}\left(\mathrm{inttrans}\right):$
 > $\mathrm{map}\left(\mathrm{laplace},\mathrm{imp},t,s\right)$
 $\left[\begin{array}{c}\frac{{s}}{{{s}}^{{2}}{+}{{\mathrm{ω}}}^{{2}}}\\ \frac{{s}{+}{1}}{{{s}}^{{2}}{+}{3}}\end{array}\right]$ (2)

The impulse response of a discrete system consists of expressions in terms of the discrete time variable (generally q).

 > $\mathrm{sys}≔\mathrm{NewSystem}\left(⟨⟨\frac{1}{z+1},\frac{z-a}{z+b}⟩⟩,\mathrm{discrete}\right):$
 > $\mathrm{imp}≔\mathrm{ImpulseResponse}\left(\mathrm{sys}\right)$
 ${\mathrm{imp}}{:=}\left[\begin{array}{c}{-}{\left({-}{1}\right)}^{{q}}{+}{{\mathrm{charfcn}}}_{{0}}{}\left({q}\right)\\ \frac{{\left({-}{b}\right)}^{{q}}{}{a}{+}{\left({-}{b}\right)}^{{q}}{}{b}{-}{a}{}{{\mathrm{charfcn}}}_{{0}}{}\left({q}\right)}{{b}}\end{array}\right]$ (3)

Use ztrans to compute the transfer-functions from the impulse response.

 > $\mathrm{simplify}\left(\mathrm{map}\left(\mathrm{ztrans},\mathrm{imp},q,z\right)\right)$
 $\left[\begin{array}{c}\frac{{1}}{{z}{+}{1}}\\ {-}\frac{{-}{z}{+}{a}}{{z}{+}{b}}\end{array}\right]$ (4)

Use the matrix method with the piecewise format.

 > $\mathrm{simplify}\left(\mathrm{ImpulseResponse}\left(\mathrm{sys},\mathrm{method}=\mathrm{matrix},\mathrm{format}=\mathrm{piecewise}\right)\right)$
 ${{}\begin{array}{cc}\left[\begin{array}{r}{0}\\ {1}\end{array}\right]& {q}{\le }{0}\\ \left[\begin{array}{c}{-}{\left({-}{1}\right)}^{{q}}\\ \frac{\left({a}{+}{b}\right){}\left({\left({-}{b}\right)}^{{q}{-}{1}}{+}{\left({-}{b}\right)}^{{q}}\right)}{{-}{1}{+}{b}}\end{array}\right]& {0}{<}{q}\end{array}$ (5)