声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 3884|回复: 5

[综合讨论] 求BPSK信号的MATLAB程序

[复制链接]
发表于 2006-8-16 15:13 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
请教BPSK信号用MATLAB编程

[ 本帖最后由 eight 于 2008-4-14 20:50 编辑 ]
回复
分享到:

使用道具 举报

 楼主| 发表于 2006-8-16 15:33 | 显示全部楼层

BPSK信号MATLAB编程

还有相关函数怎么编程?
发表于 2006-8-17 12:46 | 显示全部楼层
转贴一份BPSK程序(取自研学论坛):
% Simulation program to realize BPSK transmission system
%
% Programmed by snowflier,
%

%******************** basic information of the signal **********************

sr=100.0; % Symbol rate
ml=1;        % Number of modulation levels(bpsk)
br=sr.*ml;   % Bit rate (=symbol rate in this case)
nd = 10;   % Number of symbols that simulates in each loop
%ebn0=3;      % Eb/N0
IPOINT=100;    % Number of oversamples
T=nd/sr;
fc=10/T;

%******************** Data generation ********************************  

        data=rand(1,nd)>0.5;  % rand: built in function
        data=data.*2-1;
        [data1]=oversamp(data,nd,IPOINT);

%******************* Filter initialization ********************

irfn=21;     % Number of filter taps         
alfs=0.5;    % Rolloff factor
[xh] = hrollfcoef(irfn,IPOINT,sr,alfs,1);   %Transmitter filter coefficients  
%[xh2] = hrollfcoef(irfn,IPOINT,sr,alfs,0);  %Receiver filter coefficients

         %data=conv(data,xh);
%********************modulation********************************
delta_T=T/length(data1);
t=delta_T:delta_T:T;
b=zeros(1,length(data1));
bpsk=zeros(1,length(data1));
for i=1:100:length(data1)
     %b=cos(2*pi*fc*t+pi*data1(i));
     b=data1(i)*exp(j*2*pi*fc*t);
     bpsk(i:i+99)=b(i:i+99);
end
f=-0.5/delta_T:1/(delta_T*(length(data1)-1)):0.5/delta_T;
BPSK=abs(fft(bpsk));
subplot(211);
plot(real(bpsk));
subplot(212);
plot(f,fftshift(BPSK));
c=cwt(bpsk,1:40,'Haar');x=zeros(1,length(abs(c(2,:))));x=abs(c(2,:));figure,plot(x)
 楼主| 发表于 2006-8-17 17:06 | 显示全部楼层
非常感谢!
发表于 2008-4-12 10:41 | 显示全部楼层
ganxie!!
发表于 2008-5-11 20:25 | 显示全部楼层

回复 3楼 的帖子

请问这里面的oversamp函数是什么啊?
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-9-23 09:25 , Processed in 0.056053 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表