Distributed Manipulation using Disctrete Actuator Arrays
J.E. Luntz University of Michigan
W. Messner and H. Choset Carnegie Mellon University
Multimedia extension #3: Closed-loop simulator and results
The closed-loop simulator is built around the open-loop simulator with three major modifications:
• The current object position and orientation are fed back and used to compute desire force and moment
• The wheel velocity field is no longer static: it changes in response to the object feedback
• The constants of motion are computed at every time step since the wheel speeds change continually
This page contains:
• A desctiption of the simulink model
• Instructions on how to download and run the model
• Sample output data You can run these in Matlab without Simulink.
Model Description
The high-level closed-loop model is shown in Figure 1. Simulink represents models as block diagrams where directed arrows represent the flow of time-varying scalar (thin lines) or vector (thick lines) signals. Each block represents a function which operates on the signal.
Starting from left to right, the current position and orientation (Xc and theta) are compared to the desired position and orientation (Xeq and thetaeq) to create the position and angle error signals, each of which is multiplied by a proportional gain. The position error feeds into the "transfield" block which computes the wheel speeds for the uniform field (Equation 53 in the text). The angle error, along with the current object position feeds into the "rotfield" block which computes a rotational field based either on the computed rotation field (Equation 59 in the text) or the kinematic rotational field (Equation 65 in the text). The rotational field needs the current object position since the field is always centered on the object. The translational and rotaational fields are then added together and fed, along with the mask vector (the current set of supports), to the "Calculate Constants" block. The resulting constants of motion are then fed into the "Integration of Object Dynamics" block which outputs the current position and orientation.
Figure 1: The high level closed-loop model in Simulink. Lines represent time varying signals, with arrows representing the flow of information. Blocks act as dynamic filters acting on the signals.
The details of the "Integration Of Object Dynamics" block are identical to the same block in the open-loop simulator. The details of the "Calculate Constants" block are shown in Figure 2. The mask vector and the field vector (formed from stacking the x-velocities on top of the y-velocities) feed into the function "recalcconstsCL" (which executes from the file "recalcconsts.m").
Figure 2: Details of the "Recalculate Constants" block.
Running the Model
The following files are required to run the model:
• simclosedloop.mdl
• setupsimclosedloop.m
• isinbox.m
• recalcconstsCL.m
• calctransfield.m
Also, at least one of the following is required to compute a rotational velocity field (the first is the default, but you should download them both).
• calcrotfieldfield.m
• calckinematicrotfield.m
Finally, the following files are useful for viewing the simulation results and the results of saved sample simulations.
• animateCL.m
• makeplotCL.m
Download the files into a local directory either by right-clicking on each of the links above or by downloading and uncompressing one of the following file which contains all the open and closed-loop simulation files and sample runs.
• simfiles.tar.gz
To run the model, start matlab and change to the directory in which you saved the files. To open the model, type, at the Matlab prompt:
This will open the main model window (Figure 1). To run the model, you first must run the startup script "setupsimclosedloop.m" which defines the positions of the cells, the size, weight, and initial conditions of the object, the coefficient of friction, the feedback gains, the length of simulation, etc. Note that you can edit this file to change these parameters (see the comments in the file for instructions). To run the script, type, at the Matlab prompt:
Once this script is run, you can start the simulation by selecting "Start" of the "Simulation" menu in the main simulation window or by typing Control-t in the main simulation window. After a few seconds, Simulink will beep when the simulation finishes.
You can change which of the two rotational fields are used in the simulation. To do so, double-click on the "rotfield" block in the main simulation window and enter either calcrotfield(u) (for the computed rotational field or calckinematicrotfield(u) (for the kinematic rotational field).
Simulink saves signals from the simulation as Matlab variables for plotting and animation after the simulation runs. The position of the center of mass of the object is stored in the two-column variable Xc, the orientation of the object is stored in the one-column variable theta, the mask vector is stored in the n-column variable masks (where n is the number of cells), and the wheel-velocity field over time is stored in the 2n-column variable fields (with x-velocities in the first n columns and y-velocities in the second n-columns). In addition, the times at which these variables are stored are stored in the one-column variable t.
The script "animateCL.m" uses these stored variables to display a pseudo-real-time (assuming you computer is fast enough) animation of the recorded motion of the object (one frome of which is shown in Figure 3. To view this animation, type, at the Matlab plot:
Figure 3: Final result of the "animateCL.m" script.
The script "makeplotCL.m" uses the stored variables to make static plots of the progression of the object. Both "overhead" (Figure 4) and position and orientation vs. time plots (Figure 5)are made. To view these plots, type, at the Matlab plot:
Figure 4: Overhead plot from the "makeplotCL.m" script.
Figure 5: Position and orientation vs. time plots from the "makeplotCL.m" script.
Sample Simulation Runs
The results of a simulation can be saved by saving the relevant variables from the Matlab variable environment. To do this, type, at the Matlab prompt:
save foo Lx Ly X Xc masks fields t theta
The variables will be stored in the file name "foo.mat".
To load a set of saved variables from the file "foo.mat", type, at the Matlab prompt:
load foo
The variable saved in "foo.mat" will be loaded into the Matlab workspace. At this point, you can run the "animateCL.m" and "makeplotCL.m" scripts as described above. The following two stored runs are provided with this appendix:
• closedloopcomputed.mat: This is the computed rotational field example from the paper. The translational gains are each 1, and the rotational gain is .1.
• closedloopkinematic.mat: This is the kinematic rotational field example from the paper. The translational gains are each 1, and the rotational gain is 4.

Return to Contents