The nonlinear resistor of Chua’s circuit
In the first article I saw how the behaviour of an autonomous circuit can change radically when a single nonlinear element is introduced. Before looking for chaos with a simulation, I want to understand this component properly. In particular, a negative slope of the current-voltage characteristic means that an increase in voltage produces a decrease in current: the component does not behave like an ordinary passive resistor.
There are two distinct problems. A mathematical characteristic, like the three-segment one drawn by Matsumoto, can be reconstructed from the stated slopes and breakpoints. A photograph of an actually measured characteristic poses an additional problem: how sure can we be of the values we extract from it?
Starting from a photograph of a measurement
I chose Figure 2(b) of Zhong and Ayrom’s technical report of 6 July 1984 (UCB/ERL M84/56, page 10 of the PDF). The caption on page 8 gives a sensitivity of 4 V per division on the horizontal axis and 2 mA per division on the vertical axis. This is the information that allows distances in the photograph to be turned into scientific coordinates.

In Unified Documents I set 400 dpi and published the region of interest. The resulting image is a 1794 × 1461 pixel PNG. I am not digitising a crop of the Viewer screenshot, but the image Dataset produced by rendering the original document. This is important: calibrations and points must always refer to the same image, at the same resolution.
First calibration: relating pixels to physical quantities
In Curve Digitalizer I associated the image with the configuration Zhong_Ayrom_Fig2b_IV. I chose four grid intersections, using a rectangle six divisions wide and four divisions high. The corresponding physical values are as follows:
| Corner | Voltage (V) | Current (mA) |
|---|---|---|
| BL | −12 | −4 |
| BR | +12 | −4 |
| TL | −12 | +4 |
| TR | +12 | +4 |

The projective transformation takes into account part of the geometric distortion of the photograph, but it does not necessarily correct all the distortions of the scan. Some of the upper references have poor contrast; in addition, some points of the trace lie outside the calibrated rectangle. These are aspects to be checked, not details to be hidden.
Checking an independent reference
I accepted the first calibration in the GUI, naming it C01, and checked the point that should represent the origin of the grid. I obtained about +0.117 V and +0.044 mA with respect to the expected value of zero.

It is a useful check, but it does not determine the uncertainty of the whole curve. The four corners are the constraints of the transformation: a small residual at the corners does not prove that all the coordinates of the graph are exact. To understand how much the choice of references matters, I will repeat the calibration five times, keeping the same pixel trace.
Tracing only what is readable
The photograph has two clearly distinguishable portions and a central area in which the trace is too faint to follow with confidence. I entered 15 points in the left portion and 14 in the right portion. I preferred to keep them as two separate curves, without filling the gap with invented points.

The uncertainty problem
The position chosen for a point and the transformation linking the raster to the axes are two different sources of variability. If I move a calibration reference, I can shift many points in a correlated way. If instead I choose a different point within the thickness of the line, I introduce a local variability. I want to study the two contributions separately before combining them.
For the comparison between the five calibrations I will use Curve Digitalizer and Replicate Curves. First it is worth examining the diagnostics available for the thickness of the trace: the measured width is not automatically a standard uncertainty. The choice of distribution and of propagation will have to be made explicit before the results are used in Curve Fitter.
Only after verifying the digitisation and the uncertainty will we be able to assess which slopes of the model are compatible with the historical measurements. The complete theoretical characteristic and the partial photograph do not carry the same information.
Measuring the thickness of the trace
I reviewed the points of the characteristic, especially in the left portion, and added four independent calibrations to the first. The five calibrations C01–C05 belong to the same image and are applied to the same sequence of pixel points. The digitiser configuration saves the changes automatically.

The photograph shows a bright trace of variable width. For a cautious estimate I chose, on each portion, a rising section that is relatively wide, straight and readable. I did not look for the smallest value, nor did I deliberately include the grid or areas where the edge is ambiguous. In a first attempt I had chosen two edges in longitudinally different regions: on the right-hand portion the program returned as much as 280.81 pixels. It was not a reliable measurement of the thickness.
1. Selecting the first edge
In the Curves tab I select the curve, open Stroke width…, enable Measure this curve and choose the manual method. I zoom in on the chosen section. If there are previous invalid boundaries, I use Clear boundaries. I select Boundary A, then Edit boundary, and place four points along the first edge, from bottom to top.

2. Selecting the opposite edge
I switch to Boundary B, enable Edit boundary again and place four points on the other side of the same section, in the same order. The points of the two edges must be close in the transverse direction and describe a region with matching ends. I must not select two different sections of the curve, even if each of them is perfectly readable.

3. Computing the thickness
I press Measure two boundaries. The digitiser interpolates the two edges and evaluates their separation. For the left portion I obtained a median of 22.64 pixels and for the right one 23.96 pixels.


| Portion | Median width (px) | Interpolated samples accepted | Rejected |
|---|---|---|---|
| Left | 22.64 | 101 | 0 |
| Right | 23.96 | 101 | 0 |
The 101 samples per side come from the interpolation of the edges, not from 101 independent measurements. The decimals shown by the software do not express the accuracy of the manual choice. As a cautious geometric reference I can adopt about 24 pixels, the larger of the two results rounded up. This is a local estimate on sections chosen because they are wide and readable, not an upper bound proven for every point.
4. From width to uncertainty
The width of the trace is a geometric diagnostic: it is not automatically the standard deviation. If I assume that the transverse position of the centre is uniformly distributed within a band of total width w, the transverse standard uncertainty is u⊥ = w/√12. The assumption must be stated and then propagated through the local geometry and the calibration. It is not correct to interpret the same width automatically as two independent standard uncertainties in X and Y. The uncertainty of the original historical measurement remains separate.
Separating calibration sensitivity from trace thickness
To study the effect of the calibration alone first, I selected all five accepted measurements in the Publish tab and chose the separate layout. Curve Digitalizer published five Datasets, each with 29 points. The identities and pixel positions are identical in all of them: what changes are the scientific coordinates, as a result of the calibration. At this stage I do not assign statistical uncertainties to the thickness.

In Replicate Curves the appropriate design is calibration sensitivity, not a repeatability test of five independent physical acquisitions. The two portions of the characteristic will be analysed separately, so as not to interpolate the missing central section artificially. The spread of the calibrations will describe the sensitivity of the transformation; it will not be interpreted as a confidence interval nor added twice to the same contribution.
The comparison in Replicate Curves
For the left portion I opened Replicate Curves and selected the yx method: I want to compare the current of the five realisations at the same voltage, over the common domain. I chose calibration_sensitivity because the original points are the same, rather than declaring five independent observations. I set 200 samples for the representation of the consensus, not 200 new measurements.

In the Sources menu I use Add Digitizer source…: I select the Dataset and the curve/calibration pair. The five sources must share the identity of the characteristic, of the observation and of the raster points; the identity of the calibration, instead, changes. In this way the program does not confuse a comparison between transformations with five measurements of the circuit.

I ran the analysis of the left portion. The five curves are very close to each other, and the graph shows the consensus curve and the lines corresponding to the mean plus or minus the sample standard deviation. The agreement indicates a limited sensitivity to the five calibrations adopted; it does not prove that the photograph is exact and does not yet include the uncertainty of the thickness.

A micropatch for GX-TXT DEV112 P012
During this study I ran into a problem when publishing the results of Replicate Curves: the analysis and the graph worked, but the Study > Publish results command rejected the replicate.study metadata because they contained line-break characters. The fix changes the representation of the metadata, without altering their values, the original data or the numerical processing.
To reproduce the work with GX-TXT DEV112 P012 a manual micropatch (ZIP) is available, which is also compatible with the earlier Algebra micropatch.
- Close GX-TXT.
- Extract the ZIP archive.
- Replace the file
curve_replicate_scientific_api_v1.tclin theplugins/modules/curve.replicate_analysis/api/subfolder of the framework. - Restart GX-TXT, reopen the Replicate Curves Workspace, press Analyze and then Study > Publish results.
No installer is needed: it is enough to replace that single file. The fix was tested with the five calibrations of the left portion and installed in the copy of GX-TXT used for this article.
Publishing the result after the fix
I restarted the same installation and reopened the session and the Workspace already saved. I ran Analyze again and, once the Job had finished, selected Study > Publish results. This time GX-TXT correctly published the three Datasets: profile (consensus profile and statistics), traces (original and aligned traces), summary (summary of the study). The result is now available for further processing, without changing the digitised points or the calibrations.

