Practical Analog and Digital Filter Design

The Unnormalize_Coefs, which is given in Listing E.1, first determines the variables used for unnormalization. The unnormalization frequency freq for lowpass and highpass, as well as the center frequency Wo and the bandwidth BW for bandpass and bandstop cases are determined differently for the inverse Chebyshev case as compared to the other approximation methods. After these calculations, the appropriate unnormalization function is chosen based on the selectivity of the filter. Each of the specific functions called uses the Filt_Params structure pointer FP as well as the appropriate unnormalization variables. Any errors that occur in the functions are handled in the manner described in Appendix D to allow easy identification of the location of the problem.
/*==================================================== Unnormalize_Coefs() - converts normal lowpass coefs to unnormalized LP/HP/BP/BS. Prototype: int Unnormalize_Coefs(Filt_Params *FP); Return: error value Arguments: FP - ptr to struct holding filter params====================================================*/int Unnormalize_Coefs(Filt_Params *FP){ int Error; /* error value */ double freq, /* unnormalizing freq for LP & HP */ BW, /* unnormal. bandwidth for BP & BS */ Wo; /* unnormal. ctr freq for BP & BS */ /*...