自适应滤波仿真作业_第1页
自适应滤波仿真作业_第2页
自适应滤波仿真作业_第3页
自适应滤波仿真作业_第4页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、3.8题的仿真结果al = -0.195 a2 = 0.95)1.510.50-0.50100 200 300 400 500 600 700 800 900 1000a1 = -1.5955 a2 = 0.950100 200 300 400 500 600 700 800 900 1000-10.40.20-0.2-0.4-0.6-0.8-1iterative times niterative times nx io305a1 = -1.9114 a2 = 0.9521曰0 _- 11n-2 - 3 - 4 -,- 5 - 6 L,- 7 |1c11-''J10100200

2、3004005006007008009001000iterative times na1 = -0.195 a2 = 0.955.4题的仿真结果0.80.60.40.2 0n -0.2- 0.4- 0.6- 0.8-1-1.201002003004005006007008009001000iterative times niterative times niterative times n10.4题的仿真结果空间方向10 10 10 1010 10 10 1010 10 10 1010 10 10 10Rj 1000.4337 0.90110.6238 0.78160.9748 0.22320

3、.4337 0.901110.4337 0.90110.6238 0.78160.6238 0.78160.4337 0.901110.4337 0.90110.9748 0.22320.6238 0.78160.4337 0.90111Rnn111-33.369+90.106iRxx-52.383-78.156i107.48-22.316iRss + Rjj的特征值为:-33.369-90.106j 111-33.369+90.106i-52.383-78.156i402.35 , 37.65 ,-52.383+78.156j-33.369-90.106i111-33.369+90.106i

4、107.48+22.316j-52.383+78.156i-33.369-90.106i1110, 0相应的特征向量为:v= V1 ,V2 ,V3 ,V40.50950.3742 - 0.0860i 0.7131-0.0072 - 0.2192i-0.2042 + 0.4458i 0.5524 - 0.2177i -0.3155-0.1028i -0.3384+0.5176i v-0.2963 - 0.3906i 0.59380.1271+0.2572i 0.63140.4973 - 0.1109i 0.3797 - 0.0572i -0.5247-0.1545i -0.2859 - 0.29

5、84i最佳权向量为:H 111Wopta( s) Rxxa( s)Rxxa( s)0.2036 - 0.0068i 0.2964 - 0.0515i 0.2964+0.0515i 0.2036+0.0068T附:程序1、题 3.8clc; clear all; close all;% Using AR module generate signaldisp('Using Steepest Descent algorithm estimate the weight vector ') column = input('column =');a1 = input(

6、9;a1 =');a2 = input('a2 =');row = 1;ns = 1;n = 1 : column;u = AR_module(a1, a2, ns, row, column);% Compute Rxx and rxdr = xcorr(u, 500, 'biased');Rxx = r(501), r(502); r(500), r(501);rxd = r(500); r(499);% Using Steepest Descent algorithm compute the weight vector omega = Steepes

7、t_descent(Rxx, rxd, column);% Draw the weight vectorplot(n, omega(1, 1 : column);xlabel('n');hold on;plot(n, omega(2, 1 : column), '-');xlabel('iterative times n');ylabel('omega(n)');title('a1 = ', num2str(a1),' a2 = ',num2str(a2);legend('omega0

8、9;,'omega1',0);%最陡下降法的程序function omega = Steepest_descent(Rxx, rxd, column)% Steep descent algorithmomega = zeros(2, column);for n = 1 : columnomega( :, n+1) = omega(:, n) + 0.02 * (rxd - Rxx * omega( :, n);end3.8题和5.4题共用的AR模型function signal = AR_module(a1, a2, ns, row, column)% Using AR mod

9、ule generate signal v0 = randn(column,row);v = sqrt(ns) * v0; %generate noise u0 = 0 0;num = 1;den = 1 al a2;Zi = filtic(num,den,u0);signal, Zf = filter(num, den, v, Zi);2、5.4 题% initialclc; clear all; close all;disp('Using RLS algorithm estimate the weight vector')a1 = input('a1 =')

10、;a2 = input('a2 =');row = input('row =');column = input('column =');ns = input('ns =');signal = AR_module(a1, a2, ns, row, column);omega_ave, omega, mse_ave, mse = recursive_least_squares(signal, row, column); % draw the weight vector and mean square errorn = 1 : colu

11、mn;figure。);plot(n, omega(1, :);hold onplot(n, omega(2, :),'-');hold onplot(n, omega_ave(1, :);hold onplot(n, omega_ave(2, :),'-');legend('omega0','omega1',0);title('a1 = ', num2str(a1),' a2 = ',num2str(a2);xlabel('iterative times n');ylabel(&#

12、39;omega(n)');figure(2);plot(n, mse);xlabel('iterative times n');ylabel('单次学习曲线');figure(3);plot(n, mse_ave);xlabel('iterative times n');ylabel('100 平均学习曲线');RLS算法的程序function omega_ave, omega, mse_ave, mse = recursive_least_squares(signal, row, column)% Recursive

13、Least Squares Algorithmomega_a = zeros (2,column,row);omega = zeros(2,column);ee_ave = zeros(1,column,row);ee = zeros(1,column);mse = zeros(1,column);u = zeros(2, column);k = zeros(2, column);P = zeros(2, 2, column);P(:, :, 2) = eye(2) / 0.02;for r = 1 : rowfor n = 3 : columnu(:, n) = signal(n-1, r)

14、; signal(n-2, r);k(:, n) = P(:, :, n-1) * u(:, n)/ (0.9+ u(:, n)' * P(:, :, n-1) * u(:, n);ee(n) = signal(n, r) - u(:, n)' * omega(:, n-1);omega(:, n) = omega(:, n-1) + k(:, n) * ee(n);P(:, :, n) = (P(:, :, n-1) - k(:, n) *u(:, n)' * P(:, :, n-1) /0.9;mse(n) = ee(n)A2;endee_ave(:, :, r)

15、= mse;omega_a(:, :, r) = omega;endomega_ave = sum(omega_a, 3) ./ row;mse_ave = sum(ee_ave, 3) ./ row;3、10.4 题clc; clear all;close all;aj = 1; exp(j*pi*sin(40*pi/180);.exp(j*2*pi*sin(40*pi/180); exp(j*3*pi*sin(40*pi/180);as = ones(4, 1);Rss = 10 * as * as'Rjj = 100 * aj * aj'Rnn = eye(4)Rxx = Rss + Rjj + Rnnv, d = eig(Rss + Rjj)wopt = inv(as' * inv(Rxx) *as) * inv(R

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论