Main Content

Identify Supercapacitor Parameter

This example shows how to identify the parameters of a supercapacitor. Instead of collecting voltage and current waveforms from a real supercapacitor, this example generates voltage and current waveforms by running a simulation of a supercapacitor using known parameter values. Then the example applies a parameter identification methodology [1] to the waveforms.

To assess the accuracy of the methodology, this example compares the identified parameters to the known parameter values. The example also shows how to further refine the parameter values using the Parameter Estimation app in the Simulink® Design Optimization™ toolbox.

To empirically identify the parameters of an actual supercapacitor, you can:

  1. Collect voltage and current waveforms from the supercapacitor.

  2. Identify parameter values using the waveform data and the methodology in [1].

To identify the parameters of a modeled supercapacitor, this example:

  1. Generates voltage and current waveforms by simulating a model using known values for supercapacitor parameters.

  2. Identifies supercapacitor parameter values using the generated waveform data and the methodology in [1].

  3. Configures and simulates the supercapacitor using the identified supercapacitor parameter values.

To learn how the approach works for a real supercapacitor, evaluate the accuracy of the identification methodology by comparing:

  • The data you generate using known parameter values and the data you generate using identified parameter values.

  • The known parameter values and identified parameter values.

If the accuracy is not sufficient, use the Parameter Estimator app from Simulink Design Optimization to improve it. Use the identified parameter values as the starting values for the optimization.

Generate Data

Generate voltage and current waveforms by configuring and simulating a model using known values for the fixed resistances, fixed capacitances, and voltage-dependent capacitor gain parameters of the supercapacitor. Model the input current, configure the physical characteristics and the self-discharge resistance of the supercapacitor using realistic values.

modelName = 'SupercapacitorFromData';
open_system(modelName);

Configure the supercapacitor using known parameter values.

SupercapacitorFromDataParameterConfiguration;

Observe the supercapacitor behavior during three distinct phases:

  1. Charge with constant current

  2. Charge redistribution from immediate to delayed branch

  3. Charge redistribution from immediate and delayed branches to long-term branch

sim(modelName)

Perform Parameter Identification

Using the waveform data from the simulation, apply the methodology described in [1].

Identify Immediate Branch Parameters

During the first stage of the identification, a fully discharged supercapacitor is charged with constant current. The method assumes that the immediate branch stores all the initial charge because the time constant for the branch is relatively small.

To calculate the immediate branch parameters, you take measurements of the charge characteristic. Once the charging current reaches the steady-state at t1=20e-3s, measure v1 and then calculate the fixed resistance of the immediate branch by using this equation:

Ri=v1i1

where:

  • t1 is the time at parameter identification event n=1in seconds.

  • v1 is the terminal voltage at t1 in volts.

  • i1 is the charging current at t1 in amperes.

  • Ri is the fixed resistance of immediate branch in ohm.

Once voltage increases from v1 by approximately 50e-3V, measure t2 and v2 and then calculate the fixed capacitance of the immediate branch by using this equation:

Ci0=i1t2-t1v2-v1

where:

  • t2 is the time at parameter identification event n=2 in seconds.

  • v2 is the terminal voltage at t2 in volts.

  • Ci0 is the fixed capacitance of immediate branch in farads.

Once the voltage reaches rated voltage, measure v3 and t3, and turn off the charging current. After 20e-3s, once charging current reaches steady-state value of 0A measure t4 and v4 and then calculate the voltage-dependent capacitance coefficient by using this equation:

t4=t3+20e-3

Ci1=2v4(i1(t4-t1)v4-Ci0)

where:

  • t3 is the time at parameter identification event n=3 in seconds.

  • v3 is the terminal voltage at t3 in volts.

  • t4 is the time at parameter identification event n=4 in seconds.

  • v4 is the terminal voltage at t4 in volts.

  • Ci1 is the voltage-dependent capacitance coefficient in farads per volt.

To perform these calculations, run this script:

SupercapacitorFromDataParameterImmediateIdentification;

Identify Delayed Branch Parameters

During the second stage of the identification, the charge redistributes from the immediate branch to the delayed branch.

To calculate the delayed branch parameters, measure the hold charge characteristics.

Once the voltage decreases from v4 by approximately 50e-3V, measure t5 and v5 and then calculate the delayed branch resistance by using these equations:

Δv=v4-v5

Vci=v4-ΔV2

Cdiff=Ci0+Ci1Vci

Rd=(v4-ΔV2)(t5-t4)CdiffΔV

where:

  • t5 is the time at parameter identification event n=5 in seconds.

  • v5 is the terminal voltage at t5 in volts.

  • Vci is the voltage at which the total immediate capacitance is to be calculated in volts.

  • Cdiff is the total immediate capacitance at Vci in farads.

  • Rd is the delayed branch resistance in ohms.

