第一范文网 - 专业文章范例文档资料分享平台

OFDM技术仿真(MATLAB代码)

来源:用户分享 时间:2025/5/15 22:29:22 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

%Upconverter L = length(carriers);

chips = [ carriers.';zeros((2*q)-1,L)]; p=1/Rs:1/Rs:T/2; g=ones(length(p),1); dummy=conv(g,chips(:)); u=[dummy; zeros(46,1)]; [b,aa] = butter(13,1/20); uoft = filter(b,aa,u);

delay=64; %接收端重构滤波器延迟

s_tilde=(uoft(delay+(1:length(t))).').*exp(1i*2*pi*fc*t); s=real(s_tilde); %OFDM 接收 %Downconversion

r_tilde=exp(-1i*2*pi*fc*t).*s; %(F) figure(1); subplot(211); plot(t,real(r_tilde)); axis([0e-7 12e-7 -60 60]); grid on; figure(1); subplot(212); plot(t,imag(r_tilde)); axis([0e-7 12e-7 -100 150]); grid on; figure(2);

ff=(Rs)*(1:(q*FS))/(q*FS); subplot(211);

plot(ff,abs(fft(r_tilde,q*FS))/FS); grid on;

29

基于MATLAB实现OFDM的仿真

figure(2); subplot(212);

pwelch(r_tilde,[],[],[],Rs); %载波抑制

[B,AA] = butter(3,1/2);

r_info=2*filter(B,AA,r_tilde); %基带信号持续时间(G) figure(3); subplot(211); plot(t,real(r_info)); axis([0 12e-7 -60 60]); grid on; figure(3); subplot(212); plot(t,imag(r_info)); axis([0 12e-7 -100 150]); grid on; figure(4);

f=(2/T)*(1:(FS))/(FS); subplot(211);

plot(ff,abs(fft(r_info,q*FS))/FS); grid on; subplot(212);

pwelch(r_info,[],[],[],Rs); %抽样

r_data=real(r_info(1:(2*q):length(t)))... %离散时间基带信号 +1i*imag(r_info(1:(2*q):length(t))); % (H) figure(5) figure(5); subplot(212);

stem(tt(1:20),(imag(r_data(1:20)))); axis([0 12e-7 -100 150]);

30

grid on; figure(6);

f=(2/T)*(1:(FS))/(FS); subplot(211);

plot(f,abs(fft(r_data,FS))/FS); grid on; subplot(212);

pwelch(r_data,[],[],[],2/T); ?T

info_2N=(1/FS).*fft(r_data,FS); % (I)

info_h=[info_2N(1:A/2) info_2N((FS-((A/2)-1)):FS)]; %限幅 for k=1:N,

a_hat(k)=alphabet((info_h(k)-alphabet)==min(info_h(k)-alphabet)); %j end; figure(7)

plot(info_h((1:A)),'.k');

title('info-h Received Constellation') axis square; axis equal; figure(8)

plot(a_hat((1:A)),'or'); title('a_hat 4-QAM') axis square; axis equal; grid on;

axis([-1.5 1.5 -1.5 1.5]);; subplot(211);

stem(tt(1:20),(real(r_data(1:20)))); axis([0 12e-7 -60 60]);

31

搜索更多关于: OFDM技术仿真(MATLAB代码) 的文档
OFDM技术仿真(MATLAB代码).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c0qwob4545m7tdik036ax_8.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top