Düşük maliyetli ve kaynakları verimli kullanabilen sürekli öğrenebilen akıllı cihaz çekirdeği
Low-cost and resource-aware intelligent device: A core of thing
Yazar: ONUR AKDEMİR
Danışman: DOÇ. DR. DENİZ TURGAY ALTILAR
İstanbul Teknik Üniversitesi / Bilişim Enstitüsü / Bilgisayar Bilimleri Ana Bilim Dalı
Derece: Yüksek Lisans, 2014
Konu: Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrol = Computer Engineering and Computer Science and Control

Özet:
Günümüzdeki teknolojik gelişmeler, yüksek işlem yapma gücüne sahip ve ucuz bilgisayarların geliştirilmesine olanak sağlamaktadır. Çok düşük enerji ihtiyacı olan bu ucuz bilgisayarlar gelecekte insanların yerini alabilecek düzeye gelecektir. "İnsanİnsan" etkileşimli sistemler yerine "İnsan-Cihaz" ve hatta "Cihaz-Cihaz" etkileşimli sistemler eliştirilmesine olanak sağlanabilecektir. Bu çalışma, orman yangınlarının oluşmasını önlemek için, orman yangınları oluşmadan otonom bir şekilde karar alabilen bir cihazın merkez bir istasyondaki görevlileri uyarması ve merkez istasyondaki görevlilerin karar hakkındaki olumlu-olumsuz sonuçları cihaza göndermesi ile sürekli öğrenebilen örnek bir cihazın geliştirilemesi üzerine planlanmıştır. Ayrıca bu tez kapsamında cihazlardan bilgi bekleyen bir merkez
istasyon yazılımı geliştirilmiştir. Bu tez kapsamında çok düşük enerji ihtiyacı olan TI
LM4F120H5QR mikroişlemcisi, Texas Instruments firmasının geliştirdiği LM4F120XL geliştirme kartı yardımıyla kullanılmıştır. Bu geliştirme kartı üzerinde bulunan USB ve UART arayüzleri ile dış ortamla iletişim sağlanmıştır. Orman yangınları ile ilgili veri seti (http://archive.ics.uci.edu/ml/datasets/Forest+Fires) ve dış ortamdan alınan veriler k-means algoritması kullanılarak yangın tehlikesi olup olmadığı kararını alır, bu karar yangın tehlikesi olması durumunda Merkez istasyona bildirilir. K-means algoritmasının kullandığı veri cihazdaki düşük bellek kapasitesi sebebiyle, Flash bellek üzerinde saklanmıştır. Yeni eklenecek tüm verilerde yine Flash bellek üzerine yazılacaktır. Deneyimler sonucunda Flash bellek hızının bu algoritmaların çalışması için yeterli olduğu görülmüştür.
Bu cihazda FREERTOS işletim sistemi, işlemlerin doğru ve zamanında çalışmasını sağlamıştır. FREERTOS işletim sisteminin sunduğu ancak bu cihazda çalışmayan özellikler yine bu tez kapsamında gerçeklenmiştir. Üzerinde bir işletim sistemi bulunan bu cihaz gelecekte geliştirilebilecek sistemler içinde bir altyapı oluşturmaktadır. Yeni bir görevin eklenmesi ile cihaz daha farklı görevleri yerine getirebilecektir. K-means algoritması için kullanılan yöntemler göz önünde bulundurularak geliştirilecek yeni algoritmalar sayesinde, sadece pil veya güneş enerji panelleri yardımıyla uzun yıllar çalıştırılabilicek ve insanların ulaşmasının zor ve gereksiz olduğu durumlarda, insanların yerini alabilecek cihazlar geliştirilebilecektir.
Tez kapsamınmda geliştirilen sistemin var olan fiziksel belleğin sadece %30'unu ve flash belleğin sadece %10 luk kısmını kullandığı görülmüştür. Sadece orman yangınları değil, vahşi doğa takibi, nükleer enerji tehlikelerinin önceden sezilmesi gibi birçok uygulama için kapasitesi olan bu cihaz, gelecekte bir çok alanda kullanılabilecektir.

Abstract:
Today's technological advances allows the development of inexpensive and high power computers. These cheap computers which have very low energy consumption will make decisions for people in the future. Instead of "Human - Human " interactive systems "Human - device " and even " device - device " interactive systems will be available. This study shows how to prevent forest fires from occurring in an autonomous way that device gives decisions without the need for a central station. Device alerts the staff of the central station who gives feedback as positive or negative after taking some actions on alert. These feedbacks help the device to improve decision making capability. Also within the scope of this thesis, a central station waiting for information from the device software has been developed.
In this thesis, TI Stellaris LM4F120H5Q microprocessor which developed by Texax Instruments with very low energy requirements is used. Development of a hardware platfrom was out of scope, so EK-LM4F120XL development board was choosen for platfrom. USB and UART interfaces, which are located on the development board allow communication with external environment. Forest fires related data set (http://archive.ics.uci.edu/ml/datasets/forest+fires ) and the data received from the external environment processed with a modified k-means algorithm. After processing decision whether or not a fire hazard given, if a fire hazard exists, just this hazardous decision is sent to central station. The data which is processed by K-means algorithm is stored on flash memory due to low memory capacity. All data which is a new observation will be added again in Flash memory. The speed of Flash memory has been found to be sufficient to run K-means algorithm. FreeRTOS operating system
on this device has provided accurate and timely work. This core, which is based on an operating system constitutes an infrastructure which can be used to develop devices in the future. New task addition is very simple with the help of RTOS which makes device able to fulfill different tasks . A new k-means algorithm developed which use efficient RAM and  Flash memory, is able to run for many years using battery or solar panels. 
Thesis scope of the system developed in only 30% of the available physical memory and Flash memory uses just 10% of this was seen. Not only forest fires, wildlife tracking, foreseeable hazards such as nuclear energy capacity, which for many applications , this device would be used in many areas in the future. The IoT is the concept of networking real-world objects and is regarded as the next logical generation of the Internet. It is predicted that hundred billion devices to be connected in near future, so research on both hardware and connection methods are so popular. These connected devices need some behaviour to act as useful ends. Many challenges must be faced to make this devices intelligent. Low resources and limited energy that is supplied by small capacity batteries contradict with off-the-shelf learning algorithms. Algorithms for IoT must be implemented without vasting of any resource. IoT cover all digital devices that can connect to internet and interact with humans. This communication can be between a human and IoT or IoT-IoT. IoT enables collective intelligence which eliminates human factor for decision making on multiple sensors. IoT devices give final decision and just result is sent to humans. Collective
intelligence is not possible without intelligent IoT. It is obvious that management of
this devices could be impossible for humans in near future when IPv6 enabled. Some
intelligence can help both for management effort and automating the system. Artifial Intelligence software is an active research for several decades. Very useful libraries that implemented several AI and pattern recognition algorithms have widespread usage. Weka, matlab toolbox and other small scale libraries exist. Main disadvantage of these libraries is that they are too big for a device which has lowresources. Besides this, resource-aware intelligent software development must be done carefully to allow space for other tasks. Intelligent algorithms are based on the prior knowledge on specific topics. Starting with a known data on a special topic and further create new knowledge or extract knowledge from this data can be implemented with pattern recognition techniques. It is obvious that making machines as smart as humans not possible. So simulating human behaviour is the only way to
think like a human. Alan Turing's proposal that the question " Can machine think?" can be replaced with the question "Can machines do what we (as thinking entities) can do?". This idea lead us to learning algorithms which starts with a prior knowledge and predicts some rules from new observations with the help of this prior knowledge. Learning from scratch for machines need special efforts. An IoT without prior knowledge has to built some base knowledge with the help of observations that are collected from sensors. Some trust level must be determined until that IoT could make trusted decisions. It maybe impossible for some knowledge to find a sutiable trust level , some decisions must be done on this subject. Beacuse of open issues exist about learning from scratch, in this paper this method ignored. Proposed solution uses k-means algorithm which is a machine learning technique. Machine learning, a branch of articial intelligence, concerns the construction and study of systems that can learn from data. More formal definition: "A computer program is said to learn from expericence E with respect to some class of tasks T and performans measure P, if its performance at tasks in T, as measured by P, improves with experience E". Our model applies for situations where decisions limited to discrete number of status. Yes/No like situations with apropriate data provided prior to run, easily predicted by FILID. Learning evolves with the help of Center which could be run by a Human. Therefore, human intuition factor somehow added to FILID. FILID runs on predefined intervals and executes decision task. This task normally just checks data which come from sensors on that FILID. Decision task works without any intervention from another human or any other computer. Fully automated decision's results send to Center only if there exists an alarm situation. Communication needs lowered by this design so energy consumption. Self-living
FILID core decisions based on prior data. Prior data and sensors identify the new FILID thing and task. Alarm status that is sent to Center needs some feedback for continous learning. A human whose job is to monitor Center, feedback to alarms so learning evolves. Same alarm stuation may sent to Center more than one which is not an error but feedback for the alarm must be provided at least one by Center. With the help of feedback result and decision that created the alarm situation, new observation added to knowledge base. After that learning phase followed by normal run which listens environment and checks environment to give new decisions.
Future devices seem to have limited cpu power, low capacity storage and expected to be long-life, so new designs must be proposed. In this paper , it is shown that machine can learn new observations from experiments on low power devices. Human interaction is needed for this devices, but in near future machine teaching to machine concept seems possible. Some improvements on communication technology, and embedded programming techniques also required. Smart watches,intelligent home systems, intelligent shopping machines are some examples of our future.