资源简介
可以用的MATLAB 仿真程序,包括调制。信道部分,解调部分、
代码片段和文件信息
clear; close all;
% Simulate continuous time
f_s = 2000000; % 400 kHz (sampling rate)
T=0.1; % 0.1 second
samples=f_s*T; % total number of samples simulated
t=(0:(samples-1))/f_s; %time axis
% Generate bits
f_b=20000; % bit_rate = 20 kbps
bits=f_b*T; % number of bits simulated
rand(‘seed‘0); %
b=round(rand(1bits)); % random source bits
% Generate Symbols: QPSK symbols
bits_per_symbol=2;
f_symbol = f_b/bits_per_symbol; % symbol rate = 20 ksym/s
symbols= bits/bits_per_symbol; % number of BPSK symbols
samples_per_symbol=f_s/f_symbol; % number of samples per BPSK symbol (20)
b_mat=reshape(bbits_per_symbolsymbols);
b_1=b_mat(1:);
b_2=b_mat(2:);
j=sqrt(-1);
a = 1/sqrt(2); % amplitude
xk=a*((1-2*b_1)+j*(1-2*b_2)); % QPSK symbols
% figure;
% subplot(211)
% stem(0:1/f_symbol:(1/f_symbol)*49real(xk(1:50)));
% title(‘the plot of real[xk]‘);
% xlabel(‘time(s)‘);
% ylabel(‘Amplitude‘);
% subplot(212)
% stem(0:1/f_symbol:1/f_symbol*49imag(xk(1:50)));
% title(‘the plot of imag[xk]‘);
% xlabel(‘time(s)‘);
% ylabel(‘Amplitude‘);
% Upsampling to simulate impulses in continuous time
x_up = upsample(xk samples_per_symbol samples_per_symbol/2);
roll_off=0.5; % filter‘s roll-off factor
f_cut_off = f_symbol/2; % filter‘s cut-off frequency
filter_order=10; % filter‘s order/factor
% Tx/Rx filter
B_rrcos=sqrt(samples_per_symbol)*firrcos(filter_order*samples_per_symbolf_cut_offroll_offf_s‘rolloff‘‘sqrt‘);
% Tx filter
xt=filter2(B_rrcosx_up);
% x(t) => after up_sampling and transmit filter
% Channel
c = [10.5]; % channel profile
c_up = upsample(c samples_per_symbol); % upsampling the channel
% convolution of x(t) and c(t)
xc = filter(c_up 1 xt);
% Rx filter
xhat=filter2(B_rrcosxc);
% Eye Diagram
repetition= 200; % number of repetitions for the drawing of the eye diagram
EYE = zeros(2*samples_per_symbol repetition); % Two periods draw 200(=repetition) times
EYE(:) = xhat(samples_per_symbol*filter_order+1:(2*samples_per_symbol)*repetition+samples_per_symbol*filter_order)‘;
%subplot(211);
%plot(1:2*samples_per_symbolreal(EYE)); grid;
%title([‘Real Eye Diagram (Received QPSK S
相关资源
- 串行级联cpm系统MATLAB仿真
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
评论
共有 条评论