RLS.zip

  • aliraza
    了解作者
  • matlab
    开发工具
  • 1KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 10 积分
    下载积分
  • 1
    下载次数
  • 2017-11-22 15:39
    上传日期
RLS system identification for varying channels
RLS.zip
  • AA
  • RLS1.m
    2.3KB
内容介绍
clear all close all %%%%%%%% PARAMETERS %%%%%%%%%%%%%%%%%%%%% N = 1500; % number of training data points N_test = 500; % number of test data points Nswitch = 500; % switch from model 1 to model 2 after Nswitch iterations B1 = [1,.0668,-0.4764,0.8070]; % model 1 linear filter B2 = [1,-.4326,.6656,-.7153]; % model 2 linear filter f = @(x) tanh(x); % Wiener system nonlinearity SNR = 0.00000020; % SNR in dB embedding = 4; % time-embedding setups{1} = rls(struct('c',0.9,'lambda',.99)); %%%%%%%%%%%%%% PREPARE DATA %%%%%%%%%%%%%%%%%% % generate Gaussian input data s s = rand(N+N_test,1); s_mem = zeros(N+N_test,embedding); for i = 1:embedding, s_mem(i:N+N_test,i) = s(1:N+N_test-i+1); % time-embedding end s = s_mem(1:N+N_test,:); % input data, stored in columns s_train = s_mem(1:N,:); % input train data, stored in columns s_test = s_mem(N+1:N+N_test,:); % input test data, stored in columns % generate internal data x and output y X1 = s_mem(1:Nswitch,:)*B1'; X2 = s_mem(Nswitch+1:N,:)*B2'; X = [X1;X2]; Y_nn = f(X); % noiseless Y vary = var(Y_nn); noisevar = 10^(-SNR/10)*vary; noise = sqrt(noisevar)*randn(N,1); Y = Y_nn + noise; % noisy output data X_test1 = s_mem(N+1:N+N_test,:)*B1'; X_test2 = s_mem(N+1:N+N_test,:)*B2'; noise_test1 = sqrt(noisevar)*randn(N_test,1); noise_test2 = sqrt(noisevar)*randn(N_test,1); Y_test1 = f(X_test1) + noise_test1; % noisy output test data, model 1 Y_test2 = f(X_test2) + noise_test2; % noisy output test data, model 2 %%%%%%%%%%%%%%% RUN ALGORITHMS%%%%%%%%%%%%%%%%%%%%%%%%% num_setup = length(setups); MSE = zeros(N,num_setup); for setup_ind=1:length(setups) kaf = setups{setup_ind}; for n=1:N, if n<=Nswitch, Y_test = Y_test1; else Y_test = Y_test2; end Y_est = kaf.evaluate(s_test); % test on test set err = Y_test - Y_est; MSE(n,setup_ind) = mean(err.^2); kaf = kaf.train(s_train(n,:),Y(n)); % train with one input-output pair end end %%%%%%%%%%%%%%%% OUTPUT %%%%%%%%%%%%%%%%%%%%%%% figure plot(10*log10(MSE),'LineWidth',1); xlabel('Number of Iteration','fontsize',18),ylabel('Mean Square Error (dB)','fontsize',18); legend('RLS') set(legend,'fontsize',22);
评论
    相关推荐
    • RLS.zip
      用递推最小二乘法进行双输入双输出系统的参数估计
    • 61857042RLS.rar
      自适应信号处理的理论和技术经过40多年的发展和完善,已逐渐成为人们常用的语音去噪技术.并通过实例介绍了基于Matlab的RLS自适应语音噪声对消系统的设计与实现.
    • LMS&RLS.rar
      该程序为两个简单的传统的自适应波束形成算法,希望对大家有用
    • RLS算法滤波
      基于RLS自适应滤波器,MatLab实现RLS自适应滤波器完整代码以及示例数据
    • RLS.rar
      RLS算法matlab仿真程序,实现了RLS算法的基本功能
    • Simulink RLS.rar
      递推最小二乘法参数辨识,matlab simulink
    • rls.rar
      做回归用的代码,非常好用,亲测可用,非常好使,欢迎下载
    • RLS2.zip
      RLS算法生成最优BF权矢量,是关于智能天线的相关应用
    • rls_6_15 - 副本.rar
      检验RLS算法学习速度,运用matlab实现递归最小二乘法
    • USB-COM(HL340).rar
      usb转串口,找了很久才找到,现在别的地方很难下到,要不用不了,我这个可以用 HL340D 的