The Kalman Filter
The Kalman filter is the optimal linear state estimator; it fuses the twin's model prediction with noisy diagnostics into a best estimate and its uncertainty.
Prediction plus correction
The Kalman filter maintains a Gaussian belief about the plant state - a mean and a covariance - and updates it in two steps each cycle: predict the state forward with the model, then correct it with new measurements, weighting each by its uncertainty. It is the mathematical core of the KRONOS-CTRL twin's state estimate for both machines.
Linear model: x_k = F x_{k-1} + B u_{k-1} + w, w~N(0,Q)
Measurement: z_k = H x_k + v, v~N(0,R)
Predict:
x^-_k = F x_{k-1} + B u_{k-1}
P^-_k = F P_{k-1} F' + Q
Update:
K_k = P^-_k H' (H P^-_k H' + R)^-1 (Kalman gain)
x_k = x^-_k + K_k ( z_k - H x^-_k ) (innovation correction)
P_k = (I - K_k H) P^-_k
The gain balances trust
The Kalman gain K is the crux: it weights the measurement against the prediction by their relative uncertainties. When diagnostics are precise (small R), K is large and the filter trusts sensors; when the model is confident (small P^-), K is small and it trusts the prediction. This is exactly how the twin should behave as the breeder's diagnostics degrade or drop.
# one Kalman cycle (schematic)
x_pred = F @ x + B @ u
P_pred = F @ P @ F.T + Q
y = z - H @ x_pred # innovation
S = H @ P_pred @ H.T + R # innovation covariance
K = P_pred @ H.T @ inv(S) # gain
x = x_pred + K @ y
P = (I - K @ H) @ P_pred
The innovation as a health signal
The innovation - the gap between measured and predicted - and its covariance S are diagnostic gold. A whitened innovation that stays within its expected band means model and sensors agree; a persistent bias or an out-of-band spike signals a sensor fault, a model error, or an anomaly. The stack monitors innovations as a first-line consistency and anomaly check feeding the disruption-precursor ensemble.
- Optimal for linear-Gaussian systems; minimizes estimate variance.
- Reports covariance P: the estimate carries its own uncertainty.
- Gain adapts trust between model and measurements automatically.
- Innovation monitoring: sensor-fault and anomaly detection for free.
Real fusion dynamics are nonlinear, so the twin uses the extended/unscented and ensemble variants; the linear Kalman filter is the exact case and the conceptual foundation they all extend.