Skip to main content
. 2020 May 14;20(10):2785. doi: 10.3390/s20102785
Algorithm 1 Anonymization Algorithm.

Input:minvorg, maxvorg, minvrep, maxvrep, minσorg, maxσorg, ϵ.

Output: Report value v and standard deviation σ of sensing error

  • 1:

    Obtain sensed value v and standard deviation σ of sensing error

  • 2:

    if the standard deviation is considered as private information then

  • 3:

    ϵϵ/2

  • 4:

    end if

  • 5:

    vmin(max(minvorg,v),maxvorg)  /* If v is smaller than minvorg (or larger than maxvorg), v is set to minvorg (or maxvorg).*/

  • 6:

    vv+Lap((maxvorgminvorg)/ϵ)  /* The global sensitivity is maxvorgminvorg.*/

  • 7:

    vmin(max(minvrep,v),maxvrep)  /* If v is smaller than minvrep (or larger than maxvrep), v is set to minvrep (or maxvrep).*/

  • 8:

    if the standard deviation is considered as private information then

  • 9:

    σmin(max(minσorg,σ),maxσorg)  /* If σ is smaller than minσorg (or larger than maxσorg), σ is set to minσorg (or maxσorg).*/

  • 10:

    σσ+Lap((maxσorgminσorg)/ϵ)  /* The global sensitivity is maxσorgminσorg.*/

  • 11:

    end if

  • 12:

    Report v and σ.