File ppe_core.h¶
FileList > inc > ppe > ppe_core.h
Go to the source code of this file
Feedforward polynomial-phase estimator (frequency + chirp rate). More...
#include "clib_common.h"#include "jm_perf.h"#include "fft/fft_core.h"#include "spectral/spectral_core.h"#include <complex.h>
Classes¶
| Type | Name |
|---|---|
| struct | ppe_result_t Polynomial-phase estimate (one search). |
| struct | ppe_state_t PolynomialPhaseEstimator state (FFT plan + rate grid + scratch). |
Public Functions¶
| Type | Name |
|---|---|
| ppe_state_t * | ppe_create (size_t max_len, double max_rate) Create a polynomial-phase estimator. |
| void | ppe_destroy (ppe_state_t * state) Destroy an estimator. |
| ppe_result_t | ppe_estimate (ppe_state_t * state, const float _Complex * x, size_t n_in) Estimate the normalized frequency and chirp rate of a complex segment via the coherent (chirp-rate x frequency) surface. |
| void | ppe_reset (ppe_state_t * state) Do nothing — the estimator keeps no running state between calls. |
Detailed Description¶
Estimates the normalized frequency f (cycles/sample) and chirp rate r (cycles/sample^2) of a complex sequence by a coherent 2-D matched-filter search. For each chirp-rate hypothesis r_i in [-max_rate, +max_rate] the sequence is dechirped (multiplied by exp(-j*pi*r_i*m^2)) and FFT-ed; the resulting (chirp-rate x frequency) surface peaks at the true (r, f), refined sub-bin in both axes by parabolic interpolation. Being fully coherent it is the matched-filter-optimal estimator (holds at low SNR), and it collapses to a single FFT — pure Doppler — when max_rate = 0. One knob therefore spans near-static Doppler through severe LEO chirp.
The caller strips modulation first: data-aided (multiply by conj of the known symbols) keeps full SNR; non-data-aided raises an M-PSK stream to the M-th power (BPSK: square) — which doubles f and r, so the caller halves them.
Stateless by-value analyzer (the measure-suite pattern). Composes fft_core + the spectral_core window / find_peaks free functions.
ppe_state_t *p = ppe_create(4096, 0.0); // Doppler only (single FFT)
ppe_result_t e = ppe_estimate(p, y, n); // e.freq_norm, e.rate_norm
ppe_destroy(p);
Public Functions Documentation¶
function ppe_create¶
Create a polynomial-phase estimator.
Parameters:
max_lenMaximum input sequence length (>= 4).max_rateChirp-rate search half-span (cycles/sample^2); 0 searches frequency only (a single FFT — near-static Doppler).
Returns:
Heap state, or NULL on bad args / allocation failure.
function ppe_destroy¶
Destroy an estimator.
Parameters:
stateMay be NULL.
function ppe_estimate¶
Estimate the normalized frequency and chirp rate of a complex segment via the coherent (chirp-rate x frequency) surface.
Runs the full 2-D matched-filter search in one shot: for each chirp-rate hypothesis the segment is dechirped and FFT-ed, and the peak of the resulting surface — refined sub-bin by parabolic interpolation on both axes — gives the estimate. With max_rate = 0 the rate axis collapses to a single FFT (pure Doppler) and the returned rate is forced to exactly 0.
Feed a segment whose modulation has already been stripped (data-aided by the known symbols, or non-data-aided by the M-th-power trick — remembering that raising to the M-th power scales both returned values by M). The result carries freq_norm (cycles/sample), rate_norm (cycles/sample^2), and snr_db (a rough peak-to-mean confidence).
Parameters:
stateEstimator handle; must be non-NULL.xComplex segment (modulation already stripped by the caller).n_inSegment length, in[4, max_len].
Returns:
The estimate; all fields are zeroed if n_in is out of range.
>>> import numpy as np
>>> from doppler.dsss import PolynomialPhaseEstimator
>>> m = np.arange(512)
>>> f, r = 0.05, 1e-5 # true Doppler + chirp rate
>>> x = np.exp(2j*np.pi*(f*m + 0.5*r*m*m)).astype(np.complex64)
>>> p = PolynomialPhaseEstimator(max_len=512, max_rate=5e-5)
>>> e = p.estimate(x) # one-shot coherent search
>>> round(e.freq_norm, 4), round(e.rate_norm, 7)
(0.0501, 1e-05)
function ppe_reset¶
Do nothing — the estimator keeps no running state between calls.
A feedforward analyzer computes each estimate purely from the segment it is handed, so there is nothing to clear. The method exists only to satisfy the common object protocol; calling it is always safe and has no effect.
Parameters:
stateEstimator handle (unused).
The documentation for this class was generated from the following file native/inc/ppe/ppe_core.h