ASHRAE Journal - February 2021 - 38

TECHNICAL FEATURE

Even though this method was improved by
Ramaswamy, et al.,5 numerous parameters still need
to be assigned, which reduces the flexibility of this
method.

FIGURE 1 Common abnormal data points in a heating system.

200

A Simplified Detection Algorithm for Abnormal Data Based on k-Nearest
Neighbor
Abnormal data produced in a heating system is usually caused by two reasons. One is broken sensors or
other equipment; the other is data deviation caused by
the communication system. Abnormal data points in
heating systems are usually similar to the data shown in
Figure 1. The data set is one-dimensional, varying with
time. Therefore, the k-nearest neighbor distance can be
expressed as the sum of the difference between point p
and k-nearest neighbor:
Dk ( p) =

∑ (value

q ∈S p ,k

( p)

− value( q ) )

(2)

where Sp,k is a data set of k-nearest neighbor of point p.
The simplified k-nearest neighbor algorithm for
abnormal data detection will be based on the following
description of heating operation data.
1. In most cases, the data is time series. The normal
time series data has self-correlation, which means that
if two data are measured in a short time, their values are
usually similar.
2. The change of data with time obeys a certain rule.
For example, the accumulation of heat should increase
with time; the outdoor temperature changes periodically with the time of day, etc. By processing a variable
based on the corresponding rules, a new variable can be
obtained, the value of which is always stable in a normal
situation. For example, heat accumulation can be processed as heat consumption per day.
3. For the new variable, there will be exceptions,
which obviously drift from other normal points. This
means the differences between abnormal and normal
will be greater than the differences between normal
points. And in the value interval of the new variable,
abnormal points are located at the ends of the interval
(or on one side).
4. The number of exceptions is a minority of the total
data.
Based on the above premises and the description
of heating operation data, the simplified k-nearest
38

ASHRAE JOURNAL

ashrae.org

FEBRUARY 2021

Flow Rate (m3 /h)

160
120
80
40
0

0

20

40

60

80

100

Minutes

neighbor algorithm for sporadic and stochastic offset
fault detection is proposed as follows.
Algorithm 1
1. Select the data set S. There should be more than one
element in the data set.
2. Find the minimum data, minValue, and maximum
data, maxValue, of S.
3. Divide the value range (minValue, maxValue) into N sections. The range interval of each section, minD, can be
calculated using Equation 3:
minD =

(maxValue − minValue )
N

(3)

Thus, the space interval is:
Di =  minValue + (i − 1) × minD , minValue + i × minD 

(4)

where (i = 1,2...N).
4. Calculate the number of data for each interval, Di;
5. Give the abnormal number threshold, k, and classify each interval. If the number of variable objects in
an interval is less than or equal to k, this interval will be
classified as in the candidate range for abnormal points;
otherwise, the interval is within a normal range. k is an
arbitrary integer determined by observation, but the value
of k should be less than the number of data in data set S.
6. Judge the candidate range for abnormal points. The
rule should be:
distance( p,q) = value( p) − value(q) > minD ,q ∈ S(normal )

(5)

7. Based on the rules of the Step 6, judge the candidate interval to find abnormal points. If the candidate
interval is located between two normal ranges, it will be
determined a normal interval. If the candidate interval


http://ashrae.org

ASHRAE Journal - February 2021

Table of Contents for the Digital Edition of ASHRAE Journal - February 2021

Contents
ASHRAE Journal - February 2021 - Intro
ASHRAE Journal - February 2021 - Cover1
ASHRAE Journal - February 2021 - Cover2
ASHRAE Journal - February 2021 - 1
ASHRAE Journal - February 2021 - Contents
ASHRAE Journal - February 2021 - 3
ASHRAE Journal - February 2021 - 4
ASHRAE Journal - February 2021 - 5
ASHRAE Journal - February 2021 - 6
ASHRAE Journal - February 2021 - 7
ASHRAE Journal - February 2021 - 8
ASHRAE Journal - February 2021 - 9
ASHRAE Journal - February 2021 - 10
ASHRAE Journal - February 2021 - 11
ASHRAE Journal - February 2021 - 12
ASHRAE Journal - February 2021 - 13
ASHRAE Journal - February 2021 - 14
ASHRAE Journal - February 2021 - 15
ASHRAE Journal - February 2021 - 16
ASHRAE Journal - February 2021 - 17
ASHRAE Journal - February 2021 - 18
ASHRAE Journal - February 2021 - 19
ASHRAE Journal - February 2021 - 20
ASHRAE Journal - February 2021 - 21
ASHRAE Journal - February 2021 - 22
ASHRAE Journal - February 2021 - 23
ASHRAE Journal - February 2021 - 24
ASHRAE Journal - February 2021 - 25
ASHRAE Journal - February 2021 - 26
ASHRAE Journal - February 2021 - 27
ASHRAE Journal - February 2021 - 28
ASHRAE Journal - February 2021 - 29
ASHRAE Journal - February 2021 - 30
ASHRAE Journal - February 2021 - 31
ASHRAE Journal - February 2021 - 32
ASHRAE Journal - February 2021 - 33
ASHRAE Journal - February 2021 - 34
ASHRAE Journal - February 2021 - 35
ASHRAE Journal - February 2021 - 36
ASHRAE Journal - February 2021 - 37
ASHRAE Journal - February 2021 - 38
ASHRAE Journal - February 2021 - 39
ASHRAE Journal - February 2021 - 40
ASHRAE Journal - February 2021 - 41
ASHRAE Journal - February 2021 - 42
ASHRAE Journal - February 2021 - 43
ASHRAE Journal - February 2021 - 44
ASHRAE Journal - February 2021 - 45
ASHRAE Journal - February 2021 - 46
ASHRAE Journal - February 2021 - 47
ASHRAE Journal - February 2021 - 48
ASHRAE Journal - February 2021 - 49
ASHRAE Journal - February 2021 - 50
ASHRAE Journal - February 2021 - 51
ASHRAE Journal - February 2021 - 52
ASHRAE Journal - February 2021 - 53
ASHRAE Journal - February 2021 - 54
ASHRAE Journal - February 2021 - 55
ASHRAE Journal - February 2021 - 56
ASHRAE Journal - February 2021 - 57
ASHRAE Journal - February 2021 - 58
ASHRAE Journal - February 2021 - 59
ASHRAE Journal - February 2021 - 60
ASHRAE Journal - February 2021 - 61
ASHRAE Journal - February 2021 - 62
ASHRAE Journal - February 2021 - 63
ASHRAE Journal - February 2021 - 64
ASHRAE Journal - February 2021 - 65
ASHRAE Journal - February 2021 - 66
ASHRAE Journal - February 2021 - 67
ASHRAE Journal - February 2021 - 68
ASHRAE Journal - February 2021 - 69
ASHRAE Journal - February 2021 - 70
ASHRAE Journal - February 2021 - 71
ASHRAE Journal - February 2021 - 72
ASHRAE Journal - February 2021 - 73
ASHRAE Journal - February 2021 - 74
ASHRAE Journal - February 2021 - 75
ASHRAE Journal - February 2021 - 76
ASHRAE Journal - February 2021 - 77
ASHRAE Journal - February 2021 - 78
ASHRAE Journal - February 2021 - 79
ASHRAE Journal - February 2021 - 80
ASHRAE Journal - February 2021 - Cover3
ASHRAE Journal - February 2021 - Cover4
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_FYONLJ
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2024november_v2
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2024november
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_BDMHLG
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_WJDGRY
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_ATMAHK
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_VHQRAW
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_XGMDXI
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_YELQLJ
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_QJLWMC
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_MCDEBX
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_WNYSQY
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_XATVOD
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_FJSHSS
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_CCBZDS
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_XDEFVG
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2023november_v2
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2023november
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_VHGNBL
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_WPKBNJ
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_UUVCDE
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_RTGDEW
https://www.nxtbook.com/nxtbooks/ashrae/ashraemexico_2023
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_LKRFXS
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_AZSOFG
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_ERCDBH
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_QWDFRV
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_JHGVDF
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_OPUYHG
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_SREIBM
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_LRTGLK
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_OKRFGH
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2022november_v2
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2022november
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_TZSERA
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_LVRUIX
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_RPTVYZ
https://www.nxtbook.com/nxtbooks/ashrae/mini_pub_catalog
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_XIYTGD
https://www.nxtbook.com/nxtbooks/ashrae/ashraemexico_2022
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_RFGDOB
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_PABXNU
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_REMKLS
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_PICVBT
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_AOYTVW
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_JQOPLS
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_IOYTBC
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_SGAJJF
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_IGHYER
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_PDRKLS
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2021november
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2021november_v2
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_XCODFR
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_QSLFGO
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_ILKVNM
https://www.nxtbook.com/nxtbooks/ashrae/ashraemexico_2021
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_OPDJKD
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_VJKSRY
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_SDHUTC
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_JPPKRR
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_SDLTTH
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_CKLLES
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_SLDOX
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_HJETUK
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_OLUHGE
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2020october
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2020october_v2
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_ZERDGH
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_QVMNEO
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_RTPOKE
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_BBATRE
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_STUBMW
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_TPEMPE
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_JNMKDS
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_FBTTPA
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_WQMMNE
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_TVBRYN
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_showguide2020
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_KTUZMA
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_ABEDGD
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_201910
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_201909
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2019septmeber_v2
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2019september
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_201908
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_201907
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_201906
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_201905
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_201904
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_2019april
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_201903
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_2019march
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_201902
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_201901
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_showguide2019
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_2018december
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_2018november
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2018fall_v2
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2018fall
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_2018october
https://www.nxtbook.com/nxtbooks/ashrae/ashraemexico_2018
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201810
https://www.nxtbook.com/nxtbooks/ashrae/ashraeinsights_201806
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201805
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201804
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201803
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201712
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201711
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201710
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2017fall_v2
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2017fall
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201709
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201705
https://www.nxtbook.com/nxtbooks/ashrae/ashrae_meetinginsert_201610
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2016fall_v2
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2016fall
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_acrexindia
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2015summer_v2
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_amca_2015summer
https://www.nxtbook.com/nxtbooks/amca/2014summer2
https://www.nxtbook.com/nxtbooks/amca/2014summer
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_acma_2014summer
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201311
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201309
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_acmasupp_2013fall
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201305
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201303
https://www.nxtbook.com/nxtbooks/ashrae/pubcatalog_2013winter
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201211
https://www.nxtbook.com/nxtbooks/ashrae/achr_expo_mexico2012
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201209
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_201208_v3
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_201208_v2
https://www.nxtbook.com/nxtbooks/ashrae/pubcatalog_2012summer
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201205
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201203
https://www.nxtbook.com/nxtbooks/ashrae/pubcatalog_2012winter
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_201111_v2
https://www.nxtbook.com/nxtbooks/ashrae/ashraejournal_201109_v2
https://www.nxtbook.com/nxtbooks/ashrae/pubcatalog_2011summer
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201105
https://www.nxtbook.com/nxtbooks/ashrae/meetingplanner_201103
https://www.nxtbookmedia.com