Wpass and Wstop, in the Magnitude Specifications area are positive weights, one per band, used during optimization in the FIR Equiripple filter. Enter 0.2 for wpass and 0.5 for wstop in the Frequency Specifications area.Ħ. Select Normalized (0 to 1) in the Units pull down menu in the Frequency Specifications area.ĥ. Increasing the value creates a filter which more closely approximates an ideal equiripple filter, but more time is required as the computation increases. The FIR Equiripple filter has a Density Factor option which controls the density of the frequency grid. Select Specify order in the Filter Order area and enter 30.ģ. In general, when you change the Response Type or Design Method, the filter parameters and Filter Display region update automatically.Ģ. Select Lowpass from the dropdown menu under Response Type and Equiripple under FIR Design Method. We will use an FIR Equiripple filter with these specifications:ġ. We will design a low pass filter that passes all frequencies less than or equal to 20% of the Nyquist frequency (half the sampling frequency) and attenuates frequencies greater than or equal to 50% of the Nyquist frequency. You can right-click or click the What's This? button to get information on the different parts of the tool. The tool includes Context-sensitive help. Other panels can be displayed in the lower half by using the sidebar buttons. It controls what is displayed in the other two upper regions. The Design Panel, in the lower half is where you define your filter specifications. The lower half of the GUI is the interactive portion of Filter Designer. The Filter Display region, in the upper right, displays various filter responses, such as, magnitude response, group delay and filter coefficients. It also provides access to the Filter manager for working with multiple filters. The Current Filter Information region, in the upper left, displays filter properties, namely the filter structure, order, number of sections used and whether the filter is stable or not. The original mbed filter software can be found here and my code can be found here.The upper half of the GUI displays information on filter specifications and responses for the current filter. And simulation of filters gives the exact response you will find in practice.Ī thank you goes to Grant Griffin at Iowegian International for use of the Professional ScopeFIR software. If you require adaptive filtering, software can use a lookup table and change filter coefficients on the fly. Unlike discrete components, the coefficient values in FIR-filter software do not drift with time, temperature shifts, or supply-voltage changes. A plot of the frequency response for the resulting coefficients shows an attenuation of about 12.5 dB at 7500Hz, which agrees with the DFT plot of the filter's output data shown in Figure C. The results gave a maximum 0.87-dB ripple and a 56.2-dB attenuation. I specified fc at 5500Hz, and a stop-band frequency of 9000Hz, with a stop-band attenuation at -55 dB and one dB of ripple in the pass band. I then used the ScopeFIR software's Parks-McClellan algorithm to create new FIR coefficients for the 29-tap low-pass filter. The original 1000- and 7500-Hz test signals had the same amplitude. Next, I changed the 15kHz signal to 7500Hz and ran the program. I changed the code to transmit the filtered values to my lab PC so I could drop them into Excel and run a DFT. The original C/C++ program compared the FIR-filter's output data with the original 1000Hz signal and gave a "Success" or "Failed" result. The result showed one main frequency at about 1125Hz. The program worked well and produced filtered values I analyzed with an Excel DFT. They added the two signals to create a test values "sampled" at 48 ksamples/sec. The filter programmers used an algorithm within the code to produce sine waves at 1000Hz and at 15kHz. At -3 dB, fc equals 5500Hz and stop-band attenuation reaches -55 dB at 9000Hz. The discrete Fourier transform (DFT) plot for the 29 coefficients provided the missing data (Figure A). Unfortunately, they provided no other filter specifications. The programmers used MATLAB to produce 29 coefficients for a low-pass FIR filter with a 6000Hz cut-off frequency (fc). Also, the mbed community of programmers has created many examples, including an FIR filter. Although the Cortex-M3 lacks floating-point-math hardware, ARM software libraries can handle 32-bit floating-point math. For this demonstration, I used an ARM mbed module with an NXP LPC1768 microcontroller (ARM Cortex-M3 processor). A demonstration of FIR filters in operation completes this series of columns.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |