DynamicSystems
ImpulseResponse
compute the impulse-response of a system
Calling Sequence
Parameters
Options
Description
Examples
ImpulseResponse( sys, opts )
sys
-
System; linear system
opts
(optional) equation(s) of the form option = value; specify options for the ImpulseResponse command
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).
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).
with⁡DynamicSystems:
sys≔NewSystem⁡ss2+ω2,s+1s2+3:
imp≔ImpulseResponse⁡sys
imp≔cos⁡ω⁢tcos⁡3⁢t+3⁢sin⁡3⁢t3
Use inttrans[laplace] to compute the transfer-functions from the impulse response.
with⁡inttrans:
map⁡laplace,imp,t,s
ss2+ω2s+1s2+3
The impulse response of a discrete system consists of expressions in terms of the discrete time variable (generally q).
sys≔NewSystem⁡1z+1,z−az+b,discrete:
imp≔−−1q+charfcn0⁡q−bq⁢a+−bq⁢b−a⁢charfcn0⁡qb
Use ztrans to compute the transfer-functions from the impulse response.
simplify⁡map⁡ztrans,imp,q,z
1z+1z−az+b
Use the matrix method with the piecewise format.
simplify⁡ImpulseResponse⁡sys,method=matrix,format=piecewise
01q≤0b⁢−−bq−1−−1q−−bq+−1q−1+b−−bq−1⁢a+b0<q
See Also
charfcn
Dirac
DynamicSystems[ImpulseResponsePlot]
inttrans[laplace]
LinearAlgebra[MatrixExponential]
piecewise
ztrans
Download Help Document