Exponential, Gaussian, and power-law models
Learn to configure three nonlinear models, choose suitable initial values, interpret the parameters correctly and check the numerical results without mistaking a good fit for a guarantee of physical validity.
Verified interface: GX-TXT DEV112-P011 · Dataset Curve Fit.
Why a linear model is not enough
Many experimental responses do not follow a straight line. A decrease that slows down progressively may suggest an exponential law; nonlinear growth may follow a power law; a signal with a localized maximum may be described by a Gaussian profile. These mathematical forms represent different assumptions and have parameters with different meanings.
In Curve Fitter, the Model item allows you to choose exponential, power_law or gaussian. The Initial parameters field is also available for these models; it matters especially because a nonlinear calculation can depend on the starting point of the numerical procedure.
The three exercises use separate, entirely synthetic Datasets, published in the Session with the GX-TXT public Dataset API. They are not experimental measurements. The Previews were obtained with the actual GUI commands and the values were verified independently with SciPy.
Exponential model: a decaying response
The form implemented in Curve Fitter is:
U(t) = a · exp(b · t) + c.
The a coefficient is the amplitude relative to the asymptotic level, b is the exponential rate and c is the offset. In the example the response is in volts and time in seconds, so a and c are in V, while b is in s −1 . When b is negative, the response decays toward c; the characteristic time is τ = −1/b.
We generated 15 observations with values close to U(t) = 1.8 exp(−0.28 t) + 0.2 V , with t in seconds and small deterministic perturbations added to the voltage values.
- Open the synthetic Dataset
c09_exponential_synthetic, choose X = Time (s) and Y = Voltage (V), then press Add Dataset curve. - Select Model = exponential, Fit points = all and Output domain = source.
- Set Initial parameters =
1.8,-0.28,0.2, in the order amplitude, rate, offset. - Request Preview fit and verify that the estimated curve follows the decay of the observations.
The rounded result is:
U(t) ≈ 1.79689 · exp(−0.279533 t) + 0.200282 V, using the units declared for each coefficient.
The fit returned RMSE = 0.002639 V and R² = 0.999973. The estimated rate gives a characteristic time of about 3.58 s. This value follows mathematically from the chosen model; it is not an independent measurement of the time constant.
Exponential model residuals
Open the Residuals tab. The residuals are small and change sign around zero; their order and pattern must still be examined before treating the model as adequate for a real experiment.
In the example the deviations were introduced on purpose to avoid a curve that matches the data perfectly. A very low RMSE confirms the quality of the fit on these observations, but does not prove that a real sample necessarily follows exponential kinetics.
Power law: non-linear growth
The second model has the form:
U(t) = a · tb.
The a parameter sets the scale of the response, while b is the dimensionless exponent. If t is a physical quantity in seconds, the a coefficient must have units compatible with V·s −b ; alternatively, the law can be written explicitly with the dimensionless ratio t/t₀ and a stated reference time.
For this type of power law, Curve Fitter requires strictly positive values of the independent variable. The synthetic Dataset c09_power_law_synthetic therefore contains 21 observations between 1 and 11 s, with no negative or zero values.
- Select
c09_power_law_syntheticand bind the Time (s) and Voltage (V) variables. - Use Add Dataset curve, then choose Model = power_law.
- Enter Initial parameters =
0.35,1.35, i.e. the initial scale and exponent. - Request a Preview and check the parameters and residuals on the active source.
power_law. Any other sources already in the Workspace were hidden with the original commands, without deleting the Datasets.The estimated result is a ≈ 0.349972 and b ≈ 1.350035, with RMSE = 0.002895 V and R² ≈ 0.9999988. An exponent greater than 1 describes growth faster than linear over the range considered.
Power laws can look linear on a log–log plot, but a logarithmic transformation changes the statistical structure of the errors. Do not assume that a regression in logarithmic coordinates is automatically equivalent to a nonlinear fit of the original physical response.
Gaussian profile: amplitude, center, and width
The third example is a synthetic peaked signal, described by the function:
U(t) = a · exp[−½ ((t − μ)/σ)²] + c.
There are four parameters: a (amplitude above the baseline, V), μ (peak center, s), σ (characteristic width, s) and c (offset or baseline, V). The initial width must be nonzero. For the example, values close to a = 1.7 V, μ = 5 s, σ = 1.4 s, c = 0.12 V were chosen.
The Dataset c09_gaussian_synthetic contains 21 observations from 0 to 10 s. To prepare the fit, select the Dataset, bind X and Y and add the curve; then set Model = gaussian, Fit points = all and Initial parameters = 1.7,5,1.4,0.12.
The regression provided a ≈ 1.700438 V, μ ≈ 4.999958 s, σ ≈ 1.400937 s and c ≈ 0.119284 V, with RMSE = 0.002868 V and R² = 0.999977.
For a Gaussian of this form, the full width at half maximum above the baseline is FWHM = 2√(2 ln 2) · |σ|, about 3.30 s in this example. The relationship follows from the mathematical model; it is not a separate measurement.
Read the Gaussian parameter table
Open Parameters & Statistics. The table identifies the parameters and their units; you do not need to reconstruct them from the shape of the plot.
In the example, the tab reports that the backend stopping criteria were satisfied: the stopping criterion was met, but this does not show that the solution is the global minimum or that the model is physically correct. Keep the success of the numerical procedure separate from the scientific validation of the model.
Likewise, the standard errors in the table do not entitle you to invent confidence intervals. The GUI shows unavailable when no specific inferential assumption compatible with the treatment of covariance and weights is available.
Numerical comparison and independent verification
The three fits were reproduced on the same canonical CSV files with the scipy.optimize.curve_fit function. All estimated coefficients, RMSE, R² and every row of the residual tables were compared.
| Model | N | Parameters | RMSE (V) | R² |
|---|---|---|---|---|
| Exponential | 15 | 3 | 0.002639 | 0.999973 |
| Power law | 21 | 2 | 0.002895 | 0.9999988 |
| Gaussian | 21 | 4 | 0.002868 | 0.999977 |
The check verified **57 rows of residuals** in total: 15 for the exponential, 21 for the power law and 21 for the Gaussian. The differences between the coefficients and the SciPy estimates are within the numerical tolerances used. The values cannot be compared across the three models as if they competed on the same Dataset: each model was applied to a different synthetic example.
Assessing the quality of a nonlinear model
A good fit requires a function compatible with the shape of the data and the nature of the phenomenon. Before confirming the parameters, compare the fitted curve with the observations, check the residuals plot and verify that the coefficients have physically plausible units and values.
For nonlinear models it is useful to try several reasonable starting points and compare the results: very different estimates with similar residuals can indicate poorly identifiable parameters. If the problem imposes physical limits, such as positive amplitudes or known ranges for width and center, declare them before the optimization rather than only interpreting them afterwards.
Quality on the data used for the fit is not the same as predictive ability outside the observed range. Before using the function quantitatively, also check its domain of validity and, when available, independent observations.







