Comparison of FIR Window Filter Variation Results on Pink Noise Audio

— IIR and FIR filters are the most used digital signal filters. The application of each filter type depends on the needs of the user. IIR filters are generally used for applications with limited memory. In comparison, FIR filters are usually used for applications where the linear phase is essential. In this study, the implementation of FIR filters on pink noise audio samples was observed. Various FIR window method filters such as rectangular, hamming, hanning, and Blackman will be compared. Each type of filter will have a different filter order due to computing the frequency cut-off point for each filter. The comparisons were made by observing the gain response, the time domain signal, the frequency response, and the phase response. The results indicated that the Hanning window method is a better filter because it produces low delay and good attenuation. Things to be considered in designing FIR filters are fluctuations in frequency response and phase shift. Alterations on cut-off points on the filters and delay usage can be deployed for some improvement.


A. Background
Digital filters use mathematical algorithms to remove interference with digital data in the signal. The commonly used filters are IIR and FIR filters, whereas IIR filters are generally used for applications where the linear phase is not crucial, and memory is limited. These filters are commonly used in audio signal management, biomedical sensor signal processing, and high-speed telecommunications applications. Whereas FIR filters are generally used for applications where the linear phase is important and there is sufficient memory available. This filter is commonly used in audio signal enhancement and biomedical applications [1]. Filters can also be used to create audio equalizers applicable to many situations.
Many methods to design FIR filters such as frequency sampling, window method, and optimal design method. In this paper, the window method is chosen as the method used to design the filter. The Window Method is an easy, effective, and most commonly used method in designing FIR filters [2]. In addition, the window method also has good scalability and ease of calculating window coefficients [3]. However, the FIR filter has some problems when using the Fourier transform. Oscillations in the passband and stopband could appear. This is due to sudden signal truncation when converted using the Fourier transform and the convergence of the Fourier transform, which is quite long, especially near the discontinuity point. This problem can be solved by selecting the correct type of window method on the signal [4].
The method window itself is divided into several types based on the equation used, such as Rectangular Window, Hamming Window, Hanning Window, and Blackman Window [5].

B. Objectives and research methods
Through the discussion carried out in the background, it can be concluded that each variation of the FIR filter could filter out audio data interference or its own noise. This directly affects the results of the audio data equalizer due to the different filtering capabilities. To determine the ability of each variation of the FIR filter, the authors make an equalizer system design that includes 6 filter bands for all audio signals. The results of the equalizer for each variation of the FIR filter will be compared by the author.
The type of research used is experimental on pink noise audio as audio data to be filtered. Using the pink noise audio, a comparison of each type of FIR filter will be the objective of this research. The window methods will be compared such as Rectangular Window, Hamming Window, Hanning Window, and Blackman Window. To simplify the analysis, the x-axis timedomain graph is from 0 to 0.1 seconds and the y-axis is limited from -1 to +1. For the frequency-domain, the xaxis is limited from 0 to 7000 Hz and the y-axis is limited from 0 to 3000 samples. For the phase-domain, the x-axis is limited from 0 to 7000 Hz and the y-axis is limited from -1000 to 1000 samples.

A. Audio Signal Processing
In a world with increasingly sophisticated technological developments, communication systems are also developing and increasingly pampering their users. The development of communication systems forced the production of the best and optimal audio quality possible. To produce audio quality that spoils the ears of its users, we need a system that processes the audio signal. Audio signals can appear in the form of analogue signals or digital signals, and both have a range from 20 Hz to 20000 Hz according to the limits of human hearing ability.
With audio signal processing technology, an audio signal can be manipulated to produce a better output. Some examples of audio signal processing techniques include analogue-to-digital conversion (ADC), echo cancellation, filtering, equaliser, and noise removal [6].

B. Audio Equalizer
One of the audio signal processing techniques is equalisation, also known as the equalizer. Basically, an equalizer is a set of filters, either employing software or hardware filters used to adjust the amplitude level of a specific frequency range. At first, the equalizer was created to adjust the sound characteristics in places that have less than ideal sound results. Over time, the equalizer has evolved its use to a wider range of needs. The equalizer works in a frequency range, also known as bands. At its simplest, a two-band equalizer adjusts the treble and bass. The more bands available, the narrower the adjustable frequency range will be, so that it can provide more flexible control [7].

C. Frequency Response
Frequency response is a measure of the output of any system to an input signal of the varying frequency with a constant amplitude, as can be seen in Fig.1. This is usually characterized by the magnitude of the system response which is measured in decibel and degree [8]. In addition, the frequency response is often thought of as a filter that can increase or decrease the input signal to change the sound. The frequency response can be said to be ideal when the resulting response does not match the bass or treble volume of the audio used [9].

D. Phase Response
The phase of the frequency response is the phase response. This response shows the delay of the filter at each frequency point [10]. Ideally, the filter is expected to have a linear phase response so that the audio signal being passed is not distorted and degraded. Linear phase filter (linear response filter) has a physical meaning that every frequency that passes through the filter will have the same delay so that the phase response will increase as the frequency increases [11]. The example of phase response can be seen at Fig.2.

E. Finite Impulse Response (FIR)
Finite Impulse Response is a filter that has an impulse response with a limited period. The FIR filter design method is based on the ideal filter approach, where this filter will approach perfect characteristics because the filter order will increase so filter making, and its implementation will be more complicated [12]. FIR filters are usually implemented using delays, multipliers, and enhancers to produce the desired output. Fig. 3 Shows a basic diagram of an FIR filter of length N. The value of ℎ in the figure is the coefficient used for multiplication, so the output at time n is the sum of all pending samples multiplied by the appropriate coefficient. Figure 3. FIR Filter Structure [13] The process of selecting filter lengths and coefficients is called filter design. The purpose of the filter design is to adjust the existing parameters so that the desired results are produced through this filter [13].

F. Window Method for Designing FIR Filter
The Window Method is an effective, fast, and easyto-use filter design method. However, in general, this method is less than optimal [14]. Windowing causes smearing so that the cut-off frequency cannot be determined accurately to get the desired stop band frequency range and fit frequency band. For this reason, the window method is more suitable for the needs of design prototypes [15]. To find the equivalent representation of the time domain, the window method can be calculated using the inverse Fourier transform. The following is the equation in the window method [16]:

G. Hamming Method for Designing FIR Filter
Hamming Method is an FIR filter method that has an amplitude formed by the cosine function, this filter is limited to degrees N. When the value of n is in the range Then the value of w(n) is as follows:

H. Hanning Method for Desinging FIR Filter
Hanning Method is an FIR filter method which has an amplitude that is also formed by the cosine function, and is limited to degrees N. Different from the hamming method, hanning touches the 0 point at both ends of the signal [17].  The comparison between Hamming and Hanning windows in terms of powers and bandwidth can be seen in Fig.4 and 5.

I. Blackman Method for Designing FIR Filter
The Blackman method is used to reduce the variance. When compared with other methods, the Blackman method has a better improvement in damping the stopband. The Blackman method has good characteristics for filtering an audio [18]. The equation of the function of this method is as follows:

J. Rectangular Method for Designing FIR Filter
The Rectangular method is a method that has a constant function between the interval range and the value of zero. The equation of the function of this method is as follows. When the range n is at 0<n<N-1, then the value of w(n) is as follows: and worth if it is out of range.

K. Comb Filtering
Comb filtering occurs when a signal and a signal equal to the delay are combined into a single signal. Comb Filtering creates peaks and troughs in the frequency response and results in a thin, odd sounding sound. [19]. To reduce it, it is necessary to use delay compensation on the FIR filter between the two signals to be combined [20]. Comb filtering can be seen at Fig.  6. III. METHODOLOGY

ISSN 2355-3286
The equalizer system design features six bandpass filters covering the entire audio frequency range. The sampling frequency used is 48000 Hz as the standard for digital audio [22]. The filter specifications are shown in the Table 1. [23]. Based on reference [1], it is stated that the audio signal has more energy at low frequencies than high frequencies so that the filter specifications are limited to 5300 Hz. The equalizer design in this paper is divided into six parts; low pass filter, four band pass filter, and high pass filter. The high pass filter serves to filter frequencies above 5300 Hz. Like the equalizer function in general, by changing the amplitude/magnitude of each filter, the character of the sound output can be adjusted as needed.

