Bit Mining Project

Topics of Concern          Bit Mining System Setup
         Description of the Dynamic Package
 
 
 
 
 
 
 
 
 
 
 
 
 

Communication:
 

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.
Text Box:  Figure 1 Bit Mining SystemThe 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.44956311.14475+0.449563];
If 25<d<=35, speed distribution uniformly [10.7381-0.17099110.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.36715318.46117+1.367153];
If 25<d<=35, speed distribution uniformly [18.72786-1.00898218.72786+1.008982];
If 35<d, speed distribution uniformly [18.78518-0.53849118.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.
Text Box: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.

Text Box: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.
Text Box:

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Sensors:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Controls:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Simulation:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Relay Stations:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Trucks:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Aisles:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Experiments:
 

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

Vehicle Outputs

Experiment Plan

For different compass inputs, examine the output data of the vehicle. Record the data.
For different program modules, there are different vehicle behaviors. Record these 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 
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

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.

 
 
 
 
 
 
 
 
 
 
 

Results:
 
 



Distance and Deviation mapping
speed: fast
wheel settings: LW: 600
RW: 900
Wheel base: 9.2 cm
Wheel base/2: 4.6cm
Num loops Delta X distance(cm) Delta Y distance(cm)
25 39.15 0.1
25 39.1 0.1
25 39.1 0.3
25 38.9 0.1
25 38.9 0.1
avg: 39.03 0.14
range: 38.9--> 39.15  .1--> .3 
50 75 0.1
50 74.8 2
50 74.7 0.5
50 74.6 1.4
50 74.5 1
avg: 74.72 1
range: 74.5--> 75 .1--> 2.0
65 97.4 2.65
65 97.2 1.7
65 96.8 0.1
65 96.7 1.7
65 96.8 0.5
avg: 96.98 1.33
range: 96.7--> 97.4  .1--> 2.65 
45 67.5 0.4
45 67.6 0.2
45 67.4 0
45 67.3 0
45 67.1 1
avg: 67.38 0.32
range: 67.1--> 67.6  0--> 1 
15 24 0.1
15 24 0.2
15 24 0.1
15 24 0.1
15 23.9 0.2
avg: 23.98 0.14
range: 23.9 --> 24  .1--> .2 
Distance and Deviation mapping
speed: medium
wheel settings: LW: 721
RW: 778
Wheel base: 9.2 cm
Wheel base/2: 4.6cm
Num loops Delta X distance(cm) Delta Y distance(cm)
25 23.8 0
25 24 0.1
25 23.9 0
25 23.9 0.3
25 23.8 0.1
avg: 23.9 0.1
range: 23.8 --> 24  0--> .3 
85 79.7 1.03
85 79.6 0.83
85 79.5 1
85 75.5 1.8
85 79.5 0.9
avg: 78.575 1.165
range: 75.5 --> 79.7  .83-->1.8
70 65.5 1.9
70 65.2 1.8
70 65.1 1.3
70 65.65 0.9
70 65.4 1.8
avg: 65.3625 1.475
range: 65.1 --> 65.65  0.9--> 1.9
100 92.8 2.5
100 92.8 0.8
100 92.75 1.45
100 92.6 1.9
100 92.5 1.7
avg: 92.7375 1.6625
range: 92.5 --> 92.8  .8 --> 2.5 
50 47.2 0.4
50 47.1 0.4
50 47 0.5
50 47.3 1.1
50 46.95 0.8
avg: 47.15 0.6
range: 47.1 --> 47.3  .4-->1.1 
note** 
The wheel settings changed from the original settings of the first run of experiments.
Original settings failed to produce a straight enough path for the car.
Distance and Deviation mapping
speed: slow
wheel settings: LW: 767
RW: 730
Wheel base: 9.6
Wheel base/2: 4.8
Num loops Delta X distance(cm) Delta Y distance(cm)
25 15.5 0.4
25 15.2 0.4
25 15.2 0.3
25 15.2 0.05
25 14.85 0.3
avg: 15.275 0.2875
range: 14.85 --> 15.5  .05-->.4 
85 50.5 2
85 51.15 0.7
85 49.8 1.3
85 49.83 1.4
85 49.4 1.95
avg: 50.32 1.35
range: 49.4 --> 51.15  .7--> 2 
70 41.2 1.1
70 41.2 1.1
70 41.1 1
70 41.19 1.1
70 41.1 1.05
avg: 41.1725 1.075
range: 41.1 --> 41.2  1-->1.1 
100 58.65 1.55
100 58.65 0.85
100 58.3 1.2
100 58.5 1.05
100 58.5 1.8
avg: 58.525 1.1625
range: 58.3 --> 58.65  .85--> 1.8 
50 30.6 1
50 30.3 0.8
50 30.3 0.8
50 30.2 0.85
50 26.5 1
avg: 30.35 0.8625
range: 26.5 --> 30.6  .08--> 1 
note** 
The wheel settings changed from the original settings of the first run of experiments.
Original settings failed to produce a straight enough path for the car.

 
 

 


SPEED MAPPING
Truck set to slow speed
Num Loops:     Times(s)     Total time Avg time Speed
  t1 t2 t3 t4 t5      
20 2.63 2.63 2.74 2.64 2.64 13.28 2.656 7.53012
         
30 4.22 4.15 4.26 4.24 4.21 21.08 4.216 7.11575
         
40 5.65 5.67 5.86 5.75 5.58 28.51 5.702 7.015082
avg spd cm/s
21.66095 7.220317478
Truck set to medium speed
Num Loops:     Times(s)     Total time Avg time Speed
  t1 t2 t3 t4 t5      
20 1.87 1.74 1.8 1.74 1.83 8.98 1.796 11.13586
         
30 2.79 2.8 2.75 2.81 2.82 13.97 2.794 10.73729
         
40 3.75 3.88 3.9 3.9 3.96 19.39 3.878 10.3146
avg spd cm/s
32.18775 10.72924894
Truck set to fast speed
Num Loops:     Times(s)     Total time Avg time Speed
  t1 t2 t3 t4 t5      
20 1.05 1.17 1.03 1.13 1.05 5.43 1.086 18.41621
         
30 1.52 1.64 1.6 1.69 1.57 8.02 1.604 18.70324
         
40 2.17 2.12 2.12 2.07 2.17 10.65 2.13 18.77934
avg spd cm/s
55.89879