sdr.NCO.__call__(freq: numpy.ndarray[Any, numpy.dtype[numpy.float64]] | None = None, phase: numpy.ndarray[Any, numpy.dtype[numpy.float64]] | None = None, output: 'phase' | 'sine' | 'cosine' = 'complex-exp') ndarray[Any, dtype[float64]]
sdr.NCO.__call__(freq: numpy.ndarray[Any, numpy.dtype[numpy.float64]] | None = None, phase: numpy.ndarray[Any, numpy.dtype[numpy.float64]] | None = None, output: 'complex-exp' = 'complex-exp') ndarray[Any, dtype[complex128]]

Steps the NCO with variable frequency and/or phase signals.

Parameters:
freq: numpy.ndarray[Any, numpy.dtype[numpy.float64]] | None = None

The variable frequency signal \(f[n]\) in radians/sample. This input signal varies the per-sample phase increment of the NCO. If None, the signal is all zeros.

phase: numpy.ndarray[Any, numpy.dtype[numpy.float64]] | None = None

The variable phase signal \(p[n]\) in radians. This input signal varies the per-sample phase offset of the NCO. If None, the signal is all zeros.

output: 'phase' | 'sine' | 'cosine' = 'complex-exp'
output: 'complex-exp' = 'complex-exp'

The format of the output signal \(y[n]\). Options are the accumulated phase, sine, cosine, or complex exponential.

Returns:

The output signal \(y[n]\).

Examples

See the Phase-locked loops example.