⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nlms_chinliang_wang.m

📁 一种窄带干扰抑制的非线性自适应预测滤波算法!
💻 M
字号:
function e_prediction=nlms_chinliang_wang(receive_signal,num_weight,N_user)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%由Chin-Liang Wang提出的自适应非线性反馈补偿滤波器抑制多用户情况下的窄带干扰。
%e_prediction=nlms_chinliang_wang(receive_signal,num_weight,a,N_user)
%receive_signal:         为接收信号序列=s+i+n;
%e_prediction:           为预测到的信号值
%num_weight:             抽头系数个数;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
z=receive_signal; 
M=length(z);
w=0.001*randn(1,num_weight)';                %tap weight
e=zeros(1,M);                               %prediction/subtract error
e_hat=zeros(1,M);
z_hat=zeros(1,M);                          %predictive value of the narrowband interference 
z_tilde=zeros(1,M);                           %predictive value of the narrowband interference with the offset compensation
z_bar=zeros(1,M);                           %input signal of the compensated filter     
% z_tilde=z;                                  %input signal of the predictor
b=zeros(1,M);
d=0.001*randn(1,M);                         %output signal of the compensated filter
p=zeros(1,M);                               %the recursive estimated value of the power of the tap delay signal
% delta=zeros(1,M);                           %variance of the e(k)
% sgmak2=zeros(1,M);                          %the variance of the leave term of interference and thermol noise
pe=zeros(1,M);                              %quantizative error
u=0.1;                                      %convergence factor
% belta=0.0025;                               %forget factor
% delta(num_weight)=2;                        
p(num_weight)=5;%norm(z(1:num_weight))^2;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for k=(num_weight+1):M
      X=z_bar(k-1:-1:k-num_weight).';
      B=b(k-1:-1:k-num_weight).';
      z_hat(k)=w'*X;
      d(k)=w'*B;
      z_tilde(k)=z_hat(k)+d(k);
      e(k)=z(k)-z_hat(k);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      
%       delta(k)=(1-belta)*delta(k-1)+abs(e(k))^2*belta;         
%       sgmak2(k)=delta(k)-1;
%      pe(k)=e(k)-tanh(e(k)/(sgmak2(k)+0.01));       %软判决
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      z_bar(k)=z(k)-multiquantizer(e(k),N_user);
      e_hat(k)=z_bar(k)-z_hat(k);
      b(k)=z_bar(k)-z_tilde(k);
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %Update the tap weight
      xk2=norm(X)^2;
 %    p(k)=p(k-1)+u*(xk2-p(k-1));                    %选择一:传统功率递归
      gama=0.1;                                     %选择二:采用另外的遗忘因子
      p(k)=(1-gama)*p(k-1)+gama*xk2;
      w=w+u/(p(k)+10)*e_hat(k)*X;
  end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e_prediction=e;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -