TTSNet: State-of-Charge Estimation of Li-ion Battery in Electrical Vehicles with Temporal Transformer-based Sequence Network
Code release for our IEEE Transactions on Vehicular Technology paper TTSNet: State-of-Charge Estimation of Li-ion Battery in Electrical Vehicles with Temporal Transformer-based Sequence Network
Zhengyi Bao, Jiahao Nie, Huipin Lin, Kejie Gao, Zhiwei He, Mingyu Gao
Accurate estimating the state-of-charge (SOC) of Li-ion battery contributes significantly to electric vehicle safety. Existing methods typically focus on the traditional recurrent neural networks to encode time series features for SOC estimation. However, these methods rely solely on their own structure to extract time series correlated features, ignoring a significant amount of information on temporal dimension. To address this issue, this paper proposes a temporal transformer-based sequence network (TTSNet) that can make full use of temporal dimensional information to model the relationship between the input and SOC. Specifically, the proposed network splits the raw data into three branches including voltage, current, and temperature, as well as extracts the corresponding primary semantic features. It then uses a temporal transformer to effectively encode the features of temporal dimensional information. The resulting features are further fed into an attention-guided feature fusion module to interact information among voltage, current, and temperature branches for subsequent SOC estimation. To enhance the network's resilience for long time sequences, a sliding time window technique is introduced to pre-process the raw data. Besides, a Kalman filter is incorporated as post-processing to smooth the output to guide a more accurate SOC estimation. Comprehensive experiments are conducted on battery open datasets and vehicle operation datasets to verify the proposed method. The results demonstrate that the proposed method achieves high accuracy and strong robustness in both datasets, with average MAE, RMSE, and R2 values of 0.506%, 0.694%, and 99.791%, respectively.
Create environment and activate
conda create --name ttsnet python=3.7
conda activate ttsnet
Install requirements
pip install -r requirement.txt
python3.7 main.py
If you find TTSNet useful, please consider citing:
@ARTICLE{10382587,
author={Bao, Zhengyi and Nie, Jiahao and Lin, Huipin and Gao, Kejie and He, Zhiwei and Gao, Mingyu},
journal={IEEE Transactions on Vehicular Technology},
title={TTSNet: State-of-Charge Estimation of Li-ion Battery in Electrical Vehicles with Temporal Transformer-based Sequence Network},
year={2024},
volume={},
number={},
pages={1-14},
keywords={State of charge;Estimation;Feature extraction;Transformers;Biological system modeling;Time series analysis;Lithium-ion batteries;State-of-Charge;Li-ion Battery;Temporal Transformer;Electrical Vehicles},
doi={10.1109/TVT.2024.3350663}}
}