Infineon TLE4997 User Manual page 30

Configuration and calibration of linear hall sensor
Table of Contents

Advertisement

Private Function epsilon(ByVal T) As Double
epsilon = -1 + S_dsp(T) / (C * S_dsppre(T) * S_app(T))
End Function
Iteration Loop
The iteration loop looks through all TL and TQ values and check for the smallest rms error. It is done in two steps:
First it looks for a rough optimum point with a coarse step size of 10 for both parameters. In a second step it iterates
again using stepsize 1 around that point to find a refined optimum.
Rem --> Initialize temperature sweep parameters
T_min = -40
T_max = 150
T_step = 10
n = Math.Round((T_max - T_min) / T_step)
Rem --> Initialize variables to keep track of current optimum values
epsilon_rms_opt = 9999
TL_opt = 0
TQ_opt = 0
Rem =========================================================================
Rem --> Sweep in two runs, the coarse global and the fine local search
For Rounds = 1 To 2
Rem =====================================================================
Rem --> Initialize sweep parameters
Rem
First round coarse, second round fine
If (Rounds = 1) Then
TL_lo = 0
TL_hi = 500
TL_step = 10
TQ_lo = 0
TQ_hi = 240
TQ_step = 10
ElseIf (Rounds = 2) Then
TL_lo = TL_opt - 9
TL_hi = TL_opt + 9
TL_step = 1
TQ_lo = TQ_opt - 9
TQ_hi = TQ_opt + 9
TQ_step = 1
End If
Rem =====================================================================
Rem --> TL sweep
For TL = TL_lo To TL_hi Step TL_step
Rem =================================================================
Rem --> TQ sweep
For TQ = TQ_lo To TQ_hi Step TQ_step
Rem =============================================================
User's Manual
Calibration of TLE4997 Temperature Compensation
30
TLE4997
User's Manual
v01_01, 2019-08

Advertisement

Table of Contents
loading

Table of Contents