Thursday, April 23, 2015

Fox and Rabbit - the movie



Here, the computer's two analogue switches were used to switch scope's x and y inputs rapidly between fox's and rabbit's (x,y) position (the switches controlled from a separate function generator)...voila, two spots of light on the oscilloscope screen. The outer one is the fox...

All integrator capacitors were set to 0.1 μF for some fast-paced action. Everything else as per previous post.

Monday, April 20, 2015

Fox and Rabbit - part the second

Here the fox and rabbit are free to move in two dimensions [1], thus:


where r is the Euclidean distance between fox and rabbit. This requires all eight integrators (and all four summers) of the computer:


In this patching, the mass of the rabbit is unity, the fox is twice as massive as the rabbit, and br = 1 and bf = 0.1. Also, γ = -1 giving the required inverse square relationship.

To get the reciprocal of the square of the distance (r) squared, I used ln(x) and exp(x) functions. Since these actually give 3ln(x) and exp(x/2)-10 respectively (to make best use of the computer's range), I have to include the -2/3 between them, and then add ten volts, to give the required 1/r2.

Fox and rabbit wiring. Analogue computer enclosure nearly complete.

Initial conditions were as per reference [1]. Results below.


Comments: the fox / rabbit trajectories start off similar to those in [1], but decrease in amplitude - I think this is probably due to leakage in the integrators. Also, the trajectories are sensitive to any offsets - particularly in the integrators. Also, some of the integrators / summers are clipping.

Reference

[1] 'Anti-Newtonian dynamics', J. C. Sprott, Am. J. Physics, 77 (9), September 2009, pp. 783 - 787.

Sunday, April 19, 2015

Fox and Rabbit - part the first

Anti-Newtonian dynamics, based on reference [1].

Rabbits and foxes just never seem to get along....

When the fox exerts a force on the rabbit, the rabbit simultaneously exerts a force equal in magnitude and in the same (not-opposite) direction, on the fox, i.e. the rabbit runs away.

In one dimension we have:


The right hand side terms of the above allow for a drag which is linearly dependent on velocity (i.e. corresponding to fox and rabbit moving through a fluid (vegetation?) at relatively slow speeds, with no turbulence (whatever that would be - something anthropogenic perhaps e.g. man with gun?)).

The distance between the fox and rabbit is given by
where parameter γ controls the flavour of the force (as function of separation). Setting γ = 0 (as per reference [1]) makes the force between fox and rabbit constant in magnitude, and with a sign which is negative if the fox is chasing to the left (i.e. rabbit is further left than fox), and positive if the fox is chasing to the right (i.e. rabbit is further right than fox).

The above equations converted into the following rather compact patching diagram, using the values for the various parameters given in [1] (i.e. mass of rabbit and fox both equal unity, br = 2 and bf  = 1):


(The r / |r| was dealt with directly, using the computer's divider - I also tried using the x > y function on the computer to create sign(r), which gave the same results.)

A voltage proportional to elapsed time (to connect to plotter's horizontal axis) was obtained by integrating a unit voltage (not shown).

The initial conditions given in [1] gave the following plots for position of fox and rabbit:


Evidently, blue fox chases and overshoots red rabbit, both decelerate and the chase resumes in opposite direction. And so on...

Reference

[1] 'Anti-Newtonian dynamics', J. C. Sprott, Am. J. Physics, 77 (9), September 2009, pp. 783 - 787.













Sunday, March 29, 2015

Homoclinic Explosions and Descent into Chaos...

I came across [1] the Rucklidge oscillator, the equations for which are:


In the above, I've included a scaling parameter α (setting α = 1 gives the original equations; for my computer, setting α= 5 gave an appropriate down scaling of the solution (so it fits within +/- 10 V)).


Reference [1] gives results for various values of constants κ and λ - the behavior of the solution depends strongly on these - in particular, it is interesting to plot the solution either side of (something called) the homoclinic bifurcation (Figure 6 of reference [1]).

I plotted the results for three values of λ (blue = -2.5; red = -3.15; green = -6.0). In all cases κ = -1.724, (corresponding to Rucklidge's B point).

The blue curve (λ = -2.5) corresponds to region I of reference [1] - a 'gluing bifurcation'; the red curve (λ = -3.15) and green curve (λ = -6.0) are in region II - a 'homoclinic explosion'. All solutions share the same initial condition (v0 = 0.4). Evidently, the solution does indeed descend into chaos, as λ is made more negative.

Fascinating stuff.

vw-plane (w is vertical), both axes 0.2 V/cm

uw-plane (w is vertical), both axes 0.2 V/cm
Reference

[1] Rucklidge, A.M. (1992) Chaos in models of double convection. Journal of Fluid Mechanics, 237. pp. 209-229.

Saturday, March 28, 2015

Ueda

So far I've looked at undriven systems.

The periodically driven Ueda oscillator is described thus [1]:


Here the thing has a sinusoidal driving term on the right hand side. I naïvely thought that this term should be had by integrating 1 volt (actually minus one volt) - to yield t - and then taking the sine of it...but then after some thought I realised that this sinusoidal term can be cooked up more elegantly (and importantly without any limit on t) by solving another differential equation:

 with initial conditions z = 0 and dz/dt = 1. This gives the solution








Scaled equations (by a factor of two).


Patching diagram.


The problem was set up for the parameters used in reference [1], a = 7.5, b = 0.05 and ω = 1. Initial condition was x0 = 2.5.

Below (red plot) is the result (0.2 V/cm horizontal axis (x) and 0.5 V/cm vertical axis (y)). The left hand blue plot is taken from reference [1]:



Reference

[1] Dumitru Deleanu, Description of strange attractors using invariants of phase-plane, Proc. 13th WSEAS Conf. on mathematical methods, computational techniques and intelligent systems, 2011, pp. 113 - 116.










Thursday, March 26, 2015

Pierre François Verhulst

I've had a look at the (Verhulst / logistic differential equation):


(with unit growth rate and carrying capacity equal to 10), which has solutions:


Implementation was straightforward.  To get time (as a voltage - to plug into the scope's horizontal axis), I just ran one integrator with unit input (1 volt) - so its output is (negative) t.

To get the set of discrete initial conditions (1 V, 2 V, etc) I connected the new asynchronous reset jack (see earlier post) to the output of an equality test of ⌈x⌉ = x, where x is the ramp voltage, and ⌈x⌉ is the smallest integer not less than x. One of the integrator's ICs was then connected to ⌈x⌉ (the other integrator which gives t has its IC connected to 0 V, so t runs 0 to 10 volts for each different IC).

The computer was run in repetitive (REP) mode. At the start of the REP mode cycle, the initial condition will be set to 0 V. As the ramp voltage x increases, the output of ⌈x⌉ will equal 1 V and when the ramp voltage equals 1 V, the equality  ⌈x⌉ = x will be true and the integrator's initial condition RESET to 1 V; the output of the ⌈x⌉ will now be 2 V and so on. The differential equation is thus solved for each IC in turn. A final touch was to connect the oscilloscope's z-axis to the computer's RST output jack - this goes high (+10 V) when the computer's integrators are being reset (either via asynchronous jack input or at end of REP mode cycle). This rids us of flyback traces on the scope's display. And the result is:

1 V/div horizontal axis; 2 V div vertical axis. Lowest curve is for 1 V initial condition.
Compares with the actual solutions:



Wednesday, March 25, 2015

A commodius vicus of recirculation...

Perhaps this really is the final bit of circuitry - back to where I started all of this and a revised power supply:

This new one - which uses LM138 and LT1033 regulators - has a short (100 ms) switch-on delay for the negative rail and electrolytics with a higher working voltage.










And an opportunity for a new livery for the control rack's front panel (with its new asynchronous RST jack):