⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bpsk.asv

📁 MATLAB用于AWGN信道中产生512点算法!
💻 ASV
字号:
% bpsk.m
%
% Simulation program to build BPSK modulation singal


%************************ Preparation part *****************************
sr=1000000.0;          % Symbol rate
fc = 1000000;          % The frequency of the carrier
fs = 32000000;         % The sample rate
ml=1;                  % Number of modulation levels
br=sr.*ml;             % Bit rate (=symbol rate in this case)
nd=1024*fc/fs;         % The number of symbols (The reason we use the number 1024 is that we use 1024 piont FFT in DSP)
n =fc/sr;              % The number of the carrier in a symbol
ebno=10;               % Eb/N0
IPOINT=32;             % Number of oversamples
Ts = 1/sr;             % The period of the sourse signal

t=0:1/fs:1/fc*nd*n-1/fs;    % The sample point in one carrier period
fcos = cos(2*pi*fc*t);      % cosin carrier

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

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

%*********************** Data generation **********************************
data=rand(1,nd)>0.5;    % rand: built in function

%*********************** Bpsk modulation **********************************

data1=data.*2-1;
[data2]=oversample(data1,nd,IPOINT);
data3=conv(data2,xh);                       % date3 is the baseband singal of BPSK (conv: build in function)
data4=data3(334:
%modulation = data3.*fcos;                   % The modulation is the BPSK singal

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -