#Project Vlog
#A Brief Introduction and Description of Project Design
The midterm project achieved the imitation of birds seasonal immigration behavior. It contains three parts in detail: to tell the destination, set it as a target and move towards it; to handle emergence during the forwarding, especially, avoiding barriers when flying (which means on cannot move backwards); and to simulate how the brain status on birds will effect its ability to tell location and avoiding the barriers.
For the hardware, after research, we found birds sense the destination mainly through the earth’s magnet field. Thus, the robot can use the magnet sensor on Microbit for simulation. It also uses the supersonic sensor to detect the barriers, as well as the infrared sensor to tell whether it arrives the destination.
For the algorithm part, a statistical algorithm contains normal analysis is mainly used for the magnet field sense part. The Braitenberg model is suitable for the barrier avoiding part. As for the brain effect, we built a computation model after studying the relevant paper and our result matched the result in organisms studied in the paper.
#Process of Research, Coding and Revision
The paper by Mbaeyi P.N. revealed the mechanics of how birds navigate the destination for migration, that is, by sensing the magnet field.
However, in our first implementation we simply set a threshold, e.g. +- 30 degrees away from the north, and let our robot read the output of magnet, if the output is not in the range of out threshold, it will calibrate its direction.
Although theoretically it should work, in real situation, the direction it moves often showed great error to the north, and it moved in a unstable zigzagging behavior. We analyzed it and discovered the reason: firstly, the magnet sensor itself has error from -10 – + 10 degrees, and a tiny different in degree will cause a huge difference in destination; secondly, we let the robot make decisions based on every output, thus, because of the error, the robot cannot find the accurate direction the more it directs to the north, and its decision cannot maintain for even one second; thirdly, as the motors have a reaction delay, (which mean it often moving in its original direction for a while after receiving an command to turn), thus the robot zigzagged and could not go directly to the north.
To solve this problem, we designed and statistical model: the robot will take 100 samples of magnet output, which is the degree difference between the robot moving direction and the north. By statics it will form a approximate normal distribution with the mean relatively equals to the real difference and a standard deviation related to the hardware error of the sensor.
Then we wanted to find a n% confidence interval for the distribution, after various test, we find the robot is most stable and accurate when n is about 30.
The robot will take 100 samples each time it need to make decisions (every time a while loop is iterated), then calculate whether the direction of north is within the confidence interval, if so it mean the robot is going approximately North and the robot will move forward, otherwise it will do the calibration of direction.
This algorithm solves the three problems mentioned above at the same time: it reduced the error by using statics; reduced the instable decision making frequency; and although the motor delay still exists, on field tests showed it doesn’t affect much on the navigation anymore.
A distribution with confidence interval 95%
A formula of confidence interval
The barrier avoiding part is quite innovative. The conventional way is to make a robot withdraw a little then turn some angle, however two main reasons prevented us from using that. 1. a bird cannot flying backward; 2. it is not efficient when a bird encounter a long obstacle, e.g. a plane. Although Jacky has not learned coding before, most of this part was done by him.
The last part is to simulate how different brain states influence the accuracy of the bird’s ability to sense directions. After researching on the paper, we discovered that when a bird is in an intensive emotional state, the ion channels controlling the inflow and outflow of sodium ion, potassium ion and chlorine ion will be unstable. It then will cause the instability of the electrical pulse between nerve cells. Thus, we decided that we could quantify the brain state from 0 – 100, then match them each to a confidence interval of n%. It will then impact the accuracy of sensing.
#Reflection
The whole midterm project is a big challenge but in general very successful. During the process we have to be both innovative, such as making new mathematical model, and down to earth such as trying different arguments for the better performance of the motors. There are still the possibility to make improvement. For example, we didn’t have time to make the following mode birds.
#Reference
Whybrow P.C., Akiskal H.S., McKinney W.T. (1984) The Neurobiological Foundations of Behavior: Environmental Challenge and Response. In: Mood Disorders. Critical Issues in Psychiatry. Springer, Boston, MA
https://link.springer.com/chapter/10.1007/978-1-4613-2729-5_6#citeas
Mbaeyi P.N. (1984) Migratory Birds: Path-Finding Using Madar? (Magnetic Detection and Ranging). In: Varjú D., Schnitzler HU. (eds) Localization and Orientation in Biology and Engineering. Proceedings in Life Sciences. Springer, Berlin, Heidelberg
https://link.springer.com/chapter/10.1007/978-3-642-69308-3_63#citeas
Microbit Documentation
https://makecode.microbit.org/docs