sunyong1st 发表于 2006-8-16 15:13

求BPSK信号的MATLAB程序

请教BPSK信号用MATLAB编程

[ 本帖最后由 eight 于 2008-4-14 20:50 编辑 ]

sunyong1st 发表于 2006-8-16 15:33

BPSK信号MATLAB编程

还有相关函数怎么编程?

songzy41 发表于 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;
      =oversamp(data,nd,IPOINT);

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

irfn=21;   % Number of filter taps         
alfs=0.5;    % Rolloff factor
= hrollfcoef(irfn,IPOINT,sr,alfs,1);   %Transmitter filter coefficients
% = 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)

sunyong1st 发表于 2006-8-17 17:06

非常感谢!

roltem 发表于 2008-4-12 10:41

ganxie!!

峰雪无痕 发表于 2008-5-11 20:25

回复 3楼 的帖子

请问这里面的oversamp函数是什么啊?
页: [1]
查看完整版本: 求BPSK信号的MATLAB程序