The transfer function for the second-order section shown in IIR Filtering: Introduction is

**Exercise**

First, derive the above transfer function. Begin by writing
the difference equations for

Next, design the coefficients for a fourth-order filter implemented as the cascade of two bi-quad sections. Write a MATLAB script to compute the coefficients. Begin by designing the fourth-order filter and checking the response using the MATLAB commands

```
[B,A] = ellip(4,.25,10,.25)
freqz(B,A)
```

#### Note:

`freqz`

command displays the frequency responses of IIR filters
and FIR filters. For more information about this, type
`help freqz`

. Be sure to look at MATLAB's
definition of the transfer function. #### Note:

`freqz`

command as
shown above, without passing its returned data to another
function, both the magnitude (in decibels) and the phase
of the response will be shown.
Next you must find the roots of the numerator,
zeros, and roots of the denominator,
poles, so that you can group them to create two
second-order sections. The MATLAB commands
`roots`

and `poly`

will be useful for
this task. Save the scripts you use to decompose your
filter into second-order sections; they will probably be
useful later.

Once you have obtained the coefficients for each of your two
second-order sections, you are ready to choose a
gain factor,
`freqz`

to compute the response

**Preparing for processor implementation**

As the processor exercises become more complex, it will
become increasingly important to observe good programming
practices. Of these, perhaps the most important is careful
planning of your program flow, memory and register use, and
testing procedure. Write out pseudo-code for the processor
implementation of a bi-quad. Make sure you consider the way
you will store coefficients and states in memory. Then, to
prepare for testing, compute the values of

Comments:"Real-Time DSP with MATLAB"