ofdm 2011.11.10

%采用10个子载波,1000,1100,1200,...,1900。T=0.01s,传了20bit。数据率是2000bit/s。Rs=2000/10/2=100symbol/s。delta f=1/Tsymbol。

%在matlab里用离散的模拟连续的,解析度fs为1000000。

%问题:在数字调制实现中由ifft得到了ofdm信号的复包络的采样后,书上说由DA得到复包络信号,在matlab中如何实现,或者由基带复包络得到带通信号。

%用10个子载波调制的方法

% a=[ 1 0     1 1    0 1     0 0    1 0     1 1        0 1      1 1     0 0    1 0    ];

a=[ 1 -1     1 1    -1 1     -1 -1    1 -1     1 1        -1 1      1 1     -1 -1    1 -1    ];
fs=1000000;
T=0.01;
t=0:1/fs:T-1/fs;
f0=1000;f1=1100;f2=1200;f3=1300;f4=1400;f5=1500;f6=1600;f7=1700;f8=1800;f9=1900;
f=[cos(2*pi*f0*t);-sin(2*pi*f0*t);   cos(2*pi*f1*t);-sin(2*pi*f1*t);   cos(2*pi*f2*t);-sin(2*pi*f2*t);   cos(2*pi*f3*t);-sin(2*pi*f3*t);   cos(2*pi*f4*t);-sin(2*pi*f4*t);   cos(2*pi*f5*t);-sin(2*pi*f5*t);   cos(2*pi*f6*t);-sin(2*pi*f6*t);   cos(2*pi*f7*t);-sin(2*pi*f7*t);   cos(2*pi*f8*t);-sin(2*pi*f8*t);   cos(2*pi*f9*t);-sin(2*pi*f9*t);];
A=repmat(a',1,fs*T);
S1=A.*f;
S2=sum(S1);
figure;plot(t,S2,'.-r');

%用数字ifft实现
clear
a=[ 1 -1     1 1    -1 1     -1 -1    1 -1     1 1        -1 1      1 1     -1 -1    1 -1    ];
a1=zeros(2,10);
a1(:)=a;
a2=a1(1,:)+j*a1(2,:);
a3=ifft(a2);
ac=real(a3);
as=imag(a3);

 fs=1000000;
T=0.01;
t=0:1/fs:T-1/fs;

ac1=repmat(ac,1000,1);
ac2=ac1(:)';

as1=repmat(as,1000,1);
as2=as1(:)';

S=ac2.*cos(2*pi*1000*t)-as2.*sin(2*pi*1000*t);
figure;plot(t,S,'.-r');
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值