2
$\begingroup$

i would like to compare each other wavelet and Fourier transform on given signal,let us consider following signal

function [ x ] = generate1(N,m,A3)
f1 = 100;
f2 = 200;
T = 1./f1;
t = (0:(N*T/m):(N*T))'; %'
wn = randn(length(t),1); %zero mean variance 1
x = 20.*sin(2.*pi.*f1.*t) + 30.*cos(2.*pi.*f2.*t) + A3.*wn;
%[pks,locs] = findpeaks(x);
 plot(x)
end

which can be called by $B=generate1$(3,500,1) for example,when i have done separately FFT and wavelet transform,i have got following pictures

enter image description here

for Fourier and enter image description here

for wavelet,please help me to compare each other these two graph,does they express same picture,but drawn in different basis?

$\endgroup$
1
$\begingroup$

Fourier and wavelet are inner product transforms. There is a basis fucntion which will be multiplied to the signal and then the integral of the calculated value is the transform. The basis function determine the transform features. The basis function in fourier transform is $b\omega(t):=e^{j\omega t}$

$\operatorname{Fourier}[s(t)](\omega)=\langle\operatorname{basis}(\omega,t),s(t)\rangle=\int e^{*j\omega \tau}\cdot s(\tau)\,\mathrm{d}\tau$ note: star means conjugate

The Fourier transform will map a time domain signal to a frequency domain plot and only will tell you what frequencies a signal has. But you may want to know when these frequencies have happened. The Wavelet transform uses many basis functions, for example Morlet functions, which are defined as $\psi(t)=(\pi f_b)^{-0.5}e^{j2\pi f_c}e^{-t^{2}f_b^{-1}}$. We calculate a window function based on $\psi((t-\tau)s^{-1})$, so we slide this window over the signal with different scale values $S$.

$\operatorname{wavelet}[s(t)]=\int \psi((t-\tau)s^{-1})sig(\tau)\,\mathrm{d}\tau$ .

This transform will give us both time and frequency information. But comparing wavelet and Fourier transforms is pointless, you may like to compare STFT and Wavelet which both are time frequency transforms. If you are interested in matlab you can use the spectrogram function to calculate STFT, and then compare those results.

$\endgroup$
  • $\begingroup$ I'll have to slightly disagree with "comparing the Fourier transform and the Wavelet transform is pointless": They solve different problems, but that doesn't mean that you shouldn't compare them. Also, I edited you question a bit - could you check that I did not introduce any errors? $\endgroup$ – Johannes Kloos Nov 11 '13 at 16:34
  • $\begingroup$ Thanks for edit, and I think comparing Fourier with wavelet is wrong, you may need to compare STFT and wavelet. but you can extract frequency plot of wavelet then compare it with fourier if you want it really .@JohannesKloos $\endgroup$ – Electricman Nov 11 '13 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.