From: kc6zut on
I need an algorithm for computing the exponential of a real number using
only elementary operations (addition, subtraction, multiplication and/or
division). I have a PLC (Programmable Logic Controller - used in
industrial controls) as the processor. It has no built-in math functions
other that the above. I need to convert a voltage from a pressure
transducer to a displayed value. The transducer output is scaled to
produce X volts per decade of pressure e.g. 1 volt is 1.6e-10 Torr, 1.6
volts is 1.6e-9 Torr. The conversion formula is; pressure =
10^(1.667*Voltage - 11.46). I only need 2 - 3 significant figures for the
display. I've tried using a Taylor series but even with 5 terms it is only
good over a small range. The available memory would only support a small
look up table. Any other ideas? Any references?

Thanks
Max Miller
Ushio America, Inc.


From: Jerry Avins on
kc6zut wrote:
> I need an algorithm for computing the exponential of a real number using
> only elementary operations (addition, subtraction, multiplication and/or
> division). I have a PLC (Programmable Logic Controller - used in
> industrial controls) as the processor. It has no built-in math functions
> other that the above. I need to convert a voltage from a pressure
> transducer to a displayed value. The transducer output is scaled to
> produce X volts per decade of pressure e.g. 1 volt is 1.6e-10 Torr, 1.6
> volts is 1.6e-9 Torr. The conversion formula is; pressure =
> 10^(1.667*Voltage - 11.46). I only need 2 - 3 significant figures for the
> display. I've tried using a Taylor series but even with 5 terms it is only
> good over a small range. The available memory would only support a small
> look up table. Any other ideas? Any references?

Taylor or Maclaurin series?

Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
From: JCH on

"kc6zut" <mmiller(a)ushio.com> schrieb im Newsbeitrag
news:ZKOdnSkx57PrfZvWnZ2dnUVZ_smdnZ2d(a)giganews.com...
> I need an algorithm for computing the exponential of a real number using
> only elementary operations (addition, subtraction, multiplication and/or
> division). I have a PLC (Programmable Logic Controller - used in
> industrial controls) as the processor. It has no built-in math functions
> other that the above. I need to convert a voltage from a pressure
> transducer to a displayed value. The transducer output is scaled to
> produce X volts per decade of pressure e.g. 1 volt is 1.6e-10 Torr, 1.6
> volts is 1.6e-9 Torr. The conversion formula is; pressure =
> 10^(1.667*Voltage - 11.46). I only need 2 - 3 significant figures for the
> display. I've tried using a Taylor series but even with 5 terms it is
> only
> good over a small range. The available memory would only support a small
> look up table. Any other ideas? Any references?
>
> Thanks
> Max Miller
> Ushio America, Inc.
>
>


Polynomial Approximation:

f(x) = 10^(1.667*Voltage - 11.46) for 0...5 Volt

f(x) = 5.645269595656*10^-07 + -2.029821929602*10^-05 * x^1 +
1.370173830494*10^-04 * x^2 + -3.743361811228*10^-04 * x^3 +
5.303021991490*10^-04 * x^4 + -4.367768375904*10^-04 * x^5 +
2.207952436761*10^-04 * x^6 + -6.951425744642*10^-05 * x^7 +
1.329999350325*10^-05 * x^8 + -1.416971184009*10^-06 * x^9 +
6.459316020694*10^-08 * x^10


--
Regards JCH


From: Jerry Avins on
Jerry Avins wrote:
> kc6zut wrote:
>> I need an algorithm for computing the exponential of a real number using
>> only elementary operations (addition, subtraction, multiplication and/or
>> division). I have a PLC (Programmable Logic Controller - used in
>> industrial controls) as the processor. It has no built-in math functions
>> other that the above. I need to convert a voltage from a pressure
>> transducer to a displayed value. The transducer output is scaled to
>> produce X volts per decade of pressure e.g. 1 volt is 1.6e-10 Torr, 1.6
>> volts is 1.6e-9 Torr. The conversion formula is; pressure =
>> 10^(1.667*Voltage - 11.46). I only need 2 - 3 significant figures for
>> the
>> display. I've tried using a Taylor series but even with 5 terms it is
>> only
>> good over a small range. The available memory would only support a small
>> look up table. Any other ideas? Any references?
>
> Taylor or Maclaurin series?

My bad. I didn't read it all, apparently. Have you tried a smaller table
with interpolation? Parabolic interpolation does pretty well with only a
small table. http://users.erols.com/jyavins/typek.htm gives examples.

Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
From: mblume on
Am Fri, 20 Nov 2009 20:55:07 +0100 schrieb JCH:
>> I need an algorithm for computing the exponential of a real number
>> using only elementary operations (addition, subtraction, multiplication
>> and/or division). ...
>
> Polynomial Approximation:
>
> f(x) = 10^(1.667*Voltage - 11.46) for 0...5 Volt
>
> f(x) = 5.645269595656*10^-07 + -2.029821929602*10^-05 * x^1 +
> 1.370173830494*10^-04 * x^2 + -3.743361811228*10^-04 * x^3 +
> 5.303021991490*10^-04 * x^4 + -4.367768375904*10^-04 * x^5 +
> 2.207952436761*10^-04 * x^6 + -6.951425744642*10^-05 * x^7 +
> 1.329999350325*10^-05 * x^8 + -1.416971184009*10^-06 * x^9 +
> 6.459316020694*10^-08 * x^10

And don't forget to implement it using Horner's method:
y = ((a*x + b)*x + c)*x + d

Regards
Martin