Robochameleon
v1.0
|
Resampling. More...
Inherits unit.
Public Member Functions | |
function | Resample_v1 (in params) |
Class constructor. More... | |
function | traverse (in obj, in sig) |
main | |
![]() | |
function | traverseNode (in obj) |
Set unique ID when creating a unit. More... | |
function | connectOutput (in obj, in uobj, in unitOutput, in nextUnitInput) |
Specify where signal should go next. More... | |
function | connectOutputs (in obj, in units, in destInputs) |
Specify where signal should go next. More... | |
function | writeInputBuffer (in obj, in sig, in inputId) |
write input buffer | |
function | horzcat (in varargin) |
horizontal concatenation | |
function | vertcat (in varargin) |
vertical concatenation | |
function | setparams (in obj, in params, in REQUIRED_PARAMS, in QUIET_PARAMS) |
set parameters More... | |
function | view (in obj) |
Show interactive GUI through unit_view-class. | |
Static Public Member Functions | |
static function | resampler (in in, in Fs, in Fs_new, in Fb) |
Resample using Gardner. More... | |
static function | FindRes (in var, in nom_v, in in, in t_new, in L) |
Gardner error detector. More... | |
static function | splineResampler (in in, in Fs, in Fs_new) |
Public Attributes | |
Property | nInputs |
Number of inputs. | |
Property | nOutputs |
Number of outputs. | |
Property | method |
method {'matlab' | 'gardner' | 'spline'} | |
Property | newFs |
Sampling frequency of output signal (Hz) | |
![]() | |
Property | inputBuffer |
Buffer for storing inputs as we traverse the graph. | |
Property | nextNodes |
Children nodes. | |
Property | destInputs |
Destination inputs in children. | |
Property | results |
For storing results. | |
Property | label |
Property | draw |
enable/disable plotting | |
Property | nInputs |
Number of signals traverse expects. | |
Property | nOutputs |
Number of outputs traverse expects. | |
Resampling.
RESAMPLER resamples the signal. Use normal and fast matlab (arbitrary clock phase), a clock phase based on the Gardner estimate, or spline interpolation
Definition at line 14 of file Resample_v1.m.
function Resample_v1::Resample_v1 | ( | in | params | ) |
Class constructor.
param.method | Resampling method ['matlab' | 'gardner'|'spline']; [default spline] |
param.newFs | New sampling frequency [Hz] |
|
static |
Gardner error detector.
Calculates Gardner error term for signal
var | test timing offsets to try |
nom_v | approximate number of samples per symbol |
in | input signal |
t_new | vector of time to interpolate to (?) |
L | length of signal to consider |
PD_gardner | error detector output |
|
static |
Resample using Gardner.
Resamples signal using clock phase as determined by the Gardner timing error detector. This is calculated by averaging over the first 10^4 samples, so if there is clock skew, it will be incorrect at the end of the signal. Interpolation is performed using a cubic spline.
in | input signal |
Fs | sampling frequency of input signal |
Fs_new | sampling frequency of output signal |
Fb | symbol rate |
out | resampled output |
PD_gardner | error detector output |