A Design of a low-pass FIR filter using Hamming Window Functions in Matlab

The reduction and filtering of the input components of an original signal in one or more frequency bands using a finite impulse response, better known as FIR, is designed using a function of the Hamming window. Although there are various window functions such as the Blackman window function, the Hanning window function and the rectangular window functions that can be used as digital filters, the Hamming window function was used in this study for the reason of its minimum damping/decibel of the stopband with a reduced transition bandwidth. Among the other three widow functions that can be used, the Blackman window function is closest to the Hamming window function in terms of minimum bandstop attenuation/decibel, since both have a dB value greater than -50. However, in terms of transition bandwidth (Δω), the Hamming window has a narrower bandwidth than the Blackman window, making it more appropriate to use in this FIR filter design. This type of filter is important for analyzing the different types of signals that are essential in a world where digital filters play a major role in DSP applications. This research paper offers a Matlab-based low-pass FIR digital filter that uses Hamming window functions.


Introduction
Matlab offers several options for designing digital filters including algorithms filtering and a graphical user interface function called SPtool. Various filter design algorithms for FIR filters are available in Matlab. This article describes the various options in Matlab and provides examples of low-pass, high-pass, and band-pass filter designs.
Digital filter design techniques are broadly used in various areas. FIR filters (Finite Impulse Response Filters) among the main digital filter types used in various DSP (Digital Signal Processing) applications such as digital filters are very flexible and portable. The digital filter has minimal or insignificant interferences, stores, manage and reduces downtime. Finite Impulse Response (FIR) and Infinite Impulse Response (IIR) both use digital filters. An advantage of FIR over IIR is that it has greater flexibility in controlling the shape of your response than IIR filters.
The digital filter is divided into a low pass, high pass, and bandpass in the frequency domain. The implementation of the IIR filter is recursive, but not recursive in FIR. The digital filter plays a significant role in DSP applications. The function of a bandpass filter here is to transmit a specific frequency band and reject the other band. The digital filter is also used in noise suppression, frequency amplification, equalization of digital audio, and digital crossover.

Motivation of Study
The purpose of these comments is to provide some details about the implementations on the FIR filter and some additional aspects of the process. FIR filter is one that is described by the differential equation and by the transfer function. The project is concerned with the problem of designing an FIR filter that meets the specifications for a limited deviation from the ideal response in certain frequency bands. The window design technique does not produce optimal filters (in the sense that the design specifications are most efficiently met in the calculation), but the method is simple to use and produces reasonably good filters. The window method is 25 effective and widely used among all the manual design methods.

Concept of Digital Filter and FIR Filters
A digital filter is a calculation process to convert a series of input numbers that represent the input signal into another represented by the output signal. A digital filter can be implemented as software on a computer or it can be hardware that is part of a special purpose computer. Although the computational filtering process is performed in the time domain, the description of the filter is provided in the frequency domain. The best-known filters are selective frequency filters that transmit certain frequencies of the input signal and reject others. Examples are low pass and bandpass filters. In addition to these general types, the term filter includes any system that performs some equality transformation in the input signal. For example, a phase 3 equalizer cannot reject the frequencies of the input signal but transform the phase of the input signal to compensate for the characteristics of another system. The digital filters are divided into different classes according to the time domain or frequency properties, their mathematical representation, and their implementation. One of the uniqueness of a digital filter is the length of its serial representation in the time domain which is called the impulse response of the filter. This property leads to two important classes.

