chaotic_pfc.comms.transmitter

transmitter.py

Chaos-based modulator. Implements the Transmitter protocol — a callable that embeds a message in the state of a Hénon oscillator.

Two transmitters are provided, mirroring the two receiver modes:

  • transmit() — 2-D Hénon carrier. The message m[n] is added to the state x₁[n] before it feeds back into the next iteration, so the emitted carrier is

    \[s[n] = x_1[n] + \mu \, m[n]\]

    and the updated state becomes x_1[n+1] = a - s[n]^2 + b \, x_2[n].

  • transmit_order_n() — higher-order Hénon with an internal FIR filter whose taps form the coefficient vector c. The carrier is taken from the filtered state component x[2][n].

Both functions are deterministic given their inputs. Where a random initial condition is needed (transmit_order_n with x0=None), a seed parameter exposes the RNG so callers can reproduce results.

Functions

transmit(message[, mu, a, b, x0, y0])

Modulate a message onto a 2-D Hénon carrier.

transmit_order_n(message, fir_coeffs[, mu, ...])

Modulate a message onto an N-th order filtered Hénon carrier.

chaotic_pfc.comms.transmitter.transmit(message, mu=0.01, a=1.4, b=0.3, x0=0.0, y0=0.0)[source]

Modulate a message onto a 2-D Hénon carrier.

Parameters:
  • message (ndarray[tuple[Any, ...], dtype[_ScalarT]]) – Message samples m[n], shape (N,). Typically produced by chaotic_pfc.dynamics.signals.binary_message().

  • mu (float) – Modulation depth. Small values (≪ 1) keep the Hénon dynamics near their autonomous regime, which is important for reliable chaos synchronisation at the receiver. The default 0.01 matches the convention used throughout the project.

  • a (float) – Hénon parameters. The canonical chaotic regime is (1.4, 0.3).

  • b (float) – Hénon parameters. The canonical chaotic regime is (1.4, 0.3).

  • x0 (float) – Initial conditions of the transmitter’s internal state.

  • y0 (float) – Initial conditions of the transmitter’s internal state.

Returns:

The transmitted carrier s[n] = x_1[n] + μ · m[n].

Return type:

ndarray, shape (N,)

Notes

The recurrence implemented is

\[\begin{split}s[n] &= x_1[n] + \mu \, m[n] \\ x_1[n+1] &= a - s[n]^2 + b \, x_2[n] \\ x_2[n+1] &= x_1[n]\end{split}\]

The output s has the same chaotic broadband spectrum as the autonomous Hénon map for μ 1, with the message imprinted as a small spectral perturbation.

Implements: Transmitter.

chaotic_pfc.comms.transmitter.transmit_order_n(message, fir_coeffs, mu=0.01, a=1.4, b=0.3, x0=None, seed=None)[source]

Modulate a message onto an N-th order filtered Hénon carrier.

The carrier is taken from the filtered state component x[2][n], producing a signal with a richer spectrum than the 2-D variant. The FIR coefficients in fir_coeffs shape the feedback path and directly control the Lyapunov spectrum of the system.

Parameters:
  • message (ndarray[tuple[Any, ...], dtype[_ScalarT]]) – Message samples, shape (N,).

  • fir_coeffs (ndarray[tuple[Any, ...], dtype[_ScalarT]]) – FIR feedback coefficients c, shape (Nc,). Nc must be at least 3. Usually produced by scipy.signal.firwin().

  • mu (float) – Modulation depth. Same semantics as in transmit().

  • a (float) – Hénon parameters.

  • b (float) – Hénon parameters.

  • x0 (ndarray[tuple[Any, ...], dtype[_ScalarT]] | None) – Optional explicit initial state, shape (Nc,). If omitted, a random state is drawn from Uniform(0, 0.5) using seed.

  • seed (int | None) – Seed for the RNG that produces x0 when x0=None. Has no effect if x0 is provided.

Returns:

  • s (ndarray, shape (N,)) – Transmitted carrier s[n] = v[n] + μ · m[n] where v[n] = x[2][n].

  • state (ndarray, shape (Nc, N + 1)) – Full state trajectory of the N-th order system. Column n holds the state at step n, with column 0 equal to x0.

  • Note (this function does NOT implement)

  • Transmitter because it returns a

  • (signal, state) tuple instead of a single ndarray. Use

  • transmit() (the 2-D variant) for code that types against the

  • Transmitter protocol.

Return type:

tuple[ndarray[tuple[Any, …], dtype[_ScalarT]], ndarray[tuple[Any, …], dtype[_ScalarT]]]