Robochameleon
v1.0
|
Second order type II decision-directed PLL. More...
Inherits unit.
Public Member Functions | |
function | DDPLL_v1 (in param) |
Class constructor. More... | |
function | traverse (in obj, in varargin) |
Travese function. More... | |
function | pll (in obj, in Ein, in Ts, in Kv, in tau1, in tau2, in refConstellation, in initialPhase) |
PLL core processing. More... | |
function | plot (in obj) |
Plot phase estimates. More... | |
![]() | |
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. | |
Public Attributes | |
Property | refConstellation |
Type of constellation (PSK, QAM, ...) | |
Property | Kv |
Loop constant. | |
Property | tau1 |
PI paramters 1. | |
Property | tau2 |
PI paramters 1. | |
Property | initialPhase |
Initial phase of the PLL. | |
Property | speedupEnabled |
Flag to process a single polarization and apply the results to all the others. | |
Property | Rs |
Property | nInputs |
Number of inputs. | |
Property | nOutputs |
Number of outputs. | |
![]() | |
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. | |
Second order type II decision-directed PLL.
This class implements a decision-directed PLL for frequency offset correction and carrier phase recovery as described in [1, section 5.8]. The loop filter is proportional-integrator type and based on the implementation discussed in [2, Software PLL chapter].
Tuning the feedback parameters
tau1 and tau2 are as defined in standard continuous time PI-PLL theory - i.e. the loop filter will be described by
F(s) = (1+tau2*s)/(tau1*s)
Kv is a discrete quantity. The analogous continuous time loop gain is given by
Kv_cts = 2*Kv/Ts
Translation from continuous to discrete is accomplished using the bilinear Z transform, which is why tan(Ts/2*tau) appears in the script. Then loop parameters are given by
wn = loop BW in rad/s = sqrt(Kv_cts/tau1)
damping_factor = wn*tau2/2
Example
Advanced example
Results:
References:
[1] H. Meyer, Digital Communication Receivers: Synchronization, Channel estimation, and Signal Processing Wiley 1998. Section 5.8 and 5.9.
[2] R. Best, Phase-Locked Loops: Design, Simulation, & Applications, McGraw-Hill 1997. Chapter: Software PLL
Definition at line 71 of file DDPLL_v1.m.
function DDPLL_v1::DDPLL_v1 | ( | in | param | ) |
Class constructor.
param.constellationType | Type of constellation to be used in the decision directed phase detector. Possible values: {'PSK', 'QAM', ...} or using the fast syntax {'QPSK', '16-QAM', ...}. See constref.m for all the possible values. |
param.M | Number of symbols in the constellation. Optional if fast syntax is used to define the constellation type. |
param.Kv | Loop constant. Can be a scalar or a vector if different values should be used for the different input components (modes). Default: 0.3. |
param.tau1 | PI filter parameter 1. Default:1/(2*pi*PI_BANDWIDTH) with PI_BANDWIDTH = 10e6 |
param.tau2 | PI filter parameter 2. Default:1/(2*pi*PI_BANDWIDTH) with PI_BANDWIDTH = 10e6 |
param.initialPhase | Phse used to initialize the DDPLL. Default: 0 |
param.speedupEnabled | If true the phase is estimated for a single component and used to compensate all the other components. Default: False. |
obj | instance of DDPLL_v1 class |
function DDPLL_v1::pll | ( | in | obj, |
in | Ein, | ||
in | Ts, | ||
in | Kv, | ||
in | tau1, | ||
in | tau2, | ||
in | refConstellation, | ||
in | initialPhase | ||
) |
PLL core processing.
Estimates the phase error and applies ompensation to the input signal.
Ein | input signal |
Eout | signal with phase correction applied Class constructor |
Ein | Input complex field. [Vector of double]. |
Ts | Symbol period. |
Kv | Loop constant. Can be a scalar or a vector if different values should be used for the different input components (modes). Default: 0.3. |
tau1 | PI filter parameter 1. Default:1/(2*pi*PI_BANDWIDTH) with PI_BANDWIDTH = 10e6 |
tau2 | PI filter parameter 2. Default:1/(2*pi*PI_BANDWIDTH) with PI_BANDWIDTH = 10e6 |
refConstellation | Reference constellation points. [Vector of complex double]. |
param.initialPhase | Phse used to initialize the DDPLL. Default: 0 |
E_hat | Input signal with phase corrected. |
phaseEstimate | Phase error estimates. |
function DDPLL_v1::plot | ( | in | obj | ) |
Plot phase estimates.
Plots phase estimates and delta of the phase estimates as a function of the number of samples
|
virtual |
Travese function.
Run the pll on the input signal to estimate the phase and then applies the correction to the input signal.
Saves the phase estimates and the frequency offsets for each components in the results structure.
varargin | Case 1: signal_interface with N complex components (modes). |
varargin | Case 2: 2 x signal_interface with 1 complex component. |
varargin | Case 3: 4 x signal_interface with 4 real components. |
out | signal with phase correction applied |
Reimplemented from unit.