Main Content

Battery Cell Characterization for Electric Vehicles

This example uses the test method defined in [1] to characterize a battery cell for electric vehicle applications. First you generate a high pulse power characterization (HPPC) by using Simscape™ Battery™ blocks and an in-built function to derive the battery cell parameters. Then you compare the model to the original battery model under typical drive-profile loading conditions.

Battery HPPC Test Data

A typical HPPC data is a set of discharge-charge pulses, applied to a battery at different state of charge (SOC) and at a given temperature. Typically, the test equipment is fully charged to undergo these pulse tests. At the end of every sequence, the SOC is discharged by a third of the C-rate. A long rest time of one hour is recommended for the cells to relax after every sequence of discharge-charge pulses. This process continues until it covers all points of interest in the SOC range.

This figure shows a typical discharge-charge profile. For more information, see [1].

batt_BatteryCellCharacterizationForBEV_IMG1.png

Parameter Estimation Method

The Battery (Table-Based) block in Simscape Battery uses the equivalent circuit modelling approach. You can capture different physical phenomena of a cell by connecting multiple RC pairs in series. In Battery (Table-Based) block, you can select up to five RC pairs. You can derive the value of the resistance and time constant parameters from the HPPC test data.

The voltage response of a battery cell is equal to:

V=V0-I×Ro-I×(Ri(1-exp(-tτi))),

where

  • V0 is the cell open circuit potential.

  • Ro is the cell ohmic resistance.

  • Riandτi are the cell i-th RC pair resistance and time constant values.

  • I is the current passing through the cell.

All parameters are a function of the SOC and cell temperature. Since HPPC tests are typically performed at constant temperatures, you can ignore the temperature dependence in the parameter estimation. The ohmic resistance is estimated from the sudden voltage change during discharge or charge pulses (V1 to V2 or V5 to V6, in the figure above). The RC pairs are fit based on voltage relaxation profile just after the discharge or charge pulses.

The ParameterEstimationLUTbattery function estimates the battery parameters and:

  1. Takes the HPPC profile over entire SOC range as input.

  2. Determines all the pulse location and the points V1 - V9 in the above figure.

  3. Calculates the ohmic resistance value.

  4. Fits the RC parameters by using either MATLAB fminsearch or the Curve Fitting Toolbox™ (fminsearch or curvefit).

  5. Calculates the cell open circuit potential (point V1, at a given SOC point, in the figure above).

  6. Outputs all parameters to a workspace variable.

Generate Synthetic Test Data

Run the CellCharacterizationHPPC SLX file to generate the current and voltage data for the selected cell.

batt_BatteryCellCharacterizationForBEV_IMG2.png

The HPPC Profile MATLAB function defines the discharge-charge protocols and the test method.

hppcSim = sim('CellCharacterizationHPPC.slx');

The hppcSim workspace variable contains the current and voltage data for the HPPC profile used for battery cell parameter estimation.

Fit Parameters to Test Data

Load the HPPC data and plot the voltage and current values.

hppcTest = hppcSim.batteryHPPC_profile.extractTimetable;
time     = seconds(hppcTest.Time);
current  = hppcTest.current;
voltage  = hppcTest.voltage;

figure('Name','HPPC data - current pulses')
plot(time,current);
xlabel('Time (s)');ylabel('Current (A)')

Figure HPPC data - current pulses contains an axes object. The axes object with xlabel Time (s), ylabel Current (A) contains an object of type line.

figure('Name','HPPC data - voltage response')
plot(time,voltage);
xlabel('Time (s)');ylabel('Voltage (V)')

Figure HPPC data - voltage response contains an axes object. The axes object with xlabel Time (s), ylabel Voltage (V) contains an object of type line.

Define the cell capacity (Ahr) as during the HPPC tests and the initial SOC (0-1).

cellCapacity   = 27;
cellInitialSOC = 1;
cell_prop      = [cellCapacity; cellInitialSOC];

Define the pulse current magnitudes, in Amperes.

maxDischargeCurr  = 81;
maxChargeCurr     = 61;
constCurrSweepSOC = 9;

The ParameterEstimationLUTbattery function detects a pulse (sudden change in current) based on the value you specify for the toleranceVal variable. If the function detects a sudden change in discharge current, it compares this discharge current to the value of the maxDischargeCurr variable. If their difference is within the value of the toleranceVal variable, the function identifies the pulse. This process also applies to the detection of the charge pulse (maxChargeCurr) and the SOC sweep (constCurrSweepSOC).

toleranceVal      = 1;
hppc_protocol     = [maxDischargeCurr;...
                     maxChargeCurr;...
                     constCurrSweepSOC;...
                     toleranceVal];

Define the number of RC pairs to consider and the initial guess for resistance and the time constant values.

numRCpairs      = 1;
initialGuess_RC = [1e-3 20]; % [R1, Tau1, R2, Tau2 ....]

result=batt_BatteryCellCharacterization.ParameterEstimationLUTbattery(...
                                     [time, current, voltage],...
                                     cell_prop,...
                                     hppc_protocol,...
                                     numRCpairs,...
                                     initialGuess_RC,...
                                     "fminsearch");
Read input data
*** Number of discharge pulses =20
*** Number of charge pulses    =20
*** Number of SOC sweep pulses =19
Extracted pulse data from input data
Calculated ohmic resistance
*** Calculated RC parameters for discharge
*** Calculated RC parameters for charge
*** Calculated rmse for the fit
Calculated RC parameters
Completed OCV data extraction
% To use curvefit toolbox for data fit, type "curvefit" 
% instead of "fminsearch". The curvefit function requires 
% the Curve Fitting Toolbox license.

