class sdr.NCO

Implements a numerically-controlled oscillator (NCO).

Notes

Numerically-Controlled Oscillator Block Diagram
              increment           offset
                  |                 |
         +----+   v                 v
 x[n] -->| K0 |-->@--------------+--@--> y[n]
         +----+   ^              |
                  |   +------+   |
                  +---| z^-1 |---+
                      +------+

 x[n] = Input signal (units)
 y[n] = Output signal (units)
 K0 = NCO gain
 increment = Constant accumulation (units/sample)
 offset = Absolute offset (units)
 z^-1 = Unit delay
 @ = Adder

See also

sdr.DDS

Examples

See the Phase-locked loops example.

Constructors

NCO(K0: float = 1.0, increment: float = 0.0, offset: float = 0.0)

Creates a numerically-controlled oscillator (NCO).

Methods

process(x: ndarray) ndarray

Steps the NCO with the variable-increment signal \(x[n]\).

reset()

Resets the NCO.

step(N: int) ndarray

Steps the NCO forward by \(N\) samples.

Properties

property increment : float

The constant accumulation of the NCO in units/sample.

property K0 : float

The NCO gain.

property offset : float

The absolute offset of the NCO in units.