Vulcan
Aerospace Engineering Utilities Built on Janus
Loading...
Searching...
No Matches
vulcan::markov Namespace Reference

Classes

struct  State
 First-order Gauss-Markov process state. More...
struct  Coeffs
 Discretized first-order Markov process coefficients. More...

Functions

template<typename Scalar>
State< Scalar > init_state ()
 Initialize state to zero.
template<typename Scalar>
State< Scalar > init_state (const Scalar &initial_value)
 Initialize state to specific value.
Coeffs discretize (double tau, double sigma, double dt)
 Discretize first-order Markov process.
double process_noise_psd (double tau, double sigma)
 Compute continuous-time process noise PSD.
double process_noise_intensity (double tau, double sigma)
 Compute continuous-time process noise intensity.
template<typename Scalar>
Scalar step (State< Scalar > &state, const Coeffs &coeffs, const Scalar &noise_input)
 Step the first-order Markov process.
template<typename Scalar>
Scalar step (State< Scalar > &state, double tau, double sigma, double dt, const Scalar &noise_input)
 Step with inline discretization.
double autocorrelation (double tau, double sigma, double tau_lag)
 Compute autocorrelation at lag τ_lag.
double psd_at_frequency (double tau, double sigma, double f)
 Compute power spectral density at frequency f.

Function Documentation

◆ autocorrelation()

double vulcan::markov::autocorrelation ( double tau,
double sigma,
double tau_lag )
inline

Compute autocorrelation at lag τ_lag.

For first-order Markov process: R(τ_lag) = σ² · exp(-|τ_lag|/τ)

Parameters
tauCorrelation time [s]
sigmaSteady-state standard deviation
tau_lagTime lag [s]
Returns
Autocorrelation value

◆ discretize()

Coeffs vulcan::markov::discretize ( double tau,
double sigma,
double dt )
inline

Discretize first-order Markov process.

Uses exact discretization that preserves the steady-state variance regardless of the time step.

Parameters
tauCorrelation time [s]
sigmaSteady-state standard deviation
dtTime step [s]
Returns
Discretized coefficients

◆ init_state() [1/2]

template<typename Scalar>
State< Scalar > vulcan::markov::init_state ( )

Initialize state to zero.

Template Parameters
Scalardouble or casadi::MX
Returns
State initialized to zero

◆ init_state() [2/2]

template<typename Scalar>
State< Scalar > vulcan::markov::init_state ( const Scalar & initial_value)

Initialize state to specific value.

Useful for starting with a non-zero initial bias.

Template Parameters
Scalardouble or casadi::MX
Parameters
initial_valueInitial process value
Returns
State initialized to given value

◆ process_noise_intensity()

double vulcan::markov::process_noise_intensity ( double tau,
double sigma )
inline

Compute continuous-time process noise intensity.

The process noise intensity q_c relates to PSD by: q_c² = S_w

Parameters
tauCorrelation time [s]
sigmaSteady-state standard deviation
Returns
Process noise intensity q_c

◆ process_noise_psd()

double vulcan::markov::process_noise_psd ( double tau,
double sigma )
inline

Compute continuous-time process noise PSD.

For a first-order Markov process with correlation time τ and steady-state variance σ², the continuous-time process noise PSD is: S_w = 2σ²/τ

Parameters
tauCorrelation time [s]
sigmaSteady-state standard deviation
Returns
Process noise power spectral density

◆ psd_at_frequency()

double vulcan::markov::psd_at_frequency ( double tau,
double sigma,
double f )
inline

Compute power spectral density at frequency f.

For first-order Markov: S(f) = σ²·(2τ)/(1 + (2πfτ)²)

This is a Lorentzian spectrum.

Parameters
tauCorrelation time [s]
sigmaSteady-state standard deviation
fFrequency [Hz]
Returns
Power spectral density at frequency f

◆ step() [1/2]

template<typename Scalar>
Scalar vulcan::markov::step ( State< Scalar > & state,
const Coeffs & coeffs,
const Scalar & noise_input )

Step the first-order Markov process.

Updates the process state: x[k+1] = φ·x[k] + q·w[k]

Template Parameters
Scalardouble or casadi::MX
Parameters
stateCurrent state (updated in-place)
coeffsDiscretized coefficients
noise_inputWhite noise sample with unit variance
Returns
Current process output after update

◆ step() [2/2]

template<typename Scalar>
Scalar vulcan::markov::step ( State< Scalar > & state,
double tau,
double sigma,
double dt,
const Scalar & noise_input )

Step with inline discretization.

Convenience function when coefficients don't need to be pre-computed.

Template Parameters
Scalardouble or casadi::MX
Parameters
stateCurrent state (updated in-place)
tauCorrelation time [s]
sigmaSteady-state standard deviation
dtTime step [s]
noise_inputWhite noise sample with unit variance
Returns
Current process output after update