Demonstration CD projects list

Demonstration CD projects list
Demonstration CD
projects list
(Version 1.0 build 1020)
DynamiTechs
www.dynamitechs.com
Via Pungilupo, 25
56100 – PISA
ITALY
DynamiTechs (2003)
1
Introduction
This document describes the various demo projects that are present in the
DynaWORLDS Professional V1.0 Demo CD.
We encourage the user to deeply examine the projects, explore and change
the various points of view, edit the animation data files to see their structure,
play around with menus and seek the tricks that allow to achieve the
animation results shown by the demos: object links, dummy objects, selective
animation inheritance, pivot points, animation offsets etc.
In particular, click the right mouse button inside a 3DViewport to open the
camera selection menu. Select a camera, press APPLY and see the scene from
the new point of view. Use the menu Scene/Cameras to modify the cameras
parameters; in particular, if the camera is of type EXTERN, you can also
change interactively the point of view (defined in cylindrical coordinates)
dragging the mouse in the 3DViewport holding the CTRL or SHIFT keys down.
Using CTRL it is possible to change the heading and elevation of the camera
view point, using SHIFT the radius is changed. To control the amount of
change in radius and elevation, access the menu File/Settings and change the
value Unit Set-Up.
As of today, the version 1.0 manual is not ready yet but, although
DynaWORLDS has been completely rewritten, part of the menu structure has
been kept equal to the old version to facilitate those users familiar already with
old menus. Then, it is possible to use the old version’s manual, with few
changes relative to those parts that are completely different, to understand the
demos behavior.
*MATLAB, Simulink and Real-Time Workshop are registered trademarks of The MathWorks, Inc. Other
product or brand names are trademarks or registered trademarks of their respective holders.
DynamiTechs (2003)
2
6 Degrees of Freedom object animation
File name: 6DOF Aircraft.dwp
This project file shows an X-29 aircraft in the middle of the screen, and can be
used to test object animation in 6 degrees of freedom.
The 6DOFObject 3DObject can be animated using the Animation tab while
modifying this object parameters as explained in the user guide.
The SIXDOF channel is set-up to use the InterpTest.pos data file.
This file has 4 signals; signal 1 must be used as data for animation of position
and orientation, while signals 2,3 and 4 should be used as timeline (Check
“Time Synchronization” and change “Time signal”). Signal 1 is a ramp from 0.0
to 360.0 while signals 2,3 and 4 are ramps from 0.0 to 1.0, 10.0 and 30.0
respectively. Using these signals as timeline specifies the simulation length to
be 1.0, 10.0 or 30.0 seconds and synchronizes the simulation with real-time. A
time value of 0 (that is no signal) means that the simulation uses all samples
in the Signal 1 without any interpolation.
DynamiTechs (2003)
3
Cargo ship animation
File name: Cargo_Control.dwp
This project file shows the results of the simulation of a Cargo Ship trajectory
control system.
The simulation shows the ship cruising from its initial point to the desired port
access area; a red arrow shows the rudder position, a second arrow shows ship
X body axis and a third arrow shows desired velocity in modulus and direction
(on the X-Y plane).
DynamiTechs (2003)
4
Formation Flight
File name: Formation Flight.dwp
This project file shows the results of the simulation of a formation flight
control; the control system is robust to failures in the communication channels.
The simulation will show several automatic formation reconfiguration
manoeuvres after communication failures or aircraft loss.
Modify the unique channel settings and point the FileStream to the three
simulation files: FF_Reconf1.pos FF_Reconf2.pos FF_Reconf3.pos to see
different simulations.
DynamiTechs (2003)
5
Guidance over Waypoints
File name: Guidance over Waypoints.dwp
This project file shows the results of the simulation of a guidance system for
unmanned aircraft. Fixed waypoints are depicted as cones pointing toward the
desired crossing direction. The simulation will show the aircraft take off, pass
through all the waypoints and finally land.
DynamiTechs (2003)
6
Guidance over moving targets
File name: Guidance over moving targets.dwp
This project file shows the results of the simulation of a guidance system for
unmanned aircraft capable to reach, with a prescribed crossing direction,
moving vehicles/targets on the ground. The simulation will show the aircraft
take off, reach the first tank once and the second tank twice. A coverage cone,
depicted as a transparent cone under the aircraft will show if targets are
successfully reached or not below a certain distance threshold.
DynamiTechs (2003)
7
Remotely Operated Vehicle (ROV) control
File name: Rov_control.dwp
This project file shows a synthetic environment for visualization of a remotely
operated vehicle. The model chosen is the Phantom S2, the four propellers are
animated and four arrows indicate the force generated by each single
propeller.
The file ROV_control_waketest.dwp contains a version of this demo that
shows how bubble wakes can be added to the propellers. The demo uses an
experimental version of the Particle Engine Plug-In so DO NOT RELY on it.
DynamiTechs (2003)
8
Ferrari animation
File name: Ferrari3.dwp
This project file shows the animation of a sportcar. A Ferrari F-40 has been
used as model for the chassis that is transparent so that the suspension work
can be seen. The car starts from velocity 0 and accelerates smoothly, performs
several turns and finally a sudden release of the gas pedal causes rear axle to
loose grip and the car to spin.
Accelerate simulation playback by selecting Hard Real Time synchronization in
the Simulation/RT Settings menu and changing the Accelerator value in the
File/Settings menu.
DynamiTechs (2003)
9
Underwater Remotely Operated Vehicle (ROV)
with robotic arms simulation
File name: ROVDemo.dwp
This is a rather complex demonstration project. It features an underwater
remotely operated vehicle with two 3-dof robotic arms. Several data files are
provided with this project and can be used only changing the file name in the
“AnimData” channel settings.
The following data files can be used:
• Sim01.pos : The effect of restoring forces is shown on the vehicle left
free to move from an upside-down position.
• Sim011.pos : The effect of restoring forces from a different starting
position.
• Sim012.pos : The effect of restoring forces on the arms only. The
metacenter is slightly higher than the barycenter, thus the links stable
position is in the pointing upward position.
• Sim02.pos : The vehicle transient to an initial speed along the X axis.
• Sim03.pos : The behavior of the vehicle when a water current pushes it
from behind.
• Sim04.pos : The effect of different drag on the two arms generates a
moment that makes the vehicle turn right.
• Sim05.pos : The vehicle swims using the arms as paddles.
Try all cameras in the different simulations to see the animation from various
standpoints.
DynamiTechs (2003)
10
Interpolation Demo
File name: InterpolationDemo.dwp
This project file shows the usage of the experimental Enable Interpolation flag
of Parser-Stream Channels. Three aircraft are animated using three different
channels; the data input file is the same for the three aircraft but the choices
for the Time Signal values are different.
Enabling the interpolation flag, the channels interpolates missing data in the
input stream (must be a file) using the data pointed by Time Signal as
timebase. As an experimental feature, the status of the flag is not saved into
the DWP file; then you have to manually check the flag in all channels. It
would be interesting to see the changes in the visualization with that flag
enabled or disabled. Inspect the ASCII source file: InterpTest.pos (saved under
the directory %DYNA_ROOT%/Data) to understand the demo behaviour.
DynamiTechs (2003)
11
Shared Memory Test
File name: Channels_SMtest.dwp
This project file shows the usage of the Fixed Size Shared Memory stream; it
must be used in conjunction with Matlab/Simulink. It shows how the output of
a simulation run under Matlab can be directly fed into DynaWORLDS. The
corresponding Simulink model is SMTest.mdl.
To run this example, open Matlab and load the SMtest model (the file has been
installed with DynaWORLDS under the directory %DYNAROOT%/Matlab), open
the corresponding DynaWORLDS project and start simulation in both
environments.
(the two processes Matlab and DynaWORLDS must be run in the same
machine).
Now change the slider gains in the Simulink model to modify position and
attitude of the aircraft and watch them change in the DynaW ORLDS window.
DynamiTechs (2003)
12
UDP/IP Communications Test
File name: Channels_UDPtest.dwp
This project file shows the usage of the UDP/IP stream; it must be used in
conjunction with Matlab/Simulink. It shows how the output of a simulation run
under Matlab can be sent over the internet to DynaWORLDS. The
corresponding Simulink model is UDPTest.mdl. To run this example, open
Matlab and load the UDPtest model (the file has been installed with
DynaWORLDS under the directory %DYNAROOT%/Matlab) then open the
corresponding DynaWORLDS project. Before starting the simulation in Matlab
double click the OUTPUT UDP/IP block (the red block) and setup the IP of the
machine that is running DynaWORLDS. Then start the simulation in both
environments. It would be preferable to start the simulation in DynaWORLDS
first and then in Simulink because as soon as Simulink simulation starts, it
begins to send UDP/IP packets without any handshake so packet queuing may
happen. Adjust the sample time in the UDP/IP block as well as in the
DynaWORLDS channel to conform to your network and PC hardware
performance (e.g. increase sample time in case of increasing delays between
action and reaction).
Now change the slider gains in the Simulink model to modify position and
attitude of the aircraft and watch them change in the DynaWORLDS window.
DynamiTechs (2003)
13
Frame Buffer Test
File name: FrameBufferTest.dwp
This project file shows how the image rendered by DynaWORLDS (using
Simulink simulation data) can be accessed from Matlab/Simulink. The
corresponding Simulink model is FBtest.mdl.
To run this example, open Matlab and load the FBtest model (the file has been
installed with DynaWORLDS under the directory %DYNAROOT%/Matlab), open
the corresponding DynaWORLDS project and start simulation in both
environments.
(the two processes Matlab and DynaWORLDS must be run in the same
machine). A Matlab figure window will open and will display the current image
rendered in the DynaWORLDS viewport. Edit the showFB.m file to see how the
image data is reconstructed from the Si mulink wire. Once the data has been
converted to a NxMx3 matrix, it can be used inside Matlab and Simulink with
any image processing routine and the result can be used as feedback into the
simulator and finally into DynaWORLDS making it possible to virtually simulate,
for example, a visual servoing environment.
DynamiTechs (2003)
14
Note: In DynaWORLDS you MUST enable the Frame Buffer Export from the
Simulation menu before running the simulation, otherwise the Matlab figure
window will be black.
From ShowFB.m file:
…..
function sys=mdlOutputs(t,x,u,aWidth,aHeight,Hfig)
figure(Hfig);
dim = aWidth*aHeight*3;
%extract R, G and B planes
frameR=reshape(u(1:3:dim- 2),aWidth,aHeight);
frameG=reshape(u(2:3:dim-1),aWidth,aHeight);
frameB=reshape(u(3:3:dim),aWidth,aHeight);
%create black image
frameRGB=uint8(zeros(aHeight,aWidth,3));
%fill image with RGB planes
frameRGB(:,:,3)=frameR';
frameRGB(:,:,2)=frameG';
frameRGB(:,:,1)=frameB';
%image is upside down
frameRGB=frameRGB(end:-1:1,:,:);
%show image
image(frameRGB);
sys = [];
% end mdlOutputs
….
DynamiTechs (2003)
15
Path Tube Demo
File name: Path Tube Demo.dwp
This example shows the usage of a plug-in developed at University of Pisa –
Department of Electrical Systems and Automation that creates a guidance (or
path) tube with future aircraft position predictors and different coloring
depending on correctness of current trajectory respect to desired path.
During the simulation playback the two predictors move accordingly to aircraft
estimated future position and the tunnel segments get colored in dark or light
green depending on estimated trajectory: if the pilot maintains current
trajectory, the aircraft will fly inside the light green segments of the tube and
exit the tube approximately at the light -dark green frontier.
The simulator used to create the data that this demo plays back it is very
similar to the one used in the Aircraft Interactive Simulation demo.
DynamiTechs (2003)
16
Terrain Plug-In Demo
File name: TerrainPlugInDemo.dwp
This project file shows the usage of the experimental Terrain plug-in. The
terrain elevation data is read by a custom ASCII format .map file, while the
texture data is read from a .jpg file. (Current example uses
jaksonMillMap_HR.map and jackson-mill_Final_AERO.jpg). The terrain and
texture data is loaded at simulation time, then to see the terrain it is sufficient
to run the simulation once; when the simulation is stopped the landscape that
has been created remains displayed on the screen.
Click the right mouse button inside the viewport and choose the preferred
rendering style; exactly the same procedure needed to select the actual
camera.
DynamiTechs (2003)
17
Inverted pendulum interactive simulation
File name: DynaPendDemo.dwp
This is a very simple demonstration based on the Simulink’s Inverted
Pendulum example (namely penddemo.mdl). The inverted pendulum simulator
runs on Simulink; the basic demo has been modified to incorporate the camera
position controls, a simple real-time synchronization block, and the SimulinkDynaWORLDS connection block. The reference signal for the pendulum base
position is generated by the Reference Signal Generator block. The three
slider-gains Distance, Heading, and Azimuth control the camera position in
cylindrical coordinates respect to the target that is the pendulum base.
Procedure to run the demo:
1) Run Matlab (version 6.0 is required) and load the DynaPendDemo.mdl
scheme.
2) Run DynaWORLDS and load the DynaPendDemo.prj project file.
3) Run the simulation in Simulink.
4) Run the Simulation in DynaWORLDS.
5) You will se the following image in DynaWORLDS, animated with Simulink
data.
6) Terminate the simulation by pressing STOP in both programs.
DynamiTechs (2003)
18
The cart, the pendulum, its hub, and the reference pointer are animated. The
gauge display on the left shows pendulum angle respect to the vertical axis.
The three-dimensional red arrow indicates the control action.
Select the “Orbit” camera and moves the three sliders in the simulink scheme
to change the point of view in the DynaWORLDS window.
Explore the Simulink scheme and the DynaWORLDS object and instrument
menus to understand the demo behavior.
Real Time interactive simulation (Man in the Loop) is quite complex to set-up.
Two processes on the same PC share one CPU and the operating system must
switch between the two. Context switch logic and maximum/minimum
frequency is not directly manageable by the user. The main counter effect of a
poor setup are delay in visualization respect to simulation and data loss. To
synchronize, even if very loosely, the two processes: the simulator (Matlab and
Simulink) and the Visualization System (DynaWORLDS) must be appropriately
prepared.
The Simulink RT-Synchronization block simply aligns the simulation time to
the PC Real–Time Clock (RTC) and checks for the alignment every “Sample
Time” seconds. This value must not be too small to limit check logic overhead
on simulation time but should be at least equal to the To DynaWORLDS
communication time.
DynamiTechs (2003)
19
The To DynaWORLDS block is the interface to the visualization environment.
It sends its input vector as a binary packet to DynaWORLDS using MS Windows
shared memory. The “Sample Time” value controls the period of
communication.
From the DynaWORLDS side, the software must be instructed to check the
animation source (Simulink via shared memory) at the same frequency which
the data is sent. This is done changing the “Sample Time” value in the Channel
properties dialog. (This can be opened using the menu Channels/Input and
double clicking the penddata entry of the channels list).
The particular shared memory communication system allows no queuing of
data so the visualization system always accesses freshest data; the
communication happens without handshake so there is no risk of dead-lock in
communications, but synchronization may suffer and delays may happen.
DynamiTechs (2003)
20
If you experience delays or “jumps” while running the simulation try to switch
the Windows focus on the DynaWORLDS window (just click over its title bar)
and/or to increase the communication period in both systems.
The setup present in the DEMO CD works perfectly with the following system:
Pentium III 1.0 GHz, Windows 2000 Pro, 256 MB, NVidia Ge-Force2 video card.
DynamiTechs (2003)
21
Aircraft interactive simulation
File name: DynaFDCDemo2_HUD.dwp
This is the most complex interactive demonstration project. It features an
external view from the aircraft, a Head Up Display (HUD) instrument and realtime joystick acquisition for Main In the Loop (MIL) Simulation.
The aircraft dynamics simulator is taken from the public domain Simulink
toolbox Flight Dynamics & Control (FDC) Toolbox version 1.3 written by Marc
Rauw in 1998 (You can download the software and manuals at
www.dutchroll.com). No modification at all has been done to the FDC Toolbox;
its blocks have been used instead to create the non-linear aircraft simulation
engine.
Load the Simulink model DynaFdcDemo3.mdl (the file has been installed with
DynaWORLDS under the directory %DYNAROOT%/Matlab); the model should
load automatically the data it needs to run; should you receive some errors
claiming undefined variables, double click the top-left cyan block to manually
load the model parameters. Now you can run the simulation both in
DynaWORLDS and Simulink and fly the aircraft with the joystick.
In order to interact with the aircraft commands, a standard joystick with four
degrees of freedom (axis X and Y, RotationZ and Thrust) is needed. Joystick
must be accurately calibrated using the Windows Control Panel to ensure zero
output with central stick. Left and right movements of the stick control the
aileron angles, while the up and down movements control the elevator angle.
The rudder is controlled by the rotation around the Z axis of the stick and the
throttle command changes the throttle respect to trimmed flight conditions. If
DynamiTechs (2003)
22
you have a different joystick you can modify the setting of the Joystick SFunction and adapt them to your hardware. It should be easy to understand
what to change in the S-Function mask. Some Joystick drivers have the X and
Y axis exchanged; if this is your case, just cross invert the aileron and elevator
wires.
Follow the instructions given at the end of the Inverted Pendulum Demo
documentation to get familiar with interactive simulation setup.
DynamiTechs (2003)
23
YF-22 interactive simulation
File name: Simulink_YF22_Demo.dwp
This demo constitutes the preview of a new technology developed at University
of Pisa – Department of Electrical Systems and Automation that will be freely
available to DynaWORLDS users. A new RealTimeWorkshop (RTW) target has
been developed that allows compiling every Simulink model into a dynamic link
library (DLL) readable by DynaWORLDS. DynaWORLDS loads this DLL and uses
it to simulate system dynamics directly inside its real time engine. A white
paper will be available soon that describes this technique.
This demo allows the us er to fly in open-loop a highly unstable nonlinear YF-22
aircraft model.
The demo shows other DynaWORLDS improvements as well:
1. Binary .3DS files import
2. Multi selection of object geometries inside a geometry file
3. Complex definition of the axis of rotation (Pivot point)
4. The experimental DirectInput Stream
The following figure shows the settings for the animation of the Left Rudder of
the YF-22 that rotates around the Z axis of the pivot point reference frame
defined by 3 translations and 3 rotations.
DynamiTechs (2003)
24
In order to interact with the aircraft commands, a standard joystick with four
degrees of freedom (axis X and Y, RotationZ and Thrust) is needed. Left and
right movements of the stick control the aileron angles, while the up and down
movements control the elevator angle. The rudder is controlled by the rotation
around the Z axis of the stick and the throttle command changes the throttle
respect to trimmed flight conditions. The joystick used in this demo is a
Wingman Strike Force 3D; you might need to play around with Joystick Stream
settings with a different joystick.
This demo contains a precompiled DLL generated by RealTimeWorkshop, and it
is not meant to work smoothly on any system. When the new target for
RealTimeWorkshop will be released the user will be able possible to recompile
this demo source Simulink model following his need.
The new joystick stream settings:
Choosing the DirectX ID (and pushing Set) it is possible to choose among
various joysticks that may be attached to the system. Choosing the port
number 3 shows the number of axis the joystick has (it must be 4) Pressing
the button Details shows the labels windows uses to identify the various axes.
It could be possible that your four axes joystick lists the Y and X axis in
different ordinal positions; this would need changing the Simulink source
model and recompiling (see the Aircraft Interactive Simulation Demo note).
DynamiTechs (2003)
25
The Simulink RTW channels allows the user to pick a RTW generated DLL and
shows the corresponding number of inputs, outputs and continuous states; the
numerical integrator type (Solver name) and the Step Size that must be equal
to the SampleTime for synchronization with Real Time. In this case the RTW
DLL reports 4 inputs; these inputs are provided to the model from another
channel: the joystick channels; thus a real Man In the Loop Simulation can be
realized with this technique.
DynamiTechs (2003)
26
Pilot’s view
External View
(Note the control surfaces deflections)
DynamiTechs (2003)
27
External view from very far
DynamiTechs (2003)
28
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising