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

📄 spapulfilt.m

📁 阵列信号处理的工具箱
💻 M
📖 第 1 页 / 共 2 页
字号:
if (iscell(method))  keywordList = method;  lenExtra = length(keywordList);  if (mod(lenExtra,2) ~= 0), error('DBT-Error: Keyword value missing.'),end%if  for n = 1:2:length(keywordList)    eval([keywordList{n} '= keywordList{n+1};' ]);  end%for nend%ifarginNo = arginNo +1;% ****************** Get signals sizes. ******************sigSizeIn = sigsize(sigIn);sigSizeIn(7) = 1;  % To make possible to use the same code for 1D- and 2D-filtering.  % When 1D-filtering assign sigDim2 = 7. When 2D-filtering assign  % sampleDim = 7, since then we only want to filt one sample at a time  % because of memory usage and because the program cannot handle  % several samples when 2D-filtering.  % The constant "only1DDim" is equal to 7 and should be used when testing  % the value of sigDim1, sigDim2 and sampleDim.noTrials  = sigSizeIn(6);noCpis    = sigSizeIn(5);noExtras  = sigSizeIn(4);noBeams   = sigSizeIn(3);noRanges  = sigSizeIn(2);noPulses  = sigSizeIn(1);% ****************** Default values ******************if isempty(method)  method = 'cbf';end%ifif isempty(model)  model = {sigIn.antenna, sigIn.waveform};end%ifantenna = model{1};waveform = model{2};PRI = waveform.noRangeBins * waveform.sampleTime;PRF = 1/PRI;  % NFFtempModelParam = {{[] []} {[] []}};  % NFF: Change to suitable default values.if isempty(modelParam)  modelParam = tempModelParam;else  tempModelParam(1:length(modelParam)) = modelParam;  modelParam = tempModelParam;end%ifspaModelParam = modelParam{1};pulModelParam = modelParam{2};subArrPoint = spaModelParam{1};focusDist = spaModelParam{2};if isempty(subArrPoint)  subArrPoint = [0 0].';end%ifif isempty(focusDist)  focusDist = Inf;end%if  % NFFif isempty(doaFreqChoice)  %beamChoice = d2r(-80:2:80);  beamChoice = linspace(d2r(-90),d2r(90), antenna.noElem+1);  beamChoice = beamChoice(:,1:(size(beamChoice,2)-1));  %beamChoice = beamChoice(:,1:4)  beamChoice = [beamChoice; zeros(1,length(beamChoice))];  freqChoice = genfreqaxis(0,PRF,noPulses).';  doaFreqChoice = {beamChoice,freqChoice};    % NFF: Change to a suitable default value for "doaFreqChoice".end%ifif isempty(taperCoeff)  taperCoeff = [];end%ifif isempty(interCorrMat)  interCorrMat = [];end%ifif isempty(steVecFlag)  steVecFlag = 1;end%ifif isempty(extraParam)  extraParam = [];end%ifif isempty(orthBeamFlag)  orthBeamFlag = 0;end%ifif isempty(normType)  normType = [];end%ifif isempty(normLevel)  normLevel = [];end%ifif isempty(sampleDim)  sampleDim = only1DDim;    % "only1DDim" = Use only one sample at a time.    % NFF: Change to a suitable dimension.end%if% ************* Pick out some more fields from input parameters. *************if (length(waveform.wavelength) > 1)  error('DBT-Error: Can only handle one wavelength.')end%iflambda = waveform.wavelength;  % NFF% ****************** Error check input parameters ******************chkdtype(sigIn, 'RxRadarSigT')chkdtype(method, 'StringT')chkdtype(model, 'CellArrayT')chkdtype(spaModelParam, 'CellArrayT')chkdtype(pulModelParam, 'CellArrayT')chkdtype(subArrPoint, 'Vector of DoaT')chkdtype(taperCoeff, 'CxVectorT')chkdtype(interCorrMat, 'CxMatrixT', 'EmptyT')%if (sampleDim ~= only1DDim)%  error('DBT-Error: "sampleDim" cannot be chosen for this function.')%end%if  % NFF: Check any special input parameters.% ----------------------------------------------------------------------- %% Preparations before calculations.% ----------------------------------------------------------------------- %% *************** Adjustments for different methods. ***************%In: method, extraParam, sigSizeIn, sigDim1, sigDim2, PRF, waveform, doaFreqChoice, interCorrMat %Out: steMatIn, beamPosOut, freqPosOut, noBeamsOut, noFreqsOut, interCorrMatif (strcmp(method,'fft') | strcmp(method,'ifft'))  % Special case when the number of output channels are not determined by   % "doaFreqChoice".  dbterror('FFT or IFFT can not be used with this function.')  % The following code is not finnished.  if isempty(extraParam)    extraParam = sigSizeIn(sigDim1) * sigSizeIn(sigDim2);      %sigSizeIn(sigDim2);  end%if  extraParam = extraParam;  noBeamsOut = extraParam(1);  noFreqsOut = extraParam(2);  extraParam = extraParam(1) * extraParam(2);   % Is this the correct value for "extraParam"?   % For the FFT method in the functions "calcfiltinit" and "calcfiltproc"   % the parameter "extraParam" means the number of output channels or the   % size of the output signal vector.  steMatIn = [];  interCorrMat = [];  beamPosOut  = [];    % This should be the DOAs of the beams created by FFT. NFF:   freqPosOut = genfreqaxis(0,PRF,noFreqsOut).';    % NFF: else  % The case when the number of frequencies are determined by   % the size of "doaFreqChoice".  spaParams = {lambda, focusDist, subArrPoint};  pulParams = {};  steMatIn = spapulstemat(model, doaFreqChoice, {spaParams,pulParams});    % NFF: Call the right function with the right parameters.  noBeamsOut = size(doaFreqChoice{1},2);  noFreqsOut = size(doaFreqChoice{2},2);    % Shall it be the number of columns?  beamPosOut  = doaFreqChoice{1};  freqPosOut = doaFreqChoice{2};end%if% ****************** Create output variable. ******************sigOut = sigIn;		% Copy all fields to output signal.sigSizeOut = [noFreqsOut,noRanges, noBeamsOut, noExtras, noCpis,noTrials, 1];  % The last "1" is to make possible to use the same code for 1D- and   % 2D-filtering. See the comment above about "sigSizeIn".  % NFF: Move "noFreqsOut" and "noBeamsOut" to the right subscripts.% ----------------------------------------------------------------------- %% Do the filtering.% ----------------------------------------------------------------------- %calcInitParams = {taperCoeff, interCorrMat, orthBeamFlag, extraParam, ...  normType, normLevel};  % This parameter contains all input parameters   % after "steMat" to function "calcfiltinit". See the help text of the   % function "calcfiltinit" for more information. Most of these parameters  % are also used by the function "calcfiltproc".[signalsOut, basisMat, freqPos] = calcfiltsig(sigIn.signals, 'spapulfilt',...  [sigDim1, sigDim2], sampleDim, sigSizeIn, sigSizeOut, steMatIn,...  method, calcInitParams, interChoice, modCorrmParam);  % Filter the whole radar signal. A signal vector sample or snapshot  % consists of the dimensions "sigDim1" and "sigDim2". All samples from  % the dimension "sampleDim" are filtered simultaneously.% ----------------------------------------------------------------------- %% Output variables.% ----------------------------------------------------------------------- %sigOut.signals = signalsOut;sigOut = setspapultrans(sigOut, basisMat);  % NFF: Call the right function.% For Capon, only the non-adapted steering matrix is stored. See the function% "calcfiltinit".sigOut.doaPos = beamPosOut;sigOut.freqPos = freqPosOut;  % NFF: Assign the right field in the output function.doaFreqPosOut = {beamPosOut, freqPosOut};%endfunction spapulfilt

⌨️ 快捷键说明

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