To conduct the Wavelet transform on a signal with different harmonic content.



SOFTWARE USED: Code Composer Studio

HARDWARE REQUIRED: DSP controller board (TMS320F28335), JTAG, XDS100V2 board

THEORY:

It consists of a set of basic functions that can be used to analyze signals in both time and frequency domains simultaneously. This analysis is accomplished by the use of a scalable window to cover the time and frequency plane, providing a convenient means for analyzing the non-stationary signal. Wavelet has infinite functions that can be used for many applications. The main characteristic of these functions is that they have limited time duration. This characteristic allows Wavelet to have good time localization and compact support. It consists of 2 decomposition and reconstruction of the wavelet transform that is shown by below figures.

Fig 1: Wavelet Transform Decomposition

Fig 2: Wavelet Transform Reconstruction


Code for Wavelet Transform:

close all

clear all;

t=0:0.0001:0.2;

f=50;

N=2;

n=0:1:N-1;

X=sin(2*pi*50*t)+(1/3)*sin(3*2*pi*50*t)+(1/5)*sin(5*2*pi*50*t)+(1/7)*sin(7*2*pi*50*t); %generate sinusoidal components with harmonic

figure(1)

plot(t,X);

ho=[1 1] %low pass filter

figure(2)

plot(ho)

h1=((-1).^n).*[1 1];  %high pass filter

M1=conv(X,ho);

figure(3)

plot(M1);

M2=conv(X,h1);

figure(4)

plot(M2)

A1=downsample(M1,2) %downsample by 2 sample

B1=downsample(M2,2) %downsample by 2 sample

 

[a3 b3]=freqz(A1); %frequency plot of down sample

figure,plot(b3, abs(a3));

figure(5)

 

[a3 b3]=freqz(B1); %frequency plot of down sample

figure,plot(b3, abs(a3));

figure(6)

 

A2=upsample(A1,2) %upsample by 2 sample

B2=upsample(B1,2) %upsample by 2 sample

[a3 b3]=freqz(A2); %frequency plot of up sample

figure,plot(b3, abs(a3));

figure(7)

 

[a3 b3]=freqz(B2); %frequency plot of up sample

figure,plot(b3, abs(a3));

figure(8)

 

go=((-1).^n).*(h1) %inverse of covolution

g1=-((-1).^n).*(ho) %inverse of covolution

 

c1=conv(A2,go) %covolution of upsample and inverse convolution

c2=conv(B2,g1) %covolution of upsample and inverse convolution

c=0.5*(c1+c2) figure(9) plot(c)




Waveforms:

Fig 3: Input Signal with harmonic content


Fig 4: Low pass filter Output


Fig 5: High pass filter Output


Fig 6: Convolution of Input Signal with Low pass filter

Fig 7: Convolution of Input Signal with High pass filter

Fig 8: Frequency plot of down sample 1

Fig 9: Frequency plot of down sample 2

Fig 10: Frequency plot of up sample 1

Fig 11: Frequency plot of up sample 2  

Fig 11: Retrieved Output Signal


Conclusion:  Wavelet Transform is studied and different waveforms are plotted by decomposition and then reconstruction of the signal. And hence at the end same signal with harmonic content is retrieved.


Post a Comment

Please do not enter any spam links in the comments...

Previous Post Next Post