Bit Mining System Setup
Overview of the Experiment
The goal of the experiment
system is to run the software simulation with the physical system. Here
the physical system could be the real application or the experiment system.
By doing so, we can integrate the simulation data and the real data to
make real time decisions. Our experiment is to explore a way to implement
this concept.
Consider a simple production
system. The system is shown in Figure 1. There are three trucks running
in the experiment. The truck’s task is to move the product from the loading
zone to unloading zone. For our experiment, we use the bits (0 or 1) to
represent the material. The assembly lines get the bits from the unloading
zone and produce a three-bit string as production. The capacity of the
truck is just one bit.

The
whole experiment consists of two parts, the real experiment and virtual
simulation. The real experiment includes the physical aisle, loading zone
and unloading zone. Two trucks run on the real setup. The loading zone
emits a one bit of 0 or 1 with a certain rate. The emission has some range
constraint and the trucks need to come into the range to pick up the bit.
The trucks pick up the bit and move along the aisle toward one of the three
destinations. At the destination, the truck sends the bit to one of the
computer assembly processes. After this, the truck is able to load and
move from the loading zone again. If the assembly process comes up with
the three bits as designed, then the output is a good product. There are
demands associated with the products.
The virtual simulation
includes all static experiment objects in the environment, i.e., model
of the aisles, loading zone and unloading zone, and one DEVS truck model.
There are four more processes running on the computer. Three of which are
assembly processes to produce the stream of three-bit product. The other
one is the control process, which is in charge of the truck movement controls
and traffic controls on the aisle.
Detail Setups
·Communications:
oThe
computer transceiver talks with the virtual truck and real trucks and vise
versa;
oThe
trucks do not talk with each other.
oThe
aisle sensors give the location data of the trucks.
·Loading
zone:
oLoading
zones are two relay stations to send bits out.
oThe
relay stations have limited range.
·Sensors:
oLocation
sensors tell the position of the truck;
oAisle
sensors give information if the truck is on the aisle.
·Simulations:
oAisle
model: a graph representation of the real aisle, including the position
sensors;
oTruck
model: simulates the behavior of the truck, including movements and deviations;
oLoading
zone: should have the exact the same behavior of the loading zone as that
of the physical one;
oUnloading
zone: should have exact the same behavior of the unloading zone as that
of the physical one.
oControl
process: truck movement control and traffic control.
Descriptions of the dynamic Package
(July 27, 2000)
Distance
Distance is decided by
the number of loops the “go straight” program to run and speed. The speed
is set to be “low”, “medium” or “high”.
For low speed, each step
distance is a random variable from the uniform distribution [0.533733-0.023267,
0.533733+0.023267];
For medium speed, each
step distance is a random variable from the uniform distribution
[0.80471-0.03929, 0.80471+0.03929];
For high speed, each
step distance is a random variable from the uniform distribution
[1.479862-0.101138, 1.479862+0.101138].
Direction
For each step, the direction will change randomly.
The angle degree is assumed a random variable from the uniform distribution
[-5, +5] degree.
Speed (Low, Medium, High)
Let d be distance to
travel in cm. Data come from Paul’s experiment. Because there are some
differences according to the distance settings for high, medium or low
speeds, we estimate the speed distribution differently.
For Low Speed (cm/s):
If 0<d<=25, speed
distribution uniformly [7.531982-0.232712, 7.531982+0.232712];
If 25<d<=35, speed
distribution uniformly [7.116307-0.112609, 7.116307+0.112609];
If 35<d, speed distribution
uniformly [7.017048-0.244541, 7.017048+0.244541];
For Medium Speed (cm/s):
If 0<d<=25, speed
distribution uniformly [11.14475-0.449563, 11.14475+0.449563];
If 25<d<=35, speed
distribution uniformly [10.7381-0.170991, 10.7381+0.170991];
If 35<d, speed distribution
uniformly [10.31796-0.3487071, 10.31796+0.348707];
For High Speed (cm/s):
If 0<d<=25, speed
distribution uniformly [18.46117-1.367153, 18.46117+1.367153];
If 25<d<=35, speed
distribution uniformly [18.72786-1.008982, 18.72786+1.008982];
If 35<d, speed distribution
uniformly [18.78518-0.538491, 18.78518+0.538491];
(The speed parameter
is not used in the program. The distance is decided as mentioned in Distance
Section, which is closer to the reality than using speed to calculate the
distance.)
Algorithm Interface
The Algorithm Interface offers the basic methods
need to implement while developing the algorithms. They are
public
void setInput(int deviationAngleIn,
double
stepDistance);
public
void run();
public
int getOutput();
The setInput(int
in, double l)method gets input from the vehicle. The integer is
the angle deviation in degree, the double is the step distance. The run()
method implements the algorithm. Here, we assume that the output is the
degrees for the vehicle to turn. It could be negative or positive. The Vehicle
model accepts the output from the Controller
and corrects the direction.
Algorithms
Two simple algorithms
are implemented here as examples. The SimpleAlgorithm
class just uses the deviation of the angle. The algorithm is a P controller,
which try to eliminate the deviation by outputting an opposite angle to
the deviation.
The SimpleAlgorithm2
class uses both the step distance and deviation. The control algorithm
uses the following equations calculate the deviation of the y direction.
If the deviation is bigger than the tolerance, then outputs the controls
in degrees of the angle.
Axis x is the setting direction for the vehicle
to go, and axis y is the deviation.