Design of FIR Filters
The design of linear FIR filters has received much attention both in the early stages of research on this topic and in the later stages. The reasons are 1) the linear phase produces a continuous delay and therefore the distortion of the delay is avoided, and 2) the simplicity of the design. Maybe the easiest method to design an FIR filter is by the sampling method [1]. An FIR filter can be clearly defined by the impulse response coefficients or by the discrete Fourier transform (DFT) of the coefficients. To approximate a continuously desired frequency response, one could sample the frequency at equidistant points and evaluate the continuous frequency response as an interpolation of the sampled frequency points using the DFT. The approach would not produce errors at the specified points and a finite error between the points. More specific points would determine a more flexible approach. Despite the simple design, the results are very poor as compared to the results that can be realized with more advanced methods. An improvement in the technique can be achieved if some frequency points are left as unlimited variables and an optimization procedure is used to optimize their values. Linear programming is usually used for optimization. A full extension of the sampling design technique is to make all frequency response points variable and to optimize their position to minimize a certain degree of error between the desired samples and the estimated frequency response. One of these techniques was developed by Rabiner [2], who designed the equivalent of 7 FIR filters that minimize the maximum absolute value of the error between the desired response and the estimated FIR filter. This technique enables optimal Chebychev filters to be obtained. The disadvantage is that it is not highly effective and does not converge quickly compared to the well-known Remez Exchange algorithm. Besides, the cutoff frequencies cannot be controlled precisely. The best known digital FIR filter design method with a linear phase is the Parks-McClellan algorithm [3]. The method minimizes an error function that is weighted between a given, generally ideal answer and an FIR filter that uses the wellknown Remez-Exchange algorithm [4]. The method was developed by Parks and McClellan [3] as an algorithm and computer program written in Fortran. The linear phase FIR filter design creates a Chebychev approach problem that attempts to combine an amplitude response with an FIR filter to minimize the maximum error value. The frequency response of a realizable FIR filter is always a function with a complex value. The linearity of the phase function causes symmetry in the impulse response of an FIR filter. Using this symmetry, the complex focus problem becomes a real focus problem. The phase function does not affect the approximation since a given filter length is a linear function of the frequency with a known slope. The use of minimum phase filters is an advantage for applications where the deviation of the group delay from a constant is not as important as the nominal group value delay. The other advantage of these filters is that although the symmetry of the impulse response is not used and the phase is not linear, the design process does not involve a complex approach. With the new design method proposed here, the linearity of the phase function is loosened to achieve an improvement in the size behavior of the filter. The other main reason for the effort is that by using complex approaches, better control of the phase function is achieved. This is important if delay deviations of small groups of a constant can be tolerated to improve the size behavior and to make the average group delay value lower than that of a linear phase filter of the same length. Therefore, the design method would allow the specification of the average group delay to be less than half the length of the filter, as in the case of linear phase filters. The design of digital FIR filters with separate size and phase specifications is viewed as an approximation of a function with a complex value by a complex polynomial in the unit circle.

Window Function
In this method, a certain bandwidth is generated using an ideal low-pass filter, after which a selected window is used to achieve a certain block loss. In signal processing, a window function is a mathematical function with a zero value outside of a selected range. For example, a function that is constant in range and zero is called a rectangular window that describes its graphical representation shape. If another function or waveform/data series is multiplied by a window function, the result of the product is outside the zero range except for the part in which they overlap, the "look through the window" [5].

Windows and Their Equations
Various window functions have been proposed. some most common window functions are listed below:

Rectangular window
Hanning window

Hamming window
To reduce vibrations in the Fourier series method, the Fourier coefficients are modified by multiplying the infinite impulse response by a finite weighting sequence ( ) called a window. Windows are characterized by the width of the main lobe, which represents the bandwidth between the first negative zero, the first positive zero, and their wavelength ratio.
The energy is highly possible as it can in the main lobe and the energy in the lateral lobe being low as it can be.
Two desired properties of a window functions are: 1) The Fourier transformation of the window function must have a reduced width of the main lobe.
2) The Fourier transformation of the window function must have a lateral lobe whose energy decreases rapidly when it approaches zero. Windows can be grouped into fixed or adjustable window functions. Fixed windows such as rectangular, Hanning, Hamming, and Blackman only have an independent length of the parameter window which controls the width of the main lobe. The customizable window has two or more independent parameters, e.g. for example, the length of the window and one or more additional parameters that can be used to manage the properties of the other window.

Function
In the Kaiser window, the width of the main lobe can be adjusted by changing the length of the filter and the height of the sidelobe by changing the other parameter. However, the Kaiser window has the disadvantage of a larger computing effort due to the use of the start function when calculating the window coefficient. However, it also increases the amplitude of the side lobe and the waves in the passband.

Hammer Window Technology
Hamming's window is shaped like a bell. The window is optimized so that the maximum side lobe is minimized.
Hamming window technology eliminates the single passband and stops the band waves. The coefficients of a Hamming window are calculated by comparison.
[ ] = 0.54-0.46cos (2π) nN, 0 ≤ n ≤ N 2 Richard W. Hamming pointed out that the side lobes of the rectangular window and the Hanning window are inverted from each other so that a linear equation of the two would cancel each other out. He searched for the linear combination that minimized the maximum amplitude of the minor lobe and found the following design, which signifies [6].

