changes in mode only affected the signal element. In contrast, the state parameter vector was treat-
ed as if mode 2 dynamics were always taking place. Although this convention can create uncer-
tainty in the state parameter vector, the effect is lessened because updates affecting the parameter
vector are only computed for days of direct streamflow measurement. Direct measurements are not
possible during mode 1 or 3 dynamics because of unsafe measuring conditions.
Implementation
The extended Kalman filter was implemented by recursively computing daily updates to the
state vector x and the state error covariance matrix P, given an initial estimate of the state vector x0
and P0. The update has two steps: a temporal update and an observational update. The temporal
update is computed at each time step; the observational update is computed only on days of direct
measurement. The magnitude of P increases with temporal updates and decreases with observa-
( j +1)
tional updates. Bootstrap estimates of x0 and P0 were computed by iteratively replacing x0
with
( j +1)
( j)
( j)
≅ xf , where x0 and xf are the initial and final values for the state vector for the j or
xf until xf
j + 1 iteration of the extended Kalman filter, respectively.
Temporal updates
The temporal update represents the best linear estimate of the state at time k without consider-
ation of available observations at time k, but only information available at k1. The notational form
used for the general state equation is
x(-) (k) = f {x(+)[(k - 1), k - 1]}.
(6)
For mode 1 dynamics, the signal element is replaced by
h(k - 1)
x1-) (k) =
x1(k - 1).
(
(7)
h(k)
In the case of mode 2 dynamics, the temporal update is written
[
]
[
]
x2+) (k - 1) + x3+) x1+) (k - 1) - x2+) (k - 1) + x(+) (k - 1) u(k - 1) - x5+) (k - 1)
x1-) (k)
(
(
(
(
(
(
~
4
(-)
(+)
x2 (k - 1)
x2 (k)
(-)
(+)
x3 (k) =
x3 (k - 1)
.
(8)
(-)
x4+) (k - 1)
(
x4 (k)
x(-) (k)
x5+) (k - 1)
(
5
Finally, in the case of mode 3 dynamics, the signal element is computed as
[
]
u(k - 1) - t _ hi
~
x1-) (k) = x1+) (k - 1) +
1 - x1+) (k - 1)
(
(
(
(9)
t _ ou - t _ hi
for specified threshold parameters t_hi and t_ou.
A temporal update of streamflow is computed by multiplying the apparent streamflow by the
estimated streamflow ratio, or, for consistency with the extended Kalman filter notation, by multi-
plying the time-varying measurement sensitivity matrix H(k) times the temporal update of the state
vector as
z(-) (k) = H(k) x(-) (k) = [h(k) 0 0] x(-) (k).
^
(10)
A temporal update of the error covariance matrix is computed as
8