直序擴頻通信-matlab仿真DIRECT-SEQUENCE-SPREAD-SPECTRUM-TECHNIQUES

上傳人:風*** 文檔編號:63200200 上傳時間:2022-03-17 格式:DOC 頁數(shù):17 大?。?02.50KB
收藏 版權(quán)申訴 舉報 下載
直序擴頻通信-matlab仿真DIRECT-SEQUENCE-SPREAD-SPECTRUM-TECHNIQUES_第1頁
第1頁 / 共17頁
直序擴頻通信-matlab仿真DIRECT-SEQUENCE-SPREAD-SPECTRUM-TECHNIQUES_第2頁
第2頁 / 共17頁
直序擴頻通信-matlab仿真DIRECT-SEQUENCE-SPREAD-SPECTRUM-TECHNIQUES_第3頁
第3頁 / 共17頁

下載文檔到電腦,查找使用更方便

20 積分

下載資源

還剩頁未讀,繼續(xù)閱讀

資源描述:

《直序擴頻通信-matlab仿真DIRECT-SEQUENCE-SPREAD-SPECTRUM-TECHNIQUES》由會員分享,可在線閱讀,更多相關(guān)《直序擴頻通信-matlab仿真DIRECT-SEQUENCE-SPREAD-SPECTRUM-TECHNIQUES(17頁珍藏版)》請在裝配圖網(wǎng)上搜索。

1、精選優(yōu)質(zhì)文檔-傾情為你奉上Lab2 Direct Sequence Spread Frequency Techniques直序擴頻通信仿真ContentAbstract-3Experiment Background-3Experiment Procedure-5Analysis and Conclusion-10Reference -10Appendix-121. Abstract The objective of this lab experiment is to learn the fundamentals of the direct sequence spread spectrum an

2、d code division multiple address techniques. To get familiar with the direct sequence spread spectrum modulator and demodulator. And the direct sequence spread spectrum system can be shown as:Figure 1. Direct sequence spread spectrum system2. Experiment Background2.1 Introduction of Direct Sequence

3、Spread Spectrum 1In , direct-sequence spread spectrum (DSSS) is a technique. As with other technologies, the transmitted signal takes up more than the information signal that is being modulated. The name spread spectrum comes from the fact that the carrier signals occur over the full bandwidth (spec

4、trum) of a devices transmitting frequency.Figure 2.1 Procedure to generate a DSSS signal2.2 Generation of Direct Sequence Spread SpectrumTo generate a spread spectrum signal one requires: 1. A modulated signal somewhere in the RF spectrum 2. A PN sequence to spread it2.3 Features of Direct Sequence

5、Spread SpectrumDSSS has some features as following:1. DSSS a with a continuous of (PN) symbols called , each of which has a much shorter duration than an information . That is, each information bit is modulated by a sequence of much faster chips. Therefore, the is much higher than the signal .2. DSS

6、S uses a structure in which the sequence of chips produced by the transmitter is known a priori by the receiver. The receiver can then use the same to counteract the effect of the PN sequence on the received signal in order to reconstruct the information signal.2.4 Transmission of Direct Sequence Sp

7、read SpectrumDirect-sequence spread-spectrum transmissions multiply the data being transmitted by a noise signal. This noise signal is a pseudorandom sequence of 1 and 1 values, at a frequency much higher than that of the original signal, thereby spreading the energy of the original signal into a mu

8、ch wider band. The resulting signal resembles , like an audio recording of static. However, this noise-like signal can be used to exactly reconstruct the original data at the receiving end, by multiplying it by the same pseudorandom sequence (because 1 1 = 1, and 1 1 = 1). This process, known as de-

9、spreading, mathematically constitutes a of the transmitted PN sequence with the PN sequence that the receiver believes the transmitter is using.For de-spreading to work correctly, the transmit and receive sequences must be synchronized. This requires the receiver to synchronize its sequence with the

10、 transmitters sequence via some sort of timing search process. However, this apparent drawback can be a significant benefit: if the sequences of multiple transmitters are synchronized with each other, the relative synchronizations the receiver must make between them can be used to determine relative

11、 timing, which, in turn, can be used to calculate the receivers position if the transmitters positions are known. This is the basis for many .The resulting effect of enhancing on the channel is called . This effect can be made larger by employing a longer PN sequence and more chips per bit, but phys

12、ical devices used to generate the PN sequence impose practical limits on attainable processing gain.If an undesired transmitter transmits on the same channel but with a different PN sequence (or no sequence at all), the de-spreading process results in no processing gain for that signal. This effect

