class sdr.DDS

Implements a direct digital synthesizer (DDS).

Notes

Direct Digital Synthesizer Block Diagram
              increment           offset
                  |                 |
         +----+   v                 v   +--------+
 x[n] -->| K0 |-->@--------------+--@-->| e^(j.) |--> y[n]
         +----+   ^              |      +--------+
                  |   +------+   |
                  +---| z^-1 |---+
                      +------+

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

See also

sdr.NCO

Examples

See the Phase-locked loops example.

Constructors

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

Creates a direct digital synthesizer (DDS).

Methods

process(x: ndarray) ndarray

Steps the DDS with the variable phase increment signal \(x[n]\).

reset()

Resets the DDS.

step(N: int) ndarray

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

Properties

property nco : NCO

The numerically-controlled oscillator (NCO) used by the DDS.