1.前言
Although the time and frequency resolution problems are results of a physical phenomenon (the Heisenberg uncertainty principle) and exist regardless of the transform used, it is possible to analyze any signal by using an alternative approach called the multiresolution analysis (MRA,多分辨率分析) . MRA, as implied by its name, analyzes the signal at different frequencies with different resolutions. Every spectral component is not resolved equally as was the case in the STFT.
MRA is designed to give good time resolution and poor frequency resolution at high frequencies (在高频处,提供良好的时间分辨率和较差的频率分辨率)and good frequency resolution and poor time resolution at low frequencies(在低频处,提供良好的频率分辨率和较差的时间分辨率). This approach makes sense especially when the signal at hand has high frequency components for short durations and low frequency components for long durations. Fortunately, the signals that are encountered in practical applications are often of this type(刚好,实际中我们碰到的信号大多数满足这种情况,短时间高频长时间低频). For example, the following shows a signal of this type. It has a relatively low frequency component throughout the entire signal and relatively high frequency components for a short duration somewhere around the middle.
2.连续小波变换
The continuous wavelet transform was developed as an alternative approach to the short time Fourier transform to overcome the resolution problem(与短时傅里叶一样只是为了克服分辨率的难题). The wavelet analysis is done in a similar way to the STFT analysis, in the sense that the signal is multiplied with a function, { the wavelet}, similar to the window function in the STFT, and the transform is computed separately for different segments of the time-domain signal. However, there are two main differences between the STFT and the CWT:
1. The Fourier transforms of the windowed signals are not taken, and therefore single peak will be seen corresponding to a sinusoid, i.e., negative frequencies are not computed.
2. The width of the window is changed as the transform is computed for every single spectral component(这个窗口可就与众不同了,实时在变), which is probably the most significant characteristic of the wavelet transform.
The continuous wavelet transform is defined as follows
As seen in the above equation , the transformed signal is a function of two variables, tau and s , the translation and scale parameters, respectively. psi(t) is the transforming function, and it is called the mother wavelet(母小波) . The term mother wavelet gets its name due to two important properties of the wavelet analysis as explained below:
The term wavelet means a small wave . The smallness refers to the condition that this (window) function is of finite length ( compactly supported). The wave refers to the condition that this function is oscillatory . The term mother implies that the functions with different region of support that are used in the transformation process are derived from one main function, or the mother wavelet. In other words, the mother wavelet is a prototype for generating the other window functions.
The term translation is used in the same sense as it was used in the STFT; it is related to the location of the window, as the window is shifted through the signal. This term, obviously, corresponds to time information in the transform domain. However, we do not have a frequency parameter, as we had before for the STFT. Instead, we have scale parameter which is defined as $1/frequency$. The term frequency is reserved for the STFT. Scale is described in more detail in the next section.
3.尺度信息
The parameter scale in the wavelet analysis is similar to the scale used in maps. As in the case of maps, high scales correspond to a non-detailed global view (of the signal)(尺度越大,细节越少), and low scales correspond to a detailed view(尺度越低,细节越丰富). Similarly, in terms of frequency, low frequencies (high scales) (低频=大尺度)correspond to a global information of a signal (that usually spans the entire signal), whereas high frequencies (low scales)(高频=小尺度) correspond to a detailed information of a hidden pattern in the signal (that usually lasts a relatively short time). Cosine signals corresponding to various scales are given as examples in the following figure .
Fortunately in practical applications, low scales (high frequencies) do not last for the entire duration of the signal(但是很幸运的是,在实际工程应用过程中,高频信号并不能持续很长时间), unlike those shown in the figure, but they usually appear from time to time as short bursts, or spikes. High scales (low frequencies) usually last for the entire duration of the signal(低频信号往往出现在整个周期).
Scaling, as a mathematical operation, either dilates or compresses a signal. Larger scales correspond to dilated (or stretched out) signals and small scales correspond to compressed signals. All of the signals given in the figure are derived from the same cosine signal, i.e., they are dilated or compressed versions of the same function. In the above figure, s=0.05 is the smallest scale, and s=1 is the largest scale.
In terms of mathematical functions, if f(t) is a given function f(st) corresponds to a contracted (compressed) version of f(t) if s > 1 and to an expanded (dilated) version of f(t) if s < 1 .
However, in the definition of the wavelet transform, the scaling term is used in the denominator, and therefore, the opposite of the above statements holds, i.e., scales s > 1 dilates the signals whereas scales s < 1 , compresses the signal. This interpretation of scale will be used throughout this text.
4.连续小波变换的计算
Interpretation of the above equation will be explained in this section. Let x(t) is the signal to be analyzed. The mother wavelet is chosen to serve as a prototype for all windows in the process. All the windows that are used are the dilated (or compressed) and shifted versions of the mother wavelet. There are a number of functions that are used for this purpose. The Morlet wavelet and the Mexican hat function are two candidates, and they are used for the wavelet analysis of the examples which are presented later in this chapter.
Once the mother wavelet is chosen the computation starts with s=1 and the continuous wavelet transform is computed for all values of s , smaller and larger than ``1''. However, depending on the signal, a complete transform is usually not necessary. For all practical purposes, the signals are bandlimited, and therefore, computation of the transform for a limited interval of scales is usually adequate. In this study, some finite interval of values for s were used, as will be described later in this chapter.
For convenience, the procedure will be started from scale s=1 (从尺度s=1开始)and will continue for the increasing values of s , i.e., the analysis will start from high frequencies and proceed towards low frequencies(从高频向低频方向分析). This first value of s will correspond to the most compressed wavelet. As the value of s is increased, the wavelet will dilate.
The wavelet is placed at the beginning of the signal at the point which corresponds to time=0. The wavelet function at scale ``1'' is multiplied by the signal and then integrated over all times. The result of the integration is then multiplied by the constant number 1/sqrt{s} . This multiplication is for energy normalization purposes so that the transformed signal will have the same energy at every scale. The final result is the value of the transformation, i.e., the value of the continuous wavelet transform at time zero and scale s=1 . In other words, it is the value that corresponds to the point tau =0 , s=1 in the time-scale plane.
The wavelet at scale s=1 is then shifted towards the right by tau amount to the location t=tau , and the above equation is computed to get the transform value at t=tau , s=1 in the time-frequency plane.
This procedure is repeated until the wavelet reaches the end of the signal. One row of points on the time-scale plane for the scale s=1 is now completed.
Then, s is increased by a small value. Note that, this is a continuous transform, and therefore, both tau and s must be incremented continuously . However, if this transform needs to be computed by a computer, then both parameters are increased by a sufficiently small step size. This corresponds to sampling the time-scale plane.
The above procedure is repeated for every value of s. Every computation for a given value of s fills the corresponding single row of the time-scale plane. When the process is completed for all desired values of s, the CWT of the signal has been calculated.
The figures below illustrate the entire process step by step.
In before Figure , the signal and the wavelet function are shown for four different values of tau . The signal is a truncated version(截断的版本) of the signal. The scale value is 1 , corresponding to the lowest scale, or highest frequency. Note how compact it is (the blue window). It should be as narrow as the highest frequency component that exists in the signal. Four distinct locations of the wavelet function are shown in the figure at to=2 , to=40, to=90, and to=140 . At every location, it is multiplied by the signal. Obviously, the product is nonzero only where the signal falls in the region of support of the wavelet, and it is zero elsewhere. By shifting the wavelet in time, the signal is localized in time, and by changing the value of s , the signal is localized in scale (frequency).
If the signal has a spectral component that corresponds to the current value of s (which is 1 in this case), the product of the wavelet with the signal at the location where this spectral component exists gives a relatively large value. If the spectral component that corresponds to the current value of s is not present in the signal, the product value will be relatively small, or zero. The signal in Figure 3.3 has spectral components comparable to the window's width at s=1 around t=100 ms.
The continuous wavelet transform of the signal will yield large values for low scales around time 100 ms, and small values elsewhere. For high scales, on the other hand, the continuous wavelet transform will give large values for almost the entire duration of the signal, since low frequencies exist at all times.
Figures illustrate the same process for the scales s=5 and s=20, respectively. Note how the window width changes with increasing scale (decreasing frequency). As the window width increases, the transform starts picking up the lower frequency components(随着时域窗宽的增加,变换开始增加更多的低频组分).
As a result, for every scale and for every time (interval), one point of the time-scale plane is computed. The computations at one scale construct the rows of the time-scale plane, and the computations at different scales construct the columns of the time-scale plane.(因此,对于每一个尺度或者每一个时间间隔,计算每一个时间尺度下的点。)
5.实际例子
Now, let's take a look at an example, and see how the wavelet transform really looks like. Consider the non-stationary signal (这里面举得例子恰巧是一个非平稳信号). As stated on the figure, the signal is composed of four frequency components at 30 Hz, 20 Hz, 10 Hz and 5 Hz.
Next Figure is the continuous wavelet transform (CWT) of this signal. Note that the axes are translation and scale(轴是指平移变换和尺度变换), not time and frequency(并不是时间和频率). However, translation is strictly related to time, since it indicates where the mother wavelet is located. The translation of the mother wavelet can be thought of as the time elapsed since t=0 . The scale, however, has a whole different story. Remember that the scale parameter s in equation is actually inverse of frequency(我们会发现尺度与频率刚刚好是一对倒数). In other words, whatever we said about the properties of the wavelet transform regarding the frequency resolution, inverse of it will appear on the figures showing the WT of the time-domain signal.(这个图讲了点啥事:时域平移间隔短,信号尺度小,指向高频部分,具有良好的时间分辨率。时域平移间隔长,信号尺度大,指向低频部分,频率分辨率好。)
Note that in last 3.7 that smaller scales correspond to higher frequencies, i.e., frequency decreases as scale increases, therefore, that portion of the graph with scales around zero, actually correspond to highest frequencies in the analysis, and that with high scales correspond to lowest frequencies. Remember that the signal had 30 Hz (highest frequency) components first, and this appears at the lowest scale at a translations of 0 to 30. Then comes the 20 Hz component, second highest frequency, and so on. The 5 Hz component appears at the end of the translation axis (as expected), and at higher scales (lower frequencies) again as expected.
Now, recall these resolution properties: Unlike the STFT which has a constant resolution at all times and frequencies, the WT has a good time and poor frequency resolution at high frequencies, and good frequency and poor time resolution at low frequencies. Figure shows from another angle to better illustrate the resolution properties: In Figures, lower scales (higher frequencies) have better scale resolution (narrower in scale, which means that it is less ambiguous what the exact value of the scale) which correspond to poorer frequency resolution . Similarly, higher scales have scale frequency resolution (wider support in scale, which means it is more ambitious what the exact value of the scale is) , which correspond to better frequency resolution of lower frequencies.