-
Notifications
You must be signed in to change notification settings - Fork 23
runningAverage
The runningAverage sub-‐structure contains results from the Kalman filter stage, phase 3 of the cBathy algorithm. It contains the final results of cBathy, with errors, as well as information used in the Kalman filtering operation. While phases 1 and 2 of cBathy depend only on the current data collection, Kalman filtering depends on both the current and the previous bathy result. Since data collections are often retrieved from an Argus Station out of order, phases 1 and 2 are usually run by a separate code (analyzeBathyCollect) for a set of data collections, then phase 3 Kalman filtering is run later (using runningFilterBathy), after all data collections have been retrieved and analyzed to phase 2, to fill in the runningAverge structure. Filtering is a fast computation and can also be re-‐done at any time if the user wishes to change the filter in some way, for example by changing the process error.
Running the Kalman filter (phase 3) does not change phase 1 and 2 results in any way (fortunately, since these early phases are the more computationally intense). ‘nan’ values of runningAverage results indicates that Kalman filtering has not yet taken place or that no valid data has yet been encountered at those pixels with nans. This might occur for analysis locations that are usually high on the beach, so see waves only on occasion.
The runningAverage sub-‐structure has the following fields: bathy.runningAverage =
h: [41x43 double] hErr: [41x43 double] P: [41x43 double]
Q: [41x43 double]
K: [41x43 double]
prior: [1x64 char]
h
is the final depth estimate off cBathy
hErr
is the estimate error associated with 'h'
The fields P
, Q
and K
are components of the Kalman computation, described in section 2.3 of HPH13.
-
K and P
K
is the critical value and is the Kalman gain that expresses the extent to which the current estimate is believed compared to the previous running average values and depends on the ratio of the error variance on the prior estimate (P) compared to the error variance of the current estimate (hErr^2
) plusP
(equation (5), HPH13). So when the current estimate is much noisier than the prior,K~0
and the new bathymetry estimate is essentially ignored. But when the current estimate is much better than the prior (for some reason),K~1
and the new result is dominated by the new information. For typical conditions, after the filter has incorporated a number of collections so has stabilized,K
will commonly be around 0.1 so the new results only slowly nudge the average slowly. -
Q
Q
, the process error, represents the amount that our faith in the prior running average degrades with elapsed time due to natural sediment transport and changes in morphology. The process error is discussed further here.
prior
is simply the file name of the prior estimate used in the Kalman filter and can be used to confirm that files have been filtered in the proper order.
Final running average results for any run can be nicely displayed using the routine [plotBathyCollectKalman] (cBathy-toolbox/plotBathyCollectKalman.m).