To conduct the Wavelet transform on a signal with different harmonic content
Software used: MATLAB R2018a
To know how to download MATLAB R 2018a Click Here to see
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 a limited time duration. This characteristic allows Wavelet to have
good time localization and compact support. It consists of 2 decompositions and
reconstruction of the wavelet transform that is shown by the below figures.
CODE FOR WAVELET TRANSFORM:
% WAVELET EXTENTION
clc
clear all
t=0:0.0001:0.1;
N=6; % No Of Sample
f=50;
w=2*pi*f;
A=sin(w*t)+(1/3)*sin(3*w*t)+(1/5)*sin(5*w*t)+(1/7)*sin(7*w*t);
%DISTORTED INPUT SIGNAL
figure(1)
plot(A)
grid on;
[a3 b3]=freqz(A); %FFT ANALYSIS OD INPUT SIGNAL
figure(2),plot(b3, abs(a3));
grid on;
n=0:1:N-1;
ho=[1 -1 -8 -8 -1 1]; %LOW PASS
FILTER
h1=((-1).^n).* ho; %HIGH PASS
FILTER
go=((-1).^n).* h1; % SECOND
BLOCK UPPER LINE
g1=((-1).^n).* ho; % SECOND
BLOCK LOWER LINE
A1=conv(A,ho);%CONVOLUTION
WITH LPF
figure(3)
plot(A1)
grid on;
[a3 b3]=freqz(A1); %FFT
ANALYSIS OF LOW PASS FILTER
figure(4),plot(b3, abs(a3));
grid on;
B1=downsample(A1,2);%DOWN
SAMPLE BY 2 OF A1
[a3 b3]=freqz(B1); %FFT
ANALYSIS
figure(5),plot(b3, abs(a3));
grid on;
% UPPER AREM UPPER PATH
C1=conv(B1,ho);%CONVOLUTION
of B1 WITH LOW PASS FILTER
figure(6)
plot(C1)
grid on;
[a3 b3]=freqz(C1); %FFT
ANALYSIS
D1=downsample(C1,2);%DOWN
SAMPLE BY 2 OF C1
[a3 b3]=freqz(D1); %FFT
ANALYSIS
figure(7),plot(b3, abs(a3));
grid on;
E1=upsample(D1,2); %UP SAMPLE
BY 2 OF D1
[a3 b3]=freqz(E1); %FFT
ANALYSIS
figure(8),plot(b3, abs(a3));
grid on;
F1=conv(E1,go);
[a3 b3]=freqz(F1); %FFT
ANALYSIS
figure(9),plot(b3, abs(a3));
grid on;
% UPPER ARM LOWER PATH
C2=conv(B1,h1);%CONVOLUTION
of B1 WITH LOW PASS FILTER
figure(10)
plot(C2)
grid on;
[a3 b3]=freqz(C2); %FFT
ANALYSIS
D2=downsample(C2,2);%DOWN
SAMPLE BY 2 OF C1
[a3 b3]=freqz(D2); %FFT
ANALYSIS
figure(11),plot(b3, abs(a3));
grid on;
E2=upsample(D2,2); %UP SAMPLE
BY 2 OF D1
[a3 b3]=freqz(E2); %FFT
ANALYSIS
figure(12),plot(b3, abs(a3));
grid on;
F2=conv(E2,g1);
[a3 b3]=freqz(F2); %FFT
ANALYSIS
figure(13),plot(b3, abs(a3));
grid on;
G1=(F1+F2)/(2) %OUTPUT
SINAL AT G1
figure(14)
plot(G1)
grid on;
H1=upsample(G1,2);
figure(15)
plot(H1)
grid on;
I1=conv(H1,go);%CONVOLUTION
of B1 WITH LOW PASS FILTER
figure(16)
plot(I1)
grid on;
[a3 b3]=freqz(I1); %FFT
ANALYSIS
% LOWER ARM
A2=conv(A,h1);%CONVOLUTION
WITH LOW PASS FILTER
figure(17)
plot(A2)
grid on;
[a3
b3]=freqz(A2); %FFT ANALYSIS
figure(18),plot(b3, abs(a3));
grid on;
B2=downsample(A1,2);%DOWN
SAMPLE BY 2 OF yA
[a3 b3]=freqz(B2); %FFT
ANALYSIS
figure(19),plot(b3, abs(a3));
grid on;
%LOWER ARM UPPER PATH
C3=conv(B2,ho);%CONVOLUTION
of B2 WITH LOW PASS FILTER
figure(20)
plot(C3)
grid on;
[a3
b3]=freqz(C3); %FFT ANALYSIS
D3=downsample(C3,2);%DOWN
SAMPLE BY 2 OF C1
[a3 b3]=freqz(D3); %FFT
ANALYSIS
figure(21),plot(b3, abs(a3));
grid on;
E3=upsample(D3,2); %UP SAMPLE
BY 2 OF D1
[a3 b3]=freqz(E3); %FFT
ANALYSIS
figure(22),plot(b3, abs(a3));
grid on;
F3=conv(E3,go);
[a3 b3]=freqz(F3); %FFT
ANALYSIS
figure(23),plot(b3, abs(a3));
grid on;
C4=conv(B2,h1);%CONVOLUTION
of B1 WITH LOW PASS FILTER
figure(24)
grid on;
plot(C4)
[a3 b3]=freqz(C2); %FFT
ANALYSIS
D4=downsample(C4,2);%DOWN
SAMPLE BY 2 OF C1
[a3 b3]=freqz(D4); %FFT
ANALYSIS
figure(25),plot(b3, abs(a3));
grid on;
E4=upsample(D4,2); %UP SAMPLE
BY 2 OF D1
[a3 b3]=freqz(E4); %FFT
ANALYSIS
figure(26),plot(b3, abs(a3));
grid on;
F4=conv(E4,g1);
[a3 b3]=freqz(F1); %FFT
ANALYSIS
figure(27),plot(b3, abs(a3));
G2=(F3+F4)/(2^7) %OUTPUT
SINAL AT G2
figure(28)
plot(G2)
grid on;
H2=upsample(G2,2);
figure(29)
plot(H2)
grid on;
I2=conv(H2,g1);%CONVOLUTION
of B1 WITH LOW PASS FILTER
figure(30)
plot(I2)
grid on;
[a3 b3]=freqz(I2); %FFT ANALYSIS
J=((0.9/60)*(I1+I2))/(2^7)
figure(31)
plot(J)
[a3 b3]=freqz(J); %FFT
ANALYSIS OF THE OUTPUT SIGNAL
figure(32),plot(b3, abs(a3));
WAVEFORMS:
1. Distorted Input Signal
2. FFT Analysis of Input Signal
3. Convolution with LPF
4. FFT Analysis of Convolution in LPF
5. FFT Analysis of Down sampler by 2
6. Convolution with LPF
7. FFT Analysis of Down sampler by 2
8. FFT Analysis of upsampler by 2
9. FFT Analysis of Convolution of upsampler and LPF
10. FFT Analysis of HPF with Down sampled signal
11: FFT Analysis of the upsampler
by 2
12. FFT Analysis of the downsampler by 2
13. FFT Analysis of Convolution of upsampler and HPF inverse
14. Addition of the 2 output Signals
15. Up sampled by 2 Signal
16. Convolution of upsampler and LPF
17. FFT Analysis of HPF
18. Convolution of LPF
19. FFT Analysis of downsampler by 2
20. FFT Analysis of the downsampler
21. FFT Analysis of downsampler with LPF
22. FFT Analysis of the upsampler
23: FFT Analysis of down sampler by 2
24. Convolution with Up Sampler with inverse LPF
25. Output Signal 2
26. The output of Up Sampler
27. Output of Inverse High
Pass Filter
28. Final Output Signal
29. FFT Analysis of the 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, the same signal with harmonic content is retrieved
Post a Comment
Please do not enter any spam links in the comments...