Generalized Adaptive Polynomial Window Function

We present a novel method to design and optimize window functions based on combinations of linearly independent functions. These combinations can be performed using different strategies, such a sums of sines/cosines, series, or conveniently using a polynomial expansion. To demonstrate the flexibility of this implementation, we propose the Generalized Adaptive Polynomial (GAP) window function, a non-linear polynomial form in which all the current window functions could be considered as special cases. Its functional flexibility allows fitting the expansion coefficients to optimize a certain desirable property in time or frequency domains, such as the main lobe width, sidelobe attenuation, and sidelobe falloff rate. The window optimization can be performed by iterative techniques, starting with a set of expansion coefficients that mimics a currently known window function and considering a certain figure of merit target to optimize those coefficients. The proposed GAP window has been implemented and several sets of optimized coefficients have been obtained. The results using the GAP exemplify the potentiality of this method to obtain window functions with superior properties according to the requirements of a certain application. Other optimization algorithms can be applied within this strategy to further improve the window functions.


I. INTRODUCTION
The Discrete Fourier Transform (DFT) is a powerful tool to perform Fourier analysis in discrete data, with widespread uses in several modern applications, such as in astronomy, chemistry, acoustic signals, geophysics (seismic data), and digital processing [1]- [3]. In signal processing, the signals are sampled over a finite time interval, and window functions are time-and frequency-domain weighting functions applied to reduce the Gibbs oscillations resulting from the truncation of a Fourier series. The analyzed signal is then the multiplication of the sampled data with the window function, with the resulting signal called windowed one. The simplest window function is the rectangular one, which is unitary inside the window and null outside.
The use of window functions affects the analysis in the frequency domain, sometimes introducing unwanted artifacts, such as signal leakage, scalloping loss, intensity of sidelobes, among others. Additionally, many signals of interest are sampled corrupted with background noise, which could be of the same intensity of the signals of interest. To prevent such artifacts or improve the properties of the results, The associate editor coordinating the review of this manuscript and approving it for publication was Prakasam Periasamy . a large number of window functions have been proposed and applied to several systems, with diverse successes [4]- [11]. Those window functions have been proposed to improve and provide certain spectral characteristics, such as to reduce leakage, distinguish two sine signals with close frequencies, avoid scalloping loss, resolve a sine signal within a noisy background, analyze signals with comparable strength, and discriminate signals with different strength [12], [13].
The current need for better signal processing methods opens space for the development of improved window functions, particularly some that could provide superior properties simultaneously. The major challenge of the current window functions is that they are generally developed using guessed functional forms, with small functional flexibility, and the refinements of the window functions have been achieved by adjusting a few parameters of close-form expressions.
The recent research on window functions has focused mainly on the ability to create mechanisms to improve the performance of the algorithms and develop windows with flexible temporal and spectral characteristics [11], [14]- [17]. Several investigations have proposed window functions with one or more free parameters that could be adjusted, to improve a certain property [7]. For example, Sun et al. proposed a method to design window functions with flexible spectral characteristics based on the inverse of the shaped output using the cyclic algorithm (ISO-CA) [11]. In the same context, Liu et at. presented a convex optimization problem to optimize the sidelobe attenuation or the Signal-to-Noise Ratio (SNR) [18]. Zaytsev and Khzmalyan also proposed a method to synthesize optimal windows with sidelobe spectrum falloff rate multiple of 12 dB per octave (dB/oct) [15].
However, none of those window functions has the functional flexibility that could provide simultaneously different superior properties. In other words, while a window generally improves a certain spectral characteristic, at the same time it compromises other properties. Therefore, there is a major need for a more systematic procedure to develop window functions. In this sense, this investigation proposes a generalization for the representation of window functions for a wide range of applications, e.g., suppression of co-channel interference [19], harmonic analysis in real-time systems [20], satellite altimeter's waveform [21], radar systems [18], [22], [23], sensor arrays [24], and audio systems [3], [25].
Here, we present a generalized window function, as a non-linear polynomial expansion in which all the current windows could be mimic with the appropriate expansion coefficients. This functional form is very flexible, which allows searching by a systematic method to obtain sets of expansion coefficients that could provide superior and optimized properties, considering a reference figure of merit that takes into account the property that is intended to be improved. Finally, this procedure sets the road for the use of optimization and adaptive methods, such as machine learning and genetic algorithms, to adapt the window expansion coefficients to certain sets of data. Considering those characteristics, we labeled it as a Generalized Adaptive Polynomial (GAP) window function.
This paper is organized as follows. Section II describes the GAP window function. Section III presents a comparison between traditional window functions and the ones obtained with GAP. It also presents results from optimized GAP window functions, particularly in improving the main lobe width and the sidelobe value, or both simultaneously. Finally, Section IV presents the conclusions.

