您的位置:首页 > 编程语言 > MATLAB

MATLAB之波束形成学习

2016-03-03 09:30 441 查看
MathWorks官网上有一个Phased Array System Toolbox: http://cn.mathworks.com/help/phased/index.html其中有一项叫做Beamforming and Direction of Arrival Estimation:  http://cn.mathworks.com/help/phased/beamforming-and-direction-finding.html子目录有Beamforming:http://cn.mathworks.com/help/phased/beamforming.html介绍了使用相控阵系统工具箱完成的常见的几种波束形成。以宽带波束形成器中最简单的自带相移波束形成为例
% Signal simulation
%创建一个阵列
ha = phased.ULA('NumElements',11,'ElementSpacing',0.3);
%phased.ULA是均匀线阵列,可设置参数有四个:
%NumElements——阵元数 
%ElementSpacing——阵元间距 
%Element——默认各向同性 
%Taper——类似于某种加权,默认为1不加权
%关于ULA的说明: http://cn.mathworks.com/help/phased/ref/phased.ula-class.html[/code] 
%关于一些其他阵列Phased Array Gallery的说明:http://cn.mathworks.com/help/phased/examples/phased-array-gallery.html
%设置频率范围
ha.Element.FrequencyRange = [20 20000];
%设置一些参数以供波束形成的函数调用
fs = 1e3; 
carrierFreq = 2e3; 
t = (0:1/fs:2)';
x = chirp(t,0,2,fs);
c = 1500; % Wave propagation speed (m/s)
%宽带信号采集器phased.WidebandCollector
%Sensor
%PropagationSpeed
%SampleRate
%ModulatedInput
%CarrierFrequency
%WeightsInputPort
%Wavefront
hc = phased.WidebandCollector('Sensor',ha,...
    'PropagationSpeed',c,'SampleRate',fs,...'ModulatedInput',true,'CarrierFrequency',carrierFreq);incidentAngle = [10; 30];x = step(hc,x,incidentAngle);noise = 0.3*(randn(size(x)) + 1j*randn(size(x)));rx = x+noise;% Beamforming
%SensorArray——阵列,默认为均匀线阵列
%PropagationSpeed——信号传播速度,默认光速
%OperatingFrequency——系统工作频率,默认3e8
%SampleRate——采样率,默认1e6
%NumSubbands——将频率分成多少个子带,默认64
%DirectionSource——
%Direction——波束指向,默认[0;0]
%WeightsOutputPort——
%SubbandsOutputPort——
hbf = phased.SubbandPhaseShiftBeamformer('SensorArray',ha,...'Direction',incidentAngle,...'OperatingFrequency',carrierFreq,'PropagationSpeed',c,...'SampleRate',fs,'SubbandsOutputPort',true,...'WeightsOutputPort',true);[y,w,subbandfreq] = step(hbf,rx);% Plot signalsplot(t(1:300),real(rx(1:300,6)),'r:',t(1:300),real(y(1:300)));xlabel('Time'); ylabel('Amplitude');legend('Original','Beamformed');% Plot response pattern for five bandsfigure;plotResponse(ha,subbandfreq(1:5).',c,'Weights',w(:,1:5));legend('location','SouthEast')
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: