Merge branch 'main' of cau-git.rz.uni-kiel.de:nt/mitarbeiter/silas/imdd_simulation
This commit is contained in:
47
Classes/04_DSP/Timing_Recovery.m
Normal file
47
Classes/04_DSP/Timing_Recovery.m
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
classdef Timing_Recovery < handle
|
||||||
|
|
||||||
|
properties(Access=public)
|
||||||
|
timing_error_detector
|
||||||
|
sps
|
||||||
|
damping_factor
|
||||||
|
normalized_loop_bandwidth
|
||||||
|
detector_gain
|
||||||
|
end
|
||||||
|
|
||||||
|
methods(Access=public)
|
||||||
|
function obj = FFE(options)
|
||||||
|
arguments(Input)
|
||||||
|
|
||||||
|
options.timing_error_detector = 'Gardner';
|
||||||
|
options.sps = 2;
|
||||||
|
options.damping_factor = 1.0;
|
||||||
|
options.normalized_loop_bandwidth = 0.005;
|
||||||
|
options.detector_gain = 1;
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
fn = fieldnames(options);
|
||||||
|
for n = 1:numel(fn)
|
||||||
|
obj.(fn{n}) = options.(fn{n});
|
||||||
|
end
|
||||||
|
|
||||||
|
obj.e = zeros(obj.order,1);
|
||||||
|
obj.error = 0;
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function data_out = process(obj, data_in)
|
||||||
|
|
||||||
|
timing_synchronization = comm.SymbolSynchronizer( ...
|
||||||
|
"TimingErrorDetector", obj.timing_error_detector, ...
|
||||||
|
"SamplesPerSymbol", obj.sps, ...
|
||||||
|
"DampingFactor", obj.damping_factor, ...
|
||||||
|
"NormalizedLoopBandwidth", obj.normalized_loop_bandwidth, ...
|
||||||
|
"DetectorGain", obj.detector_gain);
|
||||||
|
|
||||||
|
data_out.signal = timing_synchronization(data_in.signal);
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Reference in New Issue
Block a user