NivaarExam PrepOfficial exam papers ↗

22-Elec-B1 Digital Signal Processing · May 2017

Question 4 of 6: Direct form I and transposed direct form II flow graphs

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

Paper format. National Exams, May 2017 — 16-Elec-B1 Digital Signal Processing. Three hours, closed book; one of two approved calculators plus one double-sided aid sheet of tables and formulas. Six questions are printed and five constitute a complete paper, each worth 12 points; the marking scheme published on page 1 gives the per-part split. All six questions are solved here, because the set is a study resource rather than a timed attempt.

Reference texts.

Question 4: Direct form I and transposed direct form II flow graphs (12 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Given. Two second-order rational system functions, and the required structure for each.

PartNumerator coefficientsDenominator coefficientsPolesZeros
(a)$b_0 = 1,\; b_1 = 0,\; b_2 = -\tfrac{1}{2}$$a_1 = -\tfrac{1}{4},\; a_2 = -\tfrac{1}{8}$$z = \tfrac{1}{2},\; -\tfrac{1}{4}$$z = \pm\tfrac{1}{\sqrt{2}} \approx \pm 0.707$
(b)$b_0 = 1,\; b_1 = -\tfrac{7}{6},\; b_2 = \tfrac{1}{6}$$a_1 = 1,\; a_2 = \tfrac{1}{2}$$z = -\tfrac{1}{2} \pm j\tfrac{1}{2}$$z = 1,\; \tfrac{1}{6}$

Find. A correctly labelled signal flow graph for each structure, with every branch gain and every unit delay shown.

Approach. Convert each system function into its difference equation, identify which coefficients are feed-forward and which are feedback, then lay the branches out in the pattern that defines the requested structure.

  1. Part (a): write the difference equation. With the denominator in the form $1 - \tfrac{1}{4}z^{-1} - \tfrac{1}{8}z^{-2}$, cross-multiplication gives $$y[n] = \tfrac{1}{4}y[n-1] + \tfrac{1}{8}y[n-2] + x[n] - \tfrac{1}{2}x[n-2].$$ Both feedback coefficients are positive as drawn, because the denominator already carries the minus signs.
  2. Choose the direct form I layout. Direct form I realises the numerator first and the denominator second, as the cascade $H(z) = H_1(z)H_2(z)$ with $H_1(z) = 1 - \tfrac{1}{2}z^{-2}$ (all-zero) and $H_2(z) = 1/\left(1 - \tfrac{1}{4}z^{-1} - \tfrac{1}{8}z^{-2}\right)$ (all-pole). It therefore needs two separate delay chains — one storing past inputs, one storing past outputs — and does not share them. The intermediate signal is $v[n] = x[n] - \tfrac{1}{2}x[n-2]$.
  3. Count the elements. The graph carries four unit delays (two per chain) and three non-trivial multipliers, namely $-\tfrac{1}{2}$, $\tfrac{1}{4}$ and $\tfrac{1}{8}$; the gain $b_0 = 1$ is a plain wire and $b_1 = 0$ means no branch at all is drawn from the first input delay. Direct form II would halve the delay count to two by sharing one chain, but the question specifically asks for form I.
  4. Verify the drawing. Running the drawn recursion on a unit impulse reproduces the impulse response obtained by long division of $H(z)$ term for term, and the denominator roots $z^{2} - \tfrac{1}{4}z - \tfrac{1}{8} = 0$ give $$\boxed{\,z = \tfrac{1}{2} \quad\text{and}\quad z = -\tfrac{1}{4}\,}$$ both inside the unit circle, so the structure is stable.
  5. Part (b): write the difference equation. Here the denominator is $1 + z^{-1} + \tfrac{1}{2}z^{-2}$, so $$y[n] = -y[n-1] - \tfrac{1}{2}y[n-2] + x[n] - \tfrac{7}{6}x[n-1] + \tfrac{1}{6}x[n-2],$$ and the feedback gains that appear in the graph are $-a_1 = -1$ and $-a_2 = -\tfrac{1}{2}$.
  6. Apply the transposition theorem. Transposing a signal flow graph means reversing every branch, exchanging the input and output nodes, and turning every adder into a branch node and vice versa; the transfer function is unchanged. Applied to direct form II the result has the same two delays, but the adders now sit on a descending rail, each receiving one feed-forward branch $b_k$ from the input node, one feedback branch $-a_k$ from the output node, and the delayed content of the adder below it.
  7. Write the state recursion the drawing implements. Reading the graph from the top down, $$y[n] = b_0x[n] + s_1[n-1], \qquad s_1[n] = b_1x[n] - a_1y[n] + s_2[n-1], \qquad s_2[n] = b_2x[n] - a_2y[n].$$ Eliminating $s_1$ and $s_2$ returns the difference equation of the previous step, which is the check that the drawing is right.
  8. Verify and comment. The denominator roots satisfy $z^{2} + z + \tfrac{1}{2} = 0$, giving $$\boxed{\,z = -\tfrac{1}{2} \pm j\tfrac{1}{2}, \qquad |z| = \tfrac{1}{\sqrt{2}} \approx 0.707\,}$$ so this system is stable as well. Its numerator has a zero at $z = 1$, which can be checked instantly: the numerator coefficients sum to $1 - \tfrac{7}{6} + \tfrac{1}{6} = 0$, so the structure blocks DC exactly. Transposed direct form II is the structure of choice in fixed-point work because it keeps the accumulator inside the feedback path and is well behaved under coefficient quantisation.
x[n]z^-1z^-11-1/2v[n]y[n]z^-11/4z^-11/8Direct form I: feed-forward section, then feedback section
Figure Q4.1 — part (a), direct form I. Left: the all-zero section forming v[n] = x[n] - x[n-2]/2 (no branch is drawn from the first input delay because b1 = 0). Right: the all-pole section adding the feedback terms y[n-1]/4 and y[n-2]/8. Four delays in total.
x[n]1y[n]-7/6-11/6-1/2z^-1z^-1Transposed direct form II: two delays, adders on the descending rail
Figure Q4.2 — part (b), transposed direct form II. Two delays feed upward into the adder rail; each adder collects one feed-forward branch from the input node and one feedback branch from the output node.
ItemPart (a) — direct form IPart (b) — transposed direct form II
Difference equation$y[n] = \tfrac{1}{4}y[n-1] + \tfrac{1}{8}y[n-2] + x[n] - \tfrac{1}{2}x[n-2]$$y[n] = -y[n-1] - \tfrac{1}{2}y[n-2] + x[n] - \tfrac{7}{6}x[n-1] + \tfrac{1}{6}x[n-2]$
Unit delays42
Non-trivial multipliers3  ($-\tfrac{1}{2}$, $\tfrac{1}{4}$, $\tfrac{1}{8}$)3  ($-\tfrac{7}{6}$, $\tfrac{1}{6}$, $-\tfrac{1}{2}$; the branch $-a_1 = -1$ is a sign change)
Poles$\tfrac{1}{2}$, $-\tfrac{1}{4}$$-\tfrac{1}{2} \pm j\tfrac{1}{2}$, $|z| = 0.707$
Zeros$\pm 0.707$$1$ and $\tfrac{1}{6}$
Stable?YesYes