Author Topic: The Rössler attractor challenge.  (Read 62428 times)

0 Members and 1 Guest are viewing this topic.

Offline johnwa

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: au
    • loopgain.net - a few of my projects
Re: The Rössler attractor challenge.
« Reply #75 on: July 28, 2014, 01:31:28 pm »
Nice work there GK! It appears you are not using your w-variable for the display. I believe it is possible to do a 3-dimensional projection of a 4-dimensional object, which I suppose could then be projected onto a 2-dimensional display. I don't know if you would be able to make much sense out of such an image, but it might look cool at least.  :)


I never did get around to this, and now I forgot how I was going to implement it  :palm:

I think you mentioned something about log amps to me Dave, does this ring any bells? I would be interested to see another take on this if you ever get the time...


I've thought of that before: you can have registers (= analog S&H) for the real and imaginary components, and the math stuff as functional blocks as usual.  The registers are initialized to one value, then the computed result is repeatedly clocked in until the magnitude saturates (outside the set) or a fixed number of iterations (maybe inside the set).

Tim

Tim, your post set me thinking about other ways of generating fractals. I decided to have a look at the http://en.wikipedia.org/wiki/Koch_snowflake as a relatively simple example. I had hoped to find a way to plot this figure using purely analogue techniques, with the idea that the amount of detail would be limited only by the high frequency response. The problem with this method is that it is necessary to generate multiple copies of an arbitrary waveform at different frequencies and amplitudes simultaneously. I tried some experiments with Fourier series for quadrature square waves, though this only gave me a squashed square with overshoot at the corners, rather than the desired fractal  :(

It seems that some sort of iterative or digital technique will always be necessary for generating these types of displays. I think I have got an idea for a circuit for showing the snowflake curve, though it will require a number of stages proportional to the number of iterations to be displayed. I will also need some sine and cosine calculator circuits, how did your diode shapers end up working out GK?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: The Rössler attractor challenge.
« Reply #76 on: July 28, 2014, 11:34:18 pm »
As single waveforms go, you could construct one of these:
http://en.wikipedia.org/wiki/Weierstrass_function
The series is not harmonic in the usual way, having energy at evenly spaced points -- the frequencies are exponential in n -- but the frequencies are still harmonics in the definitive sense (exact integer multiples of the fundamental).  If a = b, the harmonics drop off as 1/f, comparable to a square wave (give or take the phase shift, and with a whole bunch of harmonics cut out).

It wouldn't be very exciting, though: the exponential dependency of both amplitude and frequency on n means you only get a few frequency components before you run out of gain-bandwidth in a real system.

You can also construct semi-fractal things, like Perlin noise, which is handy for images (an alpha-blended grayscale mask looks conspicuously like clouds, or a variety of natural textures), and should have a similar 'feel' aurally (i.e., as sound) or temporally (e.g., as intensity of light -- perhaps a peculiar flicker generator?).

As for fractal methods, generally speaking, because analog signals are continuous value and continuous time, you must employ some other mechanism to achieve the iteration effect.  It can be sampling (as in the computed Mandelbrot example), event triggered (which is effectively equivalent; observe Logistic Map behavior in the peak-current-mode flyback controller), or cascaded (each function stage representing an 'unrolling' of a recursive function call).

On an even more fundamental level, you're talking Lambda Calculus: a system where integers have no place (sound familiar?), and iteration and counting is generally implemented recursively.  (Sadly, we have to build each and every function we recurse over; a reused function must be re-implemented as well...)

An example of the latter construction: RF log detector.  Just a chain of amplifiers of fixed gain and simple saturation behavior.  As each one saturates, it ceases amplifying the signal, so that the final output becomes strongly limited, even for very weak inputs.  The number of stages in saturation corresponds to the log of the signal strength; typically a diode detector reads each stage's amplitude, and a summing amp produces the output calculation.  The transfer function is a little lumpy (because it's linearly interpolated between any two amplifiers nearing saturation), but in practice, not too bad (within a few dB).  Rather than recursing forever, the number of stages is conveniently limited by available or desired gain-bandwidth and the noise floor.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #77 on: July 29, 2014, 01:58:49 pm »
Nice work there GK! It appears you are not using your w-variable for the display. I believe it is possible to do a 3-dimensional projection of a 4-dimensional object, which I suppose could then be projected onto a 2-dimensional display. I don't know if you would be able to make much sense out of such an image, but it might look cool at least.  :)

I will also need some sine and cosine calculator circuits, how did your diode shapers end up working out GK?


I guess I could use the 4th dimension for intensity modulation. If you mean the sine/cosine cards for my computer, they are slowly coming along.......

Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #78 on: July 29, 2014, 02:18:32 pm »
Interestingly, on a serious note, I have since found equations for a 4D hyperchaotic variant of the Lorenz attractor:

