Non-Distorted Optimization Spectrum Analysis

The discrete Fourier transform is extensively applied in spectrum analysis. However, the sampled signal is random, and the discrete Fourier transform has its own specific limitations. Thus, errors will inevitably occur in time–frequency transformation work. The most common are the leakage effects of the spectrum that are caused from the scale of the spectrum not being able to match the characteristics of the signal. The optimal spectrum is proposed to overcome this defect by adjusting the frequency scale to fit signal characteristics. This includes three stages whereby frequency scale can match signal characteristics. Firstly, the signal parameters must be found. Secondly, the frequency scale can be determined from these signal parameters. Finally, the optimal spectrum can be realized using the adjustable spectrum with the new frequency scale. After processing the optimal spectrum, the leakage effects of the signal will be decreased to a minimum. This method preserves signal characteristics in the optimization process, which reaches the ideal of non-distortion.


Introduction
The field of engineering includes electrical engineering [1,2], electronic engineering [3][4][5], mechanical engineering [6,7], civil engineering [8,9], structural engineering [10] and others, where system behavior can often be described by differential equations.The solution to the differential equation includes frequency, damping, amplitude, and phase, and while frequency and damping are the characteristic roots and are not affected by the initial conditions or boundary conditions, the amplitude and phase change due to different conditions.Since the system response is usually periodic, time-frequency conversion is often used in the analysis of these responses to convert a time-domain signal into a frequency-domain signal.
Discrete Fourier transforms (DFTs) are a powerful tool, as they reveal periodicities in input data as well as the relative strengths of any periodic components.Because of the limitations of DFTs, the following conditions must be noted when DFTs are applied: (1) The sampling rate must be higher than twice the highest frequency of the signal.
(2) Although users usually take DFTs to analyze complex exponential signals and observe the frequency response of a system, essentially, DFTs always regard signals as periodic.
As a result of the sampling of a signal being random and DFTs having their specific limitations, when a digital signal is transformed by a DFT the error usually occurs in violation of these conditions.The most frequent error is that the sampling time is not an integer multiple of the signal period, thereby creating a discontinuity in the terminal of the signal in the time domain.Consequently, in the frequency domain, it makes the component frequencies not equal to integer multiples of the frequency resolution.No suitable scale can display accurate values, and values will spread nearby to the closest bins, which causes distortion of both frequencies and amplitudes.This effect is called the "picket fence" or the "leakage effect", which seriously affects the results of DFTs.The effect causes parameters of periodic signals to not be obtained exactly, sets the bandwidth of periodic components to non-zero values, and creates confusion between periodic and non-periodic components [11].
Considering the leakage effect, many algorithms have been proposed to calculate signal parameters.The group power method provides a simple way to analyze the amplitudes of modes [12,13].Using the interpolated fast Fourier transform (IFFT) algorithm, all parameters can be obtained accurately [14][15][16][17].Alternatively, many methods have been developed to solve the leakage effect.The window methods are among the most popular solutions to overcome this effect.A signal can be multiplied by a window function to reduce the discontinuity in the terminal of the signal [18,19].In the frequency domain, the side lobes will be relatively well eliminated.The zero-padding method expands the sampling period to fit the period of the sampled signal by adding zeros [20].In the frequency domain, the harmonic frequencies will be located at bin values.The integer periodic extension method reproduces the sampling number to several times that of the original sampling number, which reduces the leakage effect quite handily [21].However, characteristics of the signal are changed from those in the original by the above-mentioned methods.These methods change the signal characteristics to match the frequency scale.Although the leakage effect on the spectrum is improved, the values on bins are not the real values.The method of spectrum analysis optimization has also been proposed, by changing the scale parameters to reach the optimal analysis [22].Nevertheless, a step of digital signal sampling is used in this method, and a slight error will show accordingly in the result.
In this paper we propose the method of optimal spectrum analysis.This method not only restrains the leakage effect on the spectrum, but also avoids the error of re-sampling to preserve signal characteristics.In this paper we adjust the frequency scale to match signal characteristics so that they are preserved.This process includes three stages: Parameter estimation, optimal scale parameter selection, and adjustable spectrum.
In the parameter estimation process, this paper regards components of a signal as being not only periodic but also possibly complex exponential, which can conform to most behaviors of physical systems.The complex exponential parameters include frequency, damping, amplitude, and phase.If the damping is equal to zero, the component is periodic.Parameter estimation is aimed at calculating parameters of each component, which provides the reference for frequency scale adjustment.
Optimal scale parameter selection determines the two parameters of sampling number and scale shift.The matching degree of signal characteristics and frequency scale can be expressed by the leakage energy.The leakage energy is established as a function of sampling number, scale shift, and component parameters.Because the component parameters are fixed, the leakage energy will be varied to follow the sampling number and scale shift.When these two parameters decrease the leakage energy to the global minimum, their frequency scale will have the optimal analysis result for the signal.
In the adjustable spectrum, the frequency scale is decided by the sampling number and scale shift.The variation in the sampling number can be achieved by increasing or decreasing the sampling number, and additionally, the scale shift can be accomplished by multiplying the signal with a shift function.This step can change not only the frequency scale, but also preserve signal characteristics.
This method optimizes the result near to the original scale, where the leakage effect is eliminated under very fine tuning, and the result is insensitive to un-expected errors.Moreover, this method has some advantages: The signal characteristics are preserved in the optimization process, the periodicity and non-periodicity of components can be recognized, and parameters of the periodic component can be directly obtained from the spectrum.In this paper, the theory is also verified by a practical instrument.

