资源简介
gardner位定时同步MATLAB仿真代码,需要理解学习的下载看看
代码片段和文件信息
%File:timing_syn.m timing synchronization
clc
clear
Data_Len = 2000;
Fs = 3840000*8; % Sampling Frequency
Fd = 3840000; % Symbol Frequency 四倍采样速率
SNR = 30; % S/N Ratio for Chanel Simulatioin
RolloffCoef = 0.22; % Roll Off Coeff.
T_Gain = 0.02; % TED Loop Gain
Ratio = Fs/Fd/2; % = Ts/Td/2 每个符号输出两个采样点
Offset = 32; %
timing_error = 0;
datalen = Fs / Fd * (Data_Len - Offset);
displaysize = 1280;
ted_out = zeros(1displaysize);
Interp_Pos = 2*Ratio + Ratio;
Rec_out = zeros(1displaysize);
disp(‘1 Data Send‘);
%1+++++++++++++Data Source+++++++++++++++++++
disp(‘ 1.1 Data Source‘);
x = (-1).^(rand(1Data_Len)>0.5) + j * (-1).^(rand(1Data_Len)>0.5);
figure(1)
plot(x‘r*‘);
xlabel(‘real‘)
ylabel(‘image‘)
xlim([-2.0 2.0]);
ylim([-2.0 2.0]);
title(‘Sending Conset‘)
grid on;
%+++++++++++++pulse shaping+++++++++++++++++++
% Using Rolloff Setting
%+++++++++++++++++++++++++++++++++++++++++++++
disp(‘ 1.2 Pulse Shaping‘);
x_t=rcosflt(xFdFs‘sqrt‘RolloffCoef);
%+++++++++++++channel simulation++++++++++++++
% Add White Offsetoise Using SOffsetR Setting
%+++++++++++++++++++++++++++++++++++++++++++++
disp(‘2 Channel Simulation‘);
c_t = awgn(x_tSNR‘measured‘);
%++++++++++++++++++receive++++++++++++++++++++
disp(‘3 Receive‘);
%4++++++++++Matching Filter++++++++++++++++++++
disp(‘ 3.1 Matching Filter‘);
%matched_data=rcosflt(r_tFdFs‘sqrt/Fs‘RolloffCoef);
r_t=rcosflt(c_tFdFs‘sqrt/Fs‘RolloffCoef);
matched_data=[r_t(Offset+1:end-Offset)];
%++++++++++++Timing Recovery+++++++++++++++++++
% =======Gardner Timing Recovery===============
% TE(k)={Y[(k-1)Td]-Y[kTd])*Y[(kTd-Td/2]
% =======Parabolic Interpolation===============
% C_2 = 0.5 * mu^2 - 0.5 * mu;
% C_1 = -0.5 * mu^2 + ( 0.5 + 1 ) * mu;
% C0 = -0.5 * mu^2 + ( 0.5 - 1 ) * mu + 1;
% C1 = 0.5 * mu^2 - 0.5 * mu;
%+++++++++++++++++++++++++++++++++++++++++++++++
disp(‘ 3.2 Timing Recovery‘);
C_2 = inline(‘0.5*u^2-0.5*u‘);
C_1 = inline(‘-0.5*u^2+1.5*u‘);
C0 = inline(‘-0.5*u^2-0.5*u+1‘);
C1 = inline(‘0.5*u^2-0.5*u‘);
ted_data1 = matched_data(Offset);
ted_data2 = matched_data(Offset+Ratio);
% hp = timing_prefilter(TTi2beta);
k = 1;
m=1;
count = 0;
while( Interp_Pos < ( datalen - 6 ) )
%++++++++++++The first half++++++++++++++++++
mk = floor(Interp_Pos); % Integer Part
uk = Interp_Pos-mk; % Fraction Part
u(m)=uk;
相关资源
- 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实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
评论
共有 条评论