The frequency response between the components obtained from wavelet decomposition and the original signal
Why does the fft of the component corresponding to the last approximation coefficient obtained after wavelet decomposition not match the fft of the original signal in the low-frequency region, resulting in an unsmooth frequency response between the two and varying with the original signal. Is using FFT to solve frequency response unreliable?
clearvars;close all;clc;
fs=10;
dt=1/fs;
t=dt:dt:200;
N=length(t);
signal=(0.2)*randn(1,N);
Max_level=wmaxlev(length(signal),’db10′);
[C,L]=wavedec(signal,Max_level,’fk8′);
level=6;
xL_DWT = wrcoef(‘a’,C,L,’fk8′,level);
xH_DWT=signal-xL_DWT;
%fft
Nfft=length(t);
f_DWT = (1:Nfft/2)*fs/(Nfft);
xL_DWT_fft=fftshift(fft(xL_DWT,Nfft));
xH_DWT_fft=fftshift(fft(xH_DWT,Nfft));
signal_fft=fftshift(fft(signal,Nfft));
wn_low_DWT=xL_DWT_fft./signal_fft;
wn_high_DWT=1-wn_low_DWT;
figure
plot(f_DWT,wn_low_DWT(Nfft/2+1:end));
hold on
plot(f_DWT,wn_high_DWT(Nfft/2+1:end));
ylim([-0.5 2]);
yticks([-0.5:0.5:2])
xlim([0 fs/2^(level-1)]);
xticks([0 fs/2^(level+1) fs/2^(level) fs/2^(level-1)])
xticklabels({‘0′,’fs/2^{i+1}’,’fs/2^{i}’,’fs/2^{i-1}’})Why does the fft of the component corresponding to the last approximation coefficient obtained after wavelet decomposition not match the fft of the original signal in the low-frequency region, resulting in an unsmooth frequency response between the two and varying with the original signal. Is using FFT to solve frequency response unreliable?
clearvars;close all;clc;
fs=10;
dt=1/fs;
t=dt:dt:200;
N=length(t);
signal=(0.2)*randn(1,N);
Max_level=wmaxlev(length(signal),’db10′);
[C,L]=wavedec(signal,Max_level,’fk8′);
level=6;
xL_DWT = wrcoef(‘a’,C,L,’fk8′,level);
xH_DWT=signal-xL_DWT;
%fft
Nfft=length(t);
f_DWT = (1:Nfft/2)*fs/(Nfft);
xL_DWT_fft=fftshift(fft(xL_DWT,Nfft));
xH_DWT_fft=fftshift(fft(xH_DWT,Nfft));
signal_fft=fftshift(fft(signal,Nfft));
wn_low_DWT=xL_DWT_fft./signal_fft;
wn_high_DWT=1-wn_low_DWT;
figure
plot(f_DWT,wn_low_DWT(Nfft/2+1:end));
hold on
plot(f_DWT,wn_high_DWT(Nfft/2+1:end));
ylim([-0.5 2]);
yticks([-0.5:0.5:2])
xlim([0 fs/2^(level-1)]);
xticks([0 fs/2^(level+1) fs/2^(level) fs/2^(level-1)])
xticklabels({‘0′,’fs/2^{i+1}’,’fs/2^{i}’,’fs/2^{i-1}’}) Why does the fft of the component corresponding to the last approximation coefficient obtained after wavelet decomposition not match the fft of the original signal in the low-frequency region, resulting in an unsmooth frequency response between the two and varying with the original signal. Is using FFT to solve frequency response unreliable?
clearvars;close all;clc;
fs=10;
dt=1/fs;
t=dt:dt:200;
N=length(t);
signal=(0.2)*randn(1,N);
Max_level=wmaxlev(length(signal),’db10′);
[C,L]=wavedec(signal,Max_level,’fk8′);
level=6;
xL_DWT = wrcoef(‘a’,C,L,’fk8′,level);
xH_DWT=signal-xL_DWT;
%fft
Nfft=length(t);
f_DWT = (1:Nfft/2)*fs/(Nfft);
xL_DWT_fft=fftshift(fft(xL_DWT,Nfft));
xH_DWT_fft=fftshift(fft(xH_DWT,Nfft));
signal_fft=fftshift(fft(signal,Nfft));
wn_low_DWT=xL_DWT_fft./signal_fft;
wn_high_DWT=1-wn_low_DWT;
figure
plot(f_DWT,wn_low_DWT(Nfft/2+1:end));
hold on
plot(f_DWT,wn_high_DWT(Nfft/2+1:end));
ylim([-0.5 2]);
yticks([-0.5:0.5:2])
xlim([0 fs/2^(level-1)]);
xticks([0 fs/2^(level+1) fs/2^(level) fs/2^(level-1)])
xticklabels({‘0′,’fs/2^{i+1}’,’fs/2^{i}’,’fs/2^{i-1}’}) fft, wavelet, frequency response, decomposition MATLAB Answers — New Questions