13、is the basis for the (CDMA) property of DSSS, which allows multiple transmitters to share the same channel within the limits of the properties of their PN sequences.As this description suggests, a plot of the transmitted waveform has a roughly bell-shaped envelope centered on the carrier frequency,

14、just like a normal transmission, except that the added noise causes the distribution to be much wider than that of an AM transmission.In contrast, pseudo-randomly re-tunes the carrier, instead of adding pseudo-random noise to the data, which results in a uniform frequency distribution whose width is

15、 determined by the output range of the pseudo-random number generator.3. Experiment Procedure3.1. Generate the pseudo random numbers sequences (m sequence) with a polynomial as followingThe polynomial is corresponding to the LFSR of the Figure 3.1, where denotes a connection.Figure 3.1 Linear feedba

16、ck shift registerAs the polynomial shows, we can get the LFSR in this experiment with 14 orders (n=14).Figure 3.2 n=15 LFSRAs Figure 3.2 shows, the feedback output has a relationship with the registers.Hence, we can get the longest m sequence as. In this experiment, I take the message data rate as 1

17、bit/s, which means Tb=1. Here, the input sequence is initialized as (1 0 1 1 0 1 1 1 0 1 1 0 0). I take the PN sequence data rate as Tc=1/64bit/s, because the spreading gain is 64, in another word, Tb/Tc=64. And I can get the waveform of M sequences and message (input data) as follows:Figure 3.3 Inp

18、ut message data waveformFigure 3.4 M sequences waveformIn this experiment, in fact, both message data and m sequences are single polar codes. In Matlab we use a simple function to change them into double polar codes, which are easy to produce the BPSK signal (phase reversing).3.2. Generate a spreadi

19、ng signal d(t), and the producing formula as following:Here we can get the waveform of d(t) comparing to b(t) and c(t). Figure 3.5 c(t) (red) and d(t) (green)Because b(t) equals 1 at the interval (0,1) and -1 at the interval (1,2), the d(t) is reversed at the interval (1,2) as Figure 3.5 shows. Now,

20、 I have get the spreading sequences d(t) with the data rate as 64bits/s.3.3. Modulate the spreading sequences d(t) to be the BPSK signal By using the formula of BPSK, I can get the BPSK signal of spreading sequences d(t).In this experiment, I take the carrier frequency as 128Hz. I can get the BPSK w

21、aveform as Figure 3.6.Figure 3.6 BPSK of d(t)At the same time, I should keep a PN sequence signal that has the same length as the spreading signal d(t) to keep the synchronization between the transmitter and receiver.3.4. In an AWGN channel to transmit the BPSK signal.First of all, I get the AWGN si

22、gnal as followFigure 3.7 AWGN signalWe can find that the AWGN signal has large number of harmonics and its power spectral density is uniform and its amplitude distribution obeys the Gauss distribution. In our transmitting channel, I add the noise to the BPSK signal and I take the SNR equals 10. Then

23、 I get the signal as shown in Figure 3.8.Figure 3.8 BPSK signal adding AWGN3.4. Recover our message data b(t)Firstly, I use two synchronized circuit to despread and demodulate the receiving signal. Then I use a matching filter to take the value at the time Tb. Figure 3.9 Matching filter (1)Figure 3.

24、10 Matching filter (2)As we can see, because of the effect of AWGN, in each Tb time interval, the matching filter output has some differences. However, I can still get the nearly maximum and minimum value at the time points Tb+n*Tb (N=1,2,3,.,N and N equals the length of the message data).Secondly,

25、I do the judgment for maximum and minimum value. Obviously, the y(Tb) get the maximum value, the recovery bit will be 1 and the last time will be Tb, to be inverse, the recovery bit will be -1. Here I can find that the output signal in our receiver is the same as that in transmitter.Figure 3.11 Outp

26、ut signal on the receiver4. Analysis and Conclusion4.1. Spectrum SpreadDigital communication has played a more important role than analog communication. In digital communication, the fastest speed of data transmission is seen to be the bandwidth of digital channel, which is also called the capacity

27、of the channel. We can know that the larger the capacity, the stronger the ability of anti-interference, because of the Shannon theorem:B is the bandwidth of frequency spectrum. Obviously, when I enlarge the capacity, the bandwidth will be wider. This is also the reason I use the high baud rate m se

28、quence to spread the message data bandwidth.4.2. Matching FilterIn this experiment, the matching filter is achieved by using a simple function in Matlab which is xcorr. This is a function used to calculate the cross-correlation of two sequences. As we know, in fact, matching filter is just like an a

29、utocorrelation calculating function.4.3. The advantages of m sequence (double polar)The characteristic of autocorrelation of m sequence is very good. I can know it from the following result.I can find that when the N is very large which is just like that in this experiment, . This is very good for t

30、he multichannel processing. In CDMA system, I take orthogonal code to encode different users message data. However, the characteristics of cross-correlation and autocorrelation of orthogonal code is bad for the multichannel systems. In order to improve this phenomenon, I should multiple m sequences

31、to the orthogonal codes.APPENDIXSome Parts of Matlab CodesI. DSSS (main function)clear;%the PAM input digital sequence and the first input of PN producerp=1 0 1 1 0 1 1 1 0 1 1 0 0;%get 0 1 0 0 1pn_in=1 0 0 0 0 0 0 0 0 0 0 0 0 0 0;%get 0 0 0 0 0 0 0 0 0 0 0%the period of input signalTb=1;%the period

32、 of PN sequence signalTc=1/256;%produce the PN sequencepn_sq=PN_Producer(pn_in);pn_dou=zero_double(pn_sq);p_dou=zero_double(p);%square wave%x1,y1=square_wave(p_dou,Tb);%a2,b2=size(x1); %x2,y2=square_wave(pn_dou,Tc);%plot(x1,y1);%get the signal after spreading frequcecy operationb_dou=PN_Signal(p_dou

33、,pn_dou,Tb,Tc);%the synchronization of PNp_syn=PN_Syn(p_dou,pn_dou,Tb,Tc);%the carry signal periodT_carry=1/512;%get the carry signal by PSKwc=2*pi*1/T_carry;psks,tpsk=PSK_Producer(b_dou,wc,Tc);a1,b1=size(tpsk);fs=b1-1;N=400;FSpectrum(psks,fs,N);%plot(tpsk,psks);%axis(0 1.6 -2 2);%grid on;%add the n

34、oise to the PSK signal by AWGNin_signal=awgn(psks,10);%the SNR is 20%fs=b1-1;%N=400;%FSpectrum(in_signal,fs,N);%plot(tpsk,in_signal);%the recovery signalsignal_corr=Signal_Recover(in_signal,tpsk,p_syn,wc,Tc,Tb);II. PN_Producer (produce the m-sequence)function y=PN_Producer(x) m_sq(1).a=x;m_sq(2).a=x

35、;m_sq(1).c=1 0 0 0 0 1 0 1 1 1 0 0 0 1 0 1 ;%get1 0 0 0 0 1 0 1 1 1 0 0 0 1 0 1 get1 1 0 0 1l_min,l_max=size(m_sq(1).c);n=2;%the first digit of m-sequencepn_out(1)=m_sq(2).a(1);%the m-sequence producer for shifting first timem_sq(2).a(l_max)=m_sq(1).c(2)*m_sq(1).a(l_max-1);for i=1:1:(l_max-2) if m_s

36、q(2).a(l_max)=(m_sq(1).c(2+i)*m_sq(1).a(l_max-i-1) m_sq(2).a(l_max)=0; else m_sq(2).a(l_max)=1; endend for j=0:1:(l_max-2) m_sq(2).a(1+j)=m_sq(2).a(2+j); end for j1=1:1:(l_max-1) m_sq(3).a(j1)=m_sq(2).a(j1);end pn_out(n)=m_sq(2).a(1);n=n+1;%to check whether the m-sequence becomes back to the origina

37、l sequenceif isequal(m_sq(3).a,m_sq(1).a) pn_check=1;else pn_check=0;end%the whole shifting operation and produce the PNwhile pn_check=0 m_sq(2).a(l_max)=m_sq(1).c(2)*m_sq(2).a(l_max-1); for i=1:1:(l_max-2) if m_sq(2).a(l_max)=(m_sq(1).c(2+i)*m_sq(2).a(l_max-i-1) m_sq(2).a(l_max)=0; else m_sq(2).a(l

38、_max)=1; end end for j=0:1:(l_max-2) m_sq(2).a(1+j)=m_sq(2).a(2+j); end for j1=1:1:(l_max-1) m_sq(3).a(j1)=m_sq(2).a(j1); end pn_out(n)=m_sq(3).a(1); if isequal(m_sq(3).a,m_sq(1).a) pn_check=1; else pn_check=0; end n=n+1;end%return the PN codefor i4=1:1:(n-2) y(i4)=pn_out(i4);end endIII. PN_Signal (

39、generate the signal after spreading spectrum)function y=PN_Signal(p,pn_in,Tb,Tc) N=fix(Tb/Tc);a,b=size(p);a1,b1=size(pn_in);c=fix(b*N/b1)pn_original=pn_in; if c0 for j=0:1:c pn_in=horzcat(pn_in,pn_original); endelse pn_in=pn_in;end s1=1;e1=N; for i=1:1:b if p(i)=1 for m=s1:1:e1 y(m)=pn_in(m); s1=1+N

40、*i; e1=N+N*i; end else for m=s1:1:e1 y(m)=p(i)*pn_in(m); s1=1+N*i; e1=N+N*i; end endend endIV. PSK_Producer (generate the BPSK signal)function y,z=PSK_Producer(x,wc,Tb) a,b=size(x);%sampling the PSK signal and produce them the N is 1:2for i=1:1:b start1=(i-1)*Tb; end1=i*Tb;%Tb is the period of PN se

41、quence Tcs(i).s=linspace(start1,end1,50); if x(i)=1 c_sq(i).s=sin(wc*Tcs(i).s); else c_sq(i).s=(-1)*sin(wc*Tcs(i).s); endend y=c_sq(1).s;z=Tcs(1).s; for j=1:1:(b-1) y=horzcat(y,c_sq(j+1).s); z=horzcat(z,Tcs(j+1).s);end endV. PN_Syn (generate the synchronized PN sequence)function y=PN_Syn(p,pn_in,Tb,

42、Tc) N=fix(Tb/Tc);a,b=size(p);a1,b1=size(pn_in);c=fix(b*N/b1);pn_original=pn_in; if c0 for j=0:1:c pn_in=horzcat(pn_in,pn_original); endelse pn_in=pn_in;end s1=1;e1=N; for i=1:1:b for m=s1:1:e1 y(m)=pn_in(m); s1=1+N*i; e1=N+N*i; endend endVI. Signal_Recover (receiver)function y=Signal_Recover(x,tpsk,

43、pn_syn,wc,Tb,Tc) m_signal=sin(wc*tpsk);t_sqr,pn_syn_sqr=square_wave(pn_syn,Tb);c_psk=x.*pn_syn_sqr;N=fix(Tc/Tb);a2,b2=size(tpsk); t_gap=b2/50/N;mid=50*N;for i2=1:1:mid t_corr_mid(i2)=tpsk(i2);endt_corr,t_corr_mid=corr_x(t_corr_mid,Tb,N); for k=1:1:t_gap for k2=1:1:(50*N) k3=k2+(k-1)*50*N; in_psk(k).

44、s(k2)=c_psk(k3); in_sin(k).s(k2)=m_signal(k3); end ym=xcorr(in_psk(k).s,in_sin(k).s); %t_corr,t_corr_mid=corr_x(t_corr_mid,Tb,N); if ym(mid)0 y(k)=1; else y(k)=0; end if k=2 plot(t_corr,ym,g*:); axis(0 2 -2000 2000); hold on; grid on; %elseif k=3 %plot(t_corr,ym,mx:); %axis(0 12.8 -2000 2000); %hold

45、 on; %grid on; else disp(nice); endend endVII. square_wave (generate the square wave signal)function fss,sqrs=square_wave(p,g)%square wave sampling frequencyfs(1).s=linspace(0,g,50);a,b=size(p);%discrete ones in different time pointfor i=1:1:(b-1) if p(i)=1 sqr_p(i).s=ones(1,50); else sqr_p(i).s=(-1

46、)*ones(1,50); end fs(i+1).s=linspace(0+g*i,g+g*i,50);end%the last time intervalif p(b)=1 sqr_p(b).s=ones(1,50);else sqr_p(b).s=(-1)*ones(1,50);end fss=fs(1).s;sqrs=sqr_p(1).s; for i2=1:1:(b-1) fss=horzcat(fss,fs(i2+1).s); sqrs=horzcat(sqrs,sqr_p(i2+1).s);end endVIII. zero_double (cover the single polar signal to the double polar signal)function y=zero_double(x) a,b=size(x);for i=1:1:b if x(i)=0 y(i)=-1; else y(i)=x(i); endend end專心-專注-專業(yè)

展開閱讀全文
溫馨提示:
1: 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
3.本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
5. 裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

相關(guān)資源

更多
正為您匹配相似的精品文檔
關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號:ICP2024067431-1 川公網(wǎng)安備51140202000466號


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務平臺,本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng),我們立即給予刪除!