SDAA253 January   2026 TPSI2240-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
    1. 1.1 Insulation Monitor
  5. 2Detailed Description
    1. 2.1 Solving for the Unknown Isolation Resistances
    2. 2.2 Addressing Large Time Constant Cases
    3. 2.3 Prediction Algorithms
    4. 2.4 Understanding Error Sources
    5. 2.5 Test Results
  6. 3Summary
  7. 4References

Prediction Algorithms

When SW2 is ON, the response follows the exponential decay equation:

Equation 6. Vt=Vinf+Voe-tτ

where Vinf is the final settled voltage (t = infinity) and Vo is the difference between the initial voltage at time zero, Vt0 , and Vinf. Refer to Figure 2-9 to help understand the concept.

The settling voltage, Vinf, is of specific interest. The three unknowns in this equation are Vinf, τ, and Vo. If the ADC measures three sample voltages at three different times, a system of three equations is created:

Equation 7. Vt0=Vinf+Vo
Equation 8. Vt1=Vinf+Voe-t1τ
Equation 9. Vt2=Vinf+Voe-t2τ

By using t2 = 2*t1, the equations become:

Equation 10. Vt0=Vinf+Vo
Equation 11. Vt1=Vinf+Voe-t1τ
Equation 12. Vt2=Vinf+Voe-2t1τ

Now, let x = e-t1τ and the equations become:

Equation 13. Vt0=Vinf+Vo
Equation 14. Vt1=Vinf+Vox
Equation 15. Vt2=Vinf+Vox2

The calculation for Vinf is heavily simplified:

Equation 16. Vinf=Vt0*Vt2-Vt12Vt0-2Vt1+Vt2
  • Note that only four-function arithmetic is needed to compute the Vinf. Once Vinf is calculated, Vo can be calculated by subtracting Vinf from Vt0 .
  • In theory, the location of t0 on the decay curve does not matter as long as t1 and t2 are spaced appropriately relative to each other. Specifically, users must keep the same time difference between the three samples. For longer time constants, the voltage settling curve can be relatively flat for the same cycle time. In noisy conditions, increasing the time spacing between the three samples increases SNR and thus improves the prediction algorithm performance.

The MATLAB script used to solve for the system of equations is:

%% solution for exponential decay
clc
syms vt0 vt1 vt2 vinf v0 x
eq1 = vt0 == vinf+v0;
eq2 = vt1 == vinf+v0*x;
eq3 = vt2 == vinf+v0*x*x;
eq4 = vt0 ~= vt1;
eqns = [eq1, eq2, eq3, eq4];
[vinf, v0, x, para, conditions] = solve(eqns,[vinf, v0, x],ReturnConditions=true)

In the TIDA-010985 default code, the time spacing between the three samples is 330ms. This verifies the total IMD measurement cycle time is under 2s while making the fixed-point computation straightforward. To change the default cycle time, the user can do one of the following:

  • Change the E1 #define in IMD.c. For example, changing E1 #define from 990 to 600 (ms) decreases the IMD cycle time from approximately 2s to approximately 1.2s. The exact time depends on a few milliseconds (ms) of computation (approximately 2ms) after the data acquisition period. If the user wants to increase the cycle time for some reason, the data buffer "SamplesSize" must be changed accordingly in addition to E1 #define. Without changing the default ADC sampling period, increasing the data buffer may be limited due to available SRAM (32 kB total):
#define SamplesSize 2000 // ADC buffer size
#define E1 990 // total time for Riso measurement is 2xE1 in ms 
  • Change the ADC sampling interval by changing the TIMER_0 period in syscfg (e.g. from 1 ms to 0.5 ms). This requires some changes to the rest of the code since the code assumes the default 1-ms ADC sampling period.

The time constant is calculated with the following equation:

Equation 17. τ=-VoV'(t0)

For isolation resistance, only Vinf is necessary. For the total system Y-cap (CisoP + CisoN), approximate V'(t) at t0 with two adjacent ADC measurements. Then Ciso is:

Equation 18. Ciso=τRisoP||RisoN||RsP+R1||RsN 
 Example Voltage Decay Curve with ADC Samples
                    Used for Prediction AlgorithmFigure 2-9 Example Voltage Decay Curve with ADC Samples Used for Prediction Algorithm

A similar analysis can be done for the charging curve. If the ADC measures three sample voltages at three different times, a system of three equations is created for the charging curve:

Equation 19. Vt0=Vi
Equation 20. Vt1=Vi+Vo1-e-t1τ
Equation 21. Vt2=Vi+Vo1-e-t2τ

Note that Vi is the initial voltage at t0 time. By using t2 = 2*t1, the equations become:

Equation 22. Vt0=Vi
Equation 23. Vt1=Vi+Vo1-e-t1τ
Equation 24. Vt2=Vi+Vo1-e-2t1τ

Now, let x = e-t1τ and the equations become:

Equation 25. Vt0=Vi
Equation 26. Vt1=Vi+Vo(1-x)
Equation 27. Vt2=Vi+Vo(1-x2)

Note, the steady state voltage, Vinf, is:

Equation 28. Vt==Vinf=Vi+Vo

The calculation for the system of equations is heavily simplified (given t2 = 2*t1) and thus Vinf is:

Equation 29. Vinf=Vt0+Vt02-2*Vt0*Vt1+Vt12-Vt0+2*Vt1-Vt2

The MATLAB script used to solve for the system of equations is:

%% charging solution
clc
syms vt0 vt1 vt2 vi v0 x
eq1 = vt0 == vi;
eq2 = vt1 == vi+ v0*(1-x);
eq3 = vt2 == vi+ v0*(1-x*x);
eq4 = vt0 ~= vt1;
eqns = [eq1, eq2, eq3, eq4];
%
[svi, sv0, sx, para, conditions] = solve(eqns,[vi, v0, x],ReturnConditions=true)

One important consideration is knowing when to apply the prediction algorithm. If the voltage has a fast settling time, the prediction algorithm is not needed. It is more practical to just wait a little longer in time before solving for Riso or Ciso. Currently, the SW does some basic checks based on the voltage time derivative (normalized by the Vbus voltage) to set a threshold for prediction mode. This method does require some tuning with known loads to verify reliable operation. These are the possible operating modes in the code:

#define SETTLED_MODE
#define DECAY_MODE
#define CHARGE_MODE
#define OUT_OF_RANGE_MODE