02-knn__slides
02-knn__slides
3. K-nearest neighbors
4
a r t i c l e i n f o
Y. Zhou et al. / Journal of Cleaner Production 249 (2020) 119409
a b s t r a c t
Article history:
Received 24 June 2019
Remaining useful life estimation is of great importance to
Remaining useful life estimation is of great importance to customers who use battery-powered products.
This paper develops a remaining useful life estimation model based on k-nearest neighbor regression by
Received in revised form
9 November 2019
customers who use battery-powered products. This paper develops
incorporating data from all the cells in a battery pack. A differential evolution technique is employed to
optimize the parameters in the estimation model. In this approach, remaining useful life is estimated
Accepted 20 November 2019
Available online 22 November 2019 a remaining useful life estimation model based on k-nearest
from a weighted average of the useful life of several nearest cells that share a similar degradation trend to
the cell whose remaining useful life needs to be estimated. The developed method obtains a remaining
Handling editor: Bin Chen
neighbor regression by incorporating data from all the cells in a
useful life estimation result with average error of 9 cycles, and the best estimation only has an error of 2
cycles. All of these estimations are done within 10 ms. Increasing the number of tested cells and nearest
cells improves the estimation accuracy. The developed method reduces the estimation average error by
Keywords:
Lithium-ion cell battery pack. A differential evolution technique is employed to
83.14% and 89.79% compared to particle filter and support vector regression, respectively. Therefore,
Remaining useful life estimation results and comparison validate the effectiveness of the developed method for remaining
K-nearest neighbor regression
Differential evolution
optimize the parameters in the estimation model. In this approach,
useful life estimation of lithium-ion cells.
© 2019 Elsevier Ltd. All rights reserved.
remaining useful life is estimated from a weighted average of the
Fig. 1. Flowchart of parameter optimization and RUL estimation.
useful life of several nearest cells that share a similar degradation
different jellyroll configurations. All the cells have a LiCoO2 cathode
1. Introduction
trend to the cell
and graphite anode, and the electrolyte material contains LiPF6, EC,
and DEC, and the rated voltage is 3.7 V. The cathode and anode
layers of groups A and B are wrapped around orthogonal rotation
center. Cells were charged with constant current and constant
whose remaining useful life needs to be estimated.
end of life (EOL) (Ungurean et al., 2017). Accurate RUL prediction
and SOH diagnosis can provide the battery performance variance
The developed method obtains a remaining useful life estimation
voltage protocol and discharged with constant current to 2.7 V
under 24 ! C. The detailed specifications and charge/discharge
Electric vehicles (EVs) are promising because they are environ- during EVs’ whole service life and can also improve battery man-
method of these cells are shown in Table 1. As shown in Table 1, cells
of group B were discharged with constant current of 0.5C, and a rate
of x C is a current equal of multiplying x and the rated capacity.
mentally friendly and inexpensive to operate. Lithium-ion batteries agement techniques to prolong battery life. For EV applications, EOL
result with
Groups A and B are used to validate the feasibility and online
applicability of this method, respectively.
have become the most popular power source for EVs owing to their
The detailed experiment procedure is as follows:
average error of 9 cycles, and the best estimation only
is the cycle when the battery SOH drops to 80% (Li et al., 2017). After
high energy density, high power density, low self-discharge rate, the SOH drops below 80%, the battery’s capacity and power both
long cycle-life, and no memory effect (Lu et al., has an error of
tend2 to cycles. [...]causing unreliable performance. The
1. Program the charge/discharge with Bits Pro software on
computer.
2013; Panchal et al.,
2. Connect the cells to the circuit, and put them into the thermal
chamber.
drop much faster,
2018). However, some irreversible reactions occur during charging/
3. Turn on the thermal chamber and set the temperature at 24 ! C,
and rest 1 h.
forthcoming battery failure could result in degraded capability,
discharging, such as lithium deposition, electrolyte decomposition,
4. Start the charge/discharge cycling with the Bits Pro software.
5. Terminate the cycling when the SOH reaches 80%. unavailable operation, downtime, and even a catastrophic incident.
Fig. 2. Cell test bench.
and Noteactive material
that there is an interval of 5 minloss
between (Song et al., 2017). The capacity of lithium-
each charge and Therefore, RUL estimation is vital for scheduling battery replace-
discharge. The capacity was calculated by integrating the discharge
data into the computer. The current measuring range of ARBIN ion
currentbatteries
with time, and then accordingly degrades with use. Therefore, the battery
the SOH can be obtained. ment to ensure the safety of the drivers and also leaving enough
BT2000 is ±10 A, with an accuracy of ±5 mA. The temperature Fig. 3 shows the SOH degradation with the charge/discharge
control range of the Yamato DVS402C thermal chamber is 5e260 ! C management
cycle. The EOL of a cell occurssystem (BMS),
when its SOH reaches which
80%. Different
rates cause different cell life and cells discharged with the same C
C is responsible for monitoring time to arrange the second application of the used battery for en-
with an accuracy of ±1 ! C.
Two cell groups have the same chemistry components but battery state of health (SOH) and estimating battery remaining
rate usually have similar degradation trajectories. That’s why cell
ergy storage.
useful life (RUL), has become one of the most important parts of Successful RUL estimation is difficult to achieve because it must
EVs. SOH quantifies a battery’s physical health condition compared take into account current health status, history data, failure
Sebastian Raschka STAT 451: Intro to ML
with that of a fresh battery and is usually calculated by a battery’s
capacity or impedance (Li et al., 2017). In this paper, we define the
Lecture 2: Nearest Neighbors
mechanisms, and failure propagation (Zhang and Lee, 2011).
However, there has been plenty of research focused on lithium-ion
6
biomolecules
Biomolecules 2020, 10, 454 6 of 22
Article
Machine Learning to Identify Flexibility Signatures 2.2. Defining Regions in GPCR Structures for Machine Learning
? ?
? ?
[i] [i]
⟨x , y ⟩ ∈ 𝒟 ( | 𝒟 | = n)
[i] [i]
⟨x , y ⟩ ∈ 𝒟 ( | 𝒟 | = n)
for :
current_distance :=
if current_distance < closest_distance:
closest_distance := current_distance
closest_point :=
return closest_point
Sebastian Raschka STAT 451: Intro to ML Lecture 2: Nearest Neighbors 13
Commonly used: Euclidean Distance (L2)
∑( j
xj )
2
[a] [b] [a] [b]
d(x , x ) = x −
j=1
3. K-nearest neighbors
a a
a c
a a c
Euclid
distan
a
c
?
Euclidean
distance=1 Manhattan
distance=1
a
c
? ?
Euclidean
Manhattan
1
m p
[ j=1 ( ) ]
p
Minkowski: d(x[a], x[b]) = [a] [b]
∑
xj
− xj
Mahalanobis
Cosine similarity
...
Sebastian Raschka STAT 451: Intro to ML Lecture 2: Nearest Neighbors 24
Some Discrete Distance Measures
m
where
Hamming distance: [a] [b]
d(x , x ) =
∑
xj[a] − xj[b]
xj ∈ {0,1}
j=1
Jaccard/Tanimoto similarity:
|A ∩ B| |A ∩ B|
J(A, B) = |A ∪ B|
= |A| + |B| − |A ∩ B|
2|A ∩ B|
Dice: D(A, B) = |A| + |B|
...
Sebastian Raschka STAT 451: Intro to ML Lecture 2: Nearest Neighbors 25
Feature Scaling
Euclidean Euclidean
distance=1 distance=1
c c
? ?
a a b
b
3. K-nearest neighbors
Majority
Majorityvote:
vote:
Plurality
Purality Vote:
vote:
B
y:
Majority
Majorityvote:
vote: None
Plurality
Purality Vote:
vote:
k
1
h(x ) =
[t]
f (x )
[i]
k∑i=1
3. K-nearest neighbors
f(n) Name
1 Constant
log n Logarithmic
n Linear
n log n Log Linear
2
n Quadratic
3
n Cubic
c
n Higher-level polynomial
n
2 Exponential
Big-O
mplexity field of research in computer science, we will not go into too
ourse. However, you should at leat be familar with the basic concepts,
the study of machine learning algorithms.
f(n) Name
1 Constant
log n Logarithmic
n Linear
n log n Log Linear
n2 Quadratic
n3 Cubic
nc Higher-level polynomial
2n Exponential
2
f(x) = 14x − 10x + 25
𝒪( )
𝒪( )
A = [[1, 2, 3],
[2, 3, 4]]
B = [[5, 8],
[6, 9],
𝒪( )
[7, 10]]
matrixmultiply(A, B)
Out[16]:
Naive Nearest
Below are two naive
of a query point x .
Neighbor
approaches (Variant
[q]
A and Variant B) Search
for finding the k nea
Variant A
Dk := {} 𝒪( )
while |Dk | < k:
• closest distance := 1
• for i = 1, ..., n, 8i 2
/ Dk :
Naive Nearest
• add closest point to D Neighbor Search
k
Variant B
Dk := D 𝒪( )
while |Dk | > k:
• largest distance := 0
• for i = 1, ..., n 8i 2 Dk :
3. K-nearest neighbors
Data Structures
Dimensionality Reduction
Editing / "Pruning"
Prototypes
• Value of k
• Scaling of the feature axes
• Distance measure
• Weighting of the distance measure
k=_
m
wj(xj[a] − xj[b])
2
dw(x[a], x[b]) =
∑
j=1
As a dot product:
[i] 1
w =
d(x , x )
[i] [t] 2
3. K-nearest neighbors
DEMO