Skip to content

Signal generation

Generate signal functions for system excitation.

dynax.aprbs(key, length, num_jumps, initial_value=None)

Generate an amplitude-modulated pseudo-random binary sequence (APRBS).

The output sequence contains numbers from [0, 1).

PARAMETER DESCRIPTION
key

JAX PRNGKey.

TYPE: PRNGKeyArray

length

Number of samples in the sequence.

TYPE: int

num_jumps

Number of jumps in the sequence.

TYPE: int

initial_value

The inital value of the sequence. If None, it is chosen randomly.

TYPE: float | None DEFAULT: None

RAISES DESCRIPTION
ValueError

If the number of jumps exceeds the number of possible jumping points (length-2).

RETURNS DESCRIPTION
Array

Array with shape (length,) describing the APRBS.