Loading the dataset


The dataset consists of drive cycle power profile calculated for an electric Ford F150 truck with a 35kWh battery pack scaled for a single Panasonic 18650PF cell at 25 degree Celcius.

Plots

Dropping unnecessary columns


For the estimation of SOC, we only require the volage, charging/ discharging current, and the temperature of the battery.

For the estimation of SOE, we will require volatage, chargin/ discharging current, temparature, and SOC.

Generating the target variables (SOC & SOE) from Amp-Hour & Watt-Hour discharging of the battery


The given values in "Ah" column shows the amount of amp-hour discharge from the battery with time. So, by adding the nominal amp-hour i.e. 2.9Ah, to all the values and dividing it again by 2.9Ah we will get out our target variable, SOC.

Similarly, the given values in "Wh" column shows the amount of watt-hour discharge from the battery with time. Panasonic 18650PF has a maximum energy capacity of 9.9Wh. So, by adding the maximum energy capacity to all the values and dividing it again by 9.9Wh, we will get our other target variable, SOE.

Shuffling and splitting the data it into training and test sets


Since there are no categorical variables or missing values, encoding and imputing the data is not required.

Selecting features using pearson correlation


None of the features are heavily correlated to other features. Hence, all of them can be safely used for training the model.

Outlier Analysis


For Voltage (V)

Removing all the data points with a z-score of greater than 3 or less than -3

For Current (A)

Removing all the data points with a z-score of greater than 3 or less than -3

For Temp (C)

Removing all the data points with a z-score of greater than 3 or less than -3

Tensorflow Model (SOC)


Normalizing the training and testing data

Tensorflow Model (SOE)

Saving and exporting JSON version of the model for SOC