II. THE GENERALIZED ADAPTIVE WINDOW FUNCTION A. GAP WINDOW FUNCTION ALGORITHM
Several window functions have been developed over the last few years, all with equivalent characteristics [10]. They are symmetric with respect to the center N /2 (for data running from i = 1 to N within the window) and generally normalized at the center w[N /2] = 1. Also, with some exceptions, e.g., the rectangular window, they are null, w[0] = w[N ] = 0, or with a very small value at their endpoints. Some window functions carry additional properties, such as null derivatives at those points. The most traditional window functions are based on fixed expressions, such as the rectangular, Hann, Hamming, Flat-top, Blackman, and Sine. Others have one or more free parameters, such as the Gaussian, Tukey, Chebyshev, and functional forms from more recent investigations [7], [11], [26]- [28], which have been adjusted to optimize a certain property at the frequency domain. Hybrid window functions have also been developed, such as the Barlett-Hann and Planck-Bessel ones, by combining other known window functions.
All those well-established window functions, even the adjustable ones, have low functional flexibility, and any adjustable parameter can not improve substantially the spectral characteristics desired. Additionally, those developments are generally based on empirical and trial-and-error procedures. This suggests the need for a more general window function, in which all others could be derived. Besides, a more systematic procedure to develop window functions could provide higher optimization on the properties of signal processing.
We propose the most flexible functional form for a window function, a non-linear polynomial expansion (1): where a n and m are the coefficients and the maximum order of the polynomial expansion, respectively. Additionally, those coefficients must be determined according to certain rules. This form has been proposed previously by other authors [5], but with different goals than here. In principle, any function could be described by an infinite polynomial expansion. For any smooth function, such as the window functions generally used in DFT, one could find a finite expansion with the appropriate set of coefficients that describe it satisfactorily.
One of the properties of all windows is the symmetry constraint around its center. Therefore, considering the polynomial represented only in the time interval −T /2 to +T /2, we kept our expansion with that constraint, with the form: and w(t) = 0 for |t| > T /2. Here, we develop window functions constraining a 0 = 1, but this constrain could be lifted in future developments. Besides, a smaller number of expansion terms than in (1) is obtained with the exponent 2n, with reasonable results with a small set of parameters (m varying from 4 to 12). On the other hand, there is no theoretical shortcoming to consider non-symmetrical window functions, such that this constraint could also be lifted in future developments, to get even more optimized widow functions, although with a higher computational cost due to a larger number of expansion terms.

B. FOURIER TRANSFORM OF GAP AND STRATEGIES TO OPTIMIZE THE GAP WINDOW FUNCTION
With a flexible functional form for the window function, the challenge is now to find the appropriate expansion coefficients that better describe a certain set of properties in the VOLUME 8, 2020 frequency domain. For that, we could use several optimization strategies, defining a figure of merit function, or cost function, to achieve the desired property in the frequency domain.
This cost function could be minimized iteratively using local or global optimization methodologies. A more sophisticated procedure to obtain an optimized window function is using a self-consistent adaptive procedure, such as machine learning, to obtain the best set of expansion parameters for a certain property.
The first optimization strategy can be performed in the frequency domain, W (ω), by varying the GAP coefficients and optimizing the main properties in the frequency response. The Fourier transform of (2) is given by (3) [5]: P 0 and P 2n can be described by (4) and (5), respectively.
As demonstrated in (2), the polynomial window is represented in the time interval |t| ≤ T /2. Applying the Fourier transform in the polynomial regression coefficients, one can calculated the variables P 0 and P 2n . These values would be represented by delta functions if the limits of integration were −∞ and +∞. However, with the restriction it is possible to obtain the Fourier transform of polynomial functions on a restricted domain. In short, P 0 can be described as a sinc function, while the P 2n can be obtained generalizing the pattern of the Fourier transform expansion.
Another strategy to optimize the GAP functions can be performed directly in the time domain. For example, minimizing the window function derivative at its extremities to improve the relative sidelobe attenuation, as described in (6), or maximizing its second derivative at the center point, as indicated in (7), to decrease the main lobe width.
The simulation could be performed with certain constraints for the function described by (2). Those constraints, such as forcing a null value for the window function extremities, guarantee that the window is normalized at its center, or to achieve a strictly positive window function, could be enforced after each iterative step. On the other hand, in a more general window function, all those constraints could be lifted. For example, as mentioned earlier, the expansion in (2) forces a symmetry around its center, but this constraint could be also lifted to explore a more general window function. With the procedure described in the previous paragraphs, it is possible to achieve highly optimized window functions as compared to the currently established ones.

A. GAP WINDOW FUNCTION COMPARISON
An expansion with m = 10, with only ten coefficients (a 2 to a 20 ), can describe well most of the traditional window functions, although large values of m could be more appropriate in some cases. The expansion of (2), with the appropriate coefficients presented in Table 1, allows to mimic any of the well-established window functions, therefore one can call the function as a generalized window function with flexibility to allow searching for sets of expansion coefficients that could provide highly-optimized results for signal analysis.
For some window functions, such as the Dolph-Chebyshev with sidelobe attenuation of −100 dB, the polynomial expansion with an order of up to 20 is insufficient to describe and to optimize the window satisfactorily. In these cases, it is necessary to increase the number of polynomial expansion terms.

B. GAP WINDOW OPTIMIZATION
The optimization could be performed starting with a random set of expansion coefficients. In the optimizations performed, GAP coefficients that mimic traditional window functions were used as initial guesses to allow a quick optimization and to guarantee a convergent solution. In other words, starting with a set of expansion coefficients a i that mimics one of the well-known window functions, as given in Table 1, one can find a new window function by varying those coefficients, searching iteratively to minimize the cost function up to a certain pre-determined convergence value.
There is no difference in treating symmetrical or non-symmetrical window functions in the proposed method. In the case of non-symmetrical window functions, one can consider maintaining the polynomial expansion with coefficients calculated on the power of n instead of the power  There are different metrics to analyze window functions. In general, the most relevant are the main lobe width, sidelobe attenuation, and sidelobe falloff rate. The first two metrics are widely used when comparing window functions, so they can be used as a reference for optimization.
Figs. 2, 3, and 4 exemplify GAP optimizations performed analyzing the frequency domain response. Fig. 2 shows an optimization for the Flat Top window to improve the sidelobe attenuation. The iterative procedure started with the set of expansion coefficients that mimic the Flat Top window. These  coefficients represent only the initial guess, and any new set of coefficients that improves the property in the frequency domain provides a more optimized window function than that initial guess. Using the a i variables as an input of the Nelder-Mead (NM) algorithm (simplex method), it is possible to find a local minimum of a sidelobe measurement function. While the Flat Top window initially has relative sidelobe attenuation of −90.3 dB and main lobe width of 0.115230 (3.68 bins), the optimized one achieves a relative  Both optimizations, shown in Figs. 3 and 4, present a decrease in the sidelobe falloff rate. This parameter is fundamental when attenuation is required at higher frequencies.
Finally, Fig. 5 demonstrates the optimization of three spectral characteristics (main lobe width, sidelobe attenuation, and sidelobe falloff rate) simultaneously using the GAP  Nuttall as initial value. Considering the first two window metrics, while the Nuttall window has initially the main lobe width of 0.059320 (1.90 bins) and a relative sidelobe attenuation of −93.8 dB, the optimized one achieves the main lobe width of 0.058594 (1.87 bins) (an improvement of 1.22%) and a relative sidelobe attenuation of −102.7 dB (an improvement of 9.48%). The optimized GAP Nuttall features a very significant and innovative result obtained in this investigation since it combines expressive values of sidelobe attenuation with main lobe width. Table 2 and Fig. 6 summarize the results obtained from main lobe width (×π rad/samples and bins) and sidelobe attenuation (dB) of traditional windows and those obtained with GAP optimization. The window functions with better spectral characteristics should have high sidelobe attenuation and small main lobe width, i.e., they are allocated in the lower and left positions of Fig. 6.
In the proposed scenarios, the optimized GAP window functions improved the spectral characteristics of the traditional window functions. During the GAP optimizations, the trade-off between main lobe width and sidelobe attenuation could be suppressed, increasing the resolution in frequency without the cost of reducing the dynamic range of the spectrum and vice versa.
The results demonstrate the versatility of GAP, and optimizations based on other methods, such as simulated annealing, could lead to even better performances. The examples presented here demonstrate the potentiality of using GAP as a strategy to develop adaptive windows.

IV. CONCLUSION
A novel method based on polynomial window functions, labeled GAP, is proposed. It allows to mimic previously known window functions, and this algorithm proposes a comprehensive method to embed a full set of window functions in devices. Since the proposed algorithm to obtain window functions is quite general, it allows the use of several optimization methods, such as global optimization techniques, e.g., genetic algorithms, simulated annealing, or local optimization techniques, e.g., Newton methods and gradient-based methods. Even machine learning could be the focus of future investigations. Besides, any new window obtained by optimization procedures represents an improvement of the properties in the frequency domain, when compared to that initial window function guess.