2.1 Background
The DFT is generally used for frequency analysis. A discrete spectrum X of the discrete time signal x(n) of length N can be expressed as
(1)
When the sampling frequency is Δt and the original signal x(n) has a period of N Δt/k, X(k) can accurately reflect the spectral structure. However, if a period other than N Δt/k appears in x(n), X(k) is expressed by the combination of N Δt/k in terms of several frequency components, and X(k) is not accurately reflected in the spectral structure.
In order to increase the frequency resolution, the value of N is generally increased. If the frequency is accompanied by a temporal fluctuation, however, then the average period is extracted and the analytical accuracy deteriorates as N is increased. Some techniques use an analysis window function for x(n) in preprocessing. However, this does not improve the apparent frequency resolution.
Figure 1 shows some of the problems associated with frequency analysis. Even when analyzing the simplest frequency signal shown at the top of Figure 1, one portion of the section is removed when determining the periodicity of the analyzed signal. The center left section of Figure 1 shows the analytical accuracy. The period can accurately be identified only if the frame length is a multiple of the period of the analyzed signal. In other words, a group of different spectra appear near the true frequency because the analyzed signal is expressed as a multiple number of periods N Δt/k. In order to prevent this, an analysis window function may be used, as shown in the center right section of Figure 1. However, this will merely concentrate around the true value, making it difficult to determine the true value. We, therefore, noted that the Fourier coefficient could be estimated by solving a nonlinear equation based on the assumption of a stationary signal (see the bottom of Figure 1). Thus, the NHA developed in this study achieves a high analytical accuracy because this NHA reduces the influence of the analysis window.
2.2 Algorithm of NHA
Figure 2 shows the algorithm used by NHA. First, a frequency analysis of the input signal is carried out by fast Fourier transform (FFT) for obtaining the initial value. Next, the frequency and initial phase of the spectral component that has the largest amplitude are converged using a cost function with the steepest descent method. At this time, a weighting coefficient based on the retardation method is applied to convert the cost functions calculated by the recurrence formulas into a monotonically decreasing sequence. The amplitude is then converged using Newton's method. Following this, Newton's method is applied again to converge both the frequency and the initial phase to a high degree of accuracy. Following a final convergence of the amplitude using Newton's method, we obtain the fully converged spectrum.
Finally, we describe the motivation for the structure shown in Figure 2. For the cost function equation, given by Equation 2, although the convergence speed is slow, the steepest descent method can find the stationary point within a wide range. In contrast, the Newton method can quickly find a nearby stationary point. Therefore, we first use the steepest descent method to find the stationary point within a wide range. Then, we use the Newton method to quickly find a stationary point. Either way, we distinguish the convergence calculation of amplitude A from the other parameters, so that the local stationary point will not be calculated incorrectly.
2.3 Details of NHA
In this section, we present a more detailed description of the NHA method. Since the Fourier coefficient is estimated by solving a nonlinear equation, NHA enables the frequency and its associated parameters to be accurately estimated without being significantly affected by the frame length. In order to minimize the sum of squares of the difference between the object signal and the sinusoidal model signal, the frequency , amplitude , and initial phase are calculated using the cost function, as follows:
(2)
where N is the frame length and fs is the sampling frequency (fs = 1/Δt).
2.3.1. Steepest descent method
George and Smith [12, 13] attempted to introduce the signal parameter A and the initial phase ϕ by applying the least mean squares method to the difference signal between the analyzed signal and the modulated harmonic sinusoidal wave.
However, this method is strongly dependent on the frame length and is difficult to apply to the analysis of signals that do not have a simple frequency harmonic structure because frequencies that are dependent on the frame length are used for the group of harmonic frequencies, as in DFT. In other words, small frequency changes cannot be detected.
By focusing on the problem of solving a nonlinear equation, we apply the nonlinear equation process to Equation 2 for optimum calculation of the frequency f, as well as the parameter amplitude A and initial phase ϕ. Figure 3 shows an example of the characteristics of and in the evaluation function of Equation 2, enlarged around the true value, where N is 512, fs is 512, and the true values of A, f, and ϕ are 1, 100 Hz, and 0.5π rad, respectively. Since small values are given in black, troughs appear as black and peaks as white. In other words, Equation 2 is a multimodal nonlinear evaluation function. Around the true value (= 100, = 0.5), minimum and maximum values are aligned vertically. This is because the true value is a minimum but becomes a maximum for the antiphase case (ϕ(2π) = 0, 1). Since the trough at the minimum value is 2 Hz wide, the minimum of the evaluation function can be estimated only if the initial value lies in the trough when solving the nonlinear equation. Since the DFT frequency resolution is 1 Hz, one or two points can be contained in a trough that is 2 Hz wide. At the point on the frequency axis where the DFT amplitude becomes maximum (i.e., the integral frequency when the frame length is 1 s), the evaluation function of Equation 2 is minimized at the initial phase determined by DFT.
If the maximum amplitude A determined by DFT and the frequency f and initial phase ϕ are used as initial values (A0,0, f0,0, ϕ0,0), then the initial values can be given inside the trough containing the minimum of cost function in Figure 3.
Therefore, in order to obtain an accurate spectrum, we use the initial value (A0,0, f0,0, ϕ0,0), which is converged using the nonlinear equation process. Considering Equation 2 as the cost function, this nonlinear problem is converted into a minimization problem, and and are determined using the steepest descent method and the retardation method to obtain the following expressions:
(3)
(4)
where p is the operated number of the retardation methods for the frequency and the phase, and m is the number of iterations of the steepest descent method. We use the following shorthand
(5)
where q is the number of iterations of the retardation method. These variables are iterated as shown in Figure 4. In the above equations, μ
m,p
is a weighting coefficient based on the retardation method and has a value between 0 and 1 to convert the cost functions calculated by recurrence formulas into a monotonically decreasing sequence [14–16]. In this article, we use this weighting coefficient as follows
(6)
where μ
m
,1 is set to 1.
This series of calculations is repeated to cause and to converge with high accuracy until the following conditions occur:
(7)
The next step is the convergence of the amplitude.
2.3.2. Amplitude convergence
Here, A can be uniquely determined only if and are known, and the following formula is used to cause A to converge:
(8)
Similarly, μ
m,p
and v
m,q
are weighting coefficients based on the retardation method [14–16] and are given by
(9)
with v
m
,1 = 1. This causes to converge with a high degree of accuracy until
(10)
Then, , and are set to , and , and q and p are reset to 1.
Next, the steepest descent method and the amplitude converging algorithm are recursed until the cost function becomes partially converged. Newton's method is then applied.
2.3.3. Newton's method
Although the steepest descent method causes values to converge over a comparatively wide range, a single series of operations cannot ensure sufficient accuracy. In order to achieve a highly accurate conversion, NHA uses Newton's method following the lower accuracy steepest descent method. The following recurrence formula is used for Newton's method:
(11)
(12)
where
(13)
and m is the number of iterations of Newton's method. In addition, μ
m,p
is similarly obtained from Equation 6. This series of calculations is also repeated to cause and to converge accurately. After applying Equations 11 and 12, is made to converge by applying Equation 8 in the same manner as in the steepest descent method, and the series of calculations is repeated. The only difference is that the converging algorithm is repeated using Newton's method instead of the steepest descent method. Thus, the frequency parameters are estimated to a high degree of accuracy and at high speed by using a hybrid process combining the steepest descent and Newton's method.
2.3.4. Sequential reduction
Even for the case in which there are several sinusoidal waves, the spectral parameters can approximately be derived by sequential reduction. Here, x(n) is expressed as the sum of K sinusoidal waves in the following manner:
(14)
According to Parseval's theorem, the object signal frequency f
k
and the model signal's frequency do not match, i.e., if
then
(16)
In addition, if the pair of and matches either or , then
(17)
If both A
j
and A match, then a frequency component of an estimated spectrum can completely be removed from an object signal. Therefore, the problem of acquiring an optimum solution is frequency independent and is applicable even to a signal consisting of several sinusoidal waves by sequential and individual estimation from the object signal. In other words, even when the object signal is a composite sinusoidal wave, several sinusoidal waves can be extracted by performing similar processing on sequential residual signals. If the frequencies of two spectra are adjacent to each other, the other spectrum generates another trough in the trough around the true value shown in Figure 3 and distorts the evaluation function. This may result in an error, as discussed later herein.
2.4. Accuracy of NHA
Among the techniques based on DFT, generalized harmonic analysis (GHA or Hirata's algorithm) is generally considered to have the highest accuracy [17–20].
According to these analyses, the frequency resolution depends on the frame length because one analysis window apparently has the length of several windows. However, the decomposition frequency has a finite length, and an object signal of any other frequency cannot be analyzed. Figure 5 shows the numbers of frequencies that can be analyzed by DFT and GHA at each frame length. Successful frequency analysis means that the number of spectra of the object signal matches the number of spectra after analysis, that is, if the frame length is unique, then DFT has N decomposition frequencies (0, fs/N, 2f/N,..., (N - 1)fs/N [Hz]). Compared to DFT of approximately half the data length, GHA is one order of magnitude more accurate. If the spectrum of the object signal is not in the group of the harmonic spectra, the group of harmonic spectra appears near the true frequency.
In order to verify the frequency resolution of NHA, we compared DFT and GHA experimentally, as shown in Figure 6. With the frame length set to 1 s (512 samples), we analyzed a single sinusoidal wave. By each technique, one sinusoidal wave was extracted, and the square of the error from the original signal was examined.
DFT exhibited low analytical accuracy except when the signals had frequencies that were integral multiples of the fundamental frequency. At frequencies above 1 Hz, GHA exhibited accuracies that were two to five orders of magnitude greater. At the same frequencies, NHA was 10 or more orders of magnitude more accurate than DFT. At frequencies below 1 Hz, DFT and GHA were equally accurate, but NHA was able to estimate the frequency and other parameters correctly without being affected by the frame length. Thus, NHA was demonstrated to have an even greater analysis accuracy than GHA, which was developed from DFT.
Accurate estimation at frequencies below 1 Hz means that even object signals having periods longer than the frame length can accurately be analyzed. Therefore, it may be possible to accurately estimate the spectral structures of signals representing stock prices and other fluctuation factors.
Figures 7 and 8 show the square errors of two sinusoidal waves. A similar evaluation to that in Figure 6 was performed by adding another sinusoidal wave (f = 0.6 Hz) in order to determine whether both sinusoidal waves could be correctly extracted.
The ratio of the amplitudes of the two sinusoidal waves is 1:1 in Figure 7 and 1:10 in Figure 8. The latter is the sinusoidal wave ratio at f = 0.6 Hz. In both cases, the accuracy increases in the order of NHA, GHA, and DFT. If the two sinusoidal waves have similar amplitudes, the evaluation functions shown in Figure 3 interfere with each other, increasing the distortion, which results in a greater error than that when only one sinusoidal wave is used. As mentioned above, this tendency becomes more noticeable as the frequencies become closer to each other. However, the NHA error is less than the average, as compared to the errors of DFT and GHA.