lf_init

Initialization of a first or second order loop filter for use in a carrier recovery PLL

Calling sequence

lf = lf_init();           // Default is first order loop, with tc = 10 samples
lf = lf_init(1, tc);      // First order loop filter
lf = lf_init(2, BL, eta); // Second order loop filter

Parameters

tc:

Time constant, in samples

BL:

Loop bandwidth, normalized to sample frequency

eta:

Damping factor

lf:

Returned loop filter object

Description

The returned object can be used as a component in a carrier recovery process (see carrier_rec_init), or directly with the process method. A first order loop can recover and track the carrier phase (and the carrier frequency is supposed to be low compared to the symbol rate). A second order loop can also recover and track the carrier frequency.

Example 1: First order loop filter

wf = wf_init('bpsk');
lf = lf_init(1, tc = 10); // First order loop filter
// lf can be used now with carrier_rec_init

Example 2: Second order loop filter

fs  = 1e6;  // 1 MHz sampling frequency
BL  = 10e3; // 10 KHz loop bandwidth (e.g. ~ 100 samples to converge)
eta = 1;    // Damping factor
lf = lf_init(2,BL/fs,eta);
// lf can be used now with carrier_rec_init