To check if the function identified the correct pulses, at a MATLAB Command Window, enter:

plotAndVerifyPulseData(result);

Figure Plot and Verify Pulse Data contains an axes object. The axes object with title Discharge ( g ) , blank C h a r g e blank ( b ) , blank S O C indexOf p baseline blank ( r ) , blank a n d blank O C V indexOf s baseline blank ( m ), xlabel Time (s), ylabel Voltage (V) contains 14 objects of type line, scatter.

To verify the fit, at a MATLAB Command Window, enter:

fitDataEverySOCval = 0.001;
fitDataForSOCpts = 0:fitDataEverySOCval:1;
verifyDataFit(result,fitDataEverySOCval,1);

Figure Voltage plot for parameter fit verification contains an axes object. The axes object with xlabel Time (s), ylabel Voltage (V) contains 2 objects of type line. These objects represent Test Data, Fit Data.

To save the parameters, enter:

cellParameters = exportResultsForLib(result,...
                 fitDataForSOCpts);

Figure Battery Open Circuit Potential contains an axes object. The axes object with title V0, xlabel SOC, ylabel V0 (V) contains an object of type line.

Figure Battery Ohmic Resistance - discharge contains an axes object. The axes object with title R 0 indexOf e baseline R0_d_i_s_c_h_a_r_g_e, xlabel SOC, ylabel R0 ( Omega ) contains an object of type line.

Figure Battery Ohmic Resistance - charge contains an axes object. The axes object with title R 0 indexOf e baseline R0_c_h_a_r_g_e, xlabel SOC, ylabel R0 ( Omega ) contains an object of type line.

Figure Battery Dynamics R-1 contains an axes object. The axes object with title R1, xlabel SOC, ylabel R ( Omega ) contains an object of type line.

Figure Battery Dynamics Time Constant-1 contains an axes object. The axes object with title tau 1, xlabel SOC, ylabel tau contains an object of type line.

To save the generated parameters in a file, at the MATLAB Command Window, run:

save batt_BatteryCellCharacterizationResults.mat cellParameters

This example uses parameters stored in batt_BatteryCellCharacterizationResults MAT file to verify the accuracy of the fit. If the estimated parameters do not look reasonable, try fitting them with more RC pairs or try a different initial guess.

Verify Parameters with Drive Profiles

A large battery pack for electric vehicle (EV) uses the battery cell that you just parameterized. The CellCharacterizationVerify.slx model uses a drive profile to compare the parameterized cell against the original cell.

batt_BatteryCellCharacterizationForBEV_IMG3.png

A typical load profile for a large battery pack (EV) is:

driveProfile   = load('batt_BatteryCellCharacterizationForBEV_Ivst.mat');
maxCurrentPack = max(driveProfile.ans.Data)
maxCurrentPack = 89.5372
minCurrentPack = min(driveProfile.ans.Data)
minCurrentPack = -55.2423
figure('Name','Drive profile');
plot(driveProfile.ans.Time,driveProfile.ans.Data)
title('Drive profile data')
xlabel('Time (s)');
ylabel('Current (A)');

Figure Drive profile contains an axes object. The axes object with title Drive profile data, xlabel Time (s), ylabel Current (A) contains an object of type line.

To limit the cell maximum C-rate to a value of 1.5, the pack requires three cells in parallel. The Np block in the CellCharacterizationVerify SLX file specifies the number of parallel cells. The Computed Cell block in the SLX file simulates the parameterized cell. The number of RC pairs you use in this script must be equal to the value you specified for the Charge Dynamics in the Computed Cell block.

Run the CellCharacterizationVerify SLX file to compare the original and the parameterized cells.

verifyRes = sim('CellCharacterizationVerify.slx');
resDriveProfile = verifyRes.CellCharacterization_DriveProfile.extractTimetable;

figure('Name','Error in voltage prediction');
plot(resDriveProfile.Time,resDriveProfile.V_err*1000);
title('Voltage Error (mV) Between Original and Parameterized Cell')
xlabel('Time (s)');
ylabel('Voltage Error (mV)');

Figure Error in voltage prediction contains an axes object. The axes object with title Voltage Error (mV) Between Original and Parameterized Cell, xlabel Time (s), ylabel Voltage Error (mV) contains an object of type line.

figure('Name','Voltage profile for original and parameterized cell');
plot(resDriveProfile.Time,resDriveProfile.V);
title('Voltage (V) for Original and Parameterized Cell')
xlabel('Time (s)');
ylabel('Voltage (V)');
legend('Original Cell', 'Parameterized Cell')

Figure Voltage profile for original and parameterized cell contains an axes object. The axes object with title Voltage (V) for Original and Parameterized Cell, xlabel Time (s), ylabel Voltage (V) contains 2 objects of type line. These objects represent Original Cell, Parameterized Cell.

If the error is not within acceptable limits, try with a different initial guess, a different number of RC pairs, or by using a different fitting method (fminsearch, Curve Fitting Toolbox).

If you want to characterize the battery at multiple temperatures, use this workflow to fit the parameters at each individual temperature and then combine them inside the temperature dependent block.

Reference

  1. Christophersen, Jon P. Battery Test Manual For Electric Vehicles, Revision 3. United States: N. p., 2015. Web. doi:10.2172/1186745

See Also

Related Topics