Skip to main content
. 2023 Nov 26;23(23):9427. doi: 10.3390/s23239427
Algorithm 2 Data Reduction Algorithm Based on Adaptive Reduction Threshold
  • Input: 

    current threshold emax, sensor reading zk, data trends dk1, data cache cachedval

  •   1:

    while True do

  •   2:

        if k = 1 then

  •   3:

            Insert zk into cachedval

  •   4:

            Send zk to remote processor

  •   5:

        else

  •   6:

            Insert zk into cachedval

  •   7:

            Calculate dk

  •   8:

            Call Algorithm 1 to calculate adaptive reduction threshold

  •   9:

            if emax changes then

  • 10:

               send dk to edge server

  • 11:

            Call the Kalman filter to calculate estimated value xk

  • 12:

            ek = zk − xk

  • 13:

            if |ek| > emax then

  • 14:

               send zk to remote processor