C. Cut Off Frequency FIR filter
The Fourier Transform design with the window function is called the window method. The window method is used to design the FIR filter used in this equalizer system. By using the equation fc = (fap +fas)/2 , we get the cut off frequency point for each of the six filters as given in Table 2.

D. Filter Order
Based on the frequency limits of cut off low, cut off high, normalized low, and normalized high, the filter order value is obtained to get the same transition width on the six filters for each of the three types of filters. Filter order is obtained by the equation f =|fas-fap| /fs and N=3.1/delta F(Hanning), N=3.3/delta F (Hamming), and N=5.5/delta F(Blackman).. The result can be seen in Fig. 3. Based on the study in [23], the order of the filter is determined by the equation that has been shown previously. The filter order is determined to get the same transition width for all four filter types. That way, the gain response diagram filter is easier to compare.

IV. RESULT AND ANALYSIS
After performing the simulation using MATLAB, the graphs of each method were obtained. Fig. 7-8. shows a graph of a pink noise audio sample in the timedomain, frequency domain, and phase domain before being filtered along with a graph of each method used.

A. Gain Response Diagram
The gain response for rectangular, hanning, hamming and Blackman windows are given in Fig. 9-12. In the gain response filter diagram, it can be seen that the hanning window has the best attenuation compared to the other two types of filters. The attenuation of the rectangular window filter starts in the range of -30 dB. The attenuation of the hanning window filter starts from the range of -60 dB. The attenuation of the hamming window filter starts from the range of -70 dB. The attenuation of the Blackman window filter starts from the range of -80 dB. Although the hamming window has a lower attenuation than the hanning window, the hanning window has a more drastic attenuation slope. That is, the further away from the cut off point, the hanning window attenuation is greater than the hamming window. If it is correlated between filter order and gain response on the four filters, it can be said that the higher the order, the more the frequency is attenuated at points outside the cut off. On the time-domain graph, as shown in Fig. 13, can be seen that the audio starts sounding at about 10 ms (0.01 sec). Then, after filtering, the results shown by the time-domain graph on the four types of FIR filters indicate a shift in the audio, also known as delay. This delay occurs due to filtering at low frequencies carried out by each type of filter. In the graph given, it can be seen that the rectangular window has the lowest delay. In addition, in Table 3 Filter Order in the low pass section, it can be seen that the rectangular window has a lower filter order than the hanning window, hamming window, and Blackman window method. This indicates that if the required filter order calculation is larger, then the delay that occurs will increase. On the frequency-domain graph given in Fig. 14, the four types of filters create fluctuations when compared to the frequency of the audio response before using the filter. This change can be caused by combining the outputs of each band filter at the cut off point. This fluctuation in output pooling occurs due to overlapping filter cut-offs. The first low-pass filter has a cut-off at 900 Hz, while the second band-pass filter has a cut-off from 550 Hz to 1850 Hz. It can be seen that the audio from 550 Hz to 900 Hz comes from two filters so that there is an increase in amplitude in that frequency range. This overlap also occurs in subsequent filters. On the other hand, for the frequency area with an amplitude close to zero (lost). This is due to the comb filtering phenomenon. This phenomenon is a phenomenon of frequency overlapping in two filters with different time-delays. When there is overlap at the same frequency value, fluctuations and faults will occur in the audio energy. For phase domain graph, given in Fig.15, there is a slight phase shift in the four types of filters used. The phase shift is also caused by the different time-delays for each filter. From the simulation results that have been carried out, it can be concluded that the hanning window method is the best method because it produces low delay and good attenuation. To compensate the fluctuations in frequency response and phase shift, some improvements can be made. First, the cut-off ISSN 2355-3286 points on the six filters could be altered so that there is no overlapping frequency range between two or more filters. Furthermore, both time-delays can be compensated by adding a delay for each filter.