Practical Analog and Digital Filter Design

The bilinear transform approach to IIR filter design is popular because it has wide application. Our procedure will be the same as outlined in Chapter 6: prewarp the critical digital frequencies to their analog counterparts, design a standard analog filter using the new specifications, perform the bilinear transform on the analog transfer function to produce the digital transfer function, and finally, set the frequencies back to their original values for future use. The design of the analog filter has already been covered in earlier chapters, so we won't need to develop that code. Consequently, our work involves generating only a few new functions in order to add the IIR filter design capability to our project.
In the Calc_DigIIR_Coefs function shown in Listing G.1, we first use Warp_Freqs to prewarp the frequencies; then, we call Calc_Filter_order, Calc_Normal_Coefs, and Unnormalize_Coefs in order to design the analog filter. After the analog filter has been designed, the analog coefficients can be converted to digital coefficients by the Bilinear_Transform function. And, finally, the UnWarp_Freqs function converts the critical frequencies back to their original values. Throughout this process, all critical parameters are transferred to and from the function in the Filt_Params structure using the pointer FP.
*/==================================================== Calc_DigIIR_Coefs () - calcs digital IIR coefs Prototype: int Calc_DigIIR_Coefs(Filt_Params *FP); Return: error value Arguments: FP - ptr to struct holding filter params====================================================*/int Calc_DigIIR_Coefs(Filt_Params *FP){...