Chua’s circuit: recognizing and measuring chaos
A two-lobed figure is fascinating, but it is not enough to say that a circuit is chaotic. I could be looking at a periodic orbit with a very long period, or at a transient that I have not observed for long enough. In this article I want to move from the shape of the double scroll to a quantitative description: to study how the trajectory returns to a region, how two almost identical states separate, and how small perturbations are deformed along the flow.
I am still working on Matsumoto’s numerical model, with \(G=0.7\), not on voltages in volts or times in seconds of a real circuit. I use GX-TXT DEV112 P012 with the fixes already documented in the previous articles. For the signal analyses I use the native Math Numeric and Math Signal services; for the specific computation of the Lyapunov spectrum, which is not available as a dedicated native operation, I use an Octave script internal to GX-TXT. All the results are canonical Datasets and the plots are produced by Scientific Dataset Plot.
1. A new question about the same trajectory
I do not need to recompute the double scroll to study its geometric structure. In session S06 I imported, through the native Dataset archive, the RK4 trajectory with step 0.02 produced in S04. I also kept Matsumoto’s original report. The variables are the numerical time \(t\), the two coordinates \(v_1,v_2\) and the current \(i_L\). The equations remain those already studied:
\[ \begin{aligned} \dot v_1&=10[0.7(v_2-v_1)-g(v_1)],\\ \dot v_2&=0.5[0.7(v_1-v_2)+i_L],\\ \dot i_L&=-7v_2,\\ g(v_1)&=-0.1v_1-1.95(|v_1+1|-|v_1-1|). \end{aligned} \]
For the maps I select \(200\le t\le1000\), excluding the beginning of the trajectory. That is 40,001 samples of the previous simulation. I do not consider them a bench measurement, nor do I assume that the choice of a finite window proves that the attractor exists for every initial condition. The question is more precise: what do these observations tell me, together with the new integrations of the variational equations?

2. From the waveform to a sequence of events
First I look for the local maxima of \(v_1(t)\) with the native findPeaks operation of Math Numeric 1.67.0. I work on the original samples: min_prominence=0, min_distance=1 sample, distance_mode=samples. I do not impose a positive threshold, because even an oscillation that stays entirely in the negative lobe has a negative local maximum. I do not interpolate the peaks and I do not replace their values with fitting estimates.
The service finds 227 maxima, 98 of which are negative. The smallest is about −2.37387 and the largest 12.12392. The intervals between two consecutive maxima range from 3.14 to 4.02 numerical time units. Sampling at 0.02 limits the time resolution and, consequently, that of the values of the maxima.

The sequence preserves the history of the passages between the two regions. Groups of positive and negative maxima can be seen: while the motion stays in one lobe, the values can change gradually before the passage towards the other. The distance between two peaks is not automatically the period of a complete cycle, especially when the motion changes lobe.
3. The map of consecutive maxima
I call \(a_n=v_1(t_n)\) the value of local maximum number \(n\), in time order. Instead of plotting it against time, I plot the next maximum against the previous one:
\[(a_n,a_{n+1}),\qquad n=1,\ldots,N-1.\]
If I had a simple periodic orbit with one maximum per cycle, after the transient the points would cluster near \((a,a)\). A periodic motion with several distinct maxima per cycle would produce a finite set of pairs. In the case of more complex dynamics the sequence can explore entire branches. The reconstruction through maxima is a projection of the dynamics: there is no guarantee that the value of a single maximum uniquely determines the next one, because the original state has three coordinates.

I published the 226 pairs in the Dataset chua.chaos.return_map, with the variables n, t_n, t_next, peak_n, peak_next and delta_t. In Plots I use peak_n as X and peak_next as Y, scatter representation. I do not join the points with a line, I do not sort them by amplitude and I do not use pairs of non-consecutive samples.
The map shows four general families of events: staying in the positive band, staying in the negative band, and transitions in both directions. The clouds are organized along narrow branches, not spread without structure over the whole plane. This is a very useful hint of deterministic dynamics; on its own it does not rigorously distinguish a chaotic attractor from a long periodic orbit.
4. The Poincaré section: intersecting, not projecting
The map of maxima reduces the state to a single value. To keep two coordinates I instead build a section in phase space. I choose the plane \(v_2=0\) and keep only the rising crossings:
\[\Sigma=\{(v_1,v_2,i_L):v_2=0,\quad \dot v_2>0\}.\]
The condition on the direction avoids mixing opposite passages through the same plane. In the native Math Signal 1.5.0 service I use events.crossings with threshold zero and direction rising. The crossing time is estimated linearly between the two samples that bracket the crossing. Then, with the native Math Numeric service, I interpolate \(v_1\) and \(i_L\) at that same instant. For example, if the sign change occurs between \(t_k\) and \(t_{k+1}\), the procedure corresponds to
\[ \theta=-\frac{v_{2,k}}{v_{2,k+1}-v_{2,k}},\quad t_\Sigma=t_k+\theta(t_{k+1}-t_k),\quad v_{1,\Sigma}=v_{1,k}+\theta(v_{1,k+1}-v_{1,k}). \]
The same interpolation applies to \(i_L\). I am not integrating the equation again up to the exact event: it is a linear reconstruction on a sampled trajectory. As a check I also verify the sign of \(\dot v_2=0.5(0.7v_1+i_L)\) at each point of the section. All 227 crossings satisfy the orientation; the minimum positive derivative is about 6.66521. I found no duplicate crossing times.

In the Dataset chua.chaos.poincare I keep the sequence number, crossing time, v1, iL and dv2_dt. The figure contains only the intersections, with X=\(v_1\) and Y=\(i_L\). Instead of two closed curves, two narrow groups of points appear. This is a two-dimensional section of the flow. It should not be confused with the XY plot obtained by projecting all the samples of the trajectory onto that plane.
I orchestrated the extraction and publication with chua_return_maps.tcl, calling exclusively the public APIs of the framework from the host session. The computation of peaks, crossings and interpolation is native; the code organizes the columns and their chronological associations. The direct call NUMERIC_API_v1/find_peaks from the Octave Script Bridge of this installation is not registered. The public Tcl path, on the other hand, is available; I did not write a replacement peak detector.
5. Sensitivity to initial conditions
So far I have studied a single trajectory. Now I start from the state saved in S04 at the instant \(t=200\). I build a second state by changing only the first coordinate by \(10^{-8}\), without changing the equations or the parameters. I integrate both initial conditions with the same RK4 method and step 0.01 for 200 units of elapsed time. I define the Euclidean distance in the numerical coordinates:
\[ d(\tau)=\sqrt{(v_{1,b}-v_{1,a})^2+(v_{2,b}-v_{2,a})^2+(i_{L,b}-i_{L,a})^2}. \]
The norm is stated because the coordinates of the model are numerical. In a physical circuit I would not indiscriminately add squared voltages and squared currents without a reference scale. In this example I do no rescaling and I do not inject random noise.

The computed initial distance is about \(10^{-8}\), consistent with the chosen perturbation. In the first part it grows irregularly, with oscillations and stretches of intermittent growth. It exceeds 0.1 at elapsed time 139.25 and exceeds 1 at 144.85. The maximum observed is about 22.7647. When the separation is comparable to the extent of the motion, it is no longer an infinitesimal perturbation: the two trajectories keep moving within the explored region, but it makes no sense to expect an indefinite exponential increase of the distance.

Between 130 and 160 the change can be seen directly in the waveforms. The two solutions seem to follow the same course, then they diverge and can visit different lobes. The phenomenon arises from the deterministic equations, not from a noise generator. However, precisely because of saturation and the phases of local growth and contraction, I do not fit a single straight line to the whole plot of \(\log_{10}d\) to claim that I have measured a Lyapunov exponent. A procedure that keeps the perturbations infinitesimal is needed.
6. Lyapunov exponents from the variational equations
I denote the state by \(\mathbf{x}\) and the field by \(\mathbf{F}(\mathbf{x})\). For a small variation \(\delta\mathbf{x}\), the first-order dynamics is governed by the Jacobian matrix along the trajectory:
\[ \dot{\mathbf{x}}=\mathbf{F}(\mathbf{x}),\qquad \dot{\delta\mathbf{x}}=J(\mathbf{x}(t))\delta\mathbf{x},\qquad J=\frac{\partial\mathbf{F}}{\partial\mathbf{x}}. \]
The derivative of the nonlinear law is constant in each region, with \(m=-4\) for \(|v_1|<1\) and \(m=-0.1\) for \(|v_1|>1\). Therefore
\[ J_m=\begin{pmatrix} -10(G+m)&10G&0\\ 0.5G&-0.5G&0.5\\ 0&-7&0 \end{pmatrix}. \]
It is the same structure used for the stability of the equilibria, but now the region changes during the motion. The eigenvalues of a single local matrix are not the global Lyapunov spectrum. A solution can spend time in an expanding region and then in a contracting region; what matters is the compound effect of the deformations along the whole trajectory.
I integrate simultaneously the state and a matrix \(M\) with three tangent vectors as columns. During each RK4 step I choose the Jacobian matrix according to the position of the state in the corresponding stage, not according to the region at the beginning of the whole step. The field is continuous at the breakpoints, while the derivative is discontinuous. At points exactly on a breakpoint the code uses the outer branch. The passage is handled at fixed step, not with an exact localization of the event. For transversal crossings of a continuous field it is not necessary to introduce a finite jump of the tangent vectors; the time resolution nevertheless remains important.
\[\dot M=J(\mathbf{x}(t))M,\qquad M(0)=I_3.\]
If I let the three columns evolve indefinitely, they would tend to align with the most unstable direction, and I would lose the other information. Every numerical time unit I apply a QR factorization without pivoting:
\[ M_k=Q_kR_k,\qquad M_k\leftarrow Q_k,\qquad \widehat\lambda_j(T)=\frac{1}{T}\sum_{k=1}^{K}\ln|R_{k,jj}|. \]
The columns of \(Q_k\) form an orthonormal basis; the diagonal terms of \(R_k\) measure the scale factors associated with the successive orthogonalization steps. The logarithm turns the products of the factors into sums. I do not reorder the exponents at each instant and I do not use a QR with pivoting, because it would change the identity of the directions. The internal Octave script chua_lyapunov.m implements the specific state–variations–QR method. I use the two-output Octave QR without pivoting; the public QR matrix operation of this version instead also returns a column permutation. I am not using the script to replace a broken native scientific function: the complete Lyapunov procedure is not available as a dedicated operation.
| Run | G | Step h | Total time | Excluded time | Observation T |
|---|---|---|---|---|---|
| Double scroll | 0.7 | 0.02 | 3000 | 500 | 2500 |
| Double scroll, step check | 0.7 | 0.01 | 3000 | 500 | 2500 |
| Stable lateral equilibrium | 0.35 | 0.01 | 1500 | 500 | 1000 |
The two double scroll runs start from \((0.1,0,0)\), as in the previous articles. For the stable control I start exactly from the positive equilibrium \((15.6,0,-5.46)\), so as to compare the variational estimate with the eigenvalues already computed in article 05. The first 500 units serve for the alignment of the tangent basis and, in the two chaotic runs, for the initial evolution of the trajectory. The QR is applied in this interval too, but its contributions do not enter the final sums.
7. The computed spectrum
The Dataset chua.chaos.lyapunov contains the cumulative estimates at every unit of observation time, not just three final numbers. I obtain the following results, expressed in the inverse of the numerical time unit:
| G | h | T | \(\widehat\lambda_1\) | \(\widehat\lambda_2\) | \(\widehat\lambda_3\) |
|---|---|---|---|---|---|
| 0.7 | 0.02 | 2500 | +0.1282314 | −0.0002065 | −6.1334157 |
| 0.7 | 0.01 | 2500 | +0.1293611 | −0.0003919 | −6.1227955 |
| 0.35 | 0.01 | 1000 | −0.0069581 | −0.0069153 | −2.6611266 |
The first exponent of the double scroll remains clearly positive in both integrations; the final estimates differ by about 0.00113. The second is close to zero, as expected along the flow direction of an autonomous system that is not at rest, and the third is strongly negative. I do not set the second exponent to zero by hand: I keep its finite-time value. The control at \(G=0.35\) instead returns three negative exponents, consistent with the stability of the equilibrium. From article 05 we know that the local eigenvalues have real parts −0.0069367, −0.0069367 and −2.66113. The comparison confirms that the procedure distinguishes the contraction of the stable linear case from the expansion of one direction of the double scroll.
A positive exponent of around 0.129 suggests, in the mean infinitesimal regime, a growth scale \(1/\lambda_1\) of about 7.7 numerical time units. It is not the exact time in which any pair of states separates: it depends on the direction of the perturbation, on the local phases of the trajectory and on the distance threshold I choose. The separation test in the previous section is a concrete example, not the definition of this scale.
8. An independent check: volume contraction
There is a particularly useful check for the three tangent directions. The infinitesimal volume transported by the flow varies according to Liouville’s identity. The logarithmic derivative of the volume is the divergence of the field, that is, the trace of the Jacobian matrix:
\[ \nabla\cdot\mathbf{F}=\operatorname{tr}J=-10(G+m)-0.5G=-10.5G-10m. \]
For \(G=0.7\) it is +32.65 in the central region and −6.35 in the outer regions. The mean contraction is therefore not the same thing as contraction at every point: during the central passage the field can expand the volume. I integrate the divergence together with the variational system, with the same weights of the four RK4 stages and the same observation window. I compare its mean with the sum of the exponents:
\[ \sum_{j=1}^{3}\widehat\lambda_j(T) \ \simeq\ \frac{1}{T}\int_{t_0}^{t_0+T}\operatorname{tr}J(\mathbf{x}(t))\,dt. \]
| G | h | Mean divergence | Sum − divergence |
|---|---|---|---|
| 0.7 | 0.02 | −6.003680 | −0.001710808 |
| 0.7 | 0.01 | −5.993436 | −0.000390312 |
| 0.35 | 0.01 | −2.675000 | +1.14×10−8 |