Theory
This section interprets the theory and the procedure.The theory includes parameter estimation, optimal scale parameter selection, and adjustable spectrum.The procedure integrates the above-mentioned theory as a complete algorithm.

Parameter Estimation
This section analyzes component parameters by the frequency-domain interpolation algorithm (FDIA) [23].The signal is regarded as complex exponential in this paper; that is, a signal can be expressed as: where f is frequency, α is damping, A is amplitude, and ϕ is phase.After applying the DFT and ignoring the influence from the negative frequency domain, the spectrum can be written as: Each component will generate its own band on the spectrum.Using the band data, parameters corresponding to the component can be found.The closer a bin m is to the component frequency f k , the more influence the component has on the value of this bin.This makes the energy spread around the component frequency.Near to the component frequency, the amplitudes are more obvious.Therefore, each component parameter can be found from the bin data with the two highest amplitudes for the corresponding band.
The following illustrates the calculation for a certain component.For a clear description, the symbols used are first shown in Figure 1.The two auxiliary equations are established firstly: and: The frequency bias, frequency and the damping can then be found: Once δ and α are determined, the third auxiliary equation can be established: The complex coefficient A ∠ ϕ is easily determined from Equations ( 9) and ( 10): If a component is periodic, its energy will centralize at a certain bin after scale adjustment.However, if the component is non-periodic, its energy will spread nearby to the bin after scale adjustment.Whether the component is periodic or not, for a complex exponential component, the largest amplitude that can influence a bin is:

