 This paper proposes a new algorithm for estimating the state of charge, SOC, and state of health, SOH, of lithium ion batteries. It uses a combination of nonlinear state space reconstruction, NSSR, and long short-term memory, LSTM, neural networks to achieve more accurate results than existing methods. Tests showed that the error rate for both SOC and SOH estimates was less than 2.5%. This means that the proposed algorithm could provide reliable and accurate estimates of the battery's current status. This article was authored by Panpanhu, W. F. Tang, C. H. Li, and others.