Comparing the two portions
I repeated the same study for the right portion, in a second Workspace of the same session. I kept the five calibrations, the same photograph, the same axis convention and the Y(X) method, this time selecting the right-hand curve. Here too the five sources describe a single physical observation, not five experiments.

The summary published by Replicate Curves gives the voltage interval common to the five realisations. I report the limits rounded to two decimals, without attributing to them an experimental precision greater than that of the photograph.
| Portion | Common interval (V) | Calibrations | Independent observations | Consensus samples |
|---|---|---|---|---|
| Left | −13.61…−2.50 | 5 | 1 | 200 |
| Right | +3.16…+13.54 | 5 | 1 | 200 |
The curves are very close in both studies. The consensus does not reconstruct the unreadable central section, and the interpolated samples do not increase the number of independent observations. For the fitting, therefore, I must not treat the 200 samples as 200 independent measurements. The consensus curve is a representation of the sensitivity to the calibration; the contribution of the thickness is declared and propagated in the next section.
The alternative procedure with the Replicate Curve Analysis module
Replicate Curves is an interactive Viewer in which I explicitly defined a calibration sensitivity study. GX-TXT also has the analysis module Replicate Curve Analysis (version 16.1 in P012). I checked whether it was possible to obtain the comparison of the five calibrations through the normal Analysis → Run cycle, without resorting to a new numerical program.
1. Preparing a family of curves
The analysis module requires a numerical variable to distinguish the families and an identifier variable to distinguish the replicates. Each of the five Datasets from the digitiser contains both portions of the characteristic. I cannot treat them as ten replicates of the same function: their voltage domains are disjoint. I therefore used the native build_family function of the Dataset Transform API (DATASET_TRANSFORM_API_v1) to organise the original points into a single Dataset, chua.fig2b.calibration_family. This preparation was carried out through the public API, not through a fully verified graphical procedure.
For each calibration C01–C05 I selected separately the two curve_id values already present in the Datasets. I assigned two numerical family coordinates: branch (−1 for the left portion, +1 for the right) and calibration_index (from 1 to 5). The result contains 145 rows, 75 on the left and 70 on the right, with the source identifiers and the original rows. I did not interpolate, modify or add any points of the characteristic.
| Variable | Meaning |
|---|---|
| x | Voltage (V) |
| y | Current (mA) |
| branch | −1: left; +1: right |
| calibration_index | 1–5: calibration C01–C05 |
| source_dataset_id / source_row_ordinal | Origin and original row |
To repeat the following graphical procedure directly, you can use the Dataset already prepared in session S02 or download it as a portable GX-TXT Dataset ZIP. It is imported into a session through Dataset → Dataset ZIP… → Import Dataset ZIP…. The file contains the points of the five calibrations, not new measurements nor a reconstruction of the missing section.
2. Enabling and configuring the module
In Configuration → Modules → Analysis & Services I search for replicate, select Replicate Curve Analysis and use Enable module. In the Modules tab I can leave only this module visible in Analysis. I do not confuse enabling the service with selecting an analysis to run.

In the Analysis tab I set Repeated-data handling to automatic, Sampling assumption to unspecified, the statistical grid to linspace with 200 points, the output grid to uniform_grid with 200 points, the consensus centre to mean and the interpolation to linear. The choice of unspecified is essential: five calibrations of the same photograph are not five independent physical observations. The calibration identifier is used to group the points, not to give them statistical independence.
I select the family Dataset as the primary source and set the following bindings: primary.x for X, primary.branch for Family, primary.y for Y and primary.calibration_index for Replicate.

3. Running the analysis and interpreting the results
I tick Run / recalculate now for the module, check in the Run tab that the other modules are excluded and start Run enabled analyses. The program recognised ten traces and two families, five calibrations per family, keeping the two voltage domains separate.



The scientific report of the module gives the sample spread of the currents of the five realisations on the common grid. The results, in mA, are:
| Portion | RMS of the standard deviation | Mean standard deviation | Maximum standard deviation |
|---|---|---|---|
| Left | 0.02893 | 0.02649 | 0.04050 |
| Right | 0.02159 | 0.02145 | 0.02762 |
The standard deviation is a descriptive spread as the calibration varies, not an estimate of the standard error of the mean of five independent measurements. The module does not return a valid SEM in the absence of that assumption; it also reports that the within-source and between-source components of the variance cannot be identified. It is correct that the corresponding graphs are not built with invented values. The width of the trace is not yet included.
4. Publishing the Datasets and a limitation of P012
The module correctly recorded the Datasets curve.replicate.traces, curve.replicate.profiles and curve.replicate.family_summary in HDF5 format, with their metadata. These are different products from those generated through the Viewer. The Viewer’s metadata publishing problem (bug 232) did not occur on the analysis module path.

Before the second micropatch I had found another defect in P012: if I disabled the two graphs of the uncertainty components, the Run ended with an error because the runner required their status files. I repeated the run with all four graphs enabled. The status receipts of the two unavailable graphs were produced correctly, but the runner still required the non-existent PNGs and marked the run as FAILED. In both cases the three Datasets and the two scientifically available graphs had actually been produced.
A second micropatch: telling an unavailable graph from an error
The defect (bug 233) does not concern the computation of the spread: the runner demanded the presence of files associated with graphs that were excluded or lacked the data needed to draw them. I corrected the output check. Now the runner excludes disabled graphs and, for enabled ones that declare a status receipt, checks the receipt of the new run. If the producer declares, with a reason, that the graph is unavailable, there is no need to create an empty or dummy image. A computation error, a missing scientific file or an invalid receipt are still reported.
For GX-TXT DEV112 P012 I provide a second manual micropatch (ZIP), compatible with the earlier Algebra and bug 232 fixes.
- Close GX-TXT.
- Extract the ZIP.
- Replace the two files
graph_workflow_api_v1.tclandstandard_octave_exec.tclin thecore/tcl/subfolder of the framework. - Restart GX-TXT, reopen the session and repeat Run enabled analyses.
I repeated the analysis on the same Dataset, keeping all the statistical settings. With only the two available graphs enabled, the Run ends with PASS: the runner checked six ordinary files and two graph outcomes.

I then enabled all four graphs and repeated the Run. In this case too the analysis ends with PASS. The first two graphs are generated, while the other two remain scientifically unavailable. The program states this explicitly in the log. The change does not invent variance components that we cannot estimate from a single physical observation.

The scientific report obtained after the fix is identical to the previous one; the three Datasets of the module were published again. The descriptive comparison of the five calibrations is therefore also completed through Analysis. The reported spread does not yet include the uncertainty due to the thickness of the trace: this distinction remains essential before fitting.
From trace thickness to coordinate uncertainty
With the five calibrations I measured how much the curve changes when the raster transformation changes. I now want to separate from this effect another source of uncertainty: the choice of the position of a point within the bright trace. The two median thickness measurements on the wide sections (22.64 and 23.96 original pixels) suggest adopting 24 pixels as a cautious working width. This is not a guaranteed maximum for every point of the photograph.
The Digitalizer keeps the Stroke width diagnostics separate from the metrological declaration. In Publish → Uncertainty… I explicitly choose a rectangular model for both raster coordinates. The full width is 24 px, so the localisation error is represented by two independent uniform variables over the interval from −12 to +12 px, with standard uncertainty:
\[u_p=\frac{w}{\sqrt{12}}=\frac{24}{\sqrt{12}}\simeq 6.93\ \mathrm{px}.\]
This square assumption is a cautious choice compared with the model of deviation normal to the trace only, but it is not equivalent to measuring the distributions of the X and Y pixels separately. For an affine transformation, like the one kept in C01 in this example, GX-TXT propagates the covariance matrix through the Jacobian of the calibration:
\[\boldsymbol{\Sigma}_{VI}=J\,\boldsymbol{\Sigma}_{p}\,J^{T},\qquad \boldsymbol{\Sigma}_{p}=\frac{w^2}{12}\,\mathbf{1}_{2}.\]
Here \(\mathbf{1}_{2}\) is the identity matrix of order two. Even though the pixel coordinates are independent in the chosen model, the transformed physical coordinates can be correlated.

