Abstract:In order to solve the problem that the Network Simulator 3 (NS-3) cannot accurately simulate the battery information of the Wireless Sensor Network (WSN) node, combined with the advantages of the LiIon battery model and the KiBaM battery model,the LiIon battery model is used to calculate output voltage of the available charge well (ACW) of the KiBaM battery model. A LiIon-KiBaM battery model that can reflect the rate capacity effect and recovery effect of the battery and can reduce the output voltage as the remaining charge decreases is proposed. And for solving the ordinary differential equations without analytical solution in the model. An easy programming numerical solution based on the implicit Runge-Kutta method is proposed. Simulations and experiments show that the proposed model and its numerical solution can accurately predict the voltage and remaining charge at any time during battery use in NS-3, and have the advantage of low computational complexity. The proposed battery model and proposed numerical solution are not only applicable to NS-3, but also to other network simulators, which provides good technical support and guarantee for the research and development of WSN and mobile Ad-hoc networks (MANET).