sara viqar_project report

Upload: sara-viqar

Post on 05-Apr-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 Sara Viqar_project Report

    1/16

  • 7/31/2019 Sara Viqar_project Report

    2/16

    Figures: No Target Present

  • 7/31/2019 Sara Viqar_project Report

    3/16

    Case 2: Single Target Present

    SNR=40dB

  • 7/31/2019 Sara Viqar_project Report

    4/16

    SNR

    30dB

  • 7/31/2019 Sara Viqar_project Report

    5/16

  • 7/31/2019 Sara Viqar_project Report

    6/16

    SNR

    15dB

  • 7/31/2019 Sara Viqar_project Report

    7/16

    Doppler Shift and Range Calculations

    Range: The targets range,R , is computed by measuring the time delay,del t ; it takes a pulse to

    travel the two-way path between the radar and the target. Since electromagnetic waves travel at

    the speed of light, c=3x10^8 , then

    Where R is in meters and del t is in seconds. The factor of is needed to account for the two-way time delay.

    Doppler Frequency Calculations: Radars use Doppler frequency to extract target radial

    velocity (range rate), as well as to distinguish between moving and stationary targets or objects

    such as clutter. The Doppler phenomenon describes the shift in the center frequency of an

    incident waveform due to the target motion with respect to the source of radiation. Depending on

    the direction of the targets motion this frequency shift may be positive or negative.

    Output

    -----------------------------------------------------------------

    Current distance of the target from the radar is

    delta_R = 225

  • 7/31/2019 Sara Viqar_project Report

    8/16

    Doppler shift introduced by the target is

    fd = 33.316666666666670

    Speed of your target is

    tv = 500 meter/sec

    Target is moving towards Radar

    Range Resolution:Range resolution, del R , is a radar metric that describes its ability to detecttargets in close proximity to each other as distinct objects. Radar systems are normally designed

    to operate between a minimum range ,R min and maximum range R max . The distance between

    Rmax and Rmin and is divided into M range bins (gates), each of width del R ,

    Targets separated by del R will be completely resolved.

    Case 3 and 4: Multiple Targets

    Unresolvable Targets (Targets present very close together )

    t1=1.5e-6; % time at which pulse1 was rcvdt2=1.8e-6; %time at pulse2 was[delta_R] = range_resolution_tgt(1e-6,t1,t2);

    OUTPUT:

    delta_R = 44.999999999999979

    your targets are not resolvable

  • 7/31/2019 Sara Viqar_project Report

    9/16

  • 7/31/2019 Sara Viqar_project Report

    10/16

    Resolvable targets (Targets present far apart)

    t1=1.5e-6; % time at which pulse1 was rcvdt2=2.7e-6; %time at pulse2 was[delta_R] = range_resolution_tgt(1e-6,t1,t2); % range or distance of target

    OUTPUT

    delta_R = 180

    Your targets are resolvable

    Figure: Resolvable Targets

  • 7/31/2019 Sara Viqar_project Report

    11/16

  • 7/31/2019 Sara Viqar_project Report

    12/16

    CODE:

    clc, clear all, close all

    %% Part OneA=2;f=10000000; %10000000;phi= pi/4;SNR=15;

    %% Carrier Wavestm=1/9;N=600;n=0:N-1;ts= 1/(7*f);fs=1/ts;y1=A*cos((2*pi*f*n*ts)+phi);figure()subplot(2,2,1)c=n*ts;plot(c,y1);axis([0 .000001 -3 3]);title('Carrier Wave (10 MHz)')grid

    %% Square Wavesubplot(2,2,2)fp=100; % 100 Pulses/ Secb=.5; % Amplitude% For 0.1 micro sec it wil be = (100% Duty Cycle /.01 Sec)*1 microsec=.01dc=0.01; % 'On' Pd of one square wave out of 100

  • 7/31/2019 Sara Viqar_project Report

    13/16

    fss=2*pi*fp;y2_o=b*square(fss*n*ts,dc);y2=y2_o + b;plot(c,y2);axis([0 .000008 -3 3]);

    title('Square Wave (100 Pulses)')grid

    %% Modulated Wavesubplot(2,2,3)y3=y1.*y2;plot(c,y3);axis([0 .000008 -3 3]);title('Modulated Signal')grid

    % delayed Signal

    d_t=15;delay=zeros(1,d_t);x=[delay y3];

    %noisy signalw=awgn(zeros(1,length(x)),SNR);x=x+w;%% Calculation of A_hat and Phi_hatM=length(y3(d_t+1:fs*1e-6+d_t+1));m=0:M-1;

    a1_h= (2/M-1).*sum(x(1:M).*cos(2*pi*f*m*fs));a2_h= (2/M-1).*sum(x(1:M).*sin(2*pi*f*m*fs));a_h= sqrt(a1_h^2 + a2_h^2);phi_h=atan(a2_h/a1_h);

    %% Frequency Estimation F-hat

    f_h=0;stm=-1/9;N=length(x);n=0:N-1;I_f1=[];subplot(224)plot(x);axis([0 600 -3 3]);title('Delayed Modulated Noisy Signal')grid

    for f1=f-5000:1:f+5000I_f=(1/N)*(abs (sum( x.*exp(-2*1i*pi*f1*n*ts))))^2;I_f1=[I_f1 I_f];if max(I_f1)>stmstm=max(I_f1);f_h=f1;

    end

  • 7/31/2019 Sara Viqar_project Report

    14/16

    end

    %Arrival Time Estimationref=-100;I_n=[];a1=1;

    % N=length(y3(d_t+1:fs*1e-6+d_t+1));a2=M;W=length(x);for k=1:W;

    a=a1:a2;if a2+1>W

    break;endI_n(k)=(1/M)*(abs(sum( x(a1:a2).*exp(-2*1i*pi*f*a*ts)))).^2;if I_n(k)>ref

    ref=I_n(k);N0=[a1 a2];I_n(k);

    end

    a1=a1+1; a2=a2+1;

    end

    [P,F]=periodogram(x,[],'twosided',N,fs);z=max(P);ind=find(P==z);F_est=F(ind(1))N0;

    % figure;% periodogram(x,[],'onesided',length(x),1/ts)

    % [b,f,t]=spectrogram(x);% %[b,F1,T1,P1]=spectrogram(x,512,256,F,1/ts)% % figure;% % mesh(t, f, (abs(b)));% % mesh(F1, T1, 10*log10(abs(b)));%% figure;% surf(t,f,abs(b));%

    %---------------------------------------------------------------------------------------------------------------------------------------------

    % Calculating Distance of the target

    t1=0; % time at which pulse was transmitted from radart2=1.5e-6; %time at which reflected pulse from the targe was received at theradartt=abs(t2-t1);

  • 7/31/2019 Sara Viqar_project Report

    15/16

    [delta_R] = range_resolution(tt,'s'); % range or distnce of target from theradar%% -------------------------------------------------------------------------------------------------------------------

    %Caculating Doppler Shiftang=0; % angle of target with respect to radar,tv=500; %velocity og target in meters per secondindicator=1; % 0 for target moving towards radar and 1 for target moving away[fd, tdr] = doppler_freq(f_h, ang, tv, indicator)

    disp('-----------------------------------------------------------------' )disp('current distance of the target from the radar is'); delta_Rdisp('Doppler shift introduced by the target is ');fddisp(' Speed of your target is ');tvdisp('meter/sec');disp('Target is moving towards Radar');disp('-----------------------------------------------------------------' )

    %-----------------------------------------------------------------------------------% Range Resuoluution

    t1=1.5e-6; % time at which pulse1 was rcvdt2=2.7e-6; %time at pulse2 wastt=abs(t2-t1);[delta_R] = range_resolution_tgt(1e-6,t1,t2); % range or distance of targetfrom the radar

    function [delta_R] = range_resolution_tgt(tau,t1,t2)

    c = 3.e+8;

    del_R =abs( c * (t2-t1) / 2.0);

    if del_R> c*tau/2disp('Your targets are resolvable')

    elsedisp('your targets are not resolvable')

    enddelta_R=del_R;return

    function [fd, tdr] = doppler_freq(freq, ang, tv, indicator)% This function computes Doppler frequency and time dilation factor ratio% tau_prime / tauformat longc = 3.0e+8;ang_rad = ang * pi /180.;

  • 7/31/2019 Sara Viqar_project Report

    16/16

    lambda = c / freq;if (indicator == 1)fd = 2.0 * tv * cos(ang_rad) / lambda;tdr = (c - tv) / (c + tv);elsefd = -2.0 * c * tv * cos(and_rad) / lambda;tdr = (c + tv) / (c -tv);endreturn

    function [delta_R] = range_resolution(bandwidth,indicator)% This function computes radar range resolution in meters% the bandwidth must be in Hz ==> indicator = Hz.% Bandwidth may be equal to (1/pulse width)==> indicator = secondsc = 3.e+8;if(indicator == 'hz')delta_R = c / (2.0 * bandwidth);elsedelta_R = c * bandwidth / 2.0;endreturn