pixel_calibration; (2) Pixel scale meaning: rectangular_full_width; (3) X/Y widths: 24,24; (4) twelve contributions of the calibration references set to zero for the conditional analysis only; (5) rationale for the choice; (6) separate Stroke width diagnostics; (7) Apply and save declaration.In this test I set the twelve contributions of the calibration references to zero: not because I consider the calibration free of error, but because I am estimating only the effect of localisation with C01 fixed. The results of the five transformations C01–C05 are kept and analysed separately, avoiding counting the same contribution twice. The rationale is stored together with the declaration.
I go back to Publish, keep the separate layout, choose only C01 and set a new Publication base Dataset ID, digitized.zhong_ayrom_fig2b_width24. The Publish selected calibrations button creates the Dataset digitized.zhong_ayrom_fig2b_width24.c01.curves. The 29 points, the identifiers and the original coordinates remain identical to the previous C01 publication: the uncertainty and the related metadata are added.

| Quantity | Value for C01 |
|---|---|
Standard uncertainty of the voltage, sigma_x | 0.20584 V |
Standard uncertainty of the current, sigma_y | 0.10355 mA |
Covariance, covariance_xy | 0.00005268 V·mA |
| X–Y correlation (maximum magnitude) | 0.00247 |
These results come from the native propagation of the Digitalizer, not from a calculation based only on the number of pixels per division. Their numerical precision is not a measure of the absolute accuracy of the photograph or of the 1984 instrument.
Fitting the four readable segments
The design characteristic is made up of five segments. In the photograph, however, the central part is not readable. I limit myself to estimating four local laws \(I=gV+q\): a pair of segments with positive conductance and a pair with negative conductance. I exclude the two points closest to the vertices, so as not to force a breakpoint to belong to one of the two lines. No point is removed from the original Dataset.
I use Curve Fitter with Y(X) orientation, variables x (V) and y (mA), the linear model and the shifts of both coordinates disabled. To separate the four domains I use the curve_label and point_index filters of the Dataset just published. In this step I configured the filters and previews through the public Curve Fit APIs in the same Viewer instance, accepting the native results and saving the Workspace.
| Segment | curve_label | point_index (included) | Points |
|---|---|---|---|
| Left outer | Fig2b_left_visible | 0–7 | 8 |
| Left intermediate | Fig2b_left_visible | 9–14 | 6 |
| Right intermediate | Fig2b_right_visible | 0–4 | 5 |
| Right outer | Fig2b_right_visible | 6–13 | 8 |
For each segment I repeat the fit with and without weights. In the second case I explicitly declare the uncertainty measure of the response through the binding measurement {kind sigma variable_id sigma_y nonfinite error} of the public API. The first regression is ordinary least squares (OLS); the second minimises the sum of the squared current residuals weighted by the inverse of the current variance. For this model with C01 fixed, since there are no appreciable differences between the standard uncertainties of the individual currents, the weights are constant and the coefficients coincide within numerical precision.

| Segment | g (mA/V) | q (mA) | RMSE (mA) |
|---|---|---|---|
| Left outer | 1.049253 | 11.796969 | 0.03669 |
| Left intermediate | −0.485698 | 1.057854 | 0.01203 |
| Right intermediate | −0.471363 | −1.184969 | 0.02275 |
| Right outer | 1.105982 | −13.134924 | 0.05224 |
The differential conductance \(g=dI/dV\) has units of mA/V, equivalent to mS. The values show two outer segments with positive conductance close to +1 mS and two intermediate segments with negative conductance close to −0.5 mS. A certain asymmetry can also be seen. I cannot yet attribute it unambiguously to the original component rather than to the photograph or the digitisation.
I now compare the standard errors of the slope and intercept returned by the Fitter. The OLS one depends on the spread of the residuals; the weighted one is conditional on the declaration of the current uncertainties. It is not an estimate of the total uncertainty.
| Segment | SE(g), OLS (mS) | SE(g), weighted (mS) | SE(q), weighted (mA) |
|---|---|---|---|
| Left outer | 0.00771 | 0.01885 | 0.20464 |
| Left intermediate | 0.00447 | 0.03139 | 0.13683 |
| Right intermediate | 0.01077 | 0.03798 | 0.19050 |
| Right outer | 0.01166 | 0.02002 | 0.22533 |

I do not introduce an assumption of Gaussian noise that I have not justified: the probabilistic model of the thickness is rectangular and the Noise model of the fit is left unspecified. For this reason the Fitter correctly marks the confidence intervals as unavailable. A standard error of the coefficients does not automatically become a 95% confidence interval.
In the Residuals tab I also check the structure of the residuals. For the right outer segment, the graph of the eight residuals suggests that small systematic departures from linearity cannot be ruled out, but it is not enough to distinguish a physical non-ideality from a distortion of the photograph.

Why can I not yet obtain the overall uncertainty of the fit?
The voltage uncertainty, about 0.206 V, is not negligible. I queried the native statistical planning feature for the published Dataset: the model with sigma on the response only is admissible, while the diagonal ODR model sigma_xy is not available because an X–Y correlation is present, however small. Even a possible model with a full covariance matrix of the response only would not solve the problem of the uncertainty on the predictor. I did not remove the covariance nor replace the Dataset with an artificial independent declaration. An overall estimate would require a method that treats both coordinates and the relevant correlations jointly.
How much do the coefficients change as the calibration varies?
The initial question about the five calibrations also concerns the parameters, not only the width of the consensus bands. I repeated the four OLS regressions on the same original points of each calibration (20 regressions in all), using Curve Source and the public linear regression and statistics APIs of the Math Numeric module. I selected exactly the same point identities. The native C01 regressions reproduce the coefficients obtained in Curve Fitter.
| Segment | Mean of g (mS) | Standard deviation of g (mS) | Mean of q (mA) | Standard deviation of q (mA) |
|---|---|---|---|---|
| Left outer | 1.04882 | 0.00250 | 11.85384 | 0.04158 |
| Left intermediate | −0.48668 | 0.00085 | 1.04284 | 0.01638 |
| Right intermediate | −0.47191 | 0.00093 | −1.20010 | 0.01729 |
| Right outer | 1.10237 | 0.00582 | −13.06812 | 0.06844 |
In our example the spread of the slopes across the calibrations is smaller than the conditional standard errors returned by the fit with the thickness. It is a useful descriptive comparison, but not a complete decomposition of an uncertainty budget. The five calibrations are not five independent physical experiments; I do not automatically divide their standard deviation by \(\sqrt{5}\), nor do I combine it in quadrature with the fitting errors without a justified joint model.
Reconstructing the nominal five-segment law
To move from the characteristic to the circuit equations, a law defined in the central region as well is needed. I therefore go back to the parameters stated by Zhong and Ayrom in the original report, on page 4 of the text (page 6 of the PDF). I do not extrapolate the four measured lines to invent the fifth segment. Instead I build the continuous, odd nominal law with the values given in the source:
| Parameter | Meaning | Nominal value |
|---|---|---|
| g0 | Outer conductance | +1 mS |
| g1 | Intermediate conductance | −0.5 mS |
| g2 | Central conductance | −0.8 mS |
| b1 | Inner breakpoints | ±2.5 V |
| b2 | Outer breakpoints | ±7.5 V |
\[I(V)=g_0V+\frac{g_1-g_0}{2}(|V+b_2|-|V-b_2|)+\frac{g_2-g_1}{2}(|V+b_1|-|V-b_1|).\]
The parameters \(b_1,b_2\) in the formula are the positive values of the breakpoint voltages. The absolute-value terms change slope exactly at the desired points, while preserving continuity. For example, the law gives −2 mA at +2.5 V and −4.5 mA at +7.5 V. This also clarifies the convention adopted for the doubtful ordinate in the historical figure discussed in the first article: I use the parameters stated in the text and the continuity of the law, not a number read in isolation from the drawing.
I reconstructed the function in Mathematics Explorer through its public API, over an interval from −15 to +15 V. To keep the units in the expression I used the references \(V_{\mathrm{ref}}=1\,\mathrm{V}\), \(I_{\mathrm{ref}}=1\,\mathrm{mA}\) and the corresponding dimensionless coefficients. The second set of functions contains only the four C01 fits, each limited to its own observed interval. The plot is generated by the native renderer and the model is saved in a Workspace of the session.

The comparison shows that the shape and slopes of the readable portions are close to the nominal ones, but they do not coincide exactly. The complete mathematical reconstruction is therefore an explicit basis for the next circuit equations, not a complete experimental estimate of the five segments. From here on it will be important to distinguish simulations with the nominal parameters from any simulations with estimated parameters: the fifth segment and a complete uncertainty budget are not identified by this photograph.
Reference
G. Q. Zhong and F. Ayrom, Experimental Confirmation of Chaos from Chua’s Circuit, UCB/ERL M84/56, 6 July 1984; paper published in 1985. DOI.