💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
本文讲解时变维纳滤波器的实现。这种维纳滤波器可以处理非平稳信号。给定噪声信号和参考信号,可以将维纳滤波器应用于噪声信号,以估计与参考信号一致。
📚2 运行结果
部分代码:
function [xest,W,Nblocks] = ADwienerFilt(x,r,Lw)
%
% Wiener filter based on STFT
% This function takes as inputs a noisy signal, x, and a reference signal, r,
% in order to compute a bank of linear filters that provides an estimate of y
% from x. This kind of Wiener filter based on short-time Fourier
% transform so it can deal with non-stationary signals.
%
% Note 1: window length (Lw) must be even
% Note 2: overlap is fixed at 50%
% Note 3: the filtered signal can be shortened
%
% INPUTS
% x = noisy signal
% r = reference signal
% Nw = window length
% Nblocks = total number of segments
%
% OUTPUTS
% xest = estimated signal
% W = matrix of Wiener filters
% window length must be even
if mod(Lw,2)~=0
Lw = Lw - 1;
disp('Window length must be an even number. Lw has been changed accordingly.')
end
L = length(x);
win = hanning(Lw);
overlap = Lw/2;
Nblocks = floor((L / (Lw/2) ) - 1);
Sxx = zeros(Nblocks,Lw);
Sxr = zeros(Nblocks,Lw);
W = zeros(Nblocks,Lw);
xest = zeros(size(r));
ind = 1:Lw;
for j = 1:Nblocks
temp = zeros(size(r));
X = 1/Lw .* fft(x(ind));
R = 1/Lw .* fft(r(ind));
Sxx(j,:) = X .* conj(X);
Sxr(j,:) = X .* conj(R);
W(j,:) = Sxr(j,:) ./ Sxx(j,:);
temp(ind) = Lw/2 * ifft(W(j,:) .* X);
xest = xest + temp;
ind = ind + Lw/2;
end
ind = ind - Lw/2;
if L ~= ind(end)
disp('Note that the length of the recovered signal has been shortened!')
end
xest((ind(end)+1):L)=[];
🎉3 参考文献
部分理论来源于网络,如有侵权请联系删除。
[1]韩笑雪,孙尚,毛文梁.基于改进维纳滤波的自适应电力线通信降噪方法[J].电脑与信息技术,2023,31(03):55-57.DOI:10.19414/j.cnki.1005-1228.2023.03.018.
[2]翟潘,王平.自适应维纳滤波在钢水红外图像去噪中的应用[J].红外技术,2021,43(07):665-669.
[3]王耀民. 基于STFT的跳频信号检测技术研究及实现[D].电子科技大学,2022.DOI:10.27005/d.cnki.gdzku.2022.004301.