The residual decreases markedly going from 0.02 to 0.01; for the constant-matrix control it is practically zero on the scale of the plot. The test verifies a mathematical property of the variational system and helps to detect errors of sign, of accumulation of the scale factors or of integration. On its own it does not certify the convergence of the motion for arbitrarily long times. Both double scroll means are strongly negative: the flow contracts infinitesimal volumes on average while expanding one direction. This is compatible with a dissipative attractor.
9. What I can claim and what remains to be verified
The geometric observations, the separation of trajectories and the finite-time spectrum converge towards the same interpretation. In the historical model at \(G=0.7\) I obtain the double scroll, a structured return map, an oriented section not reduced to a few points, and a positive Lyapunov exponent reproduced with two integration steps. The stable control and the contraction balance provide additional checks. It is quantitative numerical evidence of the chaotic behavior of the model in the regime studied, not a mathematical proof of the existence of an invariant attractor, of ergodicity or of the exact asymptotic value of the exponents. Nor is it an experimental measurement of the real circuit.
In the next article I will move from the description by differential equations to electronic simulation in LTspice, with components and physical units. I want to see how the waveforms and the XY representations change when I introduce the circuit that implements the nonlinear resistor, the power supplies, the limitations of the components and the initial conditions of the simulator. I will import the results into GX-TXT to compare them with the analyses of this series. In a later article I will build the circuit on the bench and compare the measurements, keeping the experimental uncertainties separate from the numerical effects of the solver.
Reproducible material
Session S06 contains the Matsumoto report, the S04 Dataset and four result Datasets: chua.chaos.return_map (226 rows), chua.chaos.poincare (227 rows), chua.chaos.lyapunov (6000 rows), chua.chaos.separation (20,001 rows). The eight Plot Dataset v4 variants are kept in the session. The Octave script must be registered in the Script Workspace; the Tcl code is intended for the GX-TXT host context (load the procedures and invoke ::ChuaS06::run $session with a session containing the Dataset chua.matsumoto.rk4_h002). They are not scripts to be run outside the framework. The published identifiers are fixed: to repeat all the operations, use a new session with the two input materials imported through GX-TXT. Wait for the Jobs and publications to complete before opening or saving the results.
References
T. Matsumoto, A Chaotic Attractor from Chua’s Circuit, technical report UCB/ERL M84/36 (1984), IEEE Transactions on Circuits and Systems 31(12), 1055–1058, DOI. Reference numerical model of the series. The maps and estimates reported here are new numerical processing of the model, not data transcribed from the publication.