Wait 300 seconds, measure t6 and v6 and then calculate the delayed branch capacitance by using these equations:

Qtotal=i1(t4-t1)

Cd=Qtotalv6-(Ci0+Ci12v6)

where:

  • t6 is the time at parameter identification event n=6 in seconds.

  • v6 is the terminal voltage at t6 in volts.

  • Qtotal is the total charge supplied to the supercapacitor in coulombs.

  • Cd is the delayed branch capacitance in farads.

To perform these calculations, run this script:

SupercapacitorFromDataParameterDelayedIdentification;

Identify Long-Term Branch Parameters

During the third and final stage of the identification, the charge redistributes from the immediate and delayed branches to the long-term branch.

To calculate the long-term branch parameters, measure the hold charge characteristics.

Once the voltage decreases from v6 by approximately 50e-3V, measure t7 and v7 and then calculate the long-term branch resistance by using these equations:

Δv=v6-v7

Rl=(v6-ΔV2)(t7-t6)CdiffΔV

where:

  • t7 is the time at parameter identification event n=7 in seconds.

  • v7 is the terminal voltage at t7 in volts.

  • Rl is the long-term branch resistance in ohms.

After 30 minutes from the start of the charging/discharging process, measure t8 and v8 and then calculate the long-term branch capacitance by using this equation:

Cl=Qtotalv8-(Ci0+Ci12v8)-Cd

where:

  • t8 is the time at parameter identification event n=8 in seconds.

  • v8 is the terminal voltage at t8 in volts.

  • Cl is the long-term branch capacitance in farads.

To perform these calculations, run this script:

SupercapacitorFromDataParameterLongTermIdentification;

Collate Time and Voltage Data

Collate the time and voltage data for each parameter identification event in a MATLAB® table:

DataTable = table((1:8)',...
    [t1 t2 t3 t4 t5 t6 t7 t8]',...
    [v1 v2 v3 v4 v5 v6 v7 v8]',...
    'VariableNames',{'Event','Time','Voltage'}) 
DataTable=8×3 table
    Event     Time      Voltage 
    _____    _______    ________

      1         0.02    0.071799
      2      0.51803      0.1218
      3           40      2.2717
      4        40.02      2.2019
      5       56.675      2.1519
      6       356.67      1.8473
      7       499.28      1.7973
      8         1800      1.5865

SupercapacitorFromDataPlotVoltage;

Figure contains an axes object. The axes object with title Identified and Known Supercapacitor Voltages, xlabel Time [s], ylabel Voltage [V] contains 10 objects of type line, text. One or more of the lines displays its values using only markers These objects represent Known parameters simulation, Measurements for parameter identification.

Evaluate Accuracy of Identified Parameters

Configure and simulate the model using the identified supercapacitor parameters. Then, to evaluate the accuracy of the identified parameter values, compare the waveform output to the data that you generate by running a simulation that uses known parameters.

SupercapacitorFromDataParameterSimulateIdentifiedParameters;

Figure contains an axes object. The axes object with title Identified and Known Supercapacitor Voltages, xlabel Time [s], ylabel Voltage [V] contains 3 objects of type line. One or more of the lines displays its values using only markers These objects represent Known parameters simulation, Measurements for parameter identification, Identified parameters simulation.

Optimize Parameters Using Parameter Estimation App

To perform the optimization of the supercapacitor parameters, you must have the Simulink Design Optimization toolbox installed.

If the traces are not similar enough to meet requirements, then the identified parameter values can serve as initial parameter values for the Parameter Estimator app from Simulink Design Optimization.

To optimize the super capacitor parameters, at the MATLAB Command Window, enter:

spetool('SupercapacitorSDOParameterEstimatorSession');

Display Optimization Results

Display the parameter trajectory created using the Sum Squared Error cost function and Nonlinear least squares optimization method.

openfig('SupercapacitorSDOParameterEstimatorResults');

Figure contains an axes object. The axes object with title Estimated Parameters Over Optimization Steps, xlabel Iteration, ylabel Value contains 3 objects of type line. These objects represent C(Exp), Kv(Exp), R(Exp).

Results from Real-Time Simulation

This model has been tested on a Speedgoat Performance real-time target machine with an Intel® 3.5 GHz i7 multi-core CPU. This model can run in real time with a step size of 50 microseconds.

References

[1] Zubieta, L. and R. Bonert. "Characterization of Double-Layer Capacitors for Power Electronics Applications." IEEE Transactions on Industry Applications, Vol. 36, No. 1, 2000, pp. 199-205.