https://www.eevblog.com/forum/projects/t20347/?action=dlattach;attach=103516


Since that paper only involved MATLAB simulations, I decided to do a circuit for the proposed 4D system. Just a sim for this evening, will make the real thing and write it up on my webpage also. This hyperchaotic system scales much easier than does the 4D Rossler system. However due to the ^4 terms it's a bit more complicated and requires 5 individual multipliers, four wired as squarers.
The state variables are scaled in this analogue of the equations by multiplying the output of each individual multiplier by the scaling factor. The scaling factor here is 1/10. The circuit is moderately sensitive to offset errors of the squaring multipliers (particularly the first two in the cubing chains), due to the small signal levels being handled, though not overly so. Precision op-amps will still be required here. Multiplier input and output offset errors trimmed to just 1mV or better appear to be good enough for accurate results.

Though I have to say the hyperchaotic Lorenz attractor isn't as pretty looking as the 3D version.  :D Now I would like to find a HC system >4D.....




   
« Last Edit: July 29, 2014, 02:25:38 pm by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: The Rössler attractor challenge.
« Reply #79 on: July 29, 2014, 10:53:11 pm »
x^4 + y^4 is pretty sharp, I wonder if you could approximate it with an exp(|x|) + exp(|y|) or piecewise (window comparator, +1/-1V threshold) function.

Speaking of, a log-exp chain would come in handy anyway... better to put 4x gain on the log term than cascade three multipliers. :P  Which might be fun, actually, because you could then vary each exponent with a pot.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #80 on: July 30, 2014, 09:54:47 am »
I think the multipliers will be simpler for a demonstration circuit. That paper I linked to cites and builds upon a simpler 4D hyperchaotic variant of the Lorenz attractor originally described in this paper:

"A hyperchaotic Lorenz attractor and its circuit implementation"
http://wulixb.iphy.ac.cn/EN/abstract/abstract12974.shtml

I had to download the latest version (11) of Adode reader to view the PDF. The document file "A" is also missing the .pdf extension. The text is in Chinese but the formula and circuits are universal. 

The proposed circuit:



Not quite sure what was going on there. I managed to simplify it a bit, from 11 op-amp stages to only 5. A minus complementary input to each of the multipliers is taken advantage of to eliminate the need to generate too many inverse state variables. This simpler hyperchaotic Lorenz attractor looks like a slightly noisy version of the original 3D Lorenz attractor. It doesn't have the obvious visual impact of the more much more chaotic variant having the significantly more complex x^4+y^4 non linearity.

« Last Edit: July 30, 2014, 10:09:32 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #81 on: August 01, 2014, 03:03:49 pm »
This book is on my list...(expensive - as are most of the books I want! - but substantial parts of it available online)...

http://books.google.co.uk/books/about/Elegant_Chaos.html?id=buILBDre9S4C


You just cost me $100  ;D That books looks just too good to pass up, unlike, say, this one:

http://www.amazon.com/Co-Chaos-Patterns-Fractal-DOUBLE-BUBBLE/dp/1884178510/ref=sr_1_12?ie=UTF8&qid=1406904716&sr=8-12&keywords=elegant+chaos#reader_1884178510

At one end of the spectrum the topic of "chaos" really brings up some strange crap.


 

« Last Edit: August 01, 2014, 03:32:09 pm by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #82 on: August 22, 2014, 10:53:56 am »
The above mentioned book arrived to today and it really does contain a wealth of information. I have had to update my webpages on the Rossler and Lorenz systems, deleting any reference to the Rossler attractor as being a "minimal" complexity dynamical system of coupled ordinary differential equations for continuous-time chaos. This was believed to be the case for many years but has since been proven false.

Even a neon bulb relaxation oscillator is now known to exhibit chaotic behaviour, though without the property of time-delay or hysteresis, 3 is still the minimum required dimensions for chaotic behavior with coupled ODE's.

Turns out the chaotic effect of the neon bulb oscillator are the sub harmonics produced. I would have just figured that was a stochastic/random effect not deterministic and thus not conductive to chaos, but apparently not so. I foresee perhaps a future experiment of a neon bulb oscillator and spectrum analysis and data logging.   
« Last Edit: August 22, 2014, 10:57:21 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: The Rössler attractor challenge.
« Reply #83 on: August 22, 2014, 11:54:05 am »
Do you have an example?

I would have to think it's a two-bulb coupled system, so that it exhibits behavior similar to the constant frequency peak-current-mode switching converter -- which has behavior equivalent to the Logistic Map system.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #84 on: August 22, 2014, 01:17:58 pm »
In my haste to get a post out before dinner I omitted to write forced neon bulb relaxation oscillator. Example attached (lets call it "fair use"). The book also goes on to examine coupled bulb oscillators. So the injection-locked thyratron oscillator in my ancient '40s Philips oscilloscope is a chaos generator as well as a horribly non-linear horizontal sweep generator. Heh. 

Its hysteresis or "memory" effect gives it properties in common to time-delay systems described by delay differential equations (had never even heard of them before). Then there are spatiotemporal systems described by partial differential equations. PDE and DDE systems can be "infinite-dimensional", and thus really simple first order equations can describe extremely complex, chaotic behavior.

A statistical log (occurrence and amplitude) of the sub-harmonics produced by a forced neon bulb relaxation oscillator over a lengthy period of time may make for interesting analysis. 



« Last Edit: September 08, 2014, 12:42:30 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Sprott systems
« Reply #85 on: August 29, 2014, 03:17:22 pm »
The chaos continues........ This is a work in progress, but I've got a few rather pretty videos/animations uploaded already:

http://www.glensstuff.com/sprottsystems/sprottsystems.htm

Should have all 18 systems posted and documented by the end of the weekend. However it's closing in on 1am now and I am about to go to bed for now.
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #86 on: August 30, 2014, 10:30:27 am »
Well I now have 6 of the 18 systems posted, with circuits and videos and 2-D plane views: http://www.glensstuff.com/sprottsystems/sprottsystems.htm

I notice that I have to use the refresh button on my browser to see my webpage updates. Does anyone know of any HTML code to force a browser to always check for a page update rather than just showing the old version from cache? All I can find are meta tags to disable caching, but that isn't always desirable and not all browsers pay attention to meta tags.   
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #87 on: August 31, 2014, 05:27:04 am »
OK, just persisting with my monologue  ::)

Just got another 4 systems posted up for a grand total of 10. Was hoping to get them all up this weekend, but that doesn't look like it is going to happen.

My favorite so far is Case M. Perhaps I am a weirdo, but I could watch these videos all day. I find amazing the complex behavior that can be described by such simple equations and just how easy it is to create working electrical analogues with so few active components.


Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: The Rössler attractor challenge.
« Reply #88 on: August 31, 2014, 05:33:35 am »
OK, just persisting with my monologue  ::)

We are all enjoying it, at least I am. Just not much to say about it since I haven't touched Lorenz attractors, Julia sets and Mandelbrot sets since the early 90s.
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #89 on: August 31, 2014, 12:02:22 pm »
For fractals, see this excellent and freely available book:

http://sprott.physics.wisc.edu/sa.htm

I really shouldn't have downloaded that, since I already have more than enough on my plate. I can now see a several diversionary hours at least at the keyboard of my Beeb writing BASIC fractal programs.........
   
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #90 on: September 08, 2014, 12:41:45 am »
Well I now have 17 of the 18 dissipative systems knocked off: http://www.glensstuff.com/sprottsystems/sprottsystems.htm
Case R is giving me a headache though.
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline mamalala

  • Supporter
  • ****
  • Posts: 777
  • Country: de
Re: The Rössler attractor challenge.
« Reply #91 on: September 08, 2014, 12:56:01 am »
.....then again it may be his neurons that are firing chaotically these days. 

You mean the few that weren't yet swallowed up by the self-made stupidity blackhole of his?

Greetings,

Chris
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #92 on: September 08, 2014, 01:09:12 am »
His eccentricities were probably just amusing until he started trying to waste peoples time in court. Maybe it is age related? Then you have the media that will of course seize upon the loopy pronouncements of any maverick with an adequately high academic qualification so long as it makes for a good headline.
« Last Edit: September 08, 2014, 01:15:40 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #93 on: September 08, 2014, 10:04:22 am »
Cracked Case R this evening; Just turned out to be critically sensitive to a few constants in specific directions (determined by study in SPICE). Once the real-world constants were accurately trimmed to be within the critical ranges the system came to life.

That's all 18 dissipative systems knocked off. Yahoo.

« Last Edit: September 08, 2014, 10:06:28 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28379
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: The Rössler attractor challenge.
« Reply #94 on: September 08, 2014, 10:11:49 am »
 :clap:  :clap:  :clap: Hats off to you.  :-+
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #95 on: December 13, 2014, 08:07:22 am »
So....... while plodding away soldering components for my digital computer project and wondering for the first time how chaotic attractors could be calculated using digital computation, I started pondering the formula for the voltage across a capacitor (which describes analogue integration):

Vc=(Ic/C)t

In an electrical analog the state variables of a chaotic attractor can be represented by either magnitudes of voltage or current. If one thinks in terms of current, and if C and t are fixed values, then, extrapolating into the digital domain, the recipe for integration in discrete time steps simply reduces to multiplication by a constant of a value less than one.

For example:

x=x+(x*c)

Where c is a constant less than one. If c is sufficiently small in value, then the solution to a differential equation computed such should be accurate.

Well that is how/the order my brain figured it anyway; dunno if that stream of thought is followed or considered obvious/logical by anyone else. Well I figured that it just sounded so stupidly simple and since I couldn't wait so long as to try it out in machine code on my homebrew digital computer which is still far from complete, I fired up my BBC micro and wrote a couple of BASIC programs.

Sure enough, it worked a treat. I was surprised that I only needed a constant as small as 0.01 for an accurate solution. The BBC Micro isn't a particularly powerful processor and it took several minutes for the plotted attractors pictured to be plotted out. The value of c is simply a trade-off between accuracy and calculation speed. If c is adequately small, the computer continues plotting endlessly for as long as it is turned on. If c isn't small enough the solution eventually becomes unbound, the "point" flying away from the attractor(s) and the computer bombing out with data values out of range.








 
« Last Edit: December 19, 2014, 11:56:58 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: The Rössler attractor challenge.
« Reply #96 on: December 13, 2014, 08:44:25 am »
"Accurate" is in the eye of the beholder; the results will be a far cry from the ideal analytical solution (at some given point in time, it's probably on the opposite side of the graph), but as far as producing the result, it doesn't take much accuracy, no.

For reference, what numerical type does that thing use?  I'm guessing it's not full single precision, but was it one of those hand-tuned floating point formats with enough bits to look about right?

Basic Newton's method is a very simple and intuitive way to integrate, and fairly effective given its limitations (even SPICE uses it*, for TRAP / INTORD=1).  You can also investigate Runge-Kutta (higher order) methods, which give superior accuracy and smoothness for a given timestep, at the expense of needing higher derivatives.

*With some fixes, of course.  Timestep is variable, not constant; first, an error estimation function is applied, which determines what size of timestep is required.  Occasionally, it gets stuck, timestep degenerates to ps or fs scales, and the simulation all but locks up...

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #97 on: December 13, 2014, 08:56:23 am »
Err, ignoring machine limitations, the accuracy is simply determined by the size of the c constant. The smaller the value, the smaller the integration step. It's as simple as that. If you can come up with a simpler and more instantly intuitive way to integrate with BASIC code and successfully plot an actual chaotic attractor (which was the goal here), then lets see it.



« Last Edit: December 13, 2014, 09:33:27 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: The Rössler attractor challenge.
« Reply #98 on: December 13, 2014, 09:41:23 am »
Oh, a long shot, but for anyone interested in chaotic attractors who is also a Beeb aficionado, here are links to the listed program files in audio format:

http://www.glensstuff.com/lorenz.wma
http://www.glensstuff.com/rossler.wma

I don't use a tape/cassette recorder to save my programs anymore - I just record/save/load my programs to/from my PC. Quite a convenient format in which to back-up and share old-school computer programs, I think. Others of a sufficient age can listen to the shrieking and buzzing sounds of the audio files through their speakers to experience a little nostalgia  ;D

 
« Last Edit: December 13, 2014, 09:46:49 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: The Rössler attractor challenge.
« Reply #99 on: December 13, 2014, 10:26:40 am »
Err, ignoring machine limitations, the accuracy is simply determined by the size of the c constant. The smaller the value, the smaller the integration step. It's as simple as that. If you can come up with a simpler and more instantly intuitive way to integrate with BASIC code and successfully plot an actual chaotic attractor (which was the goal here), then lets see it.

Well, I meant both: an ideal (perfectly accurate) evaluation of the equations would give a plot of so-and-so, which doesn't quite line up with the simulation, particularly after N cycles (however many that may be).  Partially due to rounding (machine limitations) and partly to the integration method (size of c and number of derivatives used in the calculation).

Just to illustrate the curves, without regard for numerical precision, simple is quite sufficient.

It's noteworthy that, because it's math by difference, too small of a c value will degrade accuracy as well.  You need a certain minimum number of bits in the numbers to get a stable enough result for the problem (i.e., it produces a figure that looks like the attractor).  There will be a range of c which works, which will be narrower on this system than, say, doing it in full double precision on a PC these days.

As for simple and intuitive, was I not agreeing...?  I doubt I can come up with a "simpler and more instantly intuitive way"; your code is quite clear and concise!

I'd hardly expect it to be optimal for the machine (par for the course, given most BASIC implementations!), but as soon as one veers away from BASIC and into the muddy world of machine code, you lose all that.  Even for a masochist who's into that sort of thing, it's hardly worth hard-coding all that, just to make a pretty picture -- BASIC (or other HLL) wins again.

Compressed audio formats, I wonder how much bitrate is required for faithful reproduction -- depending on format, those can be fairly complicated signals, and might not compress too well with standard codecs.  Neat to know it works!  (That is, getting away with a WMA, or I would assume MP3 or anything else of the sort just as well, instead of a lossless WAV.)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf