请问这个kalman 输出是哪个算法?
zuowanbushiwo opened this issue · comments
是时域 kalman 还是 频域的FDAF, 还是分块频域PBFDAF?
频域分块kalman滤波
是这篇 State-space architecture of the partitioned-block-based acoustic echo controller 文章吗,是不是有用RES?
为什么我仿真的结果不太好,是有什么技巧吗? process noise covariance 和 measurement noise variance 这两个变量 不知道怎么才能比较好的估计出来,在PBFDKF中特别 别是 process noise covariance,您有什么好的文章吗?
上面的是你的,下面是我仿真的,不知道是不是代码不对?
function [en,w0,misalign] = PBFDKF(un,dn,M,P,b)
A = 0.99;
A2 = A^2;
L = M/P;
measurement_smoothing_factor = 0.5;
Mk = zeros(2*L,1);
window_save_first = [ones(L,1); zeros(L,1)];
window_save_first = repmat(window_save_first,1,P);
Pk = ones(2*L,P)*10;
un_blocks = zeros(2*L,1);
W = zeros(2*L,P);
loop = floor(length(dn)/L);
en = zeros(size(dn));
misalign = zeros(loop,1);
ComputeEML = 0;
Xk = zeros(2*L,P);
w_old = zeros(M,1);
if nargin == 5 && length(b) == M
ComputeEML = 1;
end
for n = 1:loop
un_blocks = [un_blocks(L+1:end); un((n-1)*L+1:n*L)];
Uk = fft(un_blocks);
Xk(:,2:end) = Xk(:,1:end-1);
Xk(:,1) = Uk;
y_hat_1 = real(ifft(sum(Xk.*W,2)));
y_hat = y_hat_1(L+1:end);
en((n-1)*L+1:n*L) = dn((n-1)*L+1:n*L)-y_hat;
Ek = fft([zeros(L,1);en((n-1)*L+1:n*L)]);
Mk = measurement_smoothing_factor*Mk + (1-measurement_smoothing_factor)*abs(Ek).^2;
Rk = sum(Xk.*Pk.*conj(Xk),2)+2*Mk/P+1e-11;
mu = (Pk)./Rk;
K = mu.*conj(Xk);
Pk = A2*(1-0.5*K.*Xk).*Pk + (1-A2).*abs(W).^2;
W = A*(W + fft(window_save_first.*real(ifft(K.*Ek))));
%%%%%%%residual echo suppression
% H = 1 - sum(mu.*abs(Xk).^2,2);
% Ek_Res = H.*Ek;
% en_t = real(ifft(Ek_Res));
% en((n-1)*L+1:n*L) = en_t(L+1:end);
temp = real(ifft(W));
w0 = temp(1:L,:);
w0 = w0(:);
if ComputeEML == 1
misalign(n) = norm(b-w0)/norm(b);
else
misalign(n) = norm(w_old-w0);
w_old = w0;
end
end
if ComputeEML == 1
figure;
c = stem([b,w0]);
legend('Actual','Estimated');
title('PBFDKF System identification of an FIR filter'); grid on;
figure;
hold on; plot((0:length(misalign)-1),10*log10(misalign.^2));
xlabel('Number of iterations ');
ylabel('Misalignment (dB)');
title('PBFDKF');
grid on;
end
end
是这篇 State-space architecture of the partitioned-block-based acoustic echo controller 文章吗,是不是有用RES? 为什么我仿真的结果不太好,是有什么技巧吗? process noise covariance 和 measurement noise variance 这两个变量 不知道怎么才能比较好的估计出来,在PBFDKF中特别 别是 process noise covariance,您有什么好的文章吗?
![]()
上面的是你的,下面是我仿真的,不知道是不是代码不对?
function [en,w0,misalign] = PBFDKF(un,dn,M,P,b) A = 0.99; A2 = A^2; L = M/P; measurement_smoothing_factor = 0.5; Mk = zeros(2*L,1); window_save_first = [ones(L,1); zeros(L,1)]; window_save_first = repmat(window_save_first,1,P); Pk = ones(2*L,P)*10; un_blocks = zeros(2*L,1); W = zeros(2*L,P); loop = floor(length(dn)/L); en = zeros(size(dn)); misalign = zeros(loop,1); ComputeEML = 0; Xk = zeros(2*L,P); w_old = zeros(M,1); if nargin == 5 && length(b) == M ComputeEML = 1; end for n = 1:loop un_blocks = [un_blocks(L+1:end); un((n-1)*L+1:n*L)]; Uk = fft(un_blocks); Xk(:,2:end) = Xk(:,1:end-1); Xk(:,1) = Uk; y_hat_1 = real(ifft(sum(Xk.*W,2))); y_hat = y_hat_1(L+1:end); en((n-1)*L+1:n*L) = dn((n-1)*L+1:n*L)-y_hat; Ek = fft([zeros(L,1);en((n-1)*L+1:n*L)]); Mk = measurement_smoothing_factor*Mk + (1-measurement_smoothing_factor)*abs(Ek).^2; Rk = sum(Xk.*Pk.*conj(Xk),2)+2*Mk/P+1e-11; mu = (Pk)./Rk; K = mu.*conj(Xk); Pk = A2*(1-0.5*K.*Xk).*Pk + (1-A2).*abs(W).^2; W = A*(W + fft(window_save_first.*real(ifft(K.*Ek)))); %%%%%%%residual echo suppression % H = 1 - sum(mu.*abs(Xk).^2,2); % Ek_Res = H.*Ek; % en_t = real(ifft(Ek_Res)); % en((n-1)*L+1:n*L) = en_t(L+1:end); temp = real(ifft(W)); w0 = temp(1:L,:); w0 = w0(:); if ComputeEML == 1 misalign(n) = norm(b-w0)/norm(b); else misalign(n) = norm(w_old-w0); w_old = w0; end end if ComputeEML == 1 figure; c = stem([b,w0]); legend('Actual','Estimated'); title('PBFDKF System identification of an FIR filter'); grid on; figure; hold on; plot((0:length(misalign)-1),10*log10(misalign.^2)); xlabel('Number of iterations '); ylabel('Misalignment (dB)'); title('PBFDKF'); grid on; end end
不清楚作者是否有做后处理,如果没有做后处理,real_linear_out_kalman.wav这个文件一出来滤波器就收敛了,感觉又有点不对
想请教您一下关于分块频域Kalman回声消除初始阶段收敛问题您有好的解决办法或者可以提供的思路吗?关于两个噪声估计有没有一些论文推荐呢?谢谢您
@ydaj 其实我也不知道,我的卡尔曼的效果也不太好。
这篇文章 Robust Uncertainty Control of the Simplified Kalman Filter for Acoustic Echo Cancelation 有介绍一种新的噪声方差估计,不过我实际数据的效果不好,不知道是实现错了。如果你的效果比较好,可以告诉我一下。
路径突变有没有什么解决方法
是这篇 State-space architecture of the partitioned-block-based acoustic echo controller 文章吗,是不是有用RES? 为什么我仿真的结果不太好,是有什么技巧吗? process noise covariance 和 measurement noise variance 这两个变量 不知道怎么才能比较好的估计出来,在PBFDKF中特别 别是 process noise covariance,您有什么好的文章吗?
![]()
上面的是你的,下面是我仿真的,不知道是不是代码不对?
function [en,w0,misalign] = PBFDKF(un,dn,M,P,b) A = 0.99; A2 = A^2; L = M/P; measurement_smoothing_factor = 0.5; Mk = zeros(2*L,1); window_save_first = [ones(L,1); zeros(L,1)]; window_save_first = repmat(window_save_first,1,P); Pk = ones(2*L,P)*10; un_blocks = zeros(2*L,1); W = zeros(2*L,P); loop = floor(length(dn)/L); en = zeros(size(dn)); misalign = zeros(loop,1); ComputeEML = 0; Xk = zeros(2*L,P); w_old = zeros(M,1); if nargin == 5 && length(b) == M ComputeEML = 1; end for n = 1:loop un_blocks = [un_blocks(L+1:end); un((n-1)*L+1:n*L)]; Uk = fft(un_blocks); Xk(:,2:end) = Xk(:,1:end-1); Xk(:,1) = Uk; y_hat_1 = real(ifft(sum(Xk.*W,2))); y_hat = y_hat_1(L+1:end); en((n-1)*L+1:n*L) = dn((n-1)*L+1:n*L)-y_hat; Ek = fft([zeros(L,1);en((n-1)*L+1:n*L)]); Mk = measurement_smoothing_factor*Mk + (1-measurement_smoothing_factor)*abs(Ek).^2; Rk = sum(Xk.*Pk.*conj(Xk),2)+2*Mk/P+1e-11; mu = (Pk)./Rk; K = mu.*conj(Xk); Pk = A2*(1-0.5*K.*Xk).*Pk + (1-A2).*abs(W).^2; W = A*(W + fft(window_save_first.*real(ifft(K.*Ek)))); %%%%%%%residual echo suppression % H = 1 - sum(mu.*abs(Xk).^2,2); % Ek_Res = H.*Ek; % en_t = real(ifft(Ek_Res)); % en((n-1)*L+1:n*L) = en_t(L+1:end); temp = real(ifft(W)); w0 = temp(1:L,:); w0 = w0(:); if ComputeEML == 1 misalign(n) = norm(b-w0)/norm(b); else misalign(n) = norm(w_old-w0); w_old = w0; end end if ComputeEML == 1 figure; c = stem([b,w0]); legend('Actual','Estimated'); title('PBFDKF System identification of an FIR filter'); grid on; figure; hold on; plot((0:length(misalign)-1),10*log10(misalign.^2)); xlabel('Number of iterations '); ylabel('Misalignment (dB)'); title('PBFDKF'); grid on; end end
你这个是webrtc aec3的效果吗?因为我看你的文件名也是kalman滤波 加webrtc的非线性消除,这个和webrtc aec3的组合一样的。