资源简介
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;
相关资源
- 关于GPS信号如何产生、如何捕获、如
- matlab原木图像分割与计数.zip
- 基于卡尔曼滤波的机器人slam导航算法
- pdaf-matlab
- matlab 结构振动控制代码-RBPF
- 灰度共生矩阵matlab代码
- matlab代码-雷达脉冲压缩及多普勒处理
- 基于SIFT特征的图像配准Matlab源代码
- MATLAB课程设计(cantor三分集)
- Matlab保留ROI区域
- 逆滤波,维纳滤波实现源代码MATLAB)
- 元胞自动机-Matlab实现.zip
- 沈再阳MATLAB信号处理 代码.zip
- MPC-test.zip
- 扩频方法实现图像水印
- 单相并网逆变器PQ仿真
- 学会用MATLAB实现傅里叶变换的时移,
-
Simuli
nk_RBF神经网络PID控制 - 基于粒子群算法的配电网无功优化.
- MATLAB 2009a 注册文件2017年11月11日之后
- 以MATLAB为平台的电弧模型
- 一个用matlab编写的串口调试程序,可
- 开关磁阻电机MATLAB模型 非线性 电压
- 利用MATLAB从图片中提取曲线数据的小
- MATLAB写的成绩管理系统
- 基于PCA法的故障检测含matlab代码
- matlab版本的红外目标跟踪代码
- matlab的copula相关程序
- matlab中text函数在显示字符串时的使用
- jpeg压缩的matlab程序
评论
共有 条评论