Optimal Scale Parameter Selection
The concept of optimal scale parameters involves scale parameters that can be adjusted such that their component frequencies are located as close to bins as possible.This technique can centralize the energy of the periodic component.The concept is also regularly used to optimize the non-periodic component.After eliminating the leakage effect, the non-zero bandwidth of the non-periodic component is purely caused by its damping [24,25].
If the frequency of a periodic component is equal to a bin m, all of the energy will only affect bin m, and not the nearby bins.However, if the frequency cannot be matched with any bin, the leakage effect occurs.This phenomenon can be observed in Figure 2. Figure 1 also shows the results of processing signals with a DFT, and in this figure the leakage effect caused by frequencies cannot be matched with the frequency scale.|X(p)| represents the amplitude of the bin which is nearest to the component frequency.Apart from these amplitudes, the other amplitudes are regarded as leakage energy.If a signal includes K components, according to the concept of group power, the total energy of a signal S 2 can be expressed as: The leakage energy can represent the degree of the match between component parameters and the frequency scale.The frequency f and the amplitude A can be found in the above section, and the leakage energy can be written as: Changing the leakage energy can be achieved only by adjusting the frequency scale.The frequency scale is decided by scale parameters (sampling number N' and scale shift S s ).The sampling number decides the distance between each pair of bins, and scale shift simultaneously varies all bins by a certain value.The influence of these two parameters on the scale is shown in Figure 3.In the original spectrum, N' is fixed as N and S s is set to 0. This section regards these two parameters as adjustable, and the relation of the new bin to the original is given by: Owing to the adjusted scale, the frequency bias will be changed.The order of scale parameter adjustment is the sampling number first, and scaling the shift second.After the sampling number has been adjusted, the new frequency bias δ' becomes: where the following condition must be satisfied: Using scale adjustment, the leakage energy will become: The optimal scale parameters include the optimal sampling number and the optimal scale shift.Under the condition of arbitrarily frequency biases, the scale shift that minimizes the leakage energy is: Because of scale shifting, the leakage energy will decrease to a local minimum, and Equation ( 17) will become: where L min is defined as the minimal leakage energy.Equation ( 19) is the minimum leakage energy after scale shifting using a certain sampling number.In applications, Equation ( 19) can be simplified if needed: Because the relation between L' min and the sampling number is non-linear, a specific range must be searched one-by-one to find the minimum, L' min .Once the minimum, L' min , is found, the sampling number under this condition is optimal and the optimal scale shift can be obtained by Equation (18).From the optimal sampling number and optimal scale shift, the optimal frequency scale can be determined.

Adjustable Spectrum
The adjustable spectrum method involves adjusting the frequency scale.To preserving signal characteristics, in this paper we set the frequency scale according to the sampling number N' and the scale shift S s .The following explains the theory of adjusting these two parameters.
The sampling number decides the distance between each pair of bins.This distance can be also adjusted by changing the sampling rate [26].When the sampling rate is changed, the new signal must be obtained by re-sampling via the numerical method.This method will cause either large or small errors, especially for the higher frequency components [27].In the method of changing the sampling number, the new signal is just the data length variation of the original one, which can completely preserve the signal characteristics.
According to the frequency-shifting theorem, the shift S s in the frequency domain is equivalent to multiplying the signal with exp(j2πS s n/N') in the time domain.That is, the scale shift can be realized by the following equation: Equations ( 21) and ( 22) are the transform of the adjustable spectrum.In the DFT, N is fixed and S s is 0, so that the scale cannot flexibly respond for different signal characteristics.These two parameters in the adjustable spectrum can be changed arbitrarily, which scales the frequency in a very flexible way.After scale adjustment, the real frequencies f real corresponding to the bins are: As the sampling number is only slightly different from 2 r , it can be changed arbitrarily.In this paper we run DFTs based on Equation ( 22) instead of the fast Fourier transform (FFT).

Procedure
This section integrates the above-mentioned theory as a complete procedure; each step is explicated as per the following: Step 1: Signal sampling: Sample an analog signal as a digital one, with sample number N and sampling rate R. In this step, the sampling number must be suitable to clearly separate each band.The sampling rate must be suitable to ensure feasibility of the calculation and to avoid any aliasing effects.
Step 2: Time-frequency transform: The signal can be transformed by the FFT.This transform provides the data for parameter estimation.
Step 3: Reference data selection: Each component will generate its corresponding band on the spectrum.From these bands, the reference data p, p', X(p), and X(p') can be obtained.
Step 5: Optimal scale parameter selection: Select a range near the original sampling number, and search for the minimum, L' min , by Equation (20).The sampling number corresponding to the minimum, L' min , is the optimal one.According to the optimal sampling number, the optimal scale shift can be also found by Equation (18).
Step 6: Adjustable spectrum: The sampled signal is transformed as a spectrum by Equation ( 22) using the optimal sampling number and the optimal scale shift.
Step 7: Process accomplished: A new spectrum which has the optimal resolution for the signal has been obtained.

Result and Discussion
The main steps in the method for obtaining the optimal spectrum include parameter estimation, optimal scale parameter section, and adjustable spectrum.This section evaluates these steps, explains the spectrum properties, compares other methods, and discusses applications.

Parameter Estimation
The section uses a signal that includes periodic and non-periodic components, such as the example: x(t) = 10 cos(2π × 30.2t) + 10e −2.5t cos(2π × 60.3t) (24) with Figure 4 as its waveform.Setting the sampling number to 512 samples and the sampling rate to 512 (samples/s), the spectrum is shown in Figure 5.The characteristics of these two components are not determined from the data in this figure.That is, it would cause error in the spectrum analysis.The component parameters, which are found by Equations ( 6)- (11), are displayed in Table 1.Using Table 1, the current step can derive accurate results for component parameters.Moreover, the largest amplitude after optimization can be also predicted.

Optimal Scale Parameter Selection
To avoid causing a large difference between the result and the original, this step searches for the optimal value of the sampling number from 498 to 534. Figure 6 shows the relationship between the sampling number and the frequency biases.Figure 7 shows the local minima of the leakage energy.It can be shown that L' min is not the minimum on the original scale, which shows that the match between the signal characteristics and the original scale is poor.When both of these frequency biases are equal, L' min will descend to the minimum.Very close frequency biases are resultant in the cases of N' being 510 or 527.It follows that L' min will descend to the minimum when the frequency biases are closed.Table 2 is the expression of different sets of scale parameters.The unsuitable scale parameters of the FFT will cause large errors.Nearby to the original scale, two sets of optimal scale parameters, (510, 0.0663) and (527, 0.0727), can be found.The component frequencies are almost positioned at bin values when any set of optimal scale parameters are used.

Adjustable Spectrum
The analysis result for Equation ( 24) by the optimal scale parameters (N', S s ) = (510, 0.0663) are shown in Figure 8. Comparing Figures 4 and 8, the new signal is the original one where the length has been changed.This result demonstrates that signal characteristics can be preserved completely.The scale of Figure 9 is close to that of Figure 5, however, after scale adjustment, the energy of the periodic component has been located at the identical bin and the leakage has been reduced to a minimum.The exact parameters are directly displayed on the spectrum.After scale adjustment, the energy of the non-periodic component still spreads around its frequency.This phenomenon is similar but not equal to the leakage effect.For a non-periodic component, the non-zero bandwidth is caused by damping, which cannot be eliminated after scale adjustment.Consequently, the periodicity or non-periodicity of a component can be recognized by observing whether the leakage energy has been eliminated or not.

Spectrum Properties
The spectrum transformed by the DFT is conjugate symmetry [28].After optimal scale adjustment, the conjugate symmetry of spectrum will be destroyed.Figure 10 is the complete spectrum after optimal scale adjustment.It shows that the positive frequency domain can effectively reduce the leakage energy, but the leakage effect still exists in the negative frequency domain.The analysis results of parameter estimation are displayed in Table 3, which shows that the parameters in the negative frequency domain can also be found by Equations ( 6)- (11), in spite of the leakage energy not being reduced to a minimum.According to the above-mentioned points, the relationship can be satisfied in the optimal spectrum.It can be found that the conjugate symmetry of the component parameters in the frequency domain is still preserved, in spite of the conjugate symmetry of spectrum is destroyed after optimal scale adjustment.

Comparison of Different Methods
The variation of frequency scale can be accomplished by adjusting the scale interval and scale shift.Where the scale interval is decided by the sampling number and the sampling rate, determination of the optimal spectrum by adjustment of sampling rate has been proposed.In this paper we propose the method of adjusting the sampling number to reach optimal result.The comparison of these two methods for Equation ( 24) is shown in Figure 11.It can be found that the method of adjusting the sampling rate will cause a slight error in the optimization of the spectrum.This distortion arises from re-sampling via the numerical method.This method adjusts the data length of the original, so signal characteristics are completely preserved.Owing to the change of the sampling number, the time-frequency transform in this method can only be based on the DFT.The method of adjusting sampling rate keeps the sampling number constant, and the spectrum optimization can be performed based on the FFT.

Implementation in Instrument
A practical instrument implementing this method is also demonstrated in this paper, shown in Figure 12a.This instrument is based on the TI TMS320LF2407 DSP microprocessor, and consists of five modules [29]: The voltage-transform circuit, analog-to-digital converter, microprocessor, keyboard module, and liquid-crystal-display module, as shown in Figure 12b.The function of the voltage-transform circuit is to transform the utility nominal voltage of alternate current (AC 110 V) into an input voltage that meets the specifications of the analog-to-digital converter (0-5 V).In this converter, the sample rate is set at 1024 samples/s, with the number of samples set at 1024 and a sample period of 1.0 s.The 8-bit analog-to-digital converter has a resolution of 19.6 mV for a 5 V signal voltage.In this instrument, the functions of measurement, calculation, storage, and display are also included.The analysis of a full-wave-rectified voltage is used as the example.Figure 13a shows the spectrum from FFT.The signal causes obvious leakage effects on the spectrum.Figure 13b is the results of the optimal spectrum, whose scale is close to that in Figure 13a.However, after scale adjustment, the energy of each harmonic has been located at the identical bin, and the leakage effect has been decreased to a minimum.

Application
Due to the diversity of signals, different analysis methods are available for different signal structures.
In the engineering field, the responses of analyzed systems often contain a few important frequency components, and the signal structure is relatively simple [30][31][32][33].An exact result is therefore the requirement when analyzing this type of signal, and the optimized effect will aid in the analysis of these signals.The proposed method uses two parameters to optimize the spectrum.When the signal structure is more complex, the optimization result is less obvious.At this point, a small number of specific components can be analyzed, and local optimization results can still be obtained.
Biological signals from equipment such as the electrocardiogram (EKG) [34], electroencephalogram (EEG) [35], electromyography (EMG) [36], pulse pressure [37], phonocardiogram [38] and others, possess characteristics of large variation range, are non-stationary, have high time-variance rates, many interference factors, and are relatively complex structures.Because of the large range of variation in these signals, statistical analysis is often used to verify their significance.
In biological signals, EKG, pulse pressure, and phonocardiogram [39] can easily derive a period in the time domain, so these signals are often explained in the time domain.
In biological signals, EEG [40] and EMG have no obvious features in the time domain.Such signals are often represented as a spectrum, as the significant features can be observed in the frequency domain; however, the frequency components of such signals are also quite complex.In such signals, the instability of the signal far exceeds the leakage effect, and the optimization method will not assist in the analysis of these signals.

Conclusions
This paper proposes an optimization-based method for spectrum analysis, which adjusts the frequency scale to match the signal characteristics.When the frequency scale matches the signal characteristics, the leakage effect will be decreased to a minimum, and the spectrum analysis will reach an optimum.The capabilities of this method have been evaluated, and it has the following features: (1) Extensive suitability: This method can be used for signals with complex exponential components, but is not limited to periodic signals.
(2) Preserving original characteristics: The optimization process involves changing the frequency scale, after which the original characteristics will be completely preserved.(3) Close scale: The scale parameters of the optimal spectrum are near to the original ones, which makes the optimization results obtainable through a fine-tuning modality.(4) Directly obtaining parameters for periodic components: In the optimal spectrum, the amplitude of a periodic component concentrates at an identical bin whose parameters can be read directly.(5) Component property re-organization: In the optimal spectrum, the non-periodic component will cause non-zero bandwidth from its damping.Therefore, the periodicity or non-periodicity of a component can be recognized by observing whether non-zero bandwidth exists or not.
A real instrument is also demonstrated in this paper, so that the practical application of the method presented can be verified.
Figure 1 is the spectrum corresponding to a complex exponential signal, with the two largest vectors in the band are X(p) and X(p + ε), where ε is equal to 1 or −1, respectively, if |X(p + 1)| ≥ |X(p − 1)| or not.Bins p and p + ε are also used.These four data points are the references for parameter estimation.

Figure 1 .
Figure 1.Reference data for parameter estimation.

Figure 2 .
Figure 2. Leakage effects from different frequency biases.

Figure 6 .
Figure 6.Relation between sampling number and frequency biases.

Figure 11 .
Figure 11.Analyzed results from different methods.

Figure 12 .
Figure 12.Instrument for optimized analysis of spectrum.(a) Practical work; and (b) schematic block diagram.

Figure 13 .
Figure 13.Comparison of analysis results.(a) Result from FFT; (b) result from the optimal spectrum.

Table 1 .
Results of parameter estimation.

Table 2 .
Presentations from different scale parameters.