转自http://users.rowan.edu/~polikar/WAVELETS/WTpart1.html(陌生单词将一一备注,本人刚开始学,呵呵且是第一次涉及博客,渴望志同道合者,一起学习,大学快毕业了,赶紧学点!)
TheWavelet Tutorial
Part I
by
ROBI POLIKAR
FUNDAMENTAL CONCEPTS
&
AN OVERVIEW OF THE WAVELET THEORY
Second Edition
Welcome to this introductory tutorial on wavelet transforms. The wavelet transformis a relatively new concept (about 10 years old), but yet there are quite a fewarticles and books written on them. However, most of these books and articlesare written by math people, for the other math people; still most of the mathpeople don't know what the other math people are talking about (a mathprofessor of mine made this confession). In other words, majority of theliterature available on wavelet transforms are of little help, if any, to thosewho are new to this subject (this is my personal opinion).
When I first started working on wavelet transforms I have struggled for manyhours and days to figure out what was going on in this mysterious world ofwavelet transforms, due to the lack of introductory level text(s) in thissubject. Therefore, I have decided to write this tutorial for the ones who arenew to the this topic. I consider myself quite new tothe subject too, and I have to confess that I have not figured out all thetheoretical details yet. However, as far as the engineering applications areconcerned, I think all the theoretical details are not necessarily necessary(!).
In this tutorial I will try to give basic principles underlying the wavelettheory. The proofs of the theorems and related equations will not be given inthis tutorial due to the simple assumption that the intended readers of thistutorial do not need them at this time. However, interested readers will bedirected to related references for further and in-depth information.
In this document I am assuming that you have no background knowledge,whatsoever. If you do have this background, please disregard the followinginformation, since it may be trivial.
Should you find any inconsistent, or incorrectinformation in the following tutorial, please feel free to contact me. I willappreciate any comments on this page.
Robi POLIKAR ************************************************************************
TRANS... WHAT?
First of all, why do we need a transform, or what is a transform anyway?
Mathematical transformations are applied to signals to obtain a further information from that signal that is not readilyavailable in the raw signal. In the following tutorial I will assume atime-domain signal as araw signal, and a signal that has been "transformed"by any of the available mathematical transformations as aprocessedsignal.
There are number of transformations that can beapplied, among which the Fourier transforms are probably by far the mostpopular.
Most of the signals in practice, are TIME-DOMAINsignals in their raw format. That is, whatever that signal is measuring, is afunction of time. In other words, when we plot the signal one of the axes istime (independent variable), and the other (dependent variable) is usually theamplitude. When we plot time-domain signals, we obtain atime-amplituderepresentation of the signal. This representation is not always the bestrepresentation of the signal for most signal processing related applications.In many cases, the most distinguished information is hidden in the frequencycontent of the signal. Thefrequency SPECTRUM of a signal is basicallythe frequency components (spectral components) of that signal. The frequencyspectrum of a signal shows what frequencies exist in the signal.
Intuitively, we all know that the frequency is something to do with thechange in rate of something. If something ( amathematical or physical variable, would be the technically correct term)changes rapidly, we say that it is of high frequency, where as if this variabledoes not change rapidly, i.e., it changes smoothly, we say that it is of lowfrequency. If this variable does not change at all, then we say it has zerofrequency, or no frequency. For example the publication frequency of a dailynewspaper is higher than that of a monthly magazine (it is published morefrequently).
The frequency is measured in cycles/second, or with a more common name, in"Hertz". For example the electric power we use in our daily life inthe USis 60 Hz (50 Hz elsewhere in the world). This means that if you try to plot theelectric current, it will be a sine wave passing through the same point 50times in 1 second. Now, look at the following figures. The first one is a sinewave at 3 Hz, the second one at 10 Hz, and the third one at 50 Hz. Comparethem.
So how do we measure frequency, or how do we find the frequency content of asignal? The answer isFOURIER TRANSFORM (FT). If the FT of a signal intime domain is taken, the frequency-amplitude representation of that signal isobtained. In other words, we now have a plot with one axis being the frequencyand the other being the amplitude. This plot tells us how much of each frequencyexists in our signal.
The frequency axis starts from zero, and goes up to infinity. For everyfrequency, we have an amplitude value. For example, if we take the FT of theelectric current that we use in our houses, we will have one spike at 50 Hz,and nothing elsewhere, since that signal has only 50 Hz frequency component. Noother signal, however, has a FT which is this simple. For most practicalpurposes, signals contain more than one frequency component. The followingshows the FT of the 50 Hz signal:
Figure 1.4 The FT of the 50 Hz signal given in Figure 1.3
One word of caution is in order at this point. Note that two plots are givenin Figure 1.4. The bottom one plots only the first half of the top one. Due toreasons that are not crucial to know at this time, the frequency spectrum of areal valued signal is always symmetric. The top plot illustrates this point.However, since the symmetric part is exactly a mirror image of the first part,it provides no additional information, and therefore, this symmetric secondpart is usually not shown. In most of the following figures corresponding toFT, I will only show the first half of this symmetric spectrum.
Why do we need the frequency information?
Often times, the information that cannot be readily seen in the time-domaincan be seen in the frequency domain.
Let's give an example from biological signals. Suppose we are looking at anECG signal (ElectroCardioGraphy, graphical recordingof heart's electrical activity). The typical shape of a healthy ECG signal iswell known to cardiologists. Any significant deviation from that shape isusually considered to be a symptom of a pathological condition.
This pathological 病理学的condition, however, may not always be quite obvious in theoriginal time-domain signal. Cardiologists usually use the time-domain ECGsignals which are recorded on strip-charts to analyze ECG 心电图signals. Recently,the new computerized ECG recorders/analyzers also utilize the frequencyinformation to decide whether a pathological condition exists. A pathological condition can sometimes be diagnosed more easily when the frequency content ofthe signal is analyzed.
This, of course, is only one simple example why frequency content might beuseful. Today Fourier transforms are used in many different areas including allbranches of engineering.
Although FT is probably the most popular transform being used (especially inelectrical engineering), it is not the only one. There are many othe rtransforms that are used quite often by engineers and mathematicians. Hilberttransform, short-time Fourier transform (more about this later), Wignerdistributions, the Radon Transform, and of course ourfeatured transformation, the wavelet transform, constitute only a small portion of a huge list oftransforms that are available at engineer's and mathematician's disposal. Everytransformation technique has its own area of application, with advantages anddisadvantages, and the wavelet transform (WT) is no exception.
For a better understanding of the need for the WT let's look at the FT moreclosely. FT (as well as WT) is a reversible transform, that is, it allows to go back and forward between the raw and processed(transformed) signals. However, only either of them is available at any giventime. That is, no frequency information is available in the time-domain signal,and no time information is available in the Fourier transformed signal. Thenatural question that comes to mind is that is it necessary to have both thetime and the frequency information at the same time?
As we will see soon, the answer depends on the particular application,and the nature of the signal in hand. Recall that the FT gives the frequencyinformation of the signal, which means thatit tells us how much of eachfrequency exists in the signal, but it does not tell uswhen in time thesefrequency components exist. This information is not required when the signal isso-calledstationary .
Let's take a closer look at this stationarityconcept more closely, since it is of paramount importance in signalanalysis. Signals whose frequency content do not change in time are calledstationarysignals .In other words, the frequency content of stationary signals donot change in time. In this case, one does not need to knowat what timesfrequency components exist ,sinceall frequency components exist at all times !!!.
For example the following signal
x(t)=cos(2*pi*10*t)+cos(2*pi*25*t)+cos(2*pi*50*t)+cos(2*pi*100*t)
is a stationary signal, because it has frequenciesof 10, 25, 50, and 100 Hz at any given time instant. This signal is plottedbelow:
Figure 1.5
And the following is its FT:
Figure 1.6
The top plot in Figure 1.6 is the (half of the symmetric) frequency spectrum of the signal in Figure 1.5. The bottom plot is the zoomed version of the topplot, showing only the range of frequencies that are of interest to us. Note the four spectral components corresponding to the frequencies 10, 25, 50 and100 Hz.
Contrary to the signal in Figure 1.5, the following signal is notstationary. Figure 1.7 plots a signal whose frequency constantly changes in time. This signal is known as the "chirp"signal. This is a non-stationary signal.
Figure 1.7
Let's look at another example. Figure 1.8 plots a signal with four differentfrequency components at four different time intervals, hence a non-stationarysignal. The interval 0 to 300 ms has a 100 Hz sinusoid, the interval 300 to 600ms has a 50 Hz sinusoid, the interval 600 to 800 ms has a 25 Hz sinusoid, andfinally the interval 800 to 1000 ms has a 10 Hz sinusoid.
Figure 1.8
And the following is its FT:
Figure 1.9
Do not worry about the little ripples at this time; they are due to suddenchanges from one frequency component to another, which have no significance inthis text. Note that the amplitudes of higher frequency components are higherthan those of the lower frequency ones. This is due to fact that higherfrequencies last longer (300 ms each) than the lower frequency components (200ms each). (The exact value of the amplitudes are notimportant).
Other than those ripples, everything seems to be right. The FT has fourpeaks, corresponding to four frequencies with reasonable amplitudes... Right
WRONG (!)
Well, not exactly wrong, but not exactly right either...
Here is why:
For the first signal, plotted in Figure 1.5, consider the followingquestion:
At what times (or time intervals), do these frequency components occur?
Answer:
At all times! Remember that in stationary signals, all frequency components that exist in the signal, exist through out the entire duration of the signal. There is 10 Hz at all times, there is 50 Hz at alltimes, and there is 100 Hz at all times.
Now, consider the same question for the non-stationary signal in Figure 1.7or in Figure 1.8.
At what times these frequency components occur?
For the signal in Figure 1.8, we know that in the first interval we have the highest frequency component, and in the last interval we have the lowestfrequency component. For the signal in Figure 1.7, the frequency componentschange continuously.Therefore, for these signals the frequency componentsdonot appear at all times!
Now, compare the Figures 1.6 and 1.9. The similarity between these two spectrum should be apparent. Both of them show four spectralcomponents at exactly the same frequencies, i.e., at 10, 25, 50, and 100 Hz.Other than the ripples, and the difference in amplitude (which can always benormalized), the two spectrums are almost identical, although the correspondingtime-domain signals are not even close to each other. Both of the signals involves the same frequency components, but the first onehas these frequencies at all times, the second one has these frequencies atdifferent intervals. So, how come the spectrums of two entirely differentsignals look very much alike? Recall that the FT gives the spectral content ofthe signal, but it gives no information regarding where in time thosespectral components appear .Therefore, FT is not a suitable technique for non-stationary signal, with one exception:
FT can be used for non-stationary signals, if we are only interested in whatspectral components exist in the signal, but not interested where these occur.However, if this information is needed, i.e., if we want to know, what spectralcomponent occur at what time (interval) , then Fourier transform is not the right transform to use.
For practical purposes it is difficult to make the separation, since there are a lot of practical stationary signals, as well as non-stationary ones.Almost all biological signals, for example, are non-stationary. Some of themost famous ones are ECG (electrical activity of the heart ,electrocardiograph), EEG (electrical activity of the brain,electroencephalograph), and EMG (electrical activity of the muscles,electromyogram).
Once again please note that, the FT gives what frequency components(spectral components) exist in the signal. Nothing more,nothing less.(不过FT还有相位信息呢,以上的例子应该在相位信息上是不一样的吧,所以?)
When the time localization of the spectral components are needed, a transform giving the TIME-FREQUENCYREPRESENTATION of the signal is needed.
THE ULTIMATE SOLUTION:
THE WAVELET TRANSFORM
The Wavelet transform is a transform of this type. It provides the time-frequency representation. (There are other transforms which give this information too, such asshort time Fourier transform,Wigner distributions, etc.)
Often times a particular spectral component occurring at any instant can be of particular interest. In these cases it may be very beneficial to know the time intervals these particular spectral components occur. For example, inEEGs, the latency of an event-related potential is of particular interest(Event-related potential is the response of the brain to a specific stimuluslike flash-light, the latency of this response is the amount of time elapsedbetween the onset of the stimulus and the response).
Wavelet transform is capable of providing the time and frequency information simultaneously, hence giving a time-frequency representation of the signal.
How wavelet transform works is completely a different fun story, and should be explained aftershort time Fourier Transform (STFT)短时傅里叶变换 . The WT was developed as analternative to the STFT. The STFT will be explained in great detail in the second part of this tutorial. It suffices at this time to say that the WT was developed to overcome some resolution related problems of the STFT, asexplained in Part II.
To make a real long story short, we pass the time-domain signal from various highpass and low pass filters, which filters out either high frequency or low frequency portions of the signal. This procedureis repeated, every time some portion of the signal corresponding to somefrequencies being removed from the signal.
Here is how this works: Suppose we have a signal which has frequencies up to1000 Hz. In the first stage we split up the signal in to two partsby passing the signal from a highpass and a lowpass filter (filters should satisfy some certain conditions, so-calledadmissibility condition) which results in two different versions of the same signal: portion of the signal correspondingto 0-500 Hz (low pass portion), and 500-1000 Hz (high pass portion).
Then, we take either portion (usually low pass portion) or both, and do the same thing again. This operation is called decomposition.
Assuming that we have taken the lowpass portion, we now have 3 sets of data,each corresponding to the same signal at frequencies 0-250 Hz, 250-500 Hz,500-1000 Hz.
Then we take the lowpass portion again and pass it through low and high passfilters; we now have 4 sets of signals corresponding to 0-125 Hz, 125-250 Hz,250-500 Hz, and 500-1000 Hz.We continue like this until we have decomposed the signal to a pre-defined certain level. Then we have a bunch of signals, which actually represent the same signal, but all corresponding to different frequency bands. We know which signal corresponds to which frequency band, and if we put all of them together and plot them on a 3-D graph, we will have time in one axis, frequency in the second and amplitude in the third axis.This will show us which frequencies exist at which time ( there is an issue,called "uncertainty principle", which states that, we cannot exactlyknow what frequency exists at what time instance, but we canonly knowwhat frequency bands exist at what time intervals ,more about this in the subsequent parts of this tutorial).
However, I still would like to explain it briefly:
The uncertainty principle, originally found and formulated by Heisenberg(海森堡不确定原理),states that, the momentum 动量and the position 位置of a moving particle cannot be known simultaneously.This applies to our subject as follows:
The frequency and time information of a signal at some certain point in the time-frequency plane cannot be known. In other words: We cannot know what spectral componentexists at any given time instant. The best we cando is to investigate whatspectral components exist at any given intervalof time. This is a problem of resolution, and it is the main reason why researchers have switched to WT from STFT. STFT gives a fixed resolution at all times, whereas WT gives a variable resolution as follows:
Higher frequencies are better resolved in time, and lower frequencies are better resolved in frequency.This means that, a certain high frequency component can be located better in time (with less relative error) than a low frequency component. On the contrary, a low frequency component can be located better in frequency compared to high frequency component.
Take a look at the following grid:
f ^
|******************************************* continuous
|* * * * * * * * * * * * * * * wavelet transform
|* * * * * * *
|* * * *
|* *
--------------------------------------------> time
Interpretthe above grid as follows: The top row shows that at
higher frequencies we have more samples corresponding to smaller
intervals of time. In other words,higher frequencies can be resolved
better in time. The bottom rowhowever, corresponds to low
frequencies, and thereare less number of points to characterize the
signal, therefore, lowfrequencies are not resolved well in time.
^frequency
|
|
|
| *******************************************************
|
|
|
| * * * * * * * * * * * * * * * * * * * discrete time
| wavelet transform
| * * * * * * * * * *
|
| * * * * *
| * * *
|----------------------------------------------------------> time
Indiscrete time case, the time resolution of the signal works the same
as above, but now, the frequency information has different resolutions
at every stage too. Note that, lower frequencies are better resolved in
frequency, whereas higherfrequencies are not. Note how the spacing
between subsequent frequencycomponents increase as frequency increases.
Below , are some examples ofcontinuous wavelet transform:
Let'stake a sinusoidal signal, which has two different frequency components at
two different times:
Notethe low frequency portion first, and then the high frequency.
Figure 1.10
Thecontinuous wavelet transform of the above signal:
Figure 1.11
Notehowever, the frequency axis in these plots are labeled as
scale .The concept of the scale will be made more clear in the subsequent
sections, but it should be noted at this time that the scale is inverse
of frequency. That is, high scales correspond to low frequencies, and
low scales correspond to high frequencies.Consequently, the little
peak in the plot correspondsto the high frequency components in the
signal, and the large peak corresponds to low frequency components
(which appear before the high frequency components in time)in the
signal.
Youmight be puzzled from the frequency resolution shown in the plot,
since it shows good frequency resolution at high frequencies. Note
however that, it is the good scale resolution that looks good
at high frequencies (low scales), and good scale resolution means poor
frequency resolution and viceversa. More about this in Part II and III.
TO BECONTINUED...
This concludes the first part of this tutorial, where I have tried to
give a brief overview of signal processing, the Fourier transform and
the wavelet transform.