% % Title: UWB BPSK Fifth Order Derivative
% % Author: J C
% % Summary: Models UWB TX and RX using BPSK fifth derivative.
% % MATLAB Release: R13
% % Description: This m file models a UWB system using BPSK with the fifth order derivative
% % of the gaussian pulse with correlation receiver and intgrator.
% %
%UWB-Run from editor debug(F5)-BPSK modulation and link analysis of
%UWB fifth derivative Revised 1/24/05-JC
%This m file plots the time and frequency waveforms for BPSK fifth derivative
%equation of gaussian pulse used in UWB system analysis. The fifth
%derivative waveform equation is obtained by use of the symbolic processor in
%matlab.You would actually use the fourth derivative of the gaussian
%monocycle which is t/pw*exp(-t^2/pw^2).Procedure as follows:
%syms t pw
%t/pw*exp(-t^2/pw^2)enter
%diff(ans,t,4)
%ans=60/pw^5*t*exp(-t^2/pw^2)-80/pw^7*t^3*exp(-t^2/pw^2)+16*t^5/pw^9*exp(-t^2/pw^2)
%set pw=1 to normalize and do an ezplot(ans) and you should get a plot of the fifth order
%derivative which has 5 zero crossings.It is apparent from previous files that the 1st and
%second derivative pulses will not meet the FCC spectral mask without
%reducing the transmitter power. The fifth order derivative meets the FCC
%mask without a reduction in power. It also retains a wide 3DB and 10DB bandwidth.
%One may ask how to generate these pulses at the transmitter. You could
%take a baseband pulse and process it thru three differential highpass circuits(CR's) and
%use a TX antenna that differentiates the pulse twice for fifth order. Assume
%the RX antenna does not differentiate or integrate to preserve for fifth
%order template(assuming a template is required).It may be possible
%(for short distances and very high bit rates),to use DSSS(for smoothing and multiple access)with
%a differential PSK(DPSK) scheme(squaring circuit with delay in one leg)
%and FEC coding.This would solve a lot of design problems.
%You would only lose several DB of Eb/No(1e-3) and would not require generation of a template at
%the receiver for syncronization assuming timing jitter can be held to a minimum.There may
%be other types of waveforms that will reduce the jitter and allow comparator and
%clocked flip flop use instead of a high speed ADC.
%Antenna and path distortion would be lessened using DPSK. The characteristics
%of the fifth order waveform are as follows and which you can verify are:
%pw(tail to tail)=~.5e-9
%fc=~7Ghz
%3DB fl to fh=~3GHz
%10DB fl to fh=~6GHz
%I would suggest you review other files published under UWB to get an
%idea of the programs usage.
%================================================
clear
Fs=100e9;%sample frequency
Fn=Fs/2;%Nyquist frequency
t=-.3e-9:1/Fs:45e-9;%time vector sampled at Fs Hertz. zoom in/out using (-1e-9:1/Fs:xxxx)
%================================================
% EQUATIONS
%================================================
%y=A*(t/pw).*exp(-(t/pw).^2);%1st derivative of Gaussian pulse=Gaussian monocycle
%y =1*(1 - 4*pi.*((t)/pw).^2).* exp(-2*pi.*((t)/pw).^2);%2nd derivative of Gaussian
%pulse=doublet(two zero crossings)
pw=75e-12;%value sets pulse width of fifth derivative looking at figure 1
y=((60./pw.^5).*(t-0).*exp(-(t-0).^2./pw.^2)-(80./pw.^7).*(t-0).^3.*exp(-(t-0).^2./pw.^2)+ ...
(16.*(t-0).^5./pw.^9.*exp(-(t-0).^2/pw.^2)));%Fifth derivative of Gaussian pulse.(5 zero crossings)
%================================================
%NOISE SETUP FOR BER AND SNR
%================================================
noise=(1e-50)*(randn(size(t)));%(Noise-AWGN)Set to 1e-50 to disable
%================================================
%BPSK OR BI-PHASE MODULATION
%================================================
%The following series of equations sets the pulse recurring frequency(PRF)
%at 200MHz(waveform repeats every 5e-9 sec and a
%modulated bit stream(bit rate=200Mb/s)of 10101 (5 pulses,can add more)
%where a {1=0 degrees(right side up) and a 1 bit} and a {-1=180
%degrees(upside down) a 0 bit.}
%==================================================
% FIFTH DERIVATIVE(BPSK) WITH 5 PULSES)
%==================================================
%BPSK modulated fifth(yp)
A=.6e-45;%sets voltage level out of TX or input to mixer(.6e-45 for .3mv volt peak)
yp=A*y+ ...
-A*((60./pw.^5).*(t-5e-9).*exp(-(t-5e-9).^2./pw.^2)-(80./pw.^7).*(t-5e-9).^3.*exp(-(t-5e-9).^2./pw.^2)+ ...
(16.*(t-5e-9).^5./pw.^9.*exp(-(t-5e-9).^2/pw.^2)))+ ...
A*((60./pw.^5).*(t-10e-9).*exp(-(t-10e-9).^2./pw.^2)-(80./pw.^7).*(t-10e-9).^3.*exp(-(t-10e-9).^2./pw.^2)+ ...
(16.*(t-10e-9).^5./pw.^9.*exp(-(t-10e-9).^2/pw.^2)))+ ...
-A*((60./pw.^5).*(t-15e-9).*exp(-(t-15e-9).^2./pw.^2)-(80./pw.^7).*(t-15e-9).^3.*exp(-(t-15e-9).^2./pw.^2)+ ...
(16.*(t-15e-9).^5./pw.^9.*exp(-(t-15e-9).^2/pw.^2)))+ ...
A*((60./pw.^5).*(t-20e-9).*exp(-(t-20e-9).^2./pw.^2)-(80./pw.^7).*(t-20e-9).^3.*exp(-(t-20e-9).^2./pw.^2)+ ...
(16.*(t-20e-9).^5./pw.^9.*exp(-(t-20e-9).^2/pw.^2)));
%-A inverts waveform
%unmodulated fifth(yum)
B=.6e-45;%sets voltage level
yum=B*y+ ...
B*((60./pw.^5).*(t-5e-9).*exp(-(t-5e-9).^2./pw.^2)-(80./pw.^7).*(t-5e-9).^3.*exp(-(t-5e-9).^2./pw.^2)+ ...
(16.*(t-5e-9).^5./pw.^9.*exp(-(t-5e-9).^2/pw.^2)))+ ...
B*((60./pw.^5).*(t-10e-9).*exp(-(t-10e-9).^2./pw.^2)-(80./pw.^7).*(t-10e-9).^3.*exp(-(t-10e-9).^2./pw.^2)+ ...
(16.*(t-10e-9).^5./pw.^9.*exp(-(t-10e-9).^2/pw^2)))+ ...
B*((60./pw.^5).*(t-15e-9).*exp(-(t-15e-9).^2./pw.^2)-(80./pw.^7).*(t-15e-9).^3.*exp(-(t-15e-9).^2./pw.^2)+ ...
(16.*(t-15e-9).^5./pw.^9.*exp(-(t-15e-9).^2/pw.^2)))+ ...
B*((60./pw.^5).*(t-20e-9).*exp(-(t-20e-9).^2./pw.^2)-(80./pw.^7).*(t-20e-9).^3.*exp(-(t-20e-9).^2./pw.^2)+ ...
(16.*(t-20e-9).^5./pw.^9.*exp(-(t-20e-9).^2/pw.^2)));
ym=yp+noise;%BPSK modulated fifth with noise
%yum=yum+noise;%use this to put noise on unmodulated pulse train for DPSK
%squaring circuit use.
yc=ym.*yum;%yc(correlated output)=ym(modulated)times yum(unmodulated) fifth.
%This is where the correlation occurs in the receiver and would be the
%mixer in the receiver.
%==================================================
% FFT
%==================================================
%new FFT for BPSK modulated fifth(ym)
NFFYM=2.^(ceil(log(length(ym))/log(2)));
FFTYM=fft(ym,NFFYM);%pad with zeros
NumUniquePts=ceil((NFFYM+1)/2);
FFTYM=FFTYM(1:NumUniquePts);
MYM=abs(FFTYM);
MYM=MYM*2;
MYM(1)=MYM(1)/2;
MYM(length(MYM))=MYM(length(MYM))/2;
MYM=MYM/length(ym);
f=(0:NumUniquePts-1)*2*Fn/NFFYM;
%new FFT for unmodulated fifth(yum)
NFFYUM=2.^(ceil(log(length(yum))/log(2)));
FFTYUM=fft(yum,NFFYUM);%pad with zeros
NumUniquePts=ceil((NFFYUM+1)/2);
FFTYUM=FFTYUM(1:NumUniquePts);
MYUM=abs(FFTYUM);
MYUM=MYUM*2;
MYUM(1)=MYUM(1)/2;
MYUM(length(MYUM))=MYUM(length(MYUM))/2;
MYUM=MYUM/length(yum);
f=(0:NumUniquePts-1)*2*Fn/NFFYUM;
%new FFT for correlated pulses(yc)
%yc is the time domain signal output of the multiplier
%(modulated times unmodulated) in the correlation receiver. Plots
%in the time domain show that a simple comparator and clocked flip flop instead of high speed A/D's
%may be used to recover the 10101 signal depending on integrator design and level of
%peak voltage into mixer.
NFFYC=2.^(ceil(log(length(yc))/log(2)));
FFTYC=fft(yc,NFFYC);%pad with zeros
NumUniquePts=ceil((NFFYC+1)/2);
FFTYC=FFTYC(1:NumUniquePts);
MYC=abs(FFTYC);
MYC=MYC*2;
MYC(1)=MYC(1)/2;
MYC(length(MYC))=MYC(length(MYC))/2;
MYC=MYC/length(yc);
f=(0:NumUniquePts-1)*2*Fn/NFFYC;
%===================================================
% PLOTS
%===================================================
%plots for modulated fifth(ym)
figure(1)
subplot(2,2,1); plot(t,ym);xlabel('TIME');ylabel('AMPLITUDE');
title('Modulated pulse train');
grid on;
%axis([-1e-9,27e-9 -1 2])
subplot(2,2,2); plot(f,MYM);xlabel('FREQUENCY');ylabel('AMPLITUDE');
%axis([0 20e9 0 .0001]);%zoom in/out
grid on;
subplot(2,2
评论0