The dynamics of mechanical and/or control systems is traditionally documented by plots of system variables. The imagination of the underlying movements is restricted to very simple cases. ANDYMMO enhances imagination by introducing the possibility to see animated sequences of movements. The source may be any output generated by standard simulation tools. For linear models ANDYMMO has its own built-in simulator.
It is part of the project work in control theory that student teams use several computer aided simulation tools for block based as well as equation based modelling.
This course and its applications contributes a lot to the unterstanding of dynamics and the modelling of mechanical problems.
Usually these tools produce the plots of time series in order to document and visualize the dynamics of a system. But if one deals with multi-body systems and movements in three dimensions this kind of visualization comes to an end very rapidly. To see the movements animated in the form of movements of bodies is a strong supplement to reinforce understanding.
Here ANDYMMO may be used as a postprocessor to make movements and other elements of state space visible. Input normally comes as ASCII files, containing time series. Import filters exist for MAPLE V, DORA, AUTOLEV, TUTSIM, MATLAB, SIMULINK, PASCAL and others. ANDYMMO adopts to any regular pattern of input data. Also one can use the built-in simulator(see below). The user then creates graphical objects and links them to the time series.
It is hard to imagine the movement of the three masses from that plot for somebody who is not trained to read such time series. And even for such persons an animated video is very helpful. The following plot shows the system with active damping, which means that a varying force is applied to mass m1 such that the reference state is reached fast.
ANDYMMO is easy to learn and to use. Only the fantasy of the user and memory limitations of the computer in use restrict the application. The animation is established by defining graphical objects on different layers together with translational and rotational transformations with respect to different layers. The time series and combinations of them then control the movement of the different layers and therefore implicitly the different movements of all the objects fixed to the layers (Figure 2).
In addition to these freely definable graphical objects there is the possibility to set up virtual instruments like pointer devices (e.g. a speedometer) or bar graph instruments (e.g. a thermometer) or simple digital instruments to visualize the time series of any variable contained in the model.
Usually there is a need to reduce the huge amount of data coming from simulation, which often means numerical integration. The optimal stepsize for numerical integration is to small to use it for animation. For example a simulation which lasts 10 seconds produces 1000 values if one chooses a stepsize of 0.01 seconds. Depending on the complexity of the model the rate of image repetition may be 10 to 15 Hz. That means the whole simulation would last up to 70 to 100 seconds. In order to have real-time animation, data reduction is unavoidable.
Therefore ANDYMMO can reduce time series based on two different strategies from which the user can choose. The first one is reduction according to constant time steps, while the second reduces data such that there is a constant stepsize in the function values of one time series. Which one the user chooses depends on the model and how the animation should look.
Having finished the player files, one can play the animation like one plays a video recorder. The graphical user interface provides well known touch fields for the actions: play forward, play reverse direction rewind, increase speed, slow down, step through forward, step backward, repeat infinitely and stop.
Figure 3 shows the screen during an animation of the vibrational system with three masses. Simultaneously the system variables are provided, where a running marker shows the actual values. So the interpretation of time series diagrams can be trained.
Another feature is the built-in simulator for all autonomous and controlled models given in the well known state space representation using the matrices A,B,C,D. Figure 4 shows the block diagram of the implemented structure. One may see the matrices of the plant (A,B,C,D), the state feedback matrix K and the reference state matrix R. The state space may have up to dimension 8. The above mentioned vibrational multi-body system including strategies for active damping can be built by means of ANDYMMO alone, without using any external tool. The multi-variate reference variables may be defined using full APL possibilities, so it's easy to generate signals like step functions, pulses, pulse trains, ramps, sinusoidal signals.
ANDYMMO was tested by students using simulation data from former studies and now it is an integral part of the lab for automation, control and mechatronics (Erwin Hasenjäger). Figure 5 gives some examples of animated models.
| Figure 5: Examples of animated simulation models | |
|---|---|
|
|
|
|
|
|
|
|
|
ANDYMMO was developed for APL2/6000 on a RS6000 machine (Model 250 with 601 Processor, 32MB, AIX3.2.5, X11R5). So it is necessary to have a license of APL2/6000 in order to run it. There is a shellscript Andymmo provided, which starts APL2/6000 without session manager and loads the animation workspace AD. The workspace size in atf format is about 320KB. When stored as an APL2/6000 workspace it occupies 800KB.
Codecount is about 5800 lines of code. The coding was done by Jens Trautmann in 5 months, some minor changes concerning AP management are due to Willi Hahn.
It also runs under APL2/2 on PCs with enough gun powder (at least 75 MHz Processor, 16Mbyte memory), but is not widely tested yet. The control of the program is done by popup menus using AP124, file management uses AP211 and graphics is implemented via AP207. So a player file is mainly an AP211 file containing AP207 commands. There is also the possibility to put together for demonstration or education purposes several animation sequences which belong to the same topic in one large AP211 file, each one with its own explanation start window.
One may start it using a shell script or just loading the workspace and typing START. ANDYMMO is bilingual: Deutsch or English........
A copy of the latest version together with documentation and examples in compressed form can be obtained via anonymous ftp from
ftp://aix550.bingen.fh-rpl.de/pub/apl/andymmo
The package consists of a README file and a "tarsed" and "gziped" file andymmo.tar.gz (gzip -d andymmo.tar, then tar -xf andymmo) which unpacks to
The documentation in updated version is in a tarsed and gzip file named andymmo.doc.tar.gz which has to be unpacked the same way. The files are:
There is also a tarsed and gziped file named andymmo.exam.tar.gz containing some examples for testing. Uncompress it and copy the files to a directory according to your setting in the environment variable ADPATH (see and edit shell script). Backup a copy, since working with Andymmo may alter these files. When running under AIX the environment variable ADPATH should point to a directory where the animation data resides, otherwise Andymmo looks to the home directory. You must have write permission to that directory because Andymmo tries to open the files with attribute "UPDATE". During development of animation data all updating is done automatically, so even in case of crashes most of the data is not lost.
A first test may be done as follows: Copy the workspace and data. Start APL2/6000 and load AD or start shellscript Andymmo. A menu comes up for the language and the path information for the data files. Choose appropiately. Select in next menu open an animation, then select one of the files. Select next: play an animation , choose one of the offered animations. Select display in all foreseen windows , focus the mouse pointer to the window named Animation and touch the field for play (same is F5-key). If it is running under AIX and you don't see what you expect, switch the windows from foreground to background and back, press CTRL-F1 to rebuild window contents after having resized them by X-means. Sometimes colored pictures come up only after having iconized other windows or moved the window.
Since we had some problems with automatic resizing of the AP124 window during development, the code which does resizing that window is bypassed. (Look for the functions Q124W and S124W using the FIND function of the UTITLITY workspace which is provided with the license). AP124 window should not be closed via means of X-windows. One might have to restart the whole session when this was done.
One should not save the workspace with the )SAVE command after having used the functions, because the size may grow up to 1.6MB due to local name table space which is not freed. There is a small function SAVEMIN in the workspace (usage SAVEMIN 'name'), which does the necessary copies to have the workspace saved without that garbage.
A tool for shrinking AP211 files named FILE_PACK is within the functions of the workspace, so an APL experienced user may minimize the files, but in order to work with ANDYMMO there is no need to have knowledge of APL. Of course, the more one has, the more one can exploit the features of ANDYMMO . If your player files occupy after some development several MB you should try to pack them.
Writing this, we still do not understand the way APL2/6000 and its APs use the X-server with respect to colors and visibility of fill patterns. Sometimes its necessary to move windows from foreground to background or just move them to see everything in the windows. There also is a hot-key (Ctrl-F1) to reconstruct all graphical windows after resizing the windows using X-windows facilities. When used with AIX 4.1.3 and Common Desktop Environment (CDE) one should have the setting more colors for applications because otherwise some colors remain invisible, especially when there is another programm running in parallel, such as Netscape. In that case even the session manager of APL2 has problems displaying all colors as foreseen. Sometimes colored pictures come up only after having iconized other windows.
When using under APL2/2 one should not move windows, because OS2/2 seems to tell the whole animation story from the very beginning again when the animation window was in background and comes to foreground again.
Problems and questions should be reported to the email addresses given above.
Last updated: 1996,July 31 by W.Hahn. Minor layout changes by Gill Smith 3 August
Willi Hahn, Erwin Hasenjäger and Jens Trautmann
Fachhochschule Bingen
Berlinstrasse 109
55411 Bingen
Germany