Coupled Stochastic Chaos - Lorenz System

Coupled Stochastic Chaos - Lorenz System preview image

1 collaborator

Tags

complexity 

Tagged by Carlos Pedro S. Gonçalves 2 months ago

stochastic chaos 

"The model is for a coupled stochastic chaotic system based on Lorenz Equations"

Tagged by Carlos Pedro S. Gonçalves 2 months ago

turbulence 

Tagged by Carlos Pedro S. Gonçalves 2 months ago

Part of project 'Chaos Theory and Complexity'
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.4.0 • Viewed 227 times • Downloaded 7 times • Run 0 times
Download the 'Coupled Stochastic Chaos - Lorenz System' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This model is a stochastic coupled Lorenz system in a 2D lattice that employs numeric integration of lattice coupled nonlinear SDEs, based on the article: Gonçalves CP (2025) Stochastic Chaotic Network Vector Fields. Int J Swarm Evol Comput. 14:393, https://www.walshmedicalmedia.com/open-access/stochastic-chaotic-network-vector-fields.pdf.

The model is also featured in the webinar on stochastic chaos in spatially extended systems in continous time:

Gonçalves, CP (2025) "The "Lucifer Effect" - Synchronized Desynchronization in Strongly Coupled Chaotic Dynamics" https://www.youtube.com/watch?v=7UmjSRJf8t8

The webinar addresses a major feature of the model which is an illustration of clustering propagating desynchronization as a result from deterministic and stochastic chaotic dynamics in spatially extended systems, which is linked to both the chaotic instability and a network contagion effect that produces clustering and even turbulent dynamics in strongly coupled chaotic systems, leading to propagating waves of desynchronization, leading to a more complex dynamics which is synchronized desynchronization.

Mathematically, the model works with the concept of a coupled flow lattice (CFL), which expands on coupled map lattices (CMLs) that have been applied in chaos theory and complexity research, by working with differential equations instead of maps (finite-difference dynamical equations). That is, when compared to CMLs the difference is that we are dealing with a continuous time framework, rather than discrete time.

While in a CML of a chaotic map, the addition of noise to study spatiotemporal stochastic chaos is straightforward, in the case of a CFL it requires the introduction of a numeric integration for coupled SDEs, which is what the current model's algorithm does.

Indeed, when dealing with CFLs, the addition of noise requires the transition from network coupled deterministic differential equations to network coupled stochastic differential equations (SDEs), with the implementation of adapted numeric integration methods. These methods allow for the simulation of stochastic chaos in spatially extended systems in the continuous time framework.

The current Netlogo model allows the user to control the noise coupling level thus allowing the user to both simulate the deterministic coupled chaotic CFL, which is obtained when the noise parameter "b" is set to 0 and the stochastic chaotic version which is obtained when the noise parameter "b" is set to greater than 0.

The numeric integration used is adapted from the following reference by Roberts (2012) which was also used in Gonçalves (2025) to deal with the 1D lattice model:

Roberts AJ. (2012) Modify the Improved Euler scheme to integrate stochastic differential equations. arXiv. 2012: 1210.0933. https://arxiv.org/pdf/1210.0933.

The current model is a part of the umbrella research project "Chaos Theory and Complexity Sciences" (https://sites.google.com/view/chaos-complexity) under development at the Department of Civil Aviation and Airports from Lusófona University's School of Economic Sciences and Organizations and is also part of the course materials for the Mathematics I course lectured in the Bachelor in Aeronautical Management.

HOW IT WORKS

Each patch corresponds to a lattice node, with a 4 nearest neighbors' coupling used, which extends, to the 2D lattice structure, Gonçalves (2025)'s model that addressed a 1D lattice structure.

The model uses the Netlogo features in this case the built-in patch structure.

The lattice is characterized by a vector field with three components X(n1,n2,t), Y(n1,n2,t) and Z(n1,n2,t), where n1 and n2 correspond to the coordinates of each patch and t represents the time variable.

The field SDE is given by:

dX(n1,n2,t) = dt * ((1 - epsilon) * sigma * (Y(n1,n2,t) - X(n1,n2,t)) + epsilon * hx(n1,n2,t)) + b * dWx(n1,n2,t)

dY(n1,n2,t) = dt * ((1 - epsilon) * (rho * X(n1,n2,t) - Y(n1,n2,t) - X(n1,n2,t) * Z(n1,n2,t)) + epsilon * hy(n1,n2,t)) + b * dWy(n1,n2,t)

dZ(n1,n2,t) = dt * ((1 - epsilon) * (X(n1,n2,t) * Y(n1,n2,t) - beta * Z(n1,n2,t)) + epsilon * hz(n1,n2,t)) + b * dWz(n1,n2,t)

Where, n1 and n2 correspond to the node's coordinates and the hx, hy and hz variables are, respectively, the mean of the X, Y and Z values of the 4 nearest neighbors following the von Neumann neighborhood structure. dWx, dWy and dWz correspond to local Wiener innovation terms, leading to a coupling of the deterministic component to a stochastic field. The stochastic fluctuations are independent between different lattice sites (Netlogo patches), that is, we do not consider any nearest neighbors' coupling in the stochastic source.

Roberts' (2012) integration algorithm is implemented in the Netlogo code. If the user sets b=0, the algorithm performs the numeric integration of a deterministic coupled CFL model based upon the Lorenz system's equations, which leads to a deterministic spatiotemporal chaos model. When b is set above zero the numeric integration scheme uses the numeric integration for the Itô calculus thus working with stochastic field differential equations.

In the study of chaos in spatially extended systems the issue of synchronization/desynchronization is a relevant point and one of the key issues of the current model. In order to visualize these patterns we calculated, for each patch (node), the absolute difference between each field variable value and the local respective mean field value for the 4 nearest neighbors, and passed that difference through a sigmoid function so that we have:

devX(n1,n2,t) = ( 2 / (1 + exp(-|X(n1,n2,t) - h_x(n1,n2,t)|)) ) - 1

devY(n1,n2,t) = ( 2 / (1 + exp(-|Y(n1,n2,t) - h_y(n1,n2,t)|)) ) - 1

devZ(n1,n2,t) = ( 2 / (1 + exp(-|Z(n1,n2,t) - h_z(n1,n2,t)|)) ) - 1

The deviation variable is 0 if the absolute difference to the local mean field is 0 and it increases with the absolute deviation tending to 1 as the deviation increases to infinity.

USing the deviation variable we defined for each lattice site (patch) the activation variable to be given by the mean of the deviation function:

activation(n1,n2,t) = (devX(n1,n2,t) + devY(n1,n2,t) + devZ(n1,n2,t)) / 3

The patch is thus defined to be more active if the mean deviation is higher, thus, the activation function introduces a metric for desynchronization.

The activation can be used in conjunction with collective metrics like the standard deviation in regards to the mean field in order to evaluate synchronization/desynchronization factors.

From a simulation perspective the activation field variable can be considered in terms of a neural network model that transforms the field input into a final neural firing pattern for each lattice site.

While synchronization dynamics in coupled chaotic networks has been an important part of chaos theory's research into networks of chaotic oscillators, desynchronization in strongly coupled dynamics is an important phenomenon which can also be linked to chaotic dynamics as a source of diversity in strongly coupled nonlinear systems. This is one the major points of the current Netlogo model, as covered in the previously quoted webinar.

HOW TO USE IT

The interface tab is divided into different sections, including sliders that control the main parameters, plots and the Netlogo world, each plays a relevant role in using this model and requires some attention.

The sliders are the following:

dt - corresponds to the numeric integration step

b - is the noise coupling constant, if set to 0 the lattice field dynamics follows the deterministic CFL.

sigma, rho, beta - are the main Lorenz dynamical equations' parameters.

coupling - is the nearest neighbors' coupling for the field differential equations using the Von Neumann neighborhood structure (our epsilon in the above equations).

transient_ticks - controls the slider for plotting, that is, after a transient number of ticks the code activates the plots.

The plots are the following:

A) The phase portrait of X, Y and Z values for the patch (0,0), which allows the user to look at the local dynamics of a single patch.

B) The phase portrait of the mean value of X, Y and Z for the patches, which allows the user to see the global mean field dynamics.

C) The activation variable dynamics for the patch (0,0) along with the mean activation for the patches as defined above, which allows the user to get a quantification of the dynamics of synchronization/desynchronization for that patch.

D) We also provide for the global standard deviation for X, Y and Z, which also allows an evaluation of the collective synchronization/desynchronization dynamics.

Finally, the Netlogo world provides for a visual picture of the network's dynamics through a specific colorscheme, we plot in red scale the activation for each patch by using the RGB scale Red: activation(n1,n2,t) * 255 Green 0 Blue 0.

Darker color corresponds to patches that have a dynamics that is strongly synchronized with its four neighbors in a Von Neumann neighborhood, brighter colors are patches that have strong activation and, thus, in accordance with our definition, deviate more strongly from its nearest neighbors, following the previously defined activation function.

If considered from a neural network perspective, the coloring and this activation function expresses a final output neuron neural activity.

THINGS TO NOTICE

The default values of the parameters in the model are with low noise level and strong coupling, for a stochastic chaotic regime of the Lorenz System. The general attractor shape is visible for the patch (0,0). Indeed, as in the 1D ring (Gonçalves, 2025), the individual lattice sites tend to follow the general structure of the Lorenz attractor, with the noise level leading to a local random walk on the attractor.

The global dynamics, however, while showing an attractor shape is more complex in shape and more typical of complex large dimensional systems' dynamics, even when one switches off the noise this more complex shape appears though the trajectory is smooth.

For strong coupling a complex relation between synchronization and desynchronization occurs, depending upon the Lorenz model's values, an overview and analysis is provided in the previously quoted webinar.

For the default parameters, a relevant phenomenon surfaces, both for the stochastic (b>0) and the deterministic dynamics (b=0). The phenomenon occurs as clustered propagating desynchronization of the dynamics leading to bursts in local dispersion around the local mean field and for the global mean field.

This is seen in the pattern of bright red propagating clustering in the patches that can produce propagating waves and even, depending on the network size, vortices. Leading to a spatiotemporally turbulent dynamics.

These brighter red regions correspond to propagating desynchonization clusters. In this way, we have the ocurrence of a phenomenon of localized "synchronized desynchronization", that is, a form of "synchronized rebellion" against local mean field influence that tends to lead the local site's field state away from the local four nearest neighbors' mean field value as per the von Neumann neighborhood structure. These desynchronized clusters appear and propagate through the turbulent landscape and lead to burst activity in dispersion and to desynchronization spikes.

This effect occurs for strong coupling, that is, in this case, the dynamics for the patches is highly synchronized with the dark color corresponding to low divergence from the local mean field, however, the chaotic dynamics eventually produces this clustering propagating divergence in the field dynamics leading to a form of "dynamical rebellion" against the mean field convergence. This phenomenon in analyzed in detail in the webinar.

In the graphs we see that the local activation variable, as defined in the previous section, for the patch (0,0) leads to a form of intermittent divergence from its four nearest neighbors in the von Neumann neighborhood. The mean activation of the patches in turn shows bursts of dispersion activity that can also be seen in the patches' standard deviation for X, Y and Z.

The noise in this case can lead to seeds of localized bursting divergence, however, this also occurs for the deterministic case. With the overall dynamics showing a pulsating pattern of desynchronization leading to propagating desynchronization waves that can propagate in a translational and rotational way forming vortices of desynchronization. This dynamics however depends upon the parameters and world size, so the user is encouraged to experiment with different Netlogo world sizes and Lorenz model parameters.

In the low coupling case, most of the patches become bright red leading to a mostly chaotic divergent dynamics with low synchronization.

THINGS TO TRY

The previous section discusses the case for the parameter values that come by default in the sliders with the model. The user can change the parameter values to different dynamics of the Lorenz system without noise and with noise and compare the resulting dynamics.

Also, it is important to change the world size in order to see how different network sizes affects the dynamics, as stated above.

Different parameter values and dynamics are covered in the webinar and the user can replicate and experiment around these different dynamics.

NETLOGO FEATURES

The model shows how numeric integration of stochastic differential equations can be integrated into the agent-based framework and how Netlogo can be used to simulate systems with complex networked nonlinear dynamics described by SDEs. Which makes Netlogo a relevant environment for researching and simulating deterministic and stochastic chaos in spatially extended systems.

CREDITS AND REFERENCES

The model's reference for quoting is:

Gonçalves C.P. (2025) Coupled Stochastic Chaos - Lorenz System. Netlogo Model. Chaos Theory and Complexity Sciences Research Project. Lusófona University.

The main bibliography is:

Gonçalves CP (2025) Stochastic Chaotic Network Vector Fields. Int J Swarm Evol Comput. 14:393, https://www.walshmedicalmedia.com/open-access/stochastic-chaotic-network-vector-fields.pdf.

Gonçalves, CP (2025) "The "Lucifer Effect" - Synchronized Desynchronization in Strongly Coupled Chaotic Dynamics" (webinar featuring the model) https://www.youtube.com/watch?v=7UmjSRJf8t8.

