能否给出源程序,不甚感激。

我有本书讲OFDM的MATLAB方针(电子版)。。。

有机会上传到FTP上。。。

呵呵,误会...

不是我写的...

我下一本书...

这里牛人太多了...

牛眼里边看的,可能都是牛人吧...

%

% FUNCTION 2.10 : "cp0203_qpsk_mod"

%

% This function receives a binary stream in input ('bits')

% and returns the corresponding sequence of QPSK symbols

%  ('S'),

% plus the two sequences 'Sc' and 'Ss' containing the real

% and imaginary part of each symbol

%

% Programmed by Guerino Giancola

%

function [S,Sc,Ss] = cp0203_qpsk_mod(bits)

nb = length(bits);      % number of bits

ns = ceil(nb/2);        % number of symbols

b0 = zeros(1,ns*2);     % zero padding

b0(1:nb) = bits;

j = sqrt(-1);

for s = 1 : ns

ba = b0(((s-1)*2)+1);

bb = b0(((s-1)*2)+2);

k = bb + ba*2;

p = ((pi/4)*(2*k-1))-pi;

Sc(s) = cos(p);

Ss(s) = sin(p);

S(s) = Sc(s) + j*Ss(s);

end

%

% FUNCTION 2.11 : "cp0203_OFDM_qpsk"

%

% Simulation of a transmitter implementing

% the OFDM transmission chain with QPSK modulation

% on each sub-carrier

%

% 'numbits' is the number of bits generated by the source

% 'fp' is the carrier frequency of the generated signal

% 'fc' is the sampling frequency

% 'T0' is the block length in [s], i.e., 1/T0 is the carrier

%  separation

% 'TP' is the length of the cyclic prefix [s]

% 'TG' is guard time

% 'A' is the amplitude of the rectangular impulse response

%  [V]

% 'N' is the number of carriers (tones) used in the OFDM

%  system

%

% The function returns:

% 1) the generated stream of bits ('bits')

% 2) the corresponding stream of QPSK symbols ('S')

% 3) the I component of the generated signal ('SI')

% 4) the Q component of the generated signal ('SQ')

% 5) the generated OFDM signal ('Stx')

% 6) the value of the sampling frequency ('fc')

% 7) the value of the carrier frequency ('fp')

% 8)9)10) the values of T0, TP, and TG

% 11) the number of tones used for transmission

%

% Programmed by Guerino Giancola

%

function [bits,S,SI,SQ,Stx,fc,fp,T0,TP,TG,N] = ...

cp0203_OFDM_qpsk;

% ----------------------------

% Step Zero - Input parameters

% ----------------------------

numbits = 1024;      % number of bits to be transmitted

fp = 1e9;            % central frequency

fc = 50e9;           % sampling frequency

T0 = 242.4e-9;       % information length

TP = 60.6e-9;        % cyclic prefix

TG = 70.1e-9;        % total guard time

A = 1;               % amplitude of the rectangular impulse

% response

N = 128;             % number of carriers of the OFDM

% system

% -------------------------

% Step One - OFDM modulator

% -------------------------

tc = T0 / N;            % chip time

ntcp = floor(TP/tc);    % number of tones of the cyclic

% prefix

n = (-ntcp+1:1:N);      % tone counter

NT = length(n);         % total number of tones per symbol

% Bit generation

bits=rand(1,numbits)>0.5;

% QPSK modulator

[S,Sc,Ss] = cp0203_qpsk_mod(bits);

% OFDM modulator

nb = ceil(length(S)/N);      % number of OFDM blocks to be

% transmitted

S0 = zeros(1,nb*N);          % zero padding

S0(1:length(S))=S;

dt = 1 / fc;                 % sampling period

if ntcp>0

tc = (T0+TP)/NT;         % tone duration

end

tonesamples = floor(tc/dt);  % samples per tone

toneres = floor((TG-TP)/dt); % samples for the residual

% part

symsamp = (tonesamples*NT)+toneres;

% number of samples representing one OFDM symbol

totsamp = symsamp * nb;

% number of samples representing the transmitted signal

X = [zeros(1,totsamp)'];

for b = 1 : nb

% Serial to Parallel conversion and zero padding

c = S0((1+(b-1)*N):(N+(b-1)*N));    % block extraction

A = length(c);

a1 = floor(A/2);

a2 = A - a1;

FS = 2*A;

Czp=zeros(FS,1);

Czp(1:a1)=[c(1:a1).'];

Czp(FS-a2+1:FS)=[c(A-a2+1:A).'];

C = ifft(Czp);  % IFFT of the zero-padded input

if ntcp>0 % insertion of the cyclic prefix

C1=zeros(length(C)+2*ntcp,1);

C1(1:(2*ntcp))=C(2*N+1-(2*ntcp):2*N);

C1(2*ntcp+1:length(C1))=C;

else

C1=C;

end

%

zp = floor(tonesamples/2);

C2 = [C1.';zeros((zp-1),length(C1))];

C3 = C2(:);

g = ones(1,zp);

C4 = conv(g,C3);

C4 = C4(1:(zp*NT*2));

ics = 1 + (b-1)*symsamp + toneres;

X(ics:ics+length(C4)-1)=C4;

end % for b = 1 : nb

XM = X';                % Parallel to Serial conversion

XM = XM(1:totsamp);

I = real(XM);

Q = imag(XM);

% carrier modulation

time = linspace(0,totsamp*dt,length(I));

SI = I(cos((2*pi*fp)time));

SQ = Q(sin((2*pi*fp)time));

Stx = SI - SQ;

谢谢大家了!

matlab ofdmmodulator,那位高手指点一下OFDM的基本仿真,用MATLAB,谢谢了相关推荐

  1. 基于matlab的捷联惯导算法设计及仿真,基于 Matlab 的捷联惯导算法设计及仿真1doc.doc...

    基于 Matlab 的捷联惯导算法设计及仿真1doc 基于 Matlab 的捷联惯导算法设计及仿真1 严恭敏 西北工业大学航海学院,西安 (710072) E-mail:yangongmin@163. ...

  2. 5G NR OFDM链路层仿真及Matlab代码实现(1):LDPC信道编译码之5G Tollbox中相关函数使用介绍

    目录 0. 写在前面 1. 信道编码 2. 经过信道(❤) 3. LDPC译码 0. 写在前面 这是OFDM链路仿真系列的第一部分. 第一次写博客,望前辈们多多指教!!! 本来想着一口气写完整个过程, ...

  3. 【OFDM】多径信道下OFDM通信系统误码率仿真附matlab代码

    1 内容介绍 仿真是科学研究和工程建设中非常重要的方法.交频分复用(OFDM)技术是下一代移动通信的核心技术之一.重点研究了多径瑞利衰落信道下最大多径时延对基于OFDM技术的通信系统性能的影响. 2 ...

  4. matlab计算单模光纤耦合效率的积分,《高等光学仿真(MATLAB)版》——光波导、激光:前言...

    前言 21世纪是信息时代,信息学科和信息产业的迅猛发展促使传统的光学仪器科学向光电信 息学科扩展.现代光电信息学科及其产业的发展要求新一代的科学研究人员与工程技术人 员除了具有扎实的理论基础,还应具有 ...

  5. matlab中inf函数,matlab中voronoin()函数的用法,求高手指点

    该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 x = [ 0.5 0;0 0.5;-0.5 -0.5;-0.2 -0.1;-0.1 0.1;0.1 -0.1;0.1 0.1 ]; voronoi(x( ...

  6. matlab竖向正负柱状图,echarts竖向正负柱状图【如何用EXCEL做正负柱状图?请高手指点,谢谢】...

    excel中如何绘制正负柱状图 excel中如何绘制正负柱状图其实很容易,只要数据区分正负即可,系统作图会自动形成正负图,至于选择横图还是竖图可以自己进行选择. 为了区分正负,也可以根据情况,将负数图 ...

  7. matlab两个曲线的名称怎么显示出来的,求MATLAB的高手,怎么把两张仿真曲线合并显示在一张图上?...

    求MATLAB的高手,怎么把两张仿真曲线合并显示在一张图上? 关注:194  答案:5  手机版 解决时间 2021-02-10 14:48 提问者终究是陌生了 2021-02-09 16:38 程序 ...

  8. mysql 处理一条语句卡死_一条MySQL查询语句,卡死机器,不知道为什么,求高手指点!...

    你的位置: 问答吧 -> MySQL -> 问题详情 一条MySQL查询语句,卡死机器,不知道为什么,求高手指点! 我的这条查询语句有什么问题吗?为什么一运行,机器就卡死了!N久查询不出结 ...

  9. pro* c调用存储过程 linux,Pro*C调用存储过程,存储过程名称如何传递? 高分求高手指点。。。...

    Pro*C调用存储过程,存储过程名称如何传递? 高分求高手指点...0 运行编译后的执行程序时提示错误:ORA-00900: invalid SQL statement 以下是Pro*c代码: #in ...

最新文章

  1. 赚到!4个Python初学者必学的Numpy小技巧
  2. 大脑比机器智能_机器大脑的第一步
  3. MongoDB 自动删除集合中过期的数据——TTL索引
  4. 2019字节跳动秋招笔试
  5. 跟我学ModelArts丨探索ModelArts平台个性化联邦学习API
  6. Operation和OperationQueue实战:异步下载图片并给图片加滤镜
  7. Oracle VM VirtualBox安装教程
  8. 宝塔Linux面板登录的账号密码忘了怎么办?
  9. win10DCH驱动卸载后无法安装标准驱动的问题(与首选图形处理器拒绝访问)
  10. 分享一个开源的Springboot博客系统,界面简洁精致,拿来即用
  11. Python自动化课之Day2篇
  12. 【eoe源码索引】2014年3月份源码索引贴
  13. 全面剖析Redis Cluster原理和应用
  14. matlab humoments,应用于数字图像识别的Hu矩缩放不变性分析
  15. jenkins fastlane淌坑记录
  16. 再议IIC协议与设计【3】 --SCCB总线介绍
  17. C++11线程池探索
  18. 一招完美删除顽固文件或文件夹
  19. 采购与供应链职业人的8大天敌,你占几个
  20. 内存管理-alloc_pages()函数分配内存

热门文章

  1. Django学习资源
  2. 关于VC9和VC6以及Thread Safe和Non Thread Safe版本选择的问题
  3. 十大经典排序算法5(Python版本)
  4. 百万数据php7取出循环_用php处理百万级以上的数据
  5. sd卡和sdio sdhc_想买TF卡,那些标注卡上的参数看懂了么?
  6. Python+OpenGL实现虚拟场景中不同物体的拾取与选择
  7. 《Python程序设计基础与应用》课后习题答案
  8. 1000道Python题库系列分享十一(9道)
  9. “好串”求解算法优化原理与Python实现
  10. 全国计算机一级考试文稿演示题,计算机等级一级MS Office考试考题:第三套演示文稿题...