Skip to main content
. 2023 Nov 26;23(23):9427. doi: 10.3390/s23239427
Algorithm 3 Data Reconstruction Algorithm Based on Kalman Filtering and Data Trend
  • Input: 

    sensor reading zk, data trends dk, data cache cachedval

  •   1:

    while True do

  •   2:

        if sensor reading zk is not None then

  •   3:

            Insert zk into cachedval

  •   4:

            Calculate dk

  •   5:

        else

  •   6:

            Call the Kalman filter to calculate estimated value xk

  •   7:

            if |ek| > emax then

  •   8:

               zk = zk1 + dk

  •   9:

            else

  • 10:

               zk = xk