It
is obvious, (
x2,
y2) and (
x1,
y1)
has the following relation:
where l is the distance moved for this step,
and a
simulates the difference of the current compass reading and the compass
setting.
Observer
Observer
accepts the each step distance and the deviation. The data are written
to the database in D:\DevsCorba_Tao\CorbaGpt\database\sdb, which
has the name of posTable. The data are implication of how well the simulator
is working. The following figure is an illustration of how to deal with
the data. The figure shows the trajectory of the vehicle. The maximum deviation
is less than 0.1 cm, and the vehicle traveled 5.36 cm on the setting direction.
The fluctuation of the trajectory implies the effects of the controller.
The controller uses SimpleAlgorithm
class, which controls over the compass reading only. The simulation data
match well to the experiment data.
DEVS
Model of the system
The DEVS model of the overall system is shown
in the following figure. The input and output ports are specified. The Vehicle
has 4 input ports. Input “speedIn” decides if the speed is “low”, “high”
or “medium. Input “cmdIn” is the setting command for the vehicle, for example,
set the vehicle to “FORWARD 10” is to run the “go straight” program 10
times. Input on/off simulates the power switch. It must be on before the
vehicle can run. Input “controlIn” accepts the controls from the algorithm.
The Vehicle has two
output ports. Output “positionOut” sends the step distance and deviation
angle to Observer;
output “compassOut” sends the same information to Controller.
The Controller
has 1 input port, which is “in”. This port accepts the data for the algorithm.
The Controller has 1 output port “out”, which sends the controls to the Vehicle.
The Observer
has input port “in”. It accepts the data and writes the data to the database.
Experiment Plan for Layer II Models
Motivation
In SPEED-CS project, Layer I Models includes all
the details of the model. The vehicle model consists of irod model, motor
model, processor model, and compass model. The vehicle dynamics comes from
the combined correspondence of these models. In Layer II, the vehicle components
need not be modeled in such detail. From the observer’s point of view,
only the dynamics of the vehicle are of interest. This experiment helps
acquire the input and output relation of the vehicle.
Vehicle Inputs
-
Irod Input
-
Compass
Input
-
Processor
input (programs)
-
Switch Input
(On/Off)
-
Wheel Settings
-
Distance
Settings
Vehicle Outputs
-
Vehicle
distance
-
Vehicle
orientation
-
Speed
Experiment Plan
-
Irod gives
input and vehicle outputs data by either stopping or turning to avoid the
oncoming obstacle. For different
irod inputs, examine the output data of the vehicle, and record the data.
-
Compass
inputs a reference degree setting, after some displacement the compass
gives another reading of present orientation. Then
finally the vehicle will adjust its orientation to realign itself with
the reference degree setting.
For
different compass inputs, examine the output data of the vehicle. Record
the data.
-
Processor
input and vehicle output data
For
different program modules, there are different vehicle behaviors. Record
these data.
-
Integrate
input output data
Integrate
all the inputs and record the data. Conclude these experiment results in
a table. The Layer II vehicle model checks the table according to the inputs
and figures out the corresponding output. The table can be illustrated
as follows:
|
Irod
Input
|
Compass
Input
(Actual/relative)
|
Program
Instruction
|
Distance
Settings
|
Wheel
Settings
|
Output
|
|
No
obstacle
|
4
degrees
|
Go
straight
|
4
|
Left
Wheel 650
Right
Wheel 800
|
Distance:
|
|
Orientation:
|
|
Speed:
|
The irod and compass input is divided into
several ranges. The program has different pieces to perform different tasks.
For different combination of the input, the vehicle’s travel distance and
orientation data will be looked up from the table for the virtual model.
The data range comes from the experiments.
Data Collection Plan
-
Speed Mapping
-
Distance Mapping
-
Orientation Mapping
-
Precision of Distance
-
Precision of Smallest Angles
-
Precision of Speed
Speed Mapping
Input:
Right Wheel
setting and Left Wheel setting.
Note: Times are taken for
those outputs displacements that have a straight heading.Data
will be taken for different Wheel Setting pairs
Output:
Time necessary
to travel several specified distances.
|
Left
Wheel Setting
|
Right
Wheel
Setting
|
Distance
Setting
|
Time(s)
|
Speed
= Dn/Tn
|
|
LWS1
|
RWS1
|
D1
|
T1
|
S1
|
|
D2
|
T2
|
S2
|
|
D3
|
T3
|
S3
|
Distance Mapping
Input:
Distance settings.
Left Wheel
and Right Wheel Settings.
Note: Times are taken for
those outputs displacements that have a straight heading.Data
will be taken for different Distance Settings.
Output:
Actual
resulting distance.
|
Distance
Setting
|
Left
Wheel Setting
|
Right
Wheel Setting
|
Actual
Distance
|
|
DS1
|
680
|
800
|
D1
|
|
D2
|
|
D3
|
|
D4
|
|
D5
|
|
700
|
810
|
D1`
|
|
D2`
|
|
D3`
|
|
D4`
|
|
D5`
|
Orientation Mapping
Input:
Reference
Setting of a certain number.
Initial
angular position.
Final
angular position.
Note:
These data will be collected for different Reference Settings.
Output:
Angular
displacement of car.
|
Reference
Setting
|
Initial
Angular Position
(compass
reading)
|
Final
Angular Position
(compass
reading)
|
Output:Angular
Displacement (FP-IP)
|
|
RS1
|
IP1
|
FP1
|
AP1
|
|
IP2
|
FP2
|
AP2
|
|
IP3
|
FP3
|
AP3
|
|
IP4
|
FP4
|
AP4
|
|
IP5
|
FP5
|
AP5
|
Precision of Distance
Same
as Distance mapping except the unit for the Distance Setting is 1.
Precision of Smallest Angles
Same
as Orientation mapping except the unit for the Reference Setting is 1.
Precision of Speed
Same
as Speed mapping except the unit for the Distance Setting is 1.
*Precision
of speed mapping proved to be unreasonable to pursue.Given
the measuring equipment available in the lab and the precision needed to
accurately measure the times over such short distances the precision will
have to be acquired using distances greater than one unit.