Digital Filters
Digital filters are a fundamental part of multiple systems that require data processing. Examples are communication systems, medical devices, data acquisition systems, audio, and video systems. The first work for the development of new and efficient methods for the simulation of digital filters began in the 1960s. The goal of the pioneers in this field was to use the vast knowledge of the design of analog filters and to invent algorithms that can be implemented on the computer. In general, it involves designing the digital filterℼ 1) Specification of the desired frequency response,

2) Actual design and approximation of the specifications provided through a feasible filter,
3) Implementation of the resulting project.
The truncation operation continues the immediate discontinuity at the cutoff frequency of Hd (ω). It also widens the boundary in the discontinuity of Hd (ω) to create the transition region of a filter. The filter transition area can be narrowed using a larger window. Conversely, if you increase the width of the windows, the curl of the folds is not reduced.
The steps for designing the low-pass FIR filter with the required performance are: Step 1: Develop an expression for the frequency response Hd (ω) that is approximately desired.
Step 2: Apply this expression to get the impulse response of the impulse using the reverse DFT method Step 3: Select the window function based on the desired requirements and determine the window length (see table on the next page), which can also be called the filter sequence N. The relative frequency relates to the digital frequency [11] Step 4: Determine the impulse response of the low-pass filter designed by window reduction method [12] [12] Step 5: determine the filter transfer function. [13]

2 FIR Filter Simulation Using MATLAB
The window method requires a minimum of computing power. Therefore, the window method is easy to implement. The maximum ripple amplitude in the filter response was determined for the given window.

Simulation output of FIR Filter
It can be observed from the figure above that, the signal with a frequency of 3Hz can be separated from the combined signal, the weakening of the stopband is therefore recorded in the specified window and the frequency response of the filter shows the convolution of the window function spectrum and the desired frequency response. The window method was used in this work.

Discussion
Basic information on the design of FIR filters has been provided with separate specifications for phase dimensions and functions. In general, this is a complex approach problem. Although designing FIR filters in the complex field may probably be the most complicated approach to designing FIR filters, it offers the freedom to design filters that exactly match different specifications. Furthermore, the number of impulse response coefficients required is generally lower than for exactly linear phase models with the same response dimensions. In applications that require some nonlinear phase response, such as Phase equalizers, FIR filters developed in the complex area are the best solution. The method offers other possibilities, such as the design of almost linear phase ages with a lower group delay than those obtained with linear phase ages. Some of the existing methods for designing FIR ages were tested with a nonlinear phase response and were compared with the proposed method in this paper. The method proposed in this paper offers numerous advantages over existing techniques. First of all, no discretization is required to implement the project. This allows solutions closer to the optimal without increasing the problem complexity. Long filters can also be designed without significantly increasing the complexity of the problem. The algorithm is stable and guarantees a solution. Another major important advantage is that there is no need to assume symmetries of impulse response or frequency. This allows the design of epochs with unconjugated reactions. These filters necessarily have complex impulse responses. As seen in the next section, the design problem is formulated in a way that complex coefficients can be easily absorbed simply by duplicating the order of the approximation problem.
The DSP applications in the sensitive area are the following: -1). Telecommunications: echo cancellation in telephone networks, equalization, telephone dialing application, modem, line amplifier, channel multiplex, data coding, video conferencing, Mobile phone and fax 2). Military: radar signal processing, probe signal processing, navigation, secure communication, and missile guidance.
3) Consumer electronics: digital audio / TV, electronic music synthesizer, educational toys, stereo FM applications, and sound recording applications. 4) Instrument and control: spectrum analysis, position and frequency control, noise reduction, data compression, digital filter, PPL, function generator. 5) Image processing: image visualization, image compression, image enhancement, image restoration, and image analysis. 6) Speed processing: Speech analysis methods are used for automatic speech recognition, verification, and identification of speakers. 7) Medicine: medical diagnostic devices such as computed tomography (CT), X-ray scanning, patient monitoring and storage/improvement of X-rays. 8) Signal filtering: eliminating unwanted background noise, eliminating interference, frequency band separation and shaping the signal spectrum. [7]

1 Conclusion
Digital filtering can play an important role in speech signal processing applications such as speech filtering, speech enhancement, noise reduction, and automatic speech recognition. The FIR filter was developed with the Hamming window function. The window function is easy to use and offers more flexibility in digital signal processing applications. Digital filters are easy to design and can be used in many signal filter applications. The choice of technique for designing the filter largely depends on the designer's decision to influence the accuracy of the approach. The FIR filter design used by the Hamming window is stable compared to the techniques of rectangular and rectangular windows.