direct form II
Analysis techniques
A variety of mathematical techniques may be employed to analyze the behaviour of a given digital filter. Many of these analysis techniques may also be employed in designs, and often form the basis of a filter specification.
Typically, one characterizes filters by calculating how they will respond to a simple input such as an impulse. One can then extend this information to compute the filter's response to more complex signals.
Impulse response
The impulse response, often denoted {\displaystyle h[k]} h[k] or {\displaystyle h_{k}} h_{k}, is a measurement of how a filter will respond to the Kronecker delta function. For example, given a difference equation, one would set {\displaystyle x_{0}=1} x_{0}=1 and {\displaystyle x_{k}=0} x_{k}=0 for {\displaystyle k\neq 0} k\neq 0 and evaluate. The impulse response is a characterization of the filter's behaviour. Digital filters are typically considered in two categories: infinite impulse response (IIR) and finite impulse response (FIR). In the case of linear time-invariant FIR filters, the impulse response is exactly equal to the sequence of filter coefficients:
{\displaystyle \ y_{n}=\sum _{k=0}^{N}h_{k}x_{n-k}} {\displaystyle \ y_{n}=\sum _{k=0}^{N}h_{k}x_{n-k}}
IIR filters on the other hand are recursive, with the output depending on both current and previous inputs as well as previous outputs. The general form of an IIR filter is thus:
{\displaystyle \ \sum _{m=0}^{M}a_{m}y_{n-m}=\sum _{k=0}^{N}b_{k}x_{n-k}} {\displaystyle \ \sum _{m=0}^{M}a_{m}y_{n-m}=\sum _{k=0}^{N}b_{k}x_{n-k}}
Plotting the impulse response will reveal how a filter will respond to a sudden, momentary disturbance.
Difference equation
In discrete-time systems, the digital filter is often implemented by converting the transfer function to a linear constant-coefficient difference equation (LCCD) via the Z-transform. The discrete frequency-domain transfer function is written as the ratio of two polynomials. For example:
{\displaystyle H(z)={\frac {(z+1)^{2}}{(z-{\frac {1}{2}})(z+{\frac {3}{4}})}}} H(z)={\frac {(z+1)^{2}}{(z-{\frac {1}{2}})(z+{\frac {3}{4}})}}
This is expanded:
{\displaystyle H(z)={\frac {z^{2}+2z+1}{z^{2}+{\frac {1}{4}}z-{\frac {3}{8}}}}} H(z)={\frac {z^{2}+2z+1}{z^{2}+{\frac {1}{4}}z-{\frac {3}{8}}}}
and to make the corresponding filter causal, the numerator and denominator are divided by the highest order of {\displaystyle z} z:
{\displaystyle H(z)={\frac {1+2z^{-1}+z^{-2}}{1+{\frac {1}{4}}z^{-1}-{\frac {3}{8}}z^{-2}}}={\frac {Y(z)}{X(z)}}} H(z)={\frac {1+2z^{{-1}}+z^{{-2}}}{1+{\frac {1}{4}}z^{{-1}}-{\frac {3}{8}}z^{{-2}}}}={\frac {Y(z)}{X(z)}}
The coefficients of the denominator, {\displaystyle a_{k}} a_{k}, are the 'feed-backward' coefficients and the coefficients of the numerator are the 'feed-forward' coefficients, {\displaystyle b_{k}} b_{{k}}. The resultant linear difference equation is:
{\displaystyle y[n]=-\sum _{k=1}^{M}a_{k}y[n-k]+\sum _{k=0}^{N}b_{k}x[n-k]} y[n]=-\sum _{{k=1}}^{{M}}a_{{k}}y[n-k]+\sum _{{k=0}}^{{N}}b_{{k}}x[n-k]
or, for the example above:
{\displaystyle {\frac {Y(z)}{X(z)}}={\frac {1+2z^{-1}+z^{-2}}{1+{\frac {1}{4}}z^{-1}-{\frac {3}{8}}z^{-2}}}} {\frac {Y(z)}{X(z)}}={\frac {1+2z^{{-1}}+z^{{-2}}}{1+{\frac {1}{4}}z^{{-1}}-{\frac {3}{8}}z^{{-2}}}}
rearranging terms:
{\displaystyle \Rightarrow (1+{\frac {1}{4}}z^{-1}-{\frac {3}{8}}z^{-2})Y(z)=(1+2z^{-1}+z^{-2})X(z)} \Rightarrow (1+{\frac {1}{4}}z^{{-1}}-{\frac {3}{8}}z^{{-2}})Y(z)=(1+2z^{{-1}}+z^{{-2}})X(z)
then by taking the inverse z-transform:
{\displaystyle \Rightarrow y[n]+{\frac {1}{4}}y[n-1]-{\frac {3}{8}}y[n-2]=x[n]+2x[n-1]+x[n-2]} \Rightarrow y[n]+{\frac {1}{4}}y[n-1]-{\frac {3}{8}}y[n-2]=x[n]+2x[n-1]+x[n-2]
and finally, by solving for {\displaystyle y[n]} y[n]:
{\displaystyle y[n]=-{\frac {1}{4}}y[n-1]+{\frac {3}{8}}y[n-2]+x[n]+2x[n-1]+x[n-2]} y[n]=-{\frac {1}{4}}y[n-1]+{\frac {3}{8}}y[n-2]+x[n]+2x[n-1]+x[n-2]
This equation shows how to compute the next output sample, {\displaystyle y[n]} y[n], in terms of the past outputs, {\displaystyle y[n-p]} y[n-p], the present input, {\displaystyle x[n]} x[n], and the past inputs, {\displaystyle x[n-p]} x[n-p]. Applying the filter to an input in this form is equivalent to a Direct Form I or II realization, depending on the exact order of evaluation.Courtesy of wikipedia,,,
|
No comments:
Post a Comment