📄 normcohpulse.m
字号:
function [sigOut, normVec] = normcohpulse(sigIn, method, param1)%NORMCOHPULSE Makes a radar signal coherent between pulses.%%--------%Synopsis:% sigOut = normcohpulse(sigIn)% sigOut = normcohpulse(sigIn,[], refRangeBin)% sigOut = normcohpulse(sigIn,'refran', refRangeBin)% sigOut = normcohpulse(sigIn,'normvec', normVec)%%Description:% Normalizes the phase of a radar signal to make the signal coherent% between pulses.%%Output and Input:% sigOut (RxRadarSigT) : Radar signal after normalization.%% sigIn (RxRadarSigT) : Radar signal before normalization.% refRangeBin [D](IntScalarT): Which range bin to take as reference. % This range bin should contain a strong piece of the transmitted signal% and no received signal. Default is 12, since this range bin contains% the transmitted puls when using the special measurement arrangements% used at FOA in the autumn 1999.%%--------%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:%%Software Quality:% (About what is done to ascertain software quality. What tests are done.)% Not tested yet.%%Known Bugs:%%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:% normsig, uistart% * DBT, A Matlab Toolbox for Radar Signal Processing *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%% Start : 991104 Svante Bj鰎klund (svabj).% Latest change: $Date: 2000/10/16 15:21:12 $ $Author: svabj $.% $Revision: 1.2 $% *****************************************************************************% ----------------------------------------------------------------------- %% Handle input parameters% ----------------------------------------------------------------------- %arginNo=1;if (nargin < arginNo) error('DBT-Error: To few input parameters.')end%ifarginNo = arginNo +1;% ****************** Add missing input parameters ******************if (nargin < arginNo) method = [];end%ifarginNo = arginNo +1;if (nargin < arginNo) param1 = [];end%ifarginNo = arginNo +1;% ****************** Default values ******************if isempty(method) method = [];end%ifif isempty( param1) param1 = 14; % This range bin contains the transmitted puls when using the % special measurement arrangements used at FOA in the autumn 1999.end%if% ****************** Error check input parameters ******************chkdtype(sigIn, 'RxRadarSigT')chkdtype(param1, 'IntScalarT')% ****************** Create output variable ******************sigOut = sigIn;% ----------------------------------------------------------------------- %% RxRadarSigT: Radar signals.% ----------------------------------------------------------------------- % % ****************** Signal size ****************** sizeSpec = sizem(sigIn.signals); noPulses = sizeSpec(1); noRanges = sizeSpec(2); noChannels = sizeSpec(3); noExtras = sizeSpec(4); noCPIs = sizeSpec(5); noTrials = sizeSpec(6);if (1) normVec = exp(-j*angle(squeeze(sigIn.signals(:,param1,1)))); % Get the phase of the reference range bin in each PRI. % Use antenna channel 1. normMat = repmat(normVec(:), [1, sizeSpec(2:6)]); % Create a large matrix with corrections for the following multiplication. sigOut.signals = sigOut.signals .* normMat; % By element-wise multiplication the signal is normed so that the % reference range bin in all PRIs will have the same phase (in our case % phase zero).else disp('oldcoh')% This code is not finnished. AntennaChannel = 1; % ****************** Loops ****************** for trialLoop = 1:noTrials for cpiLoop = 1:noCPIs for extraLoop = 1:noExtras for rangeLoop = 1:noRanges %sigMat = getm3(sigIn.signals, 3, [], ':',rangeLoop, ':', ... % extraLoop, cpiLoop, trialLoop); norm = exp(-j*angle(squeeze(sigIn.signals(:,param1,... AntennaChannel)))) * ones(1,size(sigIn.signals,3)); for k = 1:size(sigIn.signals,2) sigIn.signals(:,k,:) = squeeze(sigIn.signals(:,k,:)).*norm; end%for %sigOut.signals(:,rangeLoop,:,extraLoop,cpiLoop,... % trialLoop) = sigOut.signals(:,rangeLoop,:,extraLoop,cpiLoop,... % trialLoop) / sqrt(noisePower); % % Normalize the signal to the noise amplitude. end%for rangeLoop end%for extraLoop infoStr = sprintf(['normcohpulse: cpiLoop = %d(%d), ',... 'rangeLoop = %d(%d)\r'], cpiLoop, noCPIs, rangeLoop, noRanges); dbtinfo(infoStr,1); end%for cpiLoop dbtinfo(''); %New line. end%for trialLoopend%if (1)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -