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 messagem[n]is added to the statex₁[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 vectorc. The carrier is taken from the filtered state componentx[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
|
Modulate a message onto a 2-D Hénon carrier. |
|
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 bychaotic_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.01matches 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
shas 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 infir_coeffsshape 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,).Ncmust be at least 3. Usually produced byscipy.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 fromUniform(0, 0.5)usingseed.seed (int | None) – Seed for the RNG that produces
x0whenx0=None. Has no effect ifx0is provided.
- Returns:
s (ndarray, shape (N,)) – Transmitted carrier
s[n] = v[n] + μ · m[n]wherev[n] = x[2][n].state (ndarray, shape (Nc, N + 1)) – Full state trajectory of the N-th order system. Column
nholds the state at stepn, with column 0 equal tox0.Note (this function does NOT implement)
Transmitterbecause it returns a(signal, state)tuple instead of a single ndarray. Usetransmit()(the 2-D variant) for code that types against theTransmitter protocol.
- Return type:
tuple[ndarray[tuple[Any, …], dtype[_ScalarT]], ndarray[tuple[Any, …], dtype[_ScalarT]]]