Roberts AJ. (2012) Modify the Improved Euler scheme to integrate stochastic differential equations. arXiv. 2012: 1210.0933. https://arxiv.org/pdf/1210.0933.

Lorenz E.N. (1963) Deterministic non-periodic flow. J. Atmos. Sci. 20(2):130–141.

Kaneko K, Tsuda I. Complex Systems: Chaos and Beyond: Chaos and Beyond: A Constructive Approach with Applications in Life Sciences. Berlin: Springer; 2001: 1-8.

Wolfram S. A New Kind of Science. USA: Wolfram Media;2002.

Haken H. Synergetics – Introduction and Advanced Topics. Berlin: Springer; 2004.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

patches-own [
  aX ; drift factor for Lorenz Coupled SDE for the X vector value
  aY ; drift factor for Lorenz Coupled SDE for the Y vector value
  aZ ; drift factor for Lorenx Coupled SDE for the Z vector value
  X ; X vector value
  Y ; Y vector value
  Z ; Z vector value
  activation ; activationb value for patch

  ; Auxiliary variables for SDE calculation:
  k1x
  k1y
  k1z
  k2x
  k2y
  k2z
  Xa
  Ya
  Za
  dWx
  dWy
  dWz
  Sx
  Sy
  Sz

]

to setup
  ca
  reset-ticks
  ask patches [
               ;set x 10 * pi
               ;set y 3 * exp(0.5)
               ;set z 15 * 2 ^ 0.5
               set x random-float 20 - 10
               set y random-float 20 - 10
               set z random-float 20
               ]
end 

to go
  ask patches[update-drift]
  ask patches[update-k1]
  ask patches[get-auxiliary]
  ask patches[update-new-drift]
  ask patches[update-displacement]
  ask patches[update-colors]
  if ticks > transient_ticks [do-plots]
  tick
end 


;;;;;;;;;;;;;;;;;;;;;;
;;; SDE Procedures ;;;
;;;;;;;;;;;;;;;;;;;;;;



; The initial drift is updated in accordance with the Lorenz equations with local mean field coupling

to update-drift
  set aX (1 - coupling) * (sigma * (Y - X)) + coupling * mean [X] of neighbors4
  set aY (1 - coupling) * (rho * X - Y - X * Z) + coupling * mean [Y] of neighbors4
  set aZ (1 - coupling) * (X * Y - beta * Z) + coupling * mean [Z] of neighbors4
end 


; First update of the k1 component for each field mode following
; Roberts' (2012) modified Runge-Kutta algorithm using the output
;from the first drift update obtained from the Lorenz system's equations

to update-k1
  ; Sx, Sy and Sz are randombly selected between -1 and 1 with equal
  ; probability, this is used in Itô calculus
  set Sx get_S
  set Sy get_S
  set Sz get_S
  ; The Wiener dW terms are selected for each field component each
  ; dW component is independently selected with Gaussian distribution with a
  ; zero mean and standard deviation given by the square root of the integration step dt
  set dWx (sqrt dt) * random-normal 0 1
  set dWy (sqrt dt) * random-normal 0 1
  set dWz (sqrt dt) * random-normal 0 1

  ; The k1 component of the algorithm is obtained using the three
  ; inputs as per Robert's (2012) algorithm
  set k1x get_k1 aX Sx dWx
  set k1y get_k1 aY Sy dWy
  set k1z get_k1 aZ Sz dWz
end 

; Auxliliary variables used for the computation of the displaced values for X, Y and Z
; displaces as X + k1x, Y + k1y and Z + k1z, this is a necessary step for the calculation of
; k2 which requires the calculation of the new drift using the displaced coordinates

to get-auxiliary
  set Xa X + k1x
  set Ya Y + k1y
  set Za Z + k1z
end 

; The new drift is now calculated by using the displaced coordinates using the Lorenz
; system's equations

to update-new-drift
  set aX (1 - coupling) * (sigma * (Ya - Xa)) + coupling * mean [Xa] of neighbors4
  set aY (1 - coupling) * (rho * Xa - Ya - Xa * Za) + coupling * mean [Ya] of neighbors4
  set aZ (1 - coupling) * (Xa * Ya - beta * Za) + coupling * mean [Za] of neighbors4
end 


; The new field value variables are obtained by calculating the displacement

to update-displacement
  ; First calculate k2 using the new drift
  set k2x get_k2 aX Sx dWx
  set k2y get_k2 aY Sy dWy
  set k2z get_k2 aZ Sz dWz

  ; The SDE procedure calculates the displacement is calculated using k1 and k2
  let dX_value SDE k1x k2x
  let dY_value SDE k1y k2y
  let dZ_value SDE k1z k2z

  ; The new variables are calculated
  set X X + dX_value
  set Y Y + dY_value
  set Z Z + dZ_value
end 

; The auxiliary variable S is calculated with equal probabilities between
; -1 and 1 for the numeric integration to approximate Itô integral

to-report get_S
  let S 0
  ifelse random-float 1 < 0.5  [set S -1] [set S 1]
  report S
end 

; k1 is given by the drift a which is multiplied by dt and corresponds
; in our case to the Lorenz system's equations
; and it is added by a term that depends upon the stochastic component
; following Robert's scheme we have b which in our case is a parameter that
; controls the noise level multiplied by the the Wiener innovation dW subtracted
; by S multiplied by the square root of the time step is

to-report get_k1 [a S dW]
  let k1 dt * a + b * (dW - S * sqrt(dt))
  report k1
end 

; k2 is calculated in the same way as k1 with the exception that it uses the
; displaced drift and S is multiplied by the square root of dt.

to-report get_k2 [a S dW]
  let k2 dt * a + b * (dW + S * sqrt(dt))
  report k2
end 

; The displacement for the SDE is obtained by taking the mean value of k1 and k2

to-report SDE [k1 k2]
  let displacement 0.5 * (k1 + k2)
  report displacement
end 


; Colors are updated following the activation variable which has calculates
; the deviation of each patch's field components from the mean of its 4 nearest neighbors
; using a sigmoid function the color uses shades of red the stronger the red color
; the higher the deviation from the local mean field

to update-colors

  let mX mean [X] of neighbors4
  let mY mean [Y] of neighbors4
  let mZ mean [Z] of neighbors4

  let devX (2 / (1 + exp(0 - abs(X - mX)))) - 1
  let devY (2 / (1 + exp(0 - abs(Y - mY)))) - 1
  let devZ (2 / (1 + exp(0 - abs(Z - mZ)))) - 1

  set activation (devX + devY + devZ) / 3

  set pcolor rgb (activation * 255) 0 0
end 

; The plots involve local plots using patch (0,0) and
; collective dynamics plots including mean field and
; dispersion

to do-plots

  ; Local Plots for Patch (0,0)
  let target patch 0 0

  set-current-plot "X vs Y value of Patch at 0 0"
  set-current-plot-pen "patch (0,0)"
  plotxy [X] of target [Y] of target

  set-current-plot "X vs Z value of Patch at 0 0"
  set-current-plot-pen "patch (0,0)"
  plotxy [X] of target [Z] of target

  set-current-plot "Y vs Z value of Patch at 0 0"
  set-current-plot-pen "patch (0,0)"
  plotxy [Y] of target [Z] of target

  let mfX mean [X] of patches
  let mfY mean [Y] of patches
  let mfZ mean [Z] of patches

  ; Collective Dynamics Plots
  set-current-plot " vs "
  set-current-plot-pen " vs "
  plotxy mfX mfY

  set-current-plot " vs "
  set-current-plot-pen " vs "
  plotxy mfX mfZ

  set-current-plot " vs "
  set-current-plot-pen " vs "
  plotxy mfY mfZ

  set-current-plot "Activation of Patch at 0 0"
  set-current-plot-pen "patch (0,0)"
  plot [activation] of target

  set-current-plot "Mean Activation"
  set-current-plot-pen "Mean Activation"
  plot mean [activation] of patches


  set-current-plot "Standard Deviation X"
  set-current-plot-pen "SDX"
  plot standard-deviation [X] of patches

  set-current-plot "Standard Deviation Y"
  set-current-plot-pen "SDY"
  plot standard-deviation [Y] of patches

  set-current-plot "Standard Deviation Z"
  set-current-plot-pen "SDZ"
  plot standard-deviation [Z] of patches
end 

There is only one version of this model, created 2 months ago by Carlos Pedro S. Gonçalves.

Attached files

File Type Description Last updated
Coupled Stochastic Chaos - Lorenz System.png preview Preview for 'Coupled Stochastic Chaos - Lorenz System' 2 months ago, by Carlos Pedro S. Gonçalves Download

This model does not have any ancestors.

This model does not have any descendants.