Q5Digital Signal Processing
Question
Q.3. (a) Determine direct form I and II for the second order filter given by y(n) = 2bcos(w0)y(n-1) - b^2y(n-2) + x(n) - bcos(w0)*x(n-1) [10]
(b) Explain basic Realisation block diagram and signal flow graph of digital linear system. [6]
Answer
The given second-order filter y(n)=2bcos(w0)y(n-1)-b^2y(n-2)+x(n)-bcos(w0)x(n-1) has transfer function H(z)=[1-bcos(w0)z^-1]/[1-2bcos(w0)z^-1+b^2z^-2], with Direct Form I using separate feedforward and feedback delay chains (3 total delays) and Direct Form II (canonic form) sharing a single delay chain (2 total delays, matching the maximum of numerator and denominator order); realization block diagrams and signal flow graphs both represent the same underlying system using adders, multipliers, and delays, or nodes and weighted branches respectively.
(a) Direct Form I and II for the Second-Order Filter
Rearranging the given difference equation into standard form (grouping y terms on the left, x terms on the right): y(n) - 2bcos(w0)y(n-1) + b^2y(n-2) = x(n) - bcos(w0)*x(n-1). Taking the z-transform gives the transfer function:
This second-order transfer function has a single zero at z=bcos(w0), and a complex-conjugate pole pair at z=be^(+jw0) and z=be^(-jw0) (verified by expanding (z-be^jw0)(z-be^-jw0)=z^2-2bcos(w0)*z+b^2, matching the given denominator when multiplied by z^-2 and rearranged) - this complex-conjugate pole-pair structure, with pole magnitude b (requiring b<1 for stability) and pole angle w0 (the resonant frequency), is the classic structure of a second-order resonator filter section, producing a peak in the frequency response near w=w0.
Direct Form I
Direct Form I realizes the numerator (feedforward, zero) section and the denominator (feedback, pole) section as two entirely separate delay chains, connected via a summing junction: the input x(n) passes through its own one-sample delay (needed for the x(n-1) term, scaled by -bcos(w0)) and is combined with the current x(n) at a summing node to form the numerator contribution; separately, the output y(n) itself is fed back through a chain of two delays (needed for y(n-1) and y(n-2)), each scaled by the appropriate feedback coefficients (2bcos(w0) and -b^2 respectively), and combined with the numerator contribution at a final summing junction to produce y(n). This structure requires a total of 1 (feedforward) + 2 (feedback) = 3 delay elements.
Direct Form II (Canonic Form)
Direct Form II reduces the total delay-element count by sharing a single intermediate delay chain between the feedforward and feedback computation paths, exploiting the fact that both the numerator and denominator operate on time-shifted versions of related underlying signals. An intermediate signal w(n) is computed first, satisfying the denominator (feedback) part of the difference equation: w(n) = x(n) + 2bcos(w0)w(n-1) - b^2w(n-2); then the output is formed from the numerator (feedforward) combination of this same intermediate signal: y(n) = w(n) - bcos(w0)*w(n-1). Since w(n-1) and w(n-2) are needed for the feedback computation, and w(n-1) is also needed (already available) for the feedforward output combination, only 2 delay elements (storing w(n-1) and w(n-2)) are required in total - matching the maximum of the numerator order (1) and denominator order (2), i.e., max(1,2)=2, which is the minimum possible number of delay elements for this transfer function, giving Direct Form II its 'canonic' designation.
(b) Basic Realisation Block Diagram and Signal Flow Graph
A realisation block diagram represents a digital system using the three basic elements discussed elsewhere in this paper (adders, constant multipliers, unit delays), connected according to the system's difference equation, providing a direct, intuitive graphical description of how the system can be physically implemented in hardware or software.
A signal flow graph (SFG) is an alternative, more mathematically compact graphical representation, consisting of nodes (representing signal values at specific points in the system) connected by directed branches, each branch labeled with a gain (transmittance) value representing the multiplication factor applied as the signal travels along that branch from one node to another - a node's value equals the sum of all incoming branch contributions (each incoming branch's contribution being the value at its originating node multiplied by that branch's gain), directly analogous to the summing-junction behavior in a block diagram, but represented more compactly without needing an explicit separate 'adder' symbol (since summation is implicit at any node with multiple incoming branches). Signal flow graphs are particularly convenient for applying Mason's gain formula, a systematic algebraic technique for directly computing a system's overall transfer function from its graph structure by identifying all forward paths and feedback loops, without needing to manually solve the underlying system of simultaneous equations - both representations (block diagram and signal flow graph) are functionally equivalent and convey the identical underlying system structure, differing only in their specific graphical conventions and their suitability for different subsequent analysis techniques.
This second-order system, characterized by the coefficient pair 2bcos(w0) and -b^2 in its recursive (feedback) part, is a standard, widely-used building block in digital signal processing known as the coupled or resonator form, since its two poles are located at z = be^(+-jw0) - a complex-conjugate pole pair at radius b (from the origin) and angle w0 - producing a sharply peaked (resonant) magnitude response centered at the digital frequency w0, with the sharpness (Q-factor) of the resonance peak controlled directly by how close the pole radius b is to the unit circle (b close to 1 produces a very narrow, high-Q resonance, while smaller b produces a broader, more heavily damped resonance).
This particular structure, sometimes called the 'digital resonator' or used as the core recursive element in the Goertzel algorithm for efficient single-frequency DFT-coefficient computation, is valued precisely because Direct Form II requires only two delay elements (the minimum possible for a second-order system) and just three multiplier coefficients (2bcos(w0), -b^2, and -b*cos(w0) for the numerator's feedforward term), making it an extremely resource-efficient realization for applications needing to detect or synthesize a signal component at one specific, precisely known frequency w0, such as DTMF (touch-tone telephone) signal detection or single-bin spectral analysis, without requiring a full FFT computation.
The signal flow graph representation of a digital system, complementary to the block-diagram representation, depicts the system as a directed graph in which nodes represent signal values (including internal node/delay-element outputs) and branches represent gains (multiplications) or unit delays connecting one node's value to another, with the overall system's transfer function derivable from the signal flow graph via Mason's gain formula, expressing H(z) in terms of the sum of forward-path gains and the various loop gains and their combinations - although block diagrams and signal flow graphs are mathematically equivalent representations of the same underlying difference equation, the signal flow graph representation is often preferred in more advanced structural analysis and transformation techniques (such as deriving the transposed form of a given structure, which simply involves reversing all branch directions, interchanging the input and output nodes, and leaving all branch gains unchanged), a transformation that frequently yields an equally valid but structurally distinct realization with potentially superior finite-word-length or hardware-implementation properties compared to the original.
This resonator-form second-order system is also of considerable importance in the Goertzel algorithm, a computationally efficient technique for evaluating a single DFT bin (or a small number of specific frequency bins) without computing the full N-point DFT or FFT - by choosing w0 to correspond exactly to the frequency of interest and appropriately setting b=1 (an undamped resonator, marginally stable but acceptable for the finite-duration Goertzel computation), the recursive second-order structure examined in this question directly computes the correlation between the input signal and a complex exponential at frequency w0, making it substantially more efficient than a full FFT computation whenever only a small number of specific DFT frequency bins (rather than the complete spectrum) are actually required, such as in DTMF tone detection applications.