⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pantpat3.m

📁 阵列信号处理的工具箱
💻 M
字号:
function spect = pantpat3(antenna, mainPointDoa, subPointDoa, antError, taperType, taperParam,  iNCorrMat, smplPoints, lambda, sigType, sigPart, minValuedB, scaleType, normType,  plotType, plotOpt, extra1, extra2, extraParam)%PANTPAT3 Plots a simulated (mechanical) antenna pattern.%%--------%Synopsis:%  pantpat3(antenna)%  pantpat3(antenna, mainPointDoa)%  pantpat3(antenna, {beamWeights})%%  spect = pantpat3(antenna, mainPointDoa, subPointDoa, antError, taperType, %    taperParam,  iNCorrMat, smplPoints, lambda, sigType, sigPart, minValuedB, %    scaleType, normType,  plotType, plotOpt, extra1, extra2)%%  spect = pantpat3(antenna, {beamWeights}, subPointDoa, antError, taperType,%    taperParam,  iNCorrMat, smplPoints, lambda, sigType, sigPart, minValuedB, %    scaleType, normType,  plotType, plotOpt, extra1, extra2)%%Description:%  Plots one or more simulated (mechanical) antenna patterns. Antenna%  patterns using signals (simulated or measured) can not be done with this%  function.%%  There are two different ways to specify the beamforming weights to use:%  1) Specifying one or more pointing directions of the main antenna using the%  input parameter "mainPointDoa", in which case the steering vectors for%  these directions are taken as the weights.%  2) Supplying the weights directly as the input parameter "beamWeights".%  Note, that in this case the weights must be a matrix surounded by { }, %  i.e.  the only element of a cell array. The reason for the cell array%  is simply to distinguish between beam pointing directions and beam weights. %%  In boths ways, tapering of main antenna can be choosen and adaptive side%  lobe cancellation can be used.%%%  There are two possible antenna patterns for an array antennna, either with%  mechanical angle scan or electronical angle scan. The antenna patterns are%  generated by the same formulas:%%    w(thetaEl) = inv(iNRxx) * (a(thetaEl).*taper)%    P(thetaMec, thetaEl) = abs(a(thetaMek)' * w(thetaEl))^2%%  where "w" is the weight vector to use in the beamforming,%  "iNRxx" is the input antenna signal interference-plus-noise correlation%  matrix and a() is the steering vector (a model of the antenna response).%%  Depending on which of thetaMec and thetaEl that is beeing varied while%  the other is held constant, the mechanical or the electrical pattern is%  generated.%%  The function pantpat3 generates the mechanical pattern. Model errors are%  taken in account when calculating a(thetaMek) but not when calculating%  a(thetaEl).%%Output and Input:%  spect [D](DoaSpecT): Output DOA-spectrum. It is a quadratic measure of%    the sensity of sources from different directions or more specific the%    squared modulus of the antenna patterns P above. The scale is linear.%    There can be several antennas patterns, in which case different columns%    in "spect.specSmpl" means different patterns.%  antenna (AntDefT): Antenna definition.%  mainPointDoa [D](DoaT): Pointing direction of main antenna or array.%    Default is zero. If this input parameter is used, the beamforming%    weights are calculated using the spatial steering vector directed%    in the direction of "mainPointDoa". Tapering (input paremeters%    "taperType" and "taperParam") and adaptive interference supression%    (input paremeters "iNCorrMat") are then applied.%  beamWeights [D](CxMatrixT): Beamforming weights. If this input parameter%    is used, the beamforming weights are given by this input parameter as%    a (noElems x noBeams) complex matrix. Note, the matrix must be%    surounded by { }.The beamforming is done via (signal'*w ). Note,%    the hermitian transpose.%    (Should it be w'*signal instead?)%  subPointDoa [D](Vector of DoaT): Pointing direction of subarrays if%    the function "spastemat" allows this for the used antenna type. Default%    is zero.%  antError [D](AntDefT): Antenna definition with errors. This is a model of%    the real signal.%  taperType [D](StringT): Tapering type = the parameter "taperType" of%    function "gettap1".%  taperParam [D](?): The third input parameter of function "gettap1".%  iNCorrMat (RxCorrMatT): The input antenna signal interference-plus-noise%    correlation matrix. This should be estimated on a radar signal without%    targets. Use this if you want antenna pattern adapted to supress%    jamming or other interference.%  smplPoints [D](Vector of DoaT): Calculate the antenna diagram at these%    angles.%  lambda (RealScalarT): Wavelength [m].%  minValuedB [D](RealScalarT): Lowest value in dB to plot for a quantity%    relative the maximum value.%  scaleType [D](): Not used.%  normType [D]: Type of normalization. Only used for "plotType" 'lin' & 'sin'.%    = 'max': Normalize the maximum of the signal to 1 (or 0 dB).%    = 'none' : No normalization is done.%  plotType [D](StringT):%    = 'lin': Rectangular plot with linear axis for the direction (default).%    = 'sin': Rectangular plot with sin(direction) for the direction axis.%      Not implemented.%    = 'polar': Polar plot using Matlabs function "polar".%    = 'lppolar': Polar plot using Lars Petterssons function "lppolar"%    = 'noplot' : No plot, only calculation of antenna pattern.%  plotOpt [D](): This input parameter is sent to the "S" input parameter of%    the functions "plot" and "polar". Various line types, plot symbols and%    colors are defined in this way. See the "S" input parameter of%    the functions "plot" for more information.%  extra1 (RealVectorT): The elements of this input parameter is sent%    to the input parameters "rmax", "rmin", "rticks", "fimax", "fimin"%    and "fiticks" of the function "lpplot".%%--------%Notations:%  Data type names are shown in parentheses and they start with a capital%  letter and end with a capital T. Data type definitions can be found in [1]%  or by "help dbtdata".%  [D] = This parameter can be omitted and then a default value is used.%  When the [D]-input parameter is not the last used in the call, it must be%  given the value [], i.e. an empty matrix.%  ... = There can be more parameters. They are explained under respective%  metod or choice.%%Examples:%  These examples are the same as in the file dbtex15.m.%  Example 1:%    This example shows an antenna pattern without and with adaptive%    sidelobe cancellation.%    figure%    theta  = d2r([40 60])';%    lambda = 1;%    ant = defant('isotropULA',[12, 0.45*lambda, lambda]);   % Define antenna.%    sigJam = compsim2(ant, 1, 24, 'const', [theta,zeros(size(theta)),...%      [10 5]', d2r([0 16])', d2r([34 -13])', Inf*ones(size(theta)), ...%      eye(size(theta,1))], 'rndn', eye(12));%        % Generate simulated jammer signals%    Rjam = ecorrm(sigJam);%    hold on%    pantpat3(ant, d2r(10), [],[], 'taylor', 30)%      % Without adaptive sidelobe cancellation.%   pantpat3(ant,  d2r(10), [],[], 'taylor', 30, Rjam, [], [],[],[],[], ...%      [],[],[],'r')%      % With adaptive sidelobe cancellation.%    legend('Without SLC', 'With SLC')%%  Example 2:%    This example shows how the pattern of subarrays and elements can%    be plotted.%    lambda = 0.1;%    ant = defant('aimtEx');%    figure, hold on%    pantpat3(ant, [], [], [], [], [], [], [], lambda)%    subarr = ant.element;%    pantpat3(subarr, [], [], [], [], [], [], [], lambda, [], [], [],[], [], ...%      [], 'r')%    elem = subarr.element;%    pantpat3(elem, [], [], [], [], [], [], [], lambda, [], [], [],[], [], ...%      [], 'b')%    legend('Total', 'Subarrays', 'Elements')%%  Example 3:%    This example shows two different polar plots. A user defined tapering%    is used.%    tap = cos(([-5.5:1:5.5].')./(5.5)*(pi/2)).^2;%      % A cos^2 tapering%    lambda = 1;%    ant = defant('isotropULA',[12, 0.5*lambda, lambda]);%    figure%    s1 = pantpat3(ant, d2r(30), 0, [], 'user', tap, [], [], [], ...%      [],[],-70,[],[],'polar');%    figure%    s1 = pantpat3(ant, d2r(30), 0, [], 'user', tap, [], [], [], ...%      [],[],-70,[],[],'lppolar',[],[0,-60, 6,pi/2,-pi/2,6]);%%Software Quality:%  (About what is done to ascertain software quality. What tests are done.)%%Known Bugs:%  Should the "beamSpaceTrans" field of the top level in the antenna%  definition be used as tapering? Now that field is not used automatically%  but can be used manually via the "taperType" and "taperParam" input%  parameters of this function.%%References:%  [1]: Bj鰎klund S.: "DBT, A MATLAB Toolbox for Radar Signal Processing.%    Reference Guide", FOA-D--9x-00xxx-408--SE, To be published.%%See Also:%  defant, polar, lppolar%   *  DBT, A Matlab Toolbox for Radar Signal Processing  *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%%  Start        : 980108 Svante Bj鰎klund (svabj).%  Latest change: $Date: 2001/08/31 14:33:35 $ $Author: svabj $.%  $Revision: 1.30 $% *****************************************************************************% NOTE: The following help text is currently not used.%%function spect = pantpat3(antenna, mainPointDoa, subPointDoa, antError, taperType, taperParam,  iNCorrMat, smplPoints, focusDist, sigType, sigPart, minValuedB, scaleType, normType,  plotType, plotOpt, extra1)%  focusDist [D](RealScalarT): Focus distance of the antenna [m]%    (default = Inf). Not implemented.%%  pantpat3(antenna, mainPointDoa, subPointDoa)%  pantpat3(antenna, [], [], [], taperType, taperParam)%  pantpat3(antenna, [], [], [], [], [],  iNCorrMat)%  pantpat3(antenna, [], [], [], [], [],  [], smplPoints)%  pantpat3(antenna, [], [], [], [], [],  [], [], lambda)%  pantpat3(antenna, [], [], [], [], [],  [], [], [], [], [], [], [], [],%    plotType)%  pantpat3(antenna, [], [], [], [], [],  [], [], [], [], [], minValuedB,%    [], [], plotType)%  pantpat3(antenna, [], [], [], [], [],  [], [], [], [], [], [], [], [],%    plotType, plotOpt)%  pantpat3(antenna, mainPointDoa, subPointDoa, antError, taperType,%    taperParam,  iNCorrMat, smplPoints, lambda, sigType, sigPart,%    minValuedB, scaleType, normType,  plotType, plotOpt, extra1)%%  spect = pantpat3(antenna, mainPointDoa, subPointDoa, antError, taperType,%    taperParam,  iNCorrMat, smplPoints, focusDist, sigType, sigPart, scaleType, normType, minValue, plotType, dispOpt)%%, maxValue, xAxisType)%%  sigType [D](StringT): Signal type.%    = 'sig': The signal itself (default).%    = 'fft': FFT of the signal.%  sigPart [D](StringT): What part of the signal to plot.%    = 'power': (default).%    = 'abs': Absolute value.%    = 'angle': Phase angle with Matlab:s "angle()" function.%    = 'uwangle': Phase angle with Matlab:s "unwrap(angle())" function.%       This gives a continous phase angle.%    = 'real': Real part.%    = 'imag': Imaginary part.%  scaleType [D](StringT) : Scale Type for vertical axis.%    = 'lin': Linear scale.%    = 'dB': dB scale.%  normType: Type of normalization. Not implemented.%  maxValue: H鰏ta niv

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -