📄 dbtex70.m
字号:
%DBTEX70 An example of performing radar signal processing on and plotting of measured radar signals from FOA experimental antenna.%% Radar-like measurements in anechoic chamber with FOA's experimental % digital array antenna.% This file is a changed copy of m1078a.m and m1078aplot.m.% The resulting graphs of this main program were puplished in:% Bj鰎klund S., Grahn P., Pettersson L.: "Radar-Like Measurements with% an Experimental Digital Beamforming Array Antenna", Proceedings of the % International Radar Symposium IRS 98, Munich, Germany, 15-17 September% 1998, pp. 993-1002.% Sampling frequency before down conversion fs1 = 25.8e6 Hz.% Sampling frequency after down conversion (in DBT) fs = 25.8e6/4 Hz% = 6.45e6 Hz.% Period time (after down conversion) T = 1/6.45e6 s (about 0.155e-6 s)% * DBT, A Matlab Toolbox for Radar Signal Processing *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.% Start : 980520 Svante Bj鰎klund (svabj).% Latest change: $Date: 2001/08/31 14:49:36 $ $Author: svabj $.% $Revision: 1.3 $% *****************************************************************************%% ----------------------------------------------------------------------- %% Read measured signals.% ----------------------------------------------------------------------- %%---- Define the antenna. ----ant = defant('expAnt');%---- .dbs- and .dbc-files to use. ----expFileNamePath = '';expFileName = 'm1078';expFileName = [expFileNamePath,expFileName] % File names.%---- Set calibration compensation to use. ----setcal1('wctab',[expFileName, '.dbc'])%---- Read the received antenna signals. ----load code1079a % Fetch the pulscode in the variable X. % Pulscode taken from measured signal (without calibration compensation).pModulation = X;sig = expsig1(ant,[expFileName, '.dbs'],[],[],[],[],pModulation);%---- Calibration compensation of the signals. ----sig10 = sigcomp2(sig,[expFileName, '.dbc'], 'Ccmp',[],'nearfldcomp',0);% ----------------------------------------------------------------------- %% Processing.% ----------------------------------------------------------------------- %%---- Processing parameters ----PRF = 8.0625e+03;doaPos = d2r(-50:2:50); % Do conventional beamforming in these % directions.doaPosDOA = d2r(-50:0.2:50);% Estimate DOA spectra in these directions.noDopChan = 128; % Number of doppler channels.%---- Pulse compression ----sig3 = pulscomp(sig,pModulation);%---- Doppler filtering ----sig4 = dfb2(sig3,[],noDopChan);%---- Spacial processing: ----%---- Conventional beamforming ---- sig2 = dbf(sig4,doaPos);%---- High resolution direction estimation ---- spect20 = doaspc1('music',sig4,[],doaPos,[],1:256); doaPos = spect20.doaPos; sig20 = doaspc2sig(spect20);% ---- DOA estimation for a single range. ---- spectCBF74 = doaspc1('cbf',sig4,[],doaPosDOA,[],74); spectMUSIC74 = doaspc1('music',sig4,[],doaPosDOA,[],74); spectCBF97 = doaspc1('cbf',sig4,[],doaPosDOA,[],97); spectMUSIC97 = doaspc1('music',sig4,[],doaPosDOA,[],97);% ----------------------------------------------------------------------- %% Plotting.% ----------------------------------------------------------------------- %% The first target probably starts in range bin 11 and ends in range bin 64.% Thesecond target probably starts in range bin% ---- Some system parameters ----global c0; % Speed of light.fs = 25.8e6/4; % Sampling frequency after down conversion.T = 1/fs; % Period time (after down conversion).Kfore = 1; % with 3.225 MHz. This means twice as many samples % with 6.45 Mhz.% ---- Plot parameters. ----printFlag = 0 % 1 = print to eps-files. 0 = do not print.set(0,'DefaultAxesFontSize',8)set(0,'DefaultAxesFontAngle','italic')colMap = hot;pulseIx = 96; % Doppler channel 96 has the largest value for direction 0 degrees. % Two smaller peaks are located at 88 and 90. % For direction -14 degrees (beam 19 when doaPos == d2r(-50:2:50)), % the peaks are in the same doppler channels.rangeIxRange = 1:200; % Plot for these range bins plotting several range bins.rangeIx = 15; % Plot for this range bin when plotting only one bin.scaleType = 'lin'; %pulAxis = [];ranAxis = [];%ranAxis = (rangeIxRange + 2*Kfore) * T * c0;spaAxis = r2d(doaPos);pulAxis = linspace(-PRF/2, PRF/2, noDopChan);fprintf('Study signal for doppler frequency %g Hz.\n',pulAxis(pulseIx));% ----------------------------------------------------------------------- %% Esimate SNR.% ----------------------------------------------------------------------- %pulse = 20;channel = 6;noisePower = mean(abs(sig.signals(pulse,107:256,channel)).^2);tgt1Power = mean(abs(sig.signals(pulse,11:32,channel)).^2);tgt2Power = mean(abs(sig.signals(pulse,78:96,channel)).^2);SNR1 = 10*log10(tgt1Power/noisePower)SNR2 = 10*log10(tgt2Power/noisePower)% ----------------------------------------------------------------------- %% Plot Direction - Range slice.% ----------------------------------------------------------------------- %%figuresigplot2(sig2,pulseIx,rangeIxRange,':', ... {'scaleType','lin', ... 'ranAxis',ranAxis, ... 'spaAxis',spaAxis, ... 'normType', 'max'})shading flattitle('Direction-range slice.')xlabel('Direction [degrees]')%ylabel('Range [m]')xlim(r2d([doaPos(1), doaPos(length(doaPos))]))ylim([rangeIxRange(1) rangeIxRange(length(rangeIxRange))])plotaline([-13 0],'a',0.02)plotaline('a',[74 96.5],0.03)colormap(colMap)if (printFlag) printfm('m1078aplot2.eps',[],8)end%if% This plot seems strangely enough be the same for doppler channels 1 and 96.% But can the the signal be present in all doppler channels?% ----------------------------------------------------------------------- %% Plot DOA spectra for all ranges.% ----------------------------------------------------------------------- %figure[d1,d2,d3,d4,d5,h] = sigplot2(sig20,1,rangeIxRange,':', ... {'scaleType','lin', ... 'plotType','surfl',... 'ranAxis',ranAxis, ... 'spaAxis',spaAxis, ... 'normType', 'max'});shading flat%title('After beamforming.')title('DOA spectrum')xlabel('Direction [degrees]')%ylabel('Range [m]')xlim(r2d([doaPos(1), doaPos(length(doaPos))]))ylim([rangeIxRange(1) rangeIxRange(length(rangeIxRange))])plotaline([-13 0],'a',0.01)plotaline('a',[74 96.5],0.01)colormap(colMap)if (printFlag) printfm('m1078aplot3.eps',[],8)end%if% ----------------------------------------------------------------------- %% Plot DOA spectra for the target ranges (74 and 97) only.% ----------------------------------------------------------------------- %sigMUSIC74 = doaspc2sig(spectMUSIC74);sigCBF74 = doaspc2sig(spectCBF74);figurehold onsigsize(sigMUSIC74)sigplot2(sigMUSIC74,1,1,':', ... {'scaleType','log', ... 'normType', 'max', ... 'normMaxLevel', 1, ... 'spaAxis',r2d(doaPosDOA), ... 'lineSpec' ,'b'})sigplot2(sigCBF74,1,1,':', ... {'scaleType','log', ... 'normType', 'max', ... 'normMaxLevel', 1, ... 'spaAxis',r2d(doaPosDOA), ... 'lineSpec' ,'r--'})ylim([-35 5])plotxline([-13 0],[],'-.')hold offgridlegend('MUSIC','Conv. beamform.')xlabel('Direction [degrees]')title('Range bin 74')if (printFlag) printfm('m1078aplot4.eps',[],8)end%ifsigMUSIC97 = doaspc2sig(spectMUSIC97);sigCBF97 = doaspc2sig(spectCBF97);figurehold onsigplot2(sigMUSIC97,1,1,':', ... {'scaleType','log', ... 'normType', 'max', ... 'normMaxLevel', 1, ... 'spaAxis',r2d(doaPosDOA), ... 'lineSpec' ,'b'})sigplot2(sigCBF97,1,1,':', ... {'scaleType','log', ... 'normType', 'max', ... 'normMaxLevel', 1, ... 'spaAxis',r2d(doaPosDOA), ... 'lineSpec' ,'r--'})ylim([-35 5])plotxline([-13 0],[],'-.')hold offgridlegend('MUSIC','Conv. beamform.')xlabel('Direction [degrees]')title('Range bin 97')if (printFlag) printfm('m1078aplot5.eps',[],8)end%if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -