Lock your wigs, inflate your shoes, and prepare yourself for a period of simulated exhilaration. -- Firesign Theatre, 1971 "I Think We're All Bozos On This Bus" ( www.amazon.com/exec/obidos/ASIN/B00005T7IT/hip-20 ) Last time's 'zine was quite long -- 16,275 words (a record) for the last installment and 31,620 for the whole trilogy -- and somewhat tangential to classical cybernetics (though it did deal with important issues like the digital revolution, disruptive technology, media ownership and the democratization of moviemaking). But this time I want to be more short and to the point, and also to return to fundamentals, and discuss something at the core of the methodologies of cybernetics and systems theory: simulation. A few years ago I got an email that asked this question: Are there any books (or web pages, etc.) in reference to applied cybernetics? That is, quantified cybernetic relationships in a real world application used to solve a problem or accomplish a goal. Examples outside of the science/engineering world, and cybernetics applied to business would be of particular interest. to which I replied: These days what used to be called cybernetics is usually just folded into "applied math." In the business world, they used to call it "operations research" and now they call it "management science." Here is the strategy I recommend: use visually programmed simulation packages. Go to google.com and search for: easy5 vissim ITI-SIM AMESim and you'll get links like: www.idsia.ch/~andrea/simtools.html which point to vendor web sites. Pick a package you can afford and use it to build models and play with them. Try to model as many different types of systems as you can. Then get ahold of real data, say from an e-commerce sales database, and see if you can build models that produce similar data. ... Happy studies! Since sending this email, I have come to believe it may be the best advice I have ever given to any of my readers. (I wonder if he followed it?) So I have decided to expand upon the idea for this issue. ======================================================================== Cybernetics in the 3rd Millennium (C3M) --- Volume 5 Number 2, Mar. 2006 Alan B. Scrivener --- www.well.com/~abs --- mailto:abs@well.com ========================================================================## Even Better Than the Real Thing

## AN OLD KIND OF SCIENCE

Yes, but as a noted scientist it's a bit surprising that the girl blinded ME with science... -- Thomas Dolby, 1982 "She Blinded Me With Science" on "The Golden Age of Wireless" (music CD) ( www.amazon.com/exec/obidos/ASIN/B000007O19/hip-20 ) First, to put things in context, we need a quick review of the history of the Scientific Method:

- The original methodology is usually attributed to Galileo, who established this pattern: create a mathematical model of a natural system (his used simple algebra), make quantitative measurements, and compare them with the theory. If the experiments repeatably give different answers than the theory, modify the theory and repeat. In this way Galileo was able to establish that a sufficiently dense body (so that air friction can be ignored), dropped from slightly above the Earth's surface, will have traveled a distance of 16*t^2 feet after t seconds have passed. (Here I write t^2 to indicate t squared, i.e., t*t or t times t, following the syntax of many computer languages, from BASIC to Java.) For example, after one second the distance traveled will be 16*1*1 = 16 feet; after two seconds the distance traveled will be 16*2*2 = 64 feet; after three seconds it will be 16*3*3 = 144 feet, and so on. (Note that you don't need a computer or a 3D graphics system to get these answers.) Graph this data and you start to get a parabola, or as Thomas Pynchon called it, "Gravity's Rainbow."
- Isaac Newton made a huge contribution when came up with the main set of mathematical tools used to model deterministic systems with a number of interconnected, continuous (i.e., "smooth when plotted") variables. Newton's toolbox is built on algebra and geometry, and includes calculus, so-called "linear algebra" and systems of Ordinary Differential Equations (ODEs).
- Using his tools Newton was able to prove that -- if you make some simple assumptions about forces and masses and gravity -- a single planet orbiting the sun must follow the shape of an ellipse, a conclusion that matched the detailed observations of Tycho Brahe, which Kepler had analyzed and formulated into Kepler's Laws. (Note that you don't need a computer or a 3D graphics system to get these answers either.)

- It was quickly discovered that Newton's equations did not yield ready answers when THREE bodies interacting gravitationally are analyzed. This story is told in the wonderful paper "A Mathematics for Physiology" by Alan Garfinkel (1983) which appeared in "The American Journal for Physiology." Dr. Garfinkel explains: The motion of two mass points is then described by a curve ... the solution curve to this differential equation for a given set of initial conditions. Newton's achievement was to show that that this model yielded Kepler's three laws of planetary motion: that the planets move in ellipses [&etc]. Before this derivation, Kepler's Laws had been entirely empirical, so the explanation that Newton contributed was very profound. It became the basic paradigm for a rigorous physical theory: a reduction to a differential equation, with the hypothesized forces appearing as the right-hand side of the equation, and the resulting motion of the system given by the integral curves. But the beauty of Newton's solution to the two-body problem did not seem to be extendable. In the typical cases, even in systems slightly more complex than the two-body problem, one could write equations based on first principles, but then it was completely impossible to say what motions would ensue, because the equations could not be solved. A classic case was the three-body problem. This is a more realistic model of the solar system, because it can take into account the non-negligible gravitational effects of Jupiter. A great deal of attention was focused on this problem, because it expressed the stability of the solar system, a question that had profound metaphysical, even religious, consequences. Mathematicians attempted to pose and answer this, some spurred on by a prize offered by King Oscar of Sweden. [link added -- ABS] ( www.sciencenews.org/pages/sn_arc99/11_13_99/mathland.htm ) Several false proofs were given (and exposed), but no real progress was made for 150 years. The situation took a revolutionary turn with the work of Poincare and Bruns circa 1890, which showed that the equations of the three-body problem have no analytic solution. ... They showed that the usual methods of solving differential equations could not solve this problem. In addition, because the write-a-differential-equation-and-solve-it method had become the normative ideal of an explanation, the proof that no such solution existed (not just that people had not found none) had revolutionary consequences: it represented the defeat of Newton's program. The revolution was resolved by Poincare. It was his genius to reevaluate the question and ask what we really wanted from a mathematical model of nature. Consider the problem of the stability of the solar system: what are we really asking for when we are asking if it is stable? To Poincare, it meant asking whether the orbit of the earth, for example, was closed, spiraled into the sun, or escaped into space. He was that the fundamental difference between the closed orbit and the other two was qualitative: the closed orbit is essentially a circle, and the other two are essentially lines. To make this distinction precise required the invention of a new subject, topology. In the topological view, only breaks and discontinuities are meaningful; two figures, such as the ellipse and the circle, which can be deformed into each other without discontinuities, are equivalent. However, the circle and the line are not equivalent, because we must the break the circle somewhere to map it smoothly and one-to-one onto the line. Poincare then reposed the fundamental question of dynamics. No longer was it a request for analytic solutions. Now it was asking for the qualitative FORMS of motion that might be expected from a given kind of system. This was the idea that was to revolutionize dynamics, an idea that requires a radically different view of dynamics, in which we imagine it pictorially instead of symbolically.

- a very probing "Simulation Software Survey" ( www.lionhrtpub.com/orms/surveys/Simulation/Simulation.html )
- a series of useful articles on "Software For Fluid Power Technology" in the "International Journal of Fluid Power" ( https://journal.fluid.power.net )

- AMESim, a simulation program for engineering applications ( https://journal.fluid.power.net/issue1/software.html )
- Blind Watchmaker - Dawkins' pedagogic evolution simulation ( www.amazon.com/gp/product/0393993418/103-5027803-7088611?v=glance&n=283155 )
- Data Loom - visualizes high-dimension data using parallel coordinates ( s92417348.onlinehome.us/software/dataloom )
- DYNAST - Software for Modeling, Simulation and Analysis of Fluid Power Systems ( journal.fluid.power.net/issue7/software7.html )
- EASY5 - Software for virtual system prototyping, simulation and control ( journal.fluid.power.net/issue3/software3.html )
- gAlan - Graphical Audio Language ( galan.sourceforge.net )
- ITI-SIM - Modeling and Simulation Environment for Fluid Power Components and Systems ( journal.fluid.power.net/issue4/software4.html )
- MATLAB/Simulink - Modeling and Simulation of Fluid Power Systems with MATLAB/Simulink ( journal.fluid.power.net/issue5/software5.html )

- Stella ( www.iseesystems.com/softwares/Education/StellaSoftware.aspx ) very good for learning general systems theory included in the book "Modeling Dynamic Systems: Lessons for a First Course" by Diana Fisher ( www.iseesystems.com/store/modelingbook/default.aspx ) and in "Dynamic Modeling (Modeling Dynamic Systems)" by D. H. Meadows ( www.amazon.com/exec/obidos/ASIN/0387988688/hip-20 )
- VisSim - Modeling and Simulation of Complex Dynamic Systems ( www.vissim.com ) ( https://journal.fluid.power.net/issue2/software.html ) written by a fiend of mine, Peter Darnell, who left Stellar to "do something with visual programming" and ended up as CEO of Visual Solutions - read his amazing account of controlling a prototype Antiskid Braking System (ABS) with a laptop running VisSim ( www.adeptscience.co.uk/products/mathsim/vissim/apps/gm.html )
- Mathematica ( amath.colorado.edu/computing/Mathematica/basics/odes ) when I was first learning how to solve linear ODEs at UCLA course taught by a satellite dynamics engineer, and working at Stellar with my own graphics supercomputer running mathematica, Craig Upson suggested I use the graphics in Mathematica to visualize the ODEs behaviors -- it was great advice
- AVS5 ( www.avs.com ) I worked for this company for four years and used its products for three years before that and for ten years since; what can I say, I love this software -- it's visually programmed visualization software, and you can add module in C I did some visualization of 2D and 3D ODEs with it, and posted some of it on-line (also did some videos which I ought to digitize) ( www.well.com/~abs/math_rec.html )
- NeatTools ( www.pulsar.org/neattools ) ( www.pulsar.org/images/neatimages/index.html ) this free tool created by my friend Dave Warner's company Mindtel is very handy for hooking up real time data for low-cost Digital Signal Processing (DSP) prototyping -- you can add modules in C++
- write your own code
nothing beats REALLY doing it yourself
here's some (buggy) C code:
`/* simulate linear n-dimensional system with Euler's method */ main() { int t, v; float state_array[NUMBER_OF_VARIABLES] float transition_matrix[NUMBER_OF_VARIABLES][NUMBER_OF_VARIABLES]; void initialize_change_rules(transition_matrix); void initialize_state(state_array); void display(state_array); float apply_change_rules(int v, state_array, transition_matrix); for (t = 0; t < MAX_TIME STEPS; t++) { for (v = 0; v < NUMBER_OF_VARIABLES; v++) { state_array[v] = state_array[v] + apply_change_rules(v, state_array, transition_matrix); display(state_array); } } } float apply_change_rules(int v, state_array, transition_matrix) { int n; float sum = 0; for (n = 0; n < NUMBER_OF_VARIABLES; n++) { sum = sum + transition_matrix[v][n]*state_array[n]; }`I leave it to the reader to write the routines:`initialize_change_rules(transition_matrix) initialize_state(state_array) display(state_array)`