chaotic_pfc.dynamics.signals¶
signals.py¶
Generators for the information-bearing messages used throughout the chaotic communication pipeline.
Two waveforms are provided:
binary_message()— a square-wave BPSK-style message taking values in{-1, +1}with a fixed bit period.sinusoidal_message()— a pure cosine/sine probe useful for spectral-response measurements.
Both functions return NumPy arrays of length N so they can be fed
directly to chaotic_pfc.comms.transmitter.transmit().
Functions
|
Generate a periodic square-wave binary message. |
|
Generate a single-tone sinusoidal probe signal. |
- chaotic_pfc.dynamics.signals.binary_message(N, period=20)[source]¶
Generate a periodic square-wave binary message.
The output takes values in
{+1, -1}, with the first half of each period at+1and the second half at-1. This is the standard BPSK-style message used bychaotic_pfc.comms.transmitter.transmit().- Parameters:
- Returns:
The message samples, each
+1.0or-1.0.- Return type:
ndarray, shape (N,)
- Raises:
ValueError – If
periodis not a positive even integer.
Examples
>>> binary_message(8, period=4) array([ 1., 1., -1., -1., 1., 1., -1., -1.])
- chaotic_pfc.dynamics.signals.sinusoidal_message(N, normalised_freq=0.1)[source]¶
Generate a single-tone sinusoidal probe signal.
Useful for frequency-response characterisation: feeding the output of this function through the transmitter/channel/receiver chain shows the system’s gain and phase at one specific frequency.
- Parameters:
- Returns:
The samples
sin(2π · normalised_freq · n)forn = 0, 1, …, N − 1.- Return type:
ndarray, shape (N,)
- Raises:
ValueError – If normalised_freq is not strictly between 0 and 0.5.