Jacobi并行拆解【补充】
生活随笔
收集整理的這篇文章主要介紹了
Jacobi并行拆解【补充】
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
作者:桂。
時間:2018-04-24??22:04:52
鏈接:http://www.cnblogs.com/xingshansi/p/8934373.html?
前言
本文為Jacobi并行拆解一文的補充,給出另一種矩陣運算的思路。
一、算法流程
對于復數相關矩陣R,通過矩陣變換,在維度不變的情況下,轉化為實數矩陣:
對于MUSIC算法,該思路可以降低Jacobi運算復雜度。額外的操作僅僅是少量的乘法操作,即耗費少量硬件資源換取更快速的處理時間。
直接復數轉實數,需要將nxn的矩陣擴展為2n x 2n的矩陣,而直接轉化的相關矩陣仍然為 n x n,降低了Jacobi的復雜度。
容易證明U*Un為新的特征向量,而U可與導向矢量a提前乘法處理,存儲到Ram里。
這里可以看出:(R + J*conj(R)*J)/2等價于中心對稱線陣的前、后項空間平滑算法,而斜Hermitian矩陣的特征向量與轉化的特征向量等價,因此可以得出特性:對于具備中心對稱特性的線陣,復數->實數,既可以降低Jacobi復雜度,又具備了解相干信號的能力。
二、仿真驗證
未做實數化處理,code:
clc;clear all;close all %Ref:Narrowband direction of arrival estimation for antenna arrays doas=[-30 -5 40]*pi/180; %DOA's of signals in rad. P=[1 1 1]; %Power of incoming signals N=10; %Number of array elements K=1024; %Number of data snapshots d=0.5; %Distance between elements in wavelengths noise_var=1; %Variance of noise r=length(doas); %Total number of signals % Steering vector matrix. Columns will contain the steering vectors % of the r signals A=exp(-i*2*pi*d*(0:N-1)'*sin([doas(:).'])); % Signal and noise generation sig=round(rand(r,K))*2-1; % Generate random BPSK symbols for each of the % r signals noise=sqrt(noise_var/2)*(randn(N,K)+i*randn(N,K)); %Uncorrelated noise X=A*diag(sqrt(P))*sig+noise; %Generate data matrix R=X*X'/K; %Spatial covariance matrix [Q ,D]= svd(R); %Compute eigendecomposition of covariance matrix [D,I]=sort(diag(D),1,'descend'); %Find r largest eigenvalues Q=Q(:,I);%Sort?the?eigenvectors?to?put?signal?eigenvectors?first Qs=Q (:,1:r); %Get the signal eigenvectors Qn=Q(:,r+1:N); %Get the noise eigenvectors % MUSIC algorithm %?Define?angles?at?which?MUSIC???spectrum????will?be?computed angles=(-90:0.1:90); %Compute steering vectors corresponding values in angles a1=exp(-i*2*pi*d*(0:N-1)'*sin([angles(:).']*pi/180)); for k=1:length(angles)%Compute?MUSIC???spectrum?? music_spectrum(k)= 1/(a1(:,k)'*Qn*Qn'*a1(:,k)); end figure(1) plot(angles,abs(music_spectrum)) title('MUSIC Spectrum') xlabel('Angle in degrees')實數化處理,code:
clc;clear all;close all %Ref:Narrowband direction of arrival estimation for antenna arrays doas=[-30 -5 40]*pi/180; %DOA's of signals in rad. P=[1 1 1]; %Power of incoming signals N=10; %Number of array elements K=1024; %Number of data snapshots d=0.5; %Distance between elements in wavelengths noise_var=1; %Variance of noise r=length(doas); %Total number of signals % Steering vector matrix. Columns will contain the steering vectors % of the r signals A=exp(-i*2*pi*d*(0:N-1)'*sin([doas(:).'])); % Signal and noise generation sig=round(rand(r,K))*2-1; % Generate random BPSK symbols for each of the % r signals noise=sqrt(noise_var/2)*(randn(N,K)+i*randn(N,K)); %Uncorrelated noise X=A*diag(sqrt(P))*sig+noise; %Generate data matrix R=X*X'/K; %Spatial covariance matrix %% Reconstruct %實數 n = size(R); I = eye(n/2); J = fliplr(eye(n)); U = 1/sqrt(2)*[I fliplr(I);1j*fliplr(I) -1j*I]; R = 0.5*U*(R+J*conj(R)*J)*U'; % Reconstruct_end [Q ,D]= svd(R); %Compute eigendecomposition of covariance matrix [D,I]=sort(diag(D),1,'descend'); %Find r largest eigenvalues Q=Q(:,I);%Sort?the?eigenvectors?to?put?signal?eigenvectors?first Qs=Q (:,1:r); %Get the signal eigenvectors Qn=Q(:,r+1:N); %Get the noise eigenvectors % MUSIC algorithm %?Define?angles?at?which?MUSIC???spectrum????will?be?computed angles=(-90:0.1:90); %Compute steering vectors corresponding values in angles a1=exp(-i*2*pi*d*(0:N-1)'*sin([angles(:).']*pi/180)); for k=1:length(angles)%Compute?MUSIC???spectrum?? music_spectrum(k)= 1/(a1(:,k)'*U'*Qn*Qn'*U*a1(:,k)); end figure(1) plot(angles,abs(music_spectrum)) title('MUSIC Spectrum') xlabel('Angle in degrees')?
?
?
總結
以上是生活随笔為你收集整理的Jacobi并行拆解【补充】的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Baxter机器人---Hello_ba
- 下一篇: makesfx.exe (Make SF