📄 uwbbpsk.mht
字号:
po=3Dpv;%pulse out=3Dpulse voltage
subplot(2,2,4);
plot(t,po);
axis([-1e-9 27e-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
%Check axis settings on plots
%Enter desired pulse width in pw1(.5e-9)or(.2e-9).
%Change t=3D-1e-9:1/Fs:(xxxx) to 1e-9 or proper value for viewing
%Press F5 or run.
%With waveform in plot 2,2,1(Figure 1), set pulse width with adjustment =
factor to
%.2e-9 using adjustment #s corresponding to chosen waveform. Set from =
tail to tail.
%Change t=3D-1e-9:1/Fs:(xxx) to something like 30e-9.Zoom out. I would
%comment in all plot axis and use them for zooming in and out.
%Press F5 and observe waveforms. Print or observe waveforms to compare =
with next set of
%wave forms.
%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-41.3Dbm/1MHz. The =
antenna choice at
%the receiver could integrate the doublet to a monocycle so a waveform =
for the modulated
%monocycle is included. You would need to construct a modulated and =
unmodulated version
%of the monocycle.
=20
%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 1 to 10 meters.A link budget =
will
%be shown to see if this is true.
%I didn't include BER checking with noise in the program because I =
beleive many more
%pulses would be required to get more accurate results. I have included =
a rough
%estimate of Eb/No in DB.
%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 signal and BER degrades =
when not in=20
%perfect sync.
%Things to add
%A.more pulses
%B.integrator(completed)
%C.noise(completed)
%D.BER calculations-rough estimate(completed)
%E.Link budget calculations(preliminary)
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
% CORRELATION RECEIVER LOW PASS FILTER(INTEGRATOR)
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
rc=3D.2e-9;%time constant
ht=3D(1/rc).*exp(-t/rc);%impulse response
ht=3D.2e-9*ht;%I'm not sure about this.Reduces integrated output voltage =
greatly.
ycfo=3Dfilter(yc,1,ht)/Fs;%use this instead of ycfo=3Dconv(yc,ht)/Fs for =
proper dimension.
%The #=3D1 allows this. The LPF RC time constant(integrates over this =
time).
%Theory states that it should be set to the pulse width but should be =
set
%to a value that gives the best error free operation at the highest =
noise
%levels. Different filter types(butterworth,etc) may give different
%results.I don't have the butter function.
%The 3DB or 1/2 power bandwidth on the RC LPF is f=3D1/(2*pi*RC). The =
noise
%bandwith is f=3D1/(4*rc).
yn=3Dfilter(noise,1,ht)/Fs;%looks at filtered noise only(Figure 5)
%new FFT for filtered correlated pulses(ycfo)=20
NFFYCFO=3D2.^(ceil(log(length(ycfo))/log(2)));
FFTYCFO=3Dfft(ycfo,NFFYCFO);%pad with zeros
NumUniquePts=3Dceil((NFFYCFO+1)/2);=20
FFTYCFO=3DFFTYCFO(1:NumUniquePts);
MYCFO=3Dabs(FFTYCFO);
MYCFO=3DMYCFO*2;
MYCFO(1)=3DMYCFO(1)/2;
MYCFO(length(MYCFO))=3DMYCFO(length(MYCFO))/2;
MYCFO=3DMYCFO/length(ycfo);
f=3D(0:NumUniquePts-1)*2*Fn/NFFYCFO;
%new FFT for filtered noise(yn)
NFFYN=3D2.^(ceil(log(length(yn))/log(2)));
FFTYN=3Dfft(yn,NFFYN);%pad with zeros
NumUniquePts=3Dceil((NFFYN+1)/2);=20
FFTYN=3DFFTYN(1:NumUniquePts);
MYN=3Dabs(FFTYN);
MYN=3DMYN*2;
MYN(1)=3DMYN(1)/2;
MYN(length(MYN))=3DMYN(length(MYN))/2;
MYN=3DMYN/length(yn);
f=3D(0:NumUniquePts-1)*2*Fn/NFFYN;
%plots for filtered correlated pulses(ycfo)
figure(4)
subplot(2,2,1); plot(t,ycfo);xlabel('TIME');ylabel('AMPLITUDE');
title('Receiver filtered correlator output');
grid on;
%axis([-1e-9,27e-9 -1 1])
subplot(2,2,2); plot(f,MYCFO);xlabel('FREQUENCY');ylabel('AMPLITUDE');
%axis([0 7e9 0 .25]);%zoom in/out
grid on;
subplot(2,2,3); =
plot(f,20*log10(MYCFO));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=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
% CORRELATION RECEIVER COMPARATOR(after low pass filter)
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
pt1=3D.1e-8%sets level where threshhold device comparator triggers
H=3D5;%(volts)
L=3D0;%(volts)
LEN=3Dlength(ycfo);
for ii=3D1:LEN;
if ycfo(ii)>=3Dpt1;%correlated output(ycfo) going above pt =
threshold setting
pv1(ii)=3DH;%pulse voltage
else;
pv1(ii)=3DL;
end;
end ;
po1=3Dpv1;%pulse out=3Dpulse voltage
subplot(2,2,4);
plot(t,po1);
axis([-1e-9 27e-9 -1 6])
title('Comparator output');
xlabel('Frequency');
ylabel('Voltage');
grid on;
%plots for filtered noise(yn)
figure(5)
subplot(2,2,1);plot(t,yn);xlabel('TIME');ylabel('AMPLITUDE');
title('Receiver filtered noise output');
grid on;
%axis([-1e-9,27e-9 -1 1])
subplot(2,2,2); plot(f,MYN);xlabel('FREQUENCY');ylabel('AMPLITUDE');
%axis([0 7e9 0 .25]);%zoom in/out
grid on;
subplot(2,2,3); =
plot(f,20*log10(MYN));xlabel('FREQUENCY');ylabel('20LOG10=3DDB');
%axis([0 20e9 -120 0]);
grid on;
subplot(2,2,4);plot(t,ht);xlabel('TIME');ylabel('AMPLITUDE');
title('impulse response(ht)');
grid on;
axis([0,1e-9 0 1])
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
%BER CALCULATIONS
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
%I'm going to calibrate the noise generator and roughly determine the =
Eb/No or SNR in DB
%that allows the system to operate almost error free(1e-3) in a noise =
environment.
%This value of Eb/No is the number in DB that can be used in link
%calculations. The calibration is required because in an actual TX-RX =
the received
%voltage into the correlation receiver at the mixer will be in the low =
millivolt
%region due to the FCC spectral mask at -41.3dBm/MHz and low transmitter =
power.
%It will not be the 2 volt peak-peak BPSK used here and must be =
recalibrated if
%different than 2 volt peak-peak.
=20
%The Eb/No value in DB is calculated as follows. Doing numerous runs by =
hand and
%observing the LPF comparator output in figure 4, determine the proper
%setting of the comparator threshold setting, RC filter time constant =
and
%level of multiplier(0.1 to 1) in AWGN noise generator that gives almost =
error
%free operation. This will be considered Eb/No in DB.For BPSK theory =
this value is 7DB for BER of 1e-3.=20
%For a SNR of 7 DB, 20*LOG10(ratio of Vsig/Vnoise=3D1/.446)=3D7DB.=20
%You can do your own calibration method if you don't think
%this is correct. Remember to recalibrate for new pulse widths and =
amplitude changes
%into the mixer and pay attention to axis settings. There are a few to =
keep track of.
%Comment
%The one area I am wondering about is the noise removal after the mixer =
and
%before the LPF. The correlation(multication) removes some noise and =
then the LPF
%removes more noise as seen from the plots. Would a Xcorr give different =
results?=20
%I did some preliminary link caculations with this set up and determined =
that approx 0.6mv p-p
%would be present on the mixer input for the following =
conditions.(0.3mvpeak
%for 0 and 180 degrees)
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
%FCC spectral mask -41.3dBm/MHz+10LOG10(4000)=3D~-5dBm
%antenna gains 0DB(50 ohms)
%lna 20DB gain
%NF 10 DB
%distance 1 meter
%path loss~45DB
%156Mbit rate
%BW~800Mhz 3DB BW(LPF)(RC=3D.2e-9)
%N(receiver noise level)=3DKTB=3D-114dBm+NF=3D-104dBm
%3DB spread of pulse ~4GHz
%pw=3D.2e-9
%fc=3D~5Ghz
%C(carrierless carrier)/N=3DEb/No*10LOG10(bit =
rate/BW)=3D7DB-2.74DB=3D4.26DB
%C=3D(C/N)+N=3D4.26DB-104DB=3D~-100dBm
%power received @ant=3D-5dBm-45DB(PL)=3D-50dBm over 4GHz.This value may =
be
%-41.3dBm/MHz-45DB=3D-86.3dBm which would give a much lower p-p voltage =
into
%mixer. Seems like this would be very low.
%link margin=3D-41.3dBm-45DB+100dBm=3D13.7DB.
%Emixerp-p=3Dsqrt(1e-5*50)=3D2.23e-2mvrms*1.41=3D0.03mvpeak*20DB(lna)gain=
=3D0.3mvpeak or 0.6mvp-p
%Reference-Why Such Uproar Over Ultrawideband,John McCorkle
%URL:http:/www.commsdesign.com/showArticle.jhtml?articleID=3D16504218</PR=
E></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -