• Become a member
  • Log In
The Institution of Electronics
  • Home
  • About us
    • Our Objectives
    • Our History
    • Governance of the Institution
  • The Electron Magazine
    • 2024
      • 2024 – Winter
      • 2024 – Spring
      • 2024 – Summer
      • 2024 – Autumn
    • 2025
      • 2025 – Winter
      • 2025 – Spring
      • 2025 – Summer
      • 2025 – Autumn
    • 2026
      • 2026 – Winter
      • 2026 – Summer
  • Members
    • Membership Grades and Fees
    • Members’ Resources
      • The Electron Newsletter
      • The Archives
  • Education and Projects
    • National Electronics Competition
    • Student Members’ Projects
    • Arkwright Engineering Scholarships
  • News
  • Contact Us
  • Menu Menu
Uncategorised

Discerning and coding: the exponential equation process

Most physical processes in nature have exponential properties. Radiation half-life is one example. Thermal transitions from hot to cold (or cold to hot, for that matter) are another.

Often, a set of data from some process can be a little noisy or otherwise messy. However, if the data points look exponential, the underlying process is probably exponential, too, and it’s fairly easy to find an equation to describe that exponential behavior, enabling us to go from the mess of Figure 1 to Figure 2’s more orderly outcome.


Figure 1 This hypothetical data seems rather messy.


Figure 2 Intuiting order from seeming chaos enables an exponential curve fit outcome.

Assuming an equation of the form Y = A1 + A2 * exp ( – x / A3 ), we have three unknowns, A1, A2 and A3, for which we take three x-and-y pairs from our data and solve three equations in three unknowns to obtain the associated coefficients.

The resulting equation may not be the mathematical best fit, but it can come pretty darn close. The following example algorithm serves us well in this regard (Figure 3).


Figure 3 An exponential curve algorithm enables determination of equation coefficients.

It may be that someone out there is smart enough to find the value of A3 by a one-step explicit method, but I couldn’t do it. Therefore, the value of A3 is found here using an iterative loop. Then with A3 in hand, the values of A2 and A1 are one-step next-step finds.

The code that I called “expestim.bas” was written a long time ago in GWBASIC. After you stop laughing, please take a look at it. And please also be kind in the comments.

10 CLS:SCREEN 9:COLOR 15,1
20 PRINT "save "+CHR$(34)+"expestim.bas"+CHR$(34):PRINT
30 PRINT "save "+CHR$(34)+"a:expestim.bas"+CHR$(34):PRINT:PRINT
40 PRINT "This program solves for the coefficients A1, A2 and A3 of the"
50 PRINT "expression y = A1 + A2 * exp (- x/ A3 ) based on actual data.":PRINT
60 PRINT "You are first asked for three values of the independent variable X."
70 INPUT "What are the three X-values ? ",X1,X2,X3:PRINT
80 PRINT "Next, you are asked for the three corresponding values of the";
90 PRINT " variable Y.":INPUT "What are the three Y-values ? ",Y1,Y2,Y3:PRINT
100 A3=10:A3MOD=.1:K=(Y1-Y2)/(Y1-Y3)
110 L=(EXP(-X1/A3)-EXP(-X2/A3))/(EXP(-X1/A3)-EXP(-X3/A3))
120 IF K>L THEN A3=A3/(1+A3MOD)
130 IF KA3MOD THEN GOTO 110
150 IF ABS(K-L)/ABS(K)<.01 THEN GOTO 170
160 A3MOD=A3MOD*.1:GOTO 110
170 A2=(Y1-Y3)/(EXP(-X1/A3)-EXP(-X3/A3)):A1=Y1-A2*EXP(-X1/A3)
180 PRINT "Y =";A1;"+";A2;"* exp (-X/";A3;")":PRINT
190 Z1=A1+A2*EXP(-X1/A3):Z2=A1+A2*EXP(-X2/A3):Z3=A1+A2*EXP(-X3/A3)
200 A$="SPECIFIED Y-VALUES WERE : ###.## ###.## ###.##":PRINT USING A$;Y1,Y2,Y3
210 A$="CALCULATED Y-VALUES WERE : ###.## ###.## ###.##":PRINT USING A$;Z1,Z2,Z3
220 PRINT:A$=" ":INPUT "Do you want y-value for another x-value (y/n) ? ",A$
230 IF A$="N" THEN GOTO 40
240 IF A$="n" THEN GOTO 40
250 IF A$="Y" THEN GOTO 280
260 IF A$="y" THEN GOTO 280
270 GOTO 220
280 INPUT "What is the new x-value ? ",X
290 Y=A1+A2*EXP(-X/A3):PRINT "For x =";X;", y =";Y:GOTO 220

John Dunn is an electronics consultant and a graduate of The Polytechnic Institute of Brooklyn (BSEE) and of New York University (MSEE).

Related Content

  • Excel Curve Fitting & Linearization, Part 1
  • Excel Curve Fitting & Linearization, Part 2

The post Discerning and coding: the exponential equation process appeared first on EDN.

30 October 2026
http://institutionofelectronics.ac.uk/wp-content/uploads/2022/12/IOE_LOGO.png 0 0 whdsolutions http://institutionofelectronics.ac.uk/wp-content/uploads/2022/12/IOE_LOGO.png whdsolutions2026-10-30 12:47:192026-10-30 12:47:19Discerning and coding: the exponential equation process

Latest news

  • Discerning and coding: the exponential equation process30 October 2026 - 12:47
  • AI can design the chip, manufacturing it is harder30 October 2026 - 03:31
  • Cloud to edge AI: If and when, to what degree, and how and why29 October 2026 - 12:21
  • Amazon, Apple and Microsoft: New mobile computing platforms take off28 October 2026 - 20:22
  • Industrial MCUs pair 600-MHz cores with MRAM28 October 2026 - 19:21
  • Camera kit simplifies multi-camera AI development28 October 2026 - 19:21
  • Hall switch adds diagnostics for automotive safety28 October 2026 - 19:21
  • Motion sensor combo ICs target vehicle dynamics28 October 2026 - 19:21
  • Analog in-memory computing advances to 12 nm28 October 2026 - 19:21
  • An equation-driven guide to designing a CrM/DCM boost PFC28 October 2026 - 16:19
IOE LOGO 2

Become a member

click here

Become a member

click here

Become a subscriber

click here

Become a sponsor

click here

© Copyright - The Institution of Electronics | Website by WHD Solutions
  • Link to LinkedIn
  • Link to Facebook
  • Link to X
Link to: AI can design the chip, manufacturing it is harder Link to: AI can design the chip, manufacturing it is harder AI can design the chip, manufacturing it is harder
Scroll to top Scroll to top Scroll to top