We tried to write the code for this experiment in C code but the we couldn't get the desired output and hence we switched to Scilab.Again the plotting the magnitude was a pain in the neck but eventually we did manage to plot the spectrum using h(n).
The input specifications for two different cases were taken one for LPF and other for HPF. The magnitude and phase response for both the filters were plotted in scilab.
The input specifications for two different cases were taken one for LPF and other for HPF. The magnitude and phase response for both the filters were plotted in scilab.
It was observed that there were lobes present in the magnitude spectrum in stop band for both cases. The phase spectrum was observed to be linear, and discontinous. The point of discontinuity corresponded to the frequency where the magnitude of the lobes was equal to zero and when the phase angle changed from pi to -pi.
This comment has been removed by the author.
ReplyDeleteYes it was definitely a pain in the neck. But all is well that ends well.
ReplyDeleteFSM is computationally more efficient.
ReplyDeleteCode can be done in C programming but to display the spectrums we need to use Scilab.
ReplyDeleteReally appreciate your work writing C code for this experiment....
Deletefor the same values of attenuation in stop band and pass band, pass band and stop band frequencies and sampling frequencies the order of the FIR filter is much higher compared to that of the IIR filter.
ReplyDelete