資源描述:
《藍(lán)芽GFSK調(diào)變解調(diào)分析之程式概念介紹.ppt》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在PPT專區(qū)-天天文庫(kù)。
1、藍(lán)芽GFSK調(diào)變/解調(diào)分析之程式概念介紹%bluetooth.m(signal-basedmethod)clear,clf,射頻電路參數(shù)設(shè)定:A=[-310-4-6-3.520-4-6-420%powergain(dB)3346.53.5646.546%Noisefigure(dB)6020600602060106020%Ip3o(dBm)80208010803080208030];%IP2o(dBm)輸入?yún)?shù)設(shè)定:Dr=1;%datarate(Mbps)N=100;%N/2:span(MHz)Nl=100;%resolutioninpoints/MHzNip=-110
2、;%inputnoisefloor(dBm/MHz)Nop=-114;%equvelanttheormalnoisefloor(dBm/MHz)Fr=[5];%centerfrequencyofthecarrier(MHz)Frm=[-20];%powerofthecarrier(dBm)藍(lán)芽GFSK調(diào)變/解調(diào)分析之程式概念介紹GFSK數(shù)位調(diào)變參數(shù)設(shè)定:h=.2;%modulationfactorbt=.5;%relativebandwidthforGaussianshapingButterworthBPF參數(shù)設(shè)定:Bp1=[04603605];%[*fl3fh3**U
3、ATTorder]數(shù)據(jù)資料產(chǎn)生(11-sequence):%%%prn11generatorn=11;m=2^n-1;a=ones(1,n);a(1:11)=[11101010111];fori=1:m-nni=n+i;a(ni)=rem(a(ni-2)+a(ni-11),2);enda=[aa];e=a*2-1;e(1:2)=zeros(1,2);Matlab程式所產(chǎn)生的二位元資料藍(lán)芽GFSK調(diào)變/解調(diào)分析之程式概念介紹輸入資料轉(zhuǎn)成程式運(yùn)算所需之變數(shù):%%%sourcelf=N*Nl;%totalpointsq2=sqrt(2);p2=2*pi;qN=sqrt(N);
4、qk=lf/1000;qf=sqrt(lf);ql=sqrt(Nl);rand('seed',56);F=0:lf-1;Fh=F(1:lf/2);Fu=F/Nl;FT=F/N;%timeaxisFM=Fh/Nl;%frequencyaxis產(chǎn)生熱雜訊:nip=10^((Nip)/20);Noise=randn(1,lf)*nip/ql;Matlab程式所產(chǎn)生的熱雜訊藍(lán)芽GFSK調(diào)變/解調(diào)分析之程式概念介紹產(chǎn)生未經(jīng)shapping之基頻訊號(hào):dr=N/Dr;%numberofpoints/bitds=lf/dr;%numberofbitsdh=round(dr/2);on
5、s=ones(1,dr);fori=1:dsDi((i-1)*dr+1:i*dr)=e(i)*ons;end產(chǎn)生Gaussianfilter:Dip=Di;bd=Dr*bt;io=bd*Nl;c=.347/io^2;gau(1)=1;fori=2:lf/2gau(i)=exp(-c*(i-1)^2);gau(lf-i+2)=gau(i);endgau(lf/2+1)=gau(lf/2);Matlab程式所產(chǎn)生的Gaussianfilter之轉(zhuǎn)移函數(shù)藍(lán)芽GFSK調(diào)變/解調(diào)分析之程式概念介紹經(jīng)由Gaussianfilter濾波後之基頻帶訊號(hào):uf=fft(Di);uff=u
6、f.*gau;Di=real(ifft(uff));Dio=Di;Di=Di/dr*pi*h;U0=0;經(jīng)由Gaussianfilter濾波後之基頻帶訊號(hào)藍(lán)芽GFSK調(diào)變/解調(diào)分析之程式概念介紹產(chǎn)生GaussianFSK調(diào)變訊號(hào):%%%GFSKgeneratorfori=1:lfU0=U0+Di(i);Ui(i)=U0;endFe=10^(Frm/20)*cos(p2*Fr*FT+Ui)/qf*q2;Fa=Fe;GFSK調(diào)變訊號(hào)之時(shí)間波形藍(lán)芽GFSK調(diào)變/解調(diào)分析之程式概念介紹%%%AWGNchannelso=Fa+Noise;Faf=fft(so)/qf;Na=20*
7、log10(abs(Faf));Nb(1)=Na(1);Nb(2:lf/2)=Na(2:lf/2)+3;GFSK調(diào)變訊號(hào)之功率頻譜藍(lán)芽GFSK調(diào)變/解調(diào)分析之程式概念介紹放大與濾波:%%%2ndAMP1nt=2;G=A(1,nt);NF=A(2,nt);Pi3=A(3,nt);Pi2=A(4,nt);csamp%%%1ststage:BPF1Bp=Bp1;nt=1;G=A(1,nt);NF=A(2,nt);csbpfbutGFSK訊號(hào)解調(diào):%%%GFSKdemodulatorto=so.*exp(-j*p2*Fr*FT)/q2;tfo=f