gold序列實驗報告_第1頁
gold序列實驗報告_第2頁
gold序列實驗報告_第3頁
gold序列實驗報告_第4頁
gold序列實驗報告_第5頁
已閱讀5頁,還剩7頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

1、精選文檔Gold序列實驗報告一、實驗過程及分析1 m序列&Gold序列的產(chǎn)生(1)選取本原多項式,產(chǎn)生m序列。fbconnection_m=1 0 1 0 0 1 1;mseq=m_sequence(fbconnection_m);(2)由本原多項式生成的m序列為m序列優(yōu)選對,以此優(yōu)選對來產(chǎn)生Gold序列。fbconnection_op_1=0 0 1 0 0 0 1;fbconnection_op_2=1 1 1 0 0 0 1;goldseq=gold_seq(fbconnection_op_1,fbconnection_op_2);2 m序列的相關特性圖1 m序列自相關函數(shù)圖 2

2、 m序列互相關函數(shù)3 Gold序列的相關特性圖3 Gold序列自相關函數(shù)圖4 Gold序列互相關函數(shù)圖2-5 m序列&Gold序列最小,最大相關值4 m序列&Gold序列相關特性比較圖6 m序列&Gold序列自相關函數(shù)比較圖7 m序列&Gold序列互相關函數(shù)比較gold序列在時延不為0是三值的,這一點不如m序列,在時延為0處具有與m序列相同的峰值特性。顯然,m序列的自相關特性比Gold序列的自相關特性要好。Gold序列具有更小的互相關峰值,顯然Gold序列的互相關特性比m序列的互相關特性性能要好。5 m序列優(yōu)選對m序列優(yōu)選對也是gold序列族中的gold序列,所

3、以其互相關函數(shù)與gold序列一致。圖8 m序列優(yōu)選對的互相關函數(shù)6 任選6個Gold序列,觀察其自相關函數(shù)圖9 任選6個Gold序列的自相關函數(shù)7 任選6對Gold序列,觀察其互相關函數(shù)圖 10 任選6對Gold序列的互相關函數(shù)任意兩個Gold序列互相關函數(shù)幅度小于或等于17,符合Gold理論。源碼(1) PN_Correlation.m% =% PN_Correlation.m% Correlation analysis of PN sequence% Author: jzh (04011646 seu)% Date: 2014.12.29% =% cleanclose all;clear

4、all;clc;% optimum pairsfbconnection_op_1=0 0 1 0 0 0 1;fbconnection_op_2=1 1 1 0 0 0 1;% any m sequence for testfbconnection_m=1 0 1 0 0 1 1;% gold sequencemseq_op_1=m_sequence(fbconnection_op_1);mseq_op_2=m_sequence(fbconnection_op_2);goldseq=gold_seq(fbconnection_op_1,fbconnection_op_2);% m sequen

5、cemseq=m_sequence(fbconnection_m);% mappingmseq_op_1(mseq_op_1=0)=-1;mseq_op_2(mseq_op_2=0)=-1;goldseq(goldseq=0)=-1;mseq(mseq=0)=-1;m_auto=ccorr(mseq);% any two m sequences except optimum pairsm_cross=ccorr(mseq,mseq_op_1);gold_auto=ccorr(goldseq(1,:);gold_cross=ccorr(goldseq(1,:),goldseq(2,:);m_op

6、_cross=ccorr(mseq_op_1,mseq_op_2);m_auto_max = max(m_auto)m_auto_min = min(m_auto)gold_auto_max = max(gold_auto)m_cross_amplitude_max = max(abs(m_cross)gold_cross_amplitude_max = max(abs(gold_cross)N=length(mseq); % sequence lengthabscissa=-N+1:N-1; % abscissa axisfigure(1);plot(abscissa,m_auto);xla

7、bel('k'); ylabel('R(k)');legend('autocorrelation function of m sequence');title('autocorrelation function of m sequence');figure(2);plot(abscissa,m_cross);xlabel('k'); ylabel('R(k)');legend('cross-correlation function of m sequence');title('

8、;cross-correlation function of m sequence');figure(3);plot(abscissa,gold_auto);xlabel('k'); ylabel('R(k)');legend('autocorrelation function of gold sequence');title('autocorrelation function of gold sequence');figure(4);plot(abscissa,gold_cross);xlabel('k'

9、); ylabel('R(k)');legend('cross-correlation function of gold sequence');title('cross-correlation function of gold sequence');figure(5);subplot(1,2,1);plot(abscissa,m_auto);xlabel('k'); ylabel('R(k)');title('autocorrelation function of m sequence');subp

10、lot(1,2,2);plot(abscissa,gold_auto);xlabel('k'); ylabel('R(k)');title('autocorrelation function of gold sequence');figure(6);subplot(1,2,1);plot(abscissa,m_cross);xlabel('k'); ylabel('R(k)');title('cross-correlation function of m sequence');subplot(1,2

11、,2);plot(abscissa,gold_cross);xlabel('k'); ylabel('R(k)');title('cross-correlation function of gold sequence');figure(7);plot(abscissa,m_op_cross);xlabel('k'); ylabel('R(k)');legend('cross-correlation function of m sequence optimum pairs');title('c

12、ross-correlation function of m sequence optimum pairs');% test autocorrelation of any gold sequencefor test_time = 1:6 ii = ceil(rand()*(N+2); figure(); temp_gold_auto = ccorr(goldseq(ii,:); plot(abscissa,temp_gold_auto); xlabel('k'); ylabel('R(k)'); legend(strcat( 'seq numbe

13、r = ',num2str(ii); title('autocorrelation function of a random gold sequence');end% test cross-correlation of any 2 gold sequencefor test_time = 1:6 ii = ceil(rand()*(N+2); jj=ceil(rand()*(N+2); while jj = ii jj=ceil(rand()*(N+2); end figure(); temp_gold_cross = ccorr(goldseq(ii,:),golds

14、eq(jj,:); plot(abscissa,temp_gold_cross); xlabel('k'); ylabel('R(k)'); legend(strcat( 'seq1 number=',num2str(ii),', seq2 number=',num2str(jj); title(strcat('cross-correlation function of 2 random gold sequence:',. ' cross correlation amplitude MAX = ',

15、. num2str(max(abs(temp_gold_cross);end(2) m_sequence.m% =% m_sequence.m% generating m sequence% Author: jzh (04011646 seu)% Date: 2014.12.29% =function mseq = m_sequence(fbconnection)% = m_sequence =% generating m sequence% Input:% fbconnection: feedback connection responding to primitive polynomial

16、% Output:% msequ: generation of m sequence, 1-by-N% =n = length(fbconnection);N = 2n-1; % length of m sequenceregister = zeros(1,n-1) 1; % initial state of shift register% preallocatingnewregister = zeros(1,n);mseq = zeros(1,N);mseq(1)=register(n);for ii=2:N % feedback newregister(1) = mod(sum(fbcon

17、nection.*register),2); % shift for jj=2:n newregister(jj)=register(jj-1); end register=newregister; % update mseq(ii)=register(n); % output m sequenceend(3) gold_seq.m% =% gold_seq.m% generating gold sequence family% Author: jzh (04011646 seu)% Date: 2014.12.29% =function goldseq = gold_seq(fbconnec

18、tion1,fbconnection2)% = gold_seq =% generating gold sequence family% Input:% fbconnection1: feedback connection 1 % fbconnection2: feedback connection 2% Note: fbconnection1 & fbconnection2 are optimum pairs% Output:% goldseq: generation of gold sequence family, (N+2)-by-N% =mseq1 = m_sequence(f

19、bconnection1);mseq2 = m_sequence(fbconnection2);N=2length(fbconnection1) - 1;goldseq = zeros(N+2,N); % preallocating% different shift amount of two m sequencefor shift_amount = 0:N-1 shift_mseq2 = mseq2(shift_amount+1:N) mseq2(1:shift_amount); goldseq(shift_amount+1,:) = mod(mseq1+shift_mseq2,2);endgoldseq(N+1,:)=mseq1;goldseq(N+2,:)=mseq2;(4) ccorr.m% =% ccorr.m% calculate cross-correlation function% Author: jzh (04011646 seu)% Date: 20

溫馨提示

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

評論

0/150

提交評論