## Lorenz Oscillator- The Lorenz System

*“It may happen that small differences in the initial conditions produce very great ones in the final phenomena. A small error in the former will produce an enormous error in the future. Prediction becomes impossible”. Edward Lorenz*

The meteorologist, Edward Lorenz, in 1961, discovered chaos theory inadvertently whilst modeling atmospheric convection and weather patterns. He published a paper in 1963 where he showed how the model produced chaotic behavior by changing the model from a linear to a nonlinear model. To save time during a simulation run on a very basic desktop computer, he started from the middle of a previous simulation session and to his surprise found the output was completely different from a previous output. By truncating five-digit simulation numbers down to three-digit numbers he discovered one of the principles of chaos theory “*Sensitive to Initial Conditions* (*SIC*)”. A small change in initial conditions i.e., reducing the number of places of decimals, produced a bigger change in the system as it evolves. What is often quoted in the literature is Lorenz’s famous quote in a presentation in 1972 to the American Association of Scientific research “Does the flap of a butterfly’s wings in Brazil set off a tornado in Texas”, which illustrates how very small change in the initial condition produces much bigger changes later. Edward Lorenz showed that for chaos to exist in autonomous ordinary differential equation systems, three variables and two quadratic non-linear elements must be present. However, since then the number of variables can be reduced to two for *non-autonomous chaotic * system, and one, for discrete chaotic systems. The Lorenz weather system models clockwise and anticlockwise thermal convective air mass rotations in a closed container and the ordinary differential equations used in this model were originally created by Barry Saltzman (1962). Any *n*-th order nonlinear differential equation can be written as *n* separate coupled first-order ODEs. For example, the following coupled equations are a reduced form of the Navier-Stokes equations that model the Lorenz chaotic system that we will examine shortly:

By coupled we mean that the equations are linked to each other and the parameters. The original parameter used by Lorenz are: *Prandtl* number = 10, *Rayleigh* number, *R *= 28, and *β* = *B* = 8/3 and are all greater than zero. This simplified Lorenz model has since been proved to be chaotic by B Hassard and J Zhang, 1994 but also by Tucker in 1999. The parameters were given these names because Lorenz derived his equations from the Raleigh-Bénard convection flow (convection in a liquid heated in a container from below, generates Bénard cells). We rewrite these equations in a different form shortly, where we will express the variables as a function of time and introduce initial conditions. The Lorenz equations represent the movement of a horizontal layer of a fluid like air, being heated from below. The speed of the rising air mass, *x*, is positive for clockwise rotation and negative for anti-clockwise rotations. The temperature difference between descending and ascending air masses is *y*, and *z* is the deviation of the temperature profile from a linear scale.

## 3.1 Simulating the Lorenz system using ABM parts

To simulate the Lorenz system in PSpice, we rearrange the equations in integral form and introduce initial condition conditions *x*(*t _{0}*),

*y*(

*t*),

_{0}*z*(

*t*) for each system variable. We do this because we will implement these equations using integrators using analog behavioral models (ABM) parts which will be replaced by electronic inverting integrators circuits later. The initial conditions will be dropped for simplicity later but will be included in the simulation model as initial conditions on the integrators. Hence, the first equation,

_{0}*P*(

*y*-

*x*), becomes –

*P*(

*x*-

*y*). We could use non-inverting integrators but it’s a little more complicated and left as an exercise to the interested reader. Later, we will see how to use the four-quadrant AD633 multiplier IC to realize the nonlinear product terms. This IC may also be configured to achieve integration using current outputs but that’s much later. The Lorenz equations with initial conditions,

*t*

_{0}are:

The simplest approach when investigating a chaotic system for the first time is to always use ABM parts, as shown in Figure 1 and later with actual integrated circuit models. This approach is also useful when the circuit becomes complex and in some cases when the electronic part models cause convergence.

Figure 1: The Lorenz ABM schematic

The ABM **INTEG **part has its gain set to {**–Invert_tau}**, where the time constant defined in a **PARAM** part. The gain of an inverting integrator is set negative and equal to the inverse of the time constant because in the next blog we will use inverting electronic part models. Making the gain as the inverse of the time constant enables us to set a frequency close to the main operating frequency of the system, and in the section on scaling later in this chapter, we will see the need for scaling and how to scale both amplitude and time variables. Figure 2 shows how the three variables vary over time

Figure 2: The Lorenz x, y and z output

Figure 3 displays the spectra for the variables and is obtained by pressing the **FFT** icon when in the **Probe** environment (appears after simulation). Note we may express the spectral components as **dB**(V(*x*)*V(*x*)), to ensure the smaller spectral component are emphasized, otherwise the main spectral component of 1.32 Hz will tend to mask the other components. Select the **Add Trace **icon (a small graph-like icon), and then select **dB( )** from the list of functions in the right panel. Select between the brackets and type ** v(x)*v(x)**. However, I just checked before going to press and the dB() function doesn’t now seem to allow the product of variables in the brackets so instead use 10*log10(v(x)*v(x)). Increasing the simulation run time will increase the frequency resolution but obviously increases the simulation time. The z output is quite periodic and is therefore said to be chaotically weak.

Figure 3: Power Spectra

After Probe simulation and to automate the process of placing multiple windows and additional plots, we use the log command which records all keys selected. Select **log **in Probe **File** menu. When this is selected, it will record log file of all keys pressed when doing tasks such as separating the windows. This is useful where you intend to repeat the simulation for parameter variations, for example. If you change the integrator gain from 100 to 1, you will change the system operating frequency hence you will need to change the simulation settings. I have included a log file I created called Lorenz.cmd which will plot all the variables and is called from the File menu in Probe. Select Run Commands and then select Lorenz.cmd. This will plot Figure 1 and 2 but also it will plot the famous Lorenz strange attractor by changing time to the x variable.