Algorithm #2; Horner's Method, Algorithm #2 - Honeywell IPT User Manual

Table of Contents

Advertisement

3.2.1.2 Algorithm #2

Differences from Algorithm #1 are highlighted in blue
Y = A + (F1 × p) + (F2 × p
Where:
F1 = a1 + (b1 × t) + (c1 × t
F2 = a2 + (b2 × t) + (c2 × t
F3 = a3 + (b3 × t) + (c3 × t
F4 = a4 + (b4 × t) + (c4 × t
F5 = a5 + (b5 × t) + (c5 x t
F6 = a6 + (b6 × t) + (c6 × t
Output: Y = pressure value in PSI
Inputs: p = 24-bit pressure channel ADC value, normalized 0 – 1
Normalized pressure channel ADC value = pressure channel ADC value / 16,777,215
t = 16-bit temperature channel ADC value, normalized 0 - 1
Normalized temperature channel ADC value = temperature channel ADC value / 65,535

3.2.1.2.1 Horner's Method, Algorithm #2

Horner's method is a suggested microcontroller-friendly alternative for evaluating the above equations:
Y = A + p(F1 + p(F2 + p(F3 +p(F4 + p(F5))))) +
F1 = a1 + t(b1 + t(c1 + t(d1 + t(e1 + t(fa1)))))
F2 = a2 + t(b2 + t(c2 + t(d2 + t(e2 + t(fa2)))))
F3 = a3 + t(b3 + t(c3 + t(d3 + t(e3 + t(fa3)))))
F4 = a4 + t(b4 + t(c4 + t(d4 + t(e4 + t(fa4)))))
F5 = a5 + t(b5 + t(c5 + t(d5 + t(e5 + t(fa5)))))
F6 = a6 + t(b6 + t(c6 + t(d6 + t(e6 + t(fa6)))))
Total:
35 multiplies, 36 additions
2
3
) + (F3 × p
) + (F4 × p
2
3
) + (d1 × t
) + (e1 × t
2
3
) + (d2 × t
) + (e2 × t
2
3
) + (d3 × t
) + (e3 × t
2
3
) + (d4 × t
) + (e4 × t
2
3
) + (d5 × t
) + (e5 × t
2
3
) + (d6 × t
) + (e6 × t
4
5
) + (F5 × p
) +
F6
4
5
) + (fa1 × t
)
4
5
) + (fa2 × t
)
4
5
) + (fa3 × t
)
4
5
) + (fa4 × t
)
4
5
) + (fa5 × t
)
4
5
) + (fa6 × t
)
F6
(5
multiplies, 6 additions)
(5 multiplies, 5 additions)
(5 multiplies, 5 additions)
(5 multiplies, 5 additions)
(5 multiplies, 5 additions)
(5 multiplies, 5 additions)
(5 multiplies, 5 additions)
13

Advertisement

Table of Contents
loading

Table of Contents