Skip to main content
. 2022 Oct 8;22(19):7612. doi: 10.3390/s22197612
Algorithm 1:Proposed detection and localization algorithm
  • 1:

    Inititalization: s00, t0

  • 2:

    Training phase:

  • 3:

    Partition training set XN into XN1 and XN2

  • 4:

    Compute Li for each xiϵXN1 as in (1)

  • 5:

    Find L(M) by selecting the Mth smallest Li

  • 6:

    Test phase:

  • 7:

    whilest<hdo

  • 8:

       tt+1

  • 9:

       Get new data xt and compute Dt=(Lt)d(L(M))d

  • 10:

       st=max{st1+Dt,0}

  • 11:

    end while

  • 12:

    Attack detected at time T=t

  • 13:

    Estimate attack start time as q=max{t<T:st=0}

  • 14:

    forn=1,,d do

  • 15:

       Compute ¯n as in (7)

  • 16:

       if ¯nλ then

  • 17:

         Declare dimension n as under attack

  • 18:

        end if

  • 19:

    end for