基于部分无label电池数据使用深度网络模型进行SOH预测
快速开始:点击上方的 开始连接 按钮,选择 d2l-ai:pytorch镜像 和任意GPU配置机型即可开始。
背景
锂离子电池(LIB)具有能量密度高、响应速度快、环境友好等优点,前所未有地促进了可再生能源的普及。 2020年,全球锂离子电池市场呈现出惊人的增长,电动汽车消耗的电能高达142.8GWh,预计未来几年市场规模将超过918亿美元。 尽管锂离子电池正在以惊人的速度普及,但其长周期应用依然面临着严峻的挑战。 与其他机械的情况一样,电极和隔膜等锂离子电池组件也会经历不同程度的退化。 这些负面溢出效应导致容量和电力衰退,从而危及设备安全。 为了确保安全高效的电池管理,获得准确的电池健康状态(SOH)至关重要。
电池SOH有多种形式的定义。 它可以通过使用时间或内阻的增加来定义。 尽管这些变量很容易测量,但电池退化也伴随着容量损失,容量损失的准确估计会影响其他电池管理任务,例如行驶里程估计和寿命预测。 因此,SOH(定义为当前容量与初始容量之比)引起了广泛关注。 然而,容量测量需要使用特定协议对电池进行完全充电或放电,这对于使用中的电池来说并不实用。 这促使根据日常运行数据进行 SOH 估算。
虽然准确的健康状态估计已经取得了显着进展,但生成目标电池标签的耗时和资源消耗的退化实验阻碍了健康状态估计方法的发展。 在本notebook中,作者设计了一个深度学习框架,可以在没有目标电池标签的情况下估计电池的健康状态。 该框架集成了一群配备域适应的深度神经网络,以产生准确的估计。 作者使用来自 5 个不同制造商的 65 个商用电池生成 71,588 个样本进行交叉验证。 验证结果表明,所提出的框架可以确保89.4%的样本的绝对误差小于3%(98.9%的样本的绝对误差小于5%),在没有目标标签的情况下最大绝对误差小于8.87% 。 这项工作强调了深度学习在防止老化实验中的力量,并强调了仅使用以前的实验数据快速开发新一代电池的电池管理算法的前景。
模型
本文所提出框架的训练过程集成了 N 个 DNN 的独立子训练(见下图a)。不失一般性的,电池充电数据被用作DNN的输入,因为电池充电过程通常是可控的并且有规律地发生。具体来说,是将电压采样窗口内的充电容量序列(所谓的部分充电曲线)作为每个DNN的输入。在子训练开始之前,源域和目标域的部分充电曲线均按其标定容量进行归一化。训练开始时,所有子训练均启用并共享由标记的源域样本和未标记的目标域样本组成的相同训练集。此外,我们还设计了一个trimming round,通过丢弃一些样本来形成具有平衡 SOH 分布的新源域。 所有子训练完成后,所提出框架的训练过程终止
所提出的框架中的每个 DNN 都具有相同的超参数(图b),但使用基于 He 初始化器的不同随机种子进行初始化。作为 DNN 的输入,源域和目标域的部分充电曲线首先以10 mV 的电压间隔进行网格化,以减少数据负担。接下来,这些样本被输入到堆叠的一维 (1D) CNN 层中以提取其特征向量。之后,源域的特征向量被展平并馈送到终端全连接 (TFC) 层以生成其 SOH 估计。这些估计与源域标签一起使用来计算源域损失。另一方面,目标域样本的特征向量被展平到中间的全连接(MFC)层以重建其特征向量。这些重建的特征向量起着两个作用。第一个是量化域间隙以及源域特征向量。第二个是在估计过程中提供目标域样本的估计(视为每个经过训练的 DNN 的预估计),其中重建的特征向量进一步馈送到与源域相同的 TFC 中进行回归。通过同时最小化源域样本的 SOH 估计损失和两个域的 TFC 输入之间的差距,每个子训练将源域知识转移到目标域。
与训练过程不同,所提出框架的估计过程是选择一组经过训练的 DNN 来参与估计(图c)。首先,如上所述,激活所有 DNN 以估计目标域中的 SOH。由于训练的不确定性,经过训练的 DNN 的估计性能预计会有很大差异,因此可以被视为预估计器。为了产生可靠的最终估计,我们通过为估计结果的平均值和标准差设置四分位阈值来消除一些不利的 DNN。对所选 DNN 的估计进行平均,以生成目标域样本的最终 SOH 估计。
本Notebook搬运自北京理工大学先进储能科学与应用联合实验室数据库。模型和以上图片介绍来自文章:Deep learning to estimate lithium-ion battery state of health without additional degradation experiments
首先我们要加载一些加载必要的工具包
从数据集中载入数据。
展示数据集结构。这里我们的data输入为归一化后的电压采样容量数据,即图a中经过normalization后的部分。label为每条曲线对应的SOH值。下图为输入data的展示
生成data和label批次数据。
构建深度学习框架,在没有目标标签的情况下估计电池 SOH。具体结构可参考上图a,b
计算最大平均差异。
设置训练参数
训练模型
DNN# 1 : Training finished DNN# 2 : Training finished DNN# 3 : Training finished DNN# 4 : Training finished DNN# 5 : Training finished DNN# 6 : Training finished DNN# 7 : Training finished DNN# 8 : Training finished DNN# 9 : Training finished DNN# 10 : Training finished DNN# 11 : Training finished DNN# 12 : Training finished DNN# 13 : Training finished DNN# 14 : Training finished DNN# 15 : Training finished DNN# 16 : Training finished DNN# 17 : Training finished DNN# 18 : Training finished DNN# 19 : Training finished DNN# 20 : Training finished DNN# 21 : Training finished DNN# 22 : Training finished DNN# 23 : Training finished DNN# 24 : Training finished DNN# 25 : Training finished DNN# 26 : Training finished DNN# 27 : Training finished DNN# 28 : Training finished DNN# 29 : Training finished DNN# 30 : Training finished DNN# 31 : Training finished DNN# 32 : Training finished DNN# 33 : Training finished DNN# 34 : Training finished DNN# 35 : Training finished DNN# 36 : Training finished DNN# 37 : Training finished DNN# 38 : Training finished DNN# 39 : Training finished DNN# 40 : Training finished DNN# 41 : Training finished DNN# 42 : Training finished DNN# 43 : Training finished DNN# 44 : Training finished DNN# 45 : Training finished DNN# 46 : Training finished DNN# 47 : Training finished DNN# 48 : Training finished DNN# 49 : Training finished DNN# 50 : Training finished DNN# 51 : Training finished DNN# 52 : Training finished DNN# 53 : Training finished DNN# 54 : Training finished DNN# 55 : Training finished DNN# 56 : Training finished DNN# 57 : Training finished DNN# 58 : Training finished DNN# 59 : Training finished DNN# 60 : Training finished DNN# 61 : Training finished DNN# 62 : Training finished DNN# 63 : Training finished DNN# 64 : Training finished DNN# 65 : Training finished DNN# 66 : Training finished DNN# 67 : Training finished DNN# 68 : Training finished DNN# 69 : Training finished DNN# 70 : Training finished DNN# 71 : Training finished DNN# 72 : Training finished DNN# 73 : Training finished DNN# 74 : Training finished DNN# 75 : Training finished DNN# 76 : Training finished DNN# 77 : Training finished DNN# 78 : Training finished DNN# 79 : Training finished DNN# 80 : Training finished DNN# 81 : Training finished DNN# 82 : Training finished DNN# 83 : Training finished DNN# 84 : Training finished DNN# 85 : Training finished DNN# 86 : Training finished DNN# 87 : Training finished DNN# 88 : Training finished DNN# 89 : Training finished DNN# 90 : Training finished DNN# 91 : Training finished DNN# 92 : Training finished DNN# 93 : Training finished DNN# 94 : Training finished DNN# 95 : Training finished DNN# 96 : Training finished DNN# 97 : Training finished DNN# 98 : Training finished DNN# 99 : Training finished DNN# 100 : Training finished DNN# 101 : Training finished DNN# 102 : Training finished DNN# 103 : Training finished DNN# 104 : Training finished DNN# 105 : Training finished DNN# 106 : Training finished DNN# 107 : Training finished DNN# 108 : Training finished DNN# 109 : Training finished DNN# 110 : Training finished DNN# 111 : Training finished DNN# 112 : Training finished DNN# 113 : Training finished DNN# 114 : Training finished DNN# 115 : Training finished DNN# 116 : Training finished DNN# 117 : Training finished DNN# 118 : Training finished DNN# 119 : Training finished DNN# 120 : Training finished DNN# 121 : Training finished DNN# 122 : Training finished DNN# 123 : Training finished DNN# 124 : Training finished DNN# 125 : Training finished DNN# 126 : Training finished DNN# 127 : Training finished DNN# 128 : Training finished DNN# 129 : Training finished DNN# 130 : Training finished DNN# 131 : Training finished DNN# 132 : Training finished DNN# 133 : Training finished DNN# 134 : Training finished DNN# 135 : Training finished DNN# 136 : Training finished DNN# 137 : Training finished DNN# 138 : Training finished DNN# 139 : Training finished DNN# 140 : Training finished DNN# 141 : Training finished DNN# 142 : Training finished DNN# 143 : Training finished DNN# 144 : Training finished DNN# 145 : Training finished DNN# 146 : Training finished DNN# 147 : Training finished DNN# 148 : Training finished DNN# 149 : Training finished DNN# 150 : Training finished DNN# 151 : Training finished DNN# 152 : Training finished DNN# 153 : Training finished DNN# 154 : Training finished DNN# 155 : Training finished DNN# 156 : Training finished DNN# 157 : Training finished DNN# 158 : Training finished DNN# 159 : Training finished DNN# 160 : Training finished DNN# 161 : Training finished DNN# 162 : Training finished DNN# 163 : Training finished DNN# 164 : Training finished DNN# 165 : Training finished DNN# 166 : Training finished DNN# 167 : Training finished DNN# 168 : Training finished DNN# 169 : Training finished DNN# 170 : Training finished DNN# 171 : Training finished DNN# 172 : Training finished DNN# 173 : Training finished DNN# 174 : Training finished DNN# 175 : Training finished DNN# 176 : Training finished DNN# 177 : Training finished DNN# 178 : Training finished DNN# 179 : Training finished DNN# 180 : Training finished DNN# 181 : Training finished DNN# 182 : Training finished DNN# 183 : Training finished DNN# 184 : Training finished DNN# 185 : Training finished DNN# 186 : Training finished DNN# 187 : Training finished DNN# 188 : Training finished DNN# 189 : Training finished DNN# 190 : Training finished DNN# 191 : Training finished DNN# 192 : Training finished DNN# 193 : Training finished DNN# 194 : Training finished DNN# 195 : Training finished DNN# 196 : Training finished DNN# 197 : Training finished DNN# 198 : Training finished DNN# 199 : Training finished DNN# 200 : Training finished DNN# 201 : Training finished DNN# 202 : Training finished DNN# 203 : Training finished DNN# 204 : Training finished DNN# 205 : Training finished DNN# 206 : Training finished DNN# 207 : Training finished DNN# 208 : Training finished DNN# 209 : Training finished DNN# 210 : Training finished DNN# 211 : Training finished DNN# 212 : Training finished DNN# 213 : Training finished DNN# 214 : Training finished DNN# 215 : Training finished DNN# 216 : Training finished DNN# 217 : Training finished DNN# 218 : Training finished DNN# 219 : Training finished DNN# 220 : Training finished DNN# 221 : Training finished DNN# 222 : Training finished DNN# 223 : Training finished DNN# 224 : Training finished DNN# 225 : Training finished DNN# 226 : Training finished DNN# 227 : Training finished DNN# 228 : Training finished DNN# 229 : Training finished DNN# 230 : Training finished DNN# 231 : Training finished DNN# 232 : Training finished DNN# 233 : Training finished DNN# 234 : Training finished DNN# 235 : Training finished DNN# 236 : Training finished DNN# 237 : Training finished DNN# 238 : Training finished DNN# 239 : Training finished DNN# 240 : Training finished DNN# 241 : Training finished DNN# 242 : Training finished DNN# 243 : Training finished DNN# 244 : Training finished DNN# 245 : Training finished DNN# 246 : Training finished DNN# 247 : Training finished DNN# 248 : Training finished DNN# 249 : Training finished DNN# 250 : Training finished DNN# 251 : Training finished DNN# 252 : Training finished DNN# 253 : Training finished DNN# 254 : Training finished DNN# 255 : Training finished DNN# 256 : Training finished DNN# 257 : Training finished DNN# 258 : Training finished DNN# 259 : Training finished DNN# 260 : Training finished DNN# 261 : Training finished DNN# 262 : Training finished DNN# 263 : Training finished DNN# 264 : Training finished DNN# 265 : Training finished DNN# 266 : Training finished DNN# 267 : Training finished DNN# 268 : Training finished DNN# 269 : Training finished DNN# 270 : Training finished DNN# 271 : Training finished DNN# 272 : Training finished DNN# 273 : Training finished DNN# 274 : Training finished DNN# 275 : Training finished DNN# 276 : Training finished DNN# 277 : Training finished DNN# 278 : Training finished DNN# 279 : Training finished DNN# 280 : Training finished DNN# 281 : Training finished DNN# 282 : Training finished DNN# 283 : Training finished DNN# 284 : Training finished DNN# 285 : Training finished DNN# 286 : Training finished DNN# 287 : Training finished DNN# 288 : Training finished DNN# 289 : Training finished DNN# 290 : Training finished DNN# 291 : Training finished DNN# 292 : Training finished DNN# 293 : Training finished DNN# 294 : Training finished DNN# 295 : Training finished DNN# 296 : Training finished DNN# 297 : Training finished DNN# 298 : Training finished DNN# 299 : Training finished DNN# 300 : Training finished
做出预测并绘图比较。
KaiqiYang