歡迎來到裝配圖網(wǎng)! | 幫助中心 裝配圖網(wǎng)zhuangpeitu.com!
裝配圖網(wǎng)
ImageVerifierCode 換一換
首頁 裝配圖網(wǎng) > 資源分類 > DOC文檔下載  

直序擴(kuò)頻通信-matlab仿真DIRECT-SEQUENCE-SPREAD-SPECTRUM-TECHNIQUES

  • 資源ID:63200200       資源大?。?span id="xdaas70" class="font-tahoma">702.50KB        全文頁數(shù):17頁
  • 資源格式: DOC        下載積分:20積分
快捷下載 游客一鍵下載
會(huì)員登錄下載
微信登錄下載
三方登錄下載: 微信開放平臺(tái)登錄 支付寶登錄   QQ登錄   微博登錄  
二維碼
微信掃一掃登錄
下載資源需要20積分
郵箱/手機(jī):
溫馨提示:
用戶名和密碼都是您填寫的郵箱或者手機(jī)號(hào),方便查詢和重復(fù)下載(系統(tǒng)自動(dòng)生成)
支付方式: 支付寶    微信支付   
驗(yàn)證碼:   換一換

 
賬號(hào):
密碼:
驗(yàn)證碼:   換一換
  忘記密碼?
    
友情提示
2、PDF文件下載后,可能會(huì)被瀏覽器默認(rèn)打開,此種情況可以點(diǎn)擊瀏覽器菜單,保存網(wǎng)頁到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請(qǐng)使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站資源下載后的文檔和圖紙-無水印,預(yù)覽文檔經(jīng)過壓縮,下載后原文更清晰。
5、試題試卷類文檔,如果標(biāo)題沒有明確說明有答案則都視為沒有答案,請(qǐng)知曉。

直序擴(kuò)頻通信-matlab仿真DIRECT-SEQUENCE-SPREAD-SPECTRUM-TECHNIQUES

精選優(yōu)質(zhì)文檔-傾情為你奉上Lab2 Direct Sequence Spread Frequency Techniques直序擴(kuò)頻通信仿真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 and 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 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 (spectrum) of a device's 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 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. DSSS 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 Spread 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 much 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-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 transmitter's 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 timing, which, in turn, can be used to calculate the receiver's 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 physical 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 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, 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 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 feedback 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 1bit/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 Input 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 spreading 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, 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 waveform 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 signal 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 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.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, 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 Output 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 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 sequence 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 autocorrelation 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 the 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 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 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,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 noise 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;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_sq(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 original 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_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 (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 c>0 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*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 sequence 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,Tc) N=fix(Tb/Tc);a,b=size(p);a1,b1=size(pn_in);c=fix(b*N/b1);pn_original=pn_in; if c>0 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,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).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 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)*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è)

注意事項(xiàng)

本文(直序擴(kuò)頻通信-matlab仿真DIRECT-SEQUENCE-SPREAD-SPECTRUM-TECHNIQUES)為本站會(huì)員(風(fēng)***)主動(dòng)上傳,裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)上載內(nèi)容本身不做任何修改或編輯。 若此文所含內(nèi)容侵犯了您的版權(quán)或隱私,請(qǐng)立即通知裝配圖網(wǎng)(點(diǎn)擊聯(lián)系客服),我們立即給予刪除!

溫馨提示:如果因?yàn)榫W(wǎng)速或其他原因下載失敗請(qǐng)重新下載,重復(fù)下載不扣分。




關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

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

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


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