自适应滤波仿真作业.docx

上传人:scccc 文档编号:13429097 上传时间:2021-12-25 格式:DOCX 页数:5 大小:104.94KB
返回 下载 相关 举报
自适应滤波仿真作业.docx_第1页
第1页 / 共5页
自适应滤波仿真作业.docx_第2页
第2页 / 共5页
自适应滤波仿真作业.docx_第3页
第3页 / 共5页
自适应滤波仿真作业.docx_第4页
第4页 / 共5页
自适应滤波仿真作业.docx_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

《自适应滤波仿真作业.docx》由会员分享,可在线阅读,更多相关《自适应滤波仿真作业.docx(5页珍藏版)》请在三一文库上搜索。

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 =

16、 Rss + Rjj + Rnnv, d = eig(Rss + Rjj)wopt = inv(as' * inv(Rxx) *as) * inv(Rxx) * ass = -100 : 100;a = ones(size(s); exp(j * pi * sin(s * pi / 180);exp(j * 2 * pi * sin(s * pi/180); exp(j * 3 * pi * sin(s * pi /180);m = abs(wopt' * a);plot(s, m);title('幅度波束图');xlabel('空间方向');ylabel('增益');

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 社会民生


经营许可证编号:宁ICP备18001539号-1