資源簡介
matlab開發-FBM調制解調。FBMC傳輸的超簡單matlab代碼

代碼片段和文件信息
%?Ultra?Easy?FBMC?Modulator
%?Conservatoire?National?des?Arts?et?M閠iers
%?Michel?Terr?
%?January?2014
%?FBMC?modulator?and?demodulator?using?the?Phydyas?prototype?filter
%?Ultra?Easy?approach?avoiding?polyphase?filters
%?N=16?16?subcarriers
%?frame?Number?of?“FBMC?symbols“
clear?all;
close?all;
clc;
N=16;
%?Prototype?Filter?(cf?M.?Bellanger?Phydyas?project)
H1=0.971960;
H2=sqrt(2)/2;
H3=0.235147;
factech=1+2*(H1+H2+H3);
hef(1:4*N)=0;
for?i=1:4*N-1
???hef(1+i)=1-2*H1*cos(pi*i/(2*N))+2*H2*cos(pi*i/N)-2*H3*cos(pi*i*3/(2*N));
end
hef=hef/factech;
%
%?Prototype?filter?impulse?response
h=hef;??
figure(1);
plot(h);
title?(‘Phydyas?Filter?Impulse?response‘);
%?Initialization?for?transmission
frame=4;
y=zeros(14*N+(frame-1)*N/2);
s=zeros(Nframe);
for?ntrame=1:frame
%?OQAM?Modulator
if?rem(ntrame2)==1
????s(1:2:Nntrame)=sign(randn(N/21));
????s(2:2:Nntrame)=j*sign(randn(N/21));
else
????s(1:2:Nntrame)=j*sign(randn(N/21));
????s(2:2:Nntrame)=sign(randn(N/21));
end
x=ifft(s(:ntrame));
%?Duplication?of?the?signal
x4=[x.‘?x.‘?x.‘?x.‘];
%?We?apply?the?filter?on?the?duplicated?signal
signal=x4.*h;
%?Transmitted?signal
y(1+(ntrame-1)*N/2:(ntrame-1)*N/2+4*N)=y(1+(ntrame-1)*N/2:(ntrame-1)*N/2+4*N)+signal;
end
%?Demodulator
sdemod=zeros(Nframe);
for?ntrame=1:4
????r=y(1+(ntrame-1)*N/2:(ntrame-1)*N/2+4*N).*h;?%?We?apply?the?filter
????u=zeros(1N);
????for?k=1:4
????????u=u+r(11+(k-1)*N:k*N);??????????????????%?Summation
????end
????u=u.‘;
????sest=fft(u);
????sest=sest/0.6863;???????????????????????????%?Normalization
????
????%?OQAM?demodulation
????if?rem(ntrame2)==1
????????sdemod(1:2:Nntrame)=real(sest(1:2:N));
????????sdemod(2:2:Nntrame)=j*imag(sest(2:2:N));
????else
???????sdemod(1:2:Nntrame)=j*imag(sest(1:2:N));
???????sdemod(2:2:Nntrame)=real(sest(2:2:N));
????end
end
figure(2)
plot(s‘or‘);
hold?on
plot(sdemod‘xk‘);
title(‘FBMC?OQAM?o?transmitted?x?received‘);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????2038??2014-01-19?09:23??UltraEasyFBMC.m
?????文件????????1312??2014-02-12?14:45??license.txt
評論
共有 條評論