📄 uwb_analysis.mht
字号:
From: <Microsoft Internet Explorer 5 ile kaydedildi>
Subject:
Date: Wed, 18 Feb 2009 21:22:51 +0200
MIME-Version: 1.0
Content-Type: text/html;
charset="windows-1254"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.mathworks.com/matlabcentral/fx_files/6632/1/UWB_analysis.m
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1254">
<META content=3D"MSHTML 6.00.2900.3492" name=3DGENERATOR></HEAD>
<BODY><PRE>%UWB-Run from editor debug(F5)-PPM(pulse position =
modulation)and link analysis of
%UWB monocycle and doublet waveforms.
%This m file plots the time and frequency waveforms for PPM 1st and 2nd =
derivative=20
%equations used in UWB system analysis. Fudge factors are required to
%correct for inaccuracies in the 1st and 2nd derivative equations.
%Tail to tail on the time wave forms must be considered as the actual =
pulse width.=20
%7*PW1 has about 99.9% of the signal power. The frequency spreads and =
center=20
%frequencies(fc=3Dcenter of the spread)are correct as you can =
verify(fc~1/pw1).
%Change pw(fudge factor)and t for other entered(pw1) pulse widths and
%zooming in on the waveforms.A basic correlation receiver is constructed
%showing the demodulated output information from a comparator(10101). =
Perfect sync
%is assumed in the correlation receiver.
%See SETUP and other info at end of program.
%The program is not considered to be the ultimate in UWB link analysis, =
but is=20
%configured to show basic concepts of the new technology. =20
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
pw1=3D.5e-9;%pulse width in nanosec,change to desired width
pw=3Dpw1/2.5;%Fudge factor for inaccurate PWs(approx. 4-5 for 1st der. =
and
%approx. 2-3 for 2nd der.)
Fs=3D100e9;%sample frequency
Fn=3DFs/2;%Nyquist frequency
t=3D-1e-9:1/Fs:20e-9;%time vector sampled at Fs Hertz. zoom in/out using =
(-1e-9:1/Fs:xxxx)
A=3D1;
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =
% EQUATIONS
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
%y=3DA*(t/pw).*exp(-(t/pw).^2);%1st derivative of Gaussian =
pulse=3DGaussian monocycle
y =3DA*(1 - 4*pi.*((t)/pw).^2).* exp(-2*pi.*((t)/pw).^2);%2nd derivative =
of Gaussian
%pulse=3Ddoublet(two zero crossings)
% y=3Dy.*sin((2*pi*t*4.5e9).^2)%spectrum notches(multipath)
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
%This series of pulses sets the pulse recurring frequency(PRF)
%at 400MHz(waveform repeats every 2.5e-9 sec)and a
%modulated bit stream(info bit rate=3D200MHz) of 10101 (5 pulses,can add =
more)
%using 0.2e-9 as the time delay PPM where a delay =3D a 0 bit and no =
delay =3D a 1 bit.=20
%One could expand the # of pulses and modulate for a series of
%111111000000111111000000111111 which would give a lower bit rate. You =
could just
%change the PRF also.This series of redundent pulses also improves the =
processing gain
%of the receiver by giving more voltage out of the integrator in a =
correlation
%receiver. For loops or some other method could be used to generate =
these pulses but for
%myself, I would get lost. This is a brute force method and I can easily =
copy and paste.
%I will leave that for more energetic souls. Since we basically have the =
transmitter
%implemented it's time to move on to the correlation receiver design=20
%and and add interference, multipath and noise with BER capability to
%see if we can demodulate and get 10101 bits out at the 200MHz =
information bit rate.=20
% (changed pattern from previous file to 10101)
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
% 1ST DERIVATIVE MONOCYCLE(PPM WITH 5 PULSES)
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
%yp=3Dy+ ...
%A*((t-2.5e-9-.2e-9)/pw).*exp(-((t-2.5e-9-.2e-9)/pw).^2)+A*((t-5e-9)/pw).=
*exp(-((t-5e-9)/pw).^2)+ ...
%A*((t-7.5e-9-.2e-9)/pw).*exp(-((t-7.5e-9-.2e-9)/pw).^2)+A*((t-10e-9)/pw)=
.*exp(-((t-10e-9)/pw).^2);
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
% 2ND DERIVATIVE DOUBLET(PPM WITH 5 PULSES)
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
%modulated doublet
yp=3Dy+ ...
A*(1-4*pi.*((t-2.5e-9-.2e-9)/pw).^2).*exp(-2*pi.*((t-2.5e-9-.2e-9)/pw).^2=
)+ ...
A*(1-4*pi.*((t-5.0e-9)/pw).^2).*exp(-2*pi.*((t-5.0e-9)/pw).^2)+ ...
A*(1-4*pi.*((t-7.5e-9-.2e-9)/pw).^2).*exp(-2*pi.*((t-7.5e-9-.2e-9)/pw).^2=
)+ ...
A*(1-4*pi.*((t-10e-9)/pw).^2).*exp(-2*pi.*((t-10e-9)/pw).^2);
%unmodulated doublet
B=3D1;%This shows how the anplitude matching of templet and modulated =
signal
%plays an important part. Would require AGC on first LNA to hold =
modulated
%sig constant within an expected multipath range.(B=3D.4 to .5 causes =
errors). =20
yum=3DB*y+ ...
B*(1-4*pi.*((t-2.5e-9)/pw).^2).*exp(-2*pi.*((t-2.5e-9)/pw).^2)+ ...
B*(1-4*pi.*((t-5.0e-9)/pw).^2).*exp(-2*pi.*((t-5.0e-9)/pw).^2)+ ...
B*(1-4*pi.*((t-7.5e-9)/pw).^2).*exp(-2*pi.*((t-7.5e-9)/pw).^2)+ ...
B*(1-4*pi.*((t-10e-9)/pw).^2).*exp(-2*pi.*((t-10e-9)/pw).^2);
yc=3Dyp.*yum;%yc(correlated output)=3Dyp(modulated)times =
yum(unmodulated) doublet.
%This is where the correlation occurs in the receiver and would be the
%first mixer in the receiver.=20
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
% FFT
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
%new FFT for modulated doublet
y=3Dyp;%y=3Dmodulated doublet
NFFY=3D2.^(ceil(log(length(y))/log(2)));
FFTY=3Dfft(y,NFFY);%pad with zeros
NumUniquePts=3Dceil((NFFY+1)/2);=20
FFTY=3DFFTY(1:NumUniquePts);
MY=3Dabs(FFTY);
MY=3DMY*2;
MY(1)=3DMY(1)/2;
MY(length(MY))=3DMY(length(MY))/2;
MY=3DMY/length(y);
f=3D(0:NumUniquePts-1)*2*Fn/NFFY;
%new fft for unmodulated doublet
y1=3Dyum;%unmodulated doublet
NFFY1=3D2.^(ceil(log(length(y1))/log(2)));
FFTY1=3Dfft(y1,NFFY1);%pad with zeros
NumUniquePts=3Dceil((NFFY1+1)/2);=20
FFTY1=3DFFTY1(1:NumUniquePts);
MY1=3Dabs(FFTY1);
MY1=3DMY1*2;
MY1(1)=3DMY1(1)/2;
MY1(length(MY1))=3DMY1(length(MY1))/2;
MY1=3DMY1/length(y1);
f=3D(0:NumUniquePts-1)*2*Fn/NFFY1;
%new fft for correlated yc
y2=3Dyc;%y2 is the time domain signal output of the multiplier
%(modulated times unmodulated) in the correlation receiver. Plots=20
%in the time domain show that a simple comparator instead of high speed =
A/D's=20
%could be used to recover the 10101 signal depending on integrator =
design.=20
%I have not included an integrator in the program but it would be a =
properly=20
%constructed low pass filter in an actual receiver.
NFFY2=3D2.^(ceil(log(length(y2))/log(2)));
FFTY2=3Dfft(y2,NFFY2);%pad with zeros
NumUniquePts=3Dceil((NFFY2+1)/2);=20
FFTY2=3DFFTY2(1:NumUniquePts);
MY2=3Dabs(FFTY2);
MY2=3DMY2*2;
MY2(1)=3DMY2(1)/2;
MY2(length(MY2))=3DMY2(length(MY2))/2;
MY2=3DMY2/length(y2);
f=3D(0:NumUniquePts-1)*2*Fn/NFFY2;
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
% PLOTS
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
%plots for modulated doublet
figure(1)
subplot(2,2,1); plot(t,y);xlabel('TIME');ylabel('AMPLITUDE');
title('Modulated pulse train');
grid on;
axis([-1e-9,10e-9 -1 1])
subplot(2,2,2); plot(f,MY);xlabel('FREQUENCY');ylabel('AMPLITUDE');
%axis([0 10e9 0 .1]);%zoom in/out
grid on;
subplot(2,2,3); =
plot(f,20*log10(MY));xlabel('FREQUENCY');ylabel('20LOG10=3DDB');
%axis([0 20e9 -120 0]);
grid on;
%plots for unmodulated doublet
figure(2)
subplot(2,2,1); plot(t,y1);xlabel('TIME');ylabel('AMPLITUDE');
title('Unmodulated pulse train');
grid on;
axis([-1e-9,10e-9 -1 1])
subplot(2,2,2); plot(f,MY1);xlabel('FREQUENCY');ylabel('AMPLITUDE');
%axis([0 10e9 0 .1]);%zoom in/out
grid on;
subplot(2,2,3); =
plot(f,20*log10(MY1));xlabel('FREQUENCY');ylabel('20LOG10=3DDB');
%axis([0 20e9 -120 0]);
grid on;
%plots for correlated yc
figure(3)
subplot(2,2,1); plot(t,y2);xlabel('TIME');ylabel('AMPLITUDE');
title('Receiver correlator output');
grid on;
axis([-1e-9,10e-9 -1 1])
subplot(2,2,2); plot(f,MY2);xlabel('FREQUENCY');ylabel('AMPLITUDE');
axis([0 7e9 0 .025]);%zoom in/out
grid on;
subplot(2,2,3); =
plot(f,20*log10(MY2));xlabel('FREQUENCY');ylabel('20LOG10=3DDB');
%axis([0 20e9 -120 0]);
grid on;
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
%Comparator
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
pt=3D.5;%sets level where threshhold device comparator triggers
H=3D5;%(volts)
L=3D0;%(volts)
LEN=3Dlength(y2);
for ii=3D1:LEN;
if y2(ii)>=3Dpt;%correlated output(y2) going above pt threshold =
setting
pv(ii)=3DH;%pulse voltage
else;
pv(ii)=3DL;
end;
end ;
po=3Dpv;%pulse out=3Dpulse voltage
figure(4)
plot(t,po);
axis([-1e-9 11e-9 -1 6])
title('Comparator output');
xlabel('Frequency');
ylabel('Voltage');
grid on;
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
%SETUP and INFO
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
%Enter desired pulse width in pw1(.5e-9).
%Change t=3D-1e-9:1/Fs:(xxxx) to 1e-9.
%Press F5 or run.
%With waveform in plot 2,2,1, set pulse width with fudge factor to .5e-9
%using #s corresponding to chosen waveform. Set from tail to tail.
%Change t=3D-1e-9:1/Fs:(xxx) to something like 20e-9.Zoom out. I would
%comment in all plot axis and use them for zooming in and out.
%Press F5 and observe waveforms. Print waveforms to compare with next =
set of
%wave forms.
%Pick another waveform by commenting out existing waveform and repeat as =
above.
%When you compare the waveforms you will see that the second derivative
%doublet has a center frequency in the spread twice that of the first
%derivative monocycle.
%You would expect this on a second derivative. Picking a doublet =
waveform
%for transmission (by choice of UWB antenna design) pushes the fc center =
frequency=20
%spread out by (two) allowing relief from the difficult design of =
narrower pulse
%generating circuits in transmitters and receivers. If you chose a =
monocycle, you would
%need to design your pulse circuits with a much narrower(factor of =
two)pulse width to
%meet the tough FCC spectral mask from ~3 to 10GHz at-40Dbm. I would =
guess a
%pulse width of ~ 0.4 to 0.45 nanosec using a doublet at the proper =
amplitude(A)=20
%would meet the requirements. The antenna choice at the receiver could
%integrate the doublet to a monocycle so a wave form for the modulated
%monocycle is included. You woud need to construct an unmodulated =
version
%of the monocycle. Also an unmodulated monocycle template could =
correlate with a
%modulated doublet extracting the information but the proper sense of =
the
%monocycle would be required along with proper information delay setup =
in
%the equations.
=20
%You can zoom in on the waveforms of plot 2,2,1 to see the PPM
%delays generating 10101. Use axis on plot 2,,2,1 for better
%zooming.Comment in the axis.
%Processing gains of greater than 20DB can be achieved by selection of =
the
%PRF and integrator using high information bit rates. This, when doing a =
%link budget, should give enough link margin for multipath conditions =
with
%a fixed transmitter power at ranges of 3 to 10 meters.
%I didn't include BER checking with noise in the program because I =
beleive many more
%pulses would be required to get the true picture.
%Perfect sync is assumed in the correlation receiver. You could delay =
the
%unmodulated doublet waveform and check the correlation properties of =
the=20
%waveforms at the receiver and observe how the S/N(or output signal =
since no noise has been
%added to the program) degrades when not in perfect sync.
%Things to add
%A.more pulses
%B.integrator
%C.noise
%D.BER
</PRE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -