📄 gettap1.m
字号:
function wOut = gettap1(antenna, taperType, taperParam, scanDoa, wavelength)%GETTAP1 Calculates tapering weights for array antennas.%%--------%Synopsis:% wOut = gettap1(antenna, taperType, taperParam)%%Description:% Calculates tapering weights for for array antennas. The number of% elements is given via the "antenna" input parameter.%%Output and Input:% wOut (CxVectorT): Tapering.% taperType [D](StringT): Type of taper.% = 'uniform' : Uniform taper, i.e. [1 1 ...].'. (default)% = 'taylor' : Taylor tapering.% = 'taylor2' : Sampled continuous Taylor tapering.% = 'cheby' : Dolhp-Chebychev tapering.% = 'user' : User defined taper.% antenna (AntDefT): Antenna definition.% taperParam [D](): Taper parameter, see below.% scanDoa [D](DoaT): Pointing direction of the main beam. This adds extra% phase shifts to the tapering weights so that the main beam is scanned% in the desired direction.% wavelength (RealVectorT): Wavelength of the carrier [m].%--------%Uniform Taper Type.%Synopsis:% wOut = gettap1(antenna, 'uniform')%%Description:%%--------%Taylor Taper Type.%Synopsis:% wOut = gettap1(antenna, 'taylor')% wOut = gettap1(antenna, 'taylor', SLL)% wOut = gettap1(antenna, 'taylor', [SLL nbar])%%Output and Input:% SLL [D](RealScalarT): Sidelobe level SLL in dB (SLL > 0).% nbar [D](?): nbar. If nbar is given, also SLL must be given.%%Description:% Computes a Taylor taper with sidelobes SLL and parameter nbar.%%--------%Taylor Taper Type 2.%Synopsis:% wOut = gettap1(antenna, 'taylor2')% wOut = gettap1(antenna, 'taylor2', SLL)% wOut = gettap1(antenna, 'taylor2', [SLL nbar])%%Output and Input:% SLL [D](RealScalarT): Sidelobe level SLL in dB (SLL > 0).% nbar [D](?): nbar. If nbar is given, also SLL must be given.%%Description:% Computes a Taylor taper for a specified sidelobe level SLL>0.%% This Taylor tapering is probably a sampled version of a continuous one.% The result will be good for a large antenna but worse for a small.% The error can be seen on the fact that the side lob closest to the main% beam is the smallest side lob. [5]%%Software Quality:% The function has been verified by comparing the results% with tables and plots in the following literature [2] fig. 3.6,% [3] fig. A.14. and [4] table 10.9.%%Known Bugs:% See the description above..%%--------%Dolhp-Chebychev Taper Type.%Synopsis:% wOut = gettap1(antenna, 'cheby')% wOut = gettap1(antenna, 'cheby', SLL)%%Output and Input:% SLL [D](RealScalarT): Sidelobe level SLL in dB (SLL > 0).% nbar [D](?): nbar. If nbar is given, also SLL must be given.%%Description:% Computes Dolhp-Chebychev taper weights of an n-element array with% sidelobes SLL. See [6], pp. 245-254.%%--------%User Defined Taper Type.%Synopsis:% wOut = gettap1(antenna, 'user', taper)%%Output and Input:% taper (CxVectorT): The tapering weights to use.%%Description:% Returns in input parameter "wOut" the tapering weights given by input% parameter "taper". In this way the user can use taperings that are not% supported by this function. One good reason to use this taper type is% to add phase shifts to the weights due to scanning the main beam of the% antenna in a desired direction.%%--------%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:%%Known Bugs:% Some functions that use this function can not supply the fourth input parameter%%References:% [1]: Bj鰎klund S.: "DBT, A MATLAB Toolbox for Radar Signal Processing.% Reference Guide", FOA-D--9x-00xxx-408--SE, To be published.% [2]: R.J.Mailloux, "Phased Array Antenna Handbook", 1994.% [3]: D.K.Barton, H.R.Ward,"Handbook of Radar Measurement, 1984.% [4]: M. Skolnik, "Radar Handbook", 2nd ed., 1990.% [5]: LP.% [6]: Balanis C.: "Antenna Theory, Analysis and Design", Wiley 1997, % ISBN 0-471-59268-4.%%See Also:% defant, doaspc1, pantpat3, dbtdata% * DBT, A Matlab Toolbox for Radar Signal Processing *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%% Start : 970404 Svante Bj鰎klund (svabj).% Latest change: $Date: 2000/10/21 14:05:23 $ $Author: svabj $.% $Revision: 1.25 $% *****************************************************************************% ----------------------------------------------------------------------- %% Handle standard input parameters% ----------------------------------------------------------------------- %if (nargin < 2) error('DBT-Error: To few input parameters.')end% ****************** Add missing input parameters ******************if (nargin < 2) taperType = [];endif (nargin < 3) taperParam = [];endif (nargin < 4) scanDoa = [];end% ****************** Default values ******************if (isempty(taperType)) taperType = 'uniform';end%ifif (isempty(scanDoa)) scanDoa = [0;0];end%if% ****************** Error check input parameters ******************chkdtype(taperType, 'StringT')chkdtype(antenna, 'AntDefT')chkdtype(scanDoa, 'DoaT')antType = antenna.antennaType;%if ~(strcmp(antType,'ULA') | strcmp(antType,'elem') | strcmp(antType,'LA'))% %error('DBT-Error: Only implemeted for antennaType ULA, LA and elem')% dbtwarning('The function "gettap1" only intended for antennaType ULA, LA and elem.')%end% ****************** Pick out fields from input parameters. ******************noElem = antenna.noElem; % Number of channels.% ----------------------------------------------------------------------- %% Different taper types.% ----------------------------------------------------------------------- %% ----------------------------------------------------------------------- %% Taylor according to Fredrik Athley% ----------------------------------------------------------------------- %if (strcmp(taperType,'taylor2')) %if ((length(taperParam) > 0) & (isempty(taperParam(1)))) % SLL in dB % taperParam(1) = 30; %end%if [SLL, nbar] = taylorArguments(taperParam,noElem); wOut = tayltap(SLL,nbar,noElem).';% ----------------------------------------------------------------------- %% Taylor according to Lars Pettersson.% ----------------------------------------------------------------------- %elseif (strcmp(taperType,'taylor')) [SLL, nbar] = taylorArguments(taperParam,noElem); wOut = taylorlp(noElem,SLL,nbar); wOut = wOut(:);% ----------------------------------------------------------------------- %% Dolhp-Chebychev weights.% ----------------------------------------------------------------------- %elseif (strcmp(taperType,'cheby')) if (isempty(taperParam)) % SLL in dB taperParam = 30; end%if chkdtype(taperParam, 'RealScalarT') wOut = chebylp(noElem,taperParam); wOut = wOut(:);% ----------------------------------------------------------------------- %% Uniform or 'notaper'% ----------------------------------------------------------------------- %elseif (strcmp(taperType,'uniform') | strcmp(taperType,'notaper')) wOut = ones(noElem,1);% ----------------------------------------------------------------------- %% User defined taper.% ----------------------------------------------------------------------- %elseif (strcmp(taperType,'user')) wOut = taperParam;% ----------------------------------------------------------------------- %%% ----------------------------------------------------------------------- %elseif (strcmp(taperType,'dummy'))% ----------------------------------------------------------------------- %%% ----------------------------------------------------------------------- %else error(['Selected taper type ',taperType,' is not implemented.'])end%if% ----------------------------------------------------------------------- %% Scanning of the main beam.% ----------------------------------------------------------------------- %%scanPhases = antenna.elemPos.' * doa2wavevec(scanDoa,wavelength)%endfunction gettap1function [SLL, nbar] = taylorArguments(taperParam,noElem)% Gives default values and checks input parameters for Taylor tapers. if (isempty(taperParam(1))) % SLL in dB taperParam(1) = 30; end%if if (length(taperParam) == 1) % nbar %taperParam(2) = 12; % Suitable for 'taylor2' but not for 'taylor'. taperParam(2) = fix(noElem/2)-1; end%if chkdtype(taperParam(1), 'RealScalarT') chkdtype(taperParam(2), 'RealScalarT') SLL = taperParam(1); nbar = taperParam(2);%endfunction taylorArguments
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -