Skip to main content
. 2019 Nov 28;19(23):5236. doi: 10.3390/s19235236
Algorithm 2 Appliance state clustering.
Input:
GT={g1,g2,,gt} is the ground truth of appliance m
N = Maximum number of states
Output:
CState=[C1,C2,,CK] is the clustered operational states of appliance m
  •   1:

    GScale= Standardize the values of GT time series

  •   2:

    forK=1toNdo

  •   3:

      Compute within groups sum of squares (WSS)

  •   4:

    end for

  •   5:

    Obtain K using elbow method

  •   6:

    Perform K-Means clustering on GT to find K clusters Clus1,Clus2,,ClusK

  •   7:

    where Clus1=GT_Clus1(1),,GT_Clus1(n1),,ClusK=GT_ClusK(1),,GT_ClusK(nK)

  •   8:

    fori=1toKdo

  •   9:

      Get Cmean and Cstd.dev of cluster Clusi

  • 10:

      CThres=Cstd.devCmean

  • 11:

      CRate=λCstd.devCmean where λ=3

  • 12:

      Store Si,Cmean,Cstd.dev,CThres,CRate in Ci

  • 13:

      Store Ci in CState

  • 14:

    end for

  • 15:

    returnCstate