Intelligent Bus Alarm using Nokia N95

Page created by Cathy Curry
 
CONTINUE READING
Intelligent Bus Alarm using Nokia N95
FINAL PROJECT OF AE498MPA, DECEMBER 15, 2007                                                                                           1

                 Intelligent Bus Alarm using Nokia N95
                                         Han-Ul Yoon1 , Cesar Corzo1 , and Kyle Smith2

                                     1 Department   of Electrical and Computer Engineering
                                              2 Department  of Aerospace Engineering
                                           University of Illinois at Urbana–Champaign
                                         e-Mail: {hyoon24, ccorzo2, kjsmith}@uiuc.edu

   Abstract— In this paper, we propose the intelligent bus alarm        in the view of system resource. Needless to say, it gives
using Nokia N95 smart phone. The goal of this project is                numerous information to users, such as time, weather forecast,
to provide a passive application which monitors the status of           stock trade, even a scientific calculator (not just as Window’s
particular bus routes and alerts the user when they should leave
for the bus. First, we created data which contains each bus             accessory. it is perfect one like Texas Instrument new calcu-
schedule from C-U MTD web and MTD booklet. Second, we                   lator). Interestingly, Champaign-Urbana MTD provides a nice
allowed a user to input a specific bus station with a corresponding     widget, named by STOPwatch.WIDGET, which a user can use
stop identification number and time to get the station. Next, if        it with YAHOO widget engine. Figure 1 shows C-U MTD
the time is close to user’s designated departure time, the phone        Stopwatch.WIDGET [1]. If a user gives the stopID of bus
sent a text message to MTD bus control station for required
data retrieving. By information from the data retrieval the phone       stop, which is unique identification code assigned to every bus
estimates the states of bus schedule using Bayes filter, which are      stop, the STOPwatch.WIDGET provides bus number[name]
Delayed, OnTime, and Advanced. Finally, the phone determines            and expected time to get the stop by text and background
departure time and sounds alarm to notify the user to leave.            color. The red presents that a bus will be at the stop within 3
   Index Terms— Intelligent bus alarm, STOPwatch.TEXTMSG,               minutes, the yellow shows that a bus will come within 4∼10
stopID, Bayes filter, N95 smart phone.                                  minutes, and the green means that a bus will take 10 or more
                                                                        minutes to get the designated stop.
                                                                           The shortcomings of widget application are wireless net-
                       I. I NTRODUCTION
                                                                        work accessibility and portability. Let’s assume that a student

T     HE cellphone technology has been advanced dramatically
      for recent 10 years. In early 90’s, the function of cell-
phone was simply to make/receive a call, and to send/receive
                                                                        carries his labtop for widget service while he is walking around
                                                                        campus. Even though the campus area is covered by WiFi
                                                                        nodes 99 % approximately, most of nodes are protected by
text messages, even though it costed a lot. Compared with               NetID and password, or private security WAP codes. One
those aspect, now the cellphone does marvelous things, i.e.,            solution might be a program application which contains a
taking a picture, play mp3 files, and so on. Remarkably, some           method[function] to provide NetID and password automati-
of advanced cellphone can access the Internet via wireless              cally. However, if he lose the labtop or someone looks up the
connection, also perform position tracking using integrated             code of application, his personal information can be misused
GPS.                                                                    unfortunately. For portability, the labtop is still heavy device
   The intelligent system has a broad range of applications.            to carry for a long time even though it is smallest model. In
Not only in academia, but also our real life we can interact            this sense, we propose the intelligent bus alarm application
with some intelligent systems. For example, when you search             which a user can install on the cellphone which is running on
information on the Internet, a search window automatically              Symbian OS. To overcome the problems that were mentioned
complete keyword or URL using Bayes learning, then wait a               above, we use STOPwatch.TEXTMSG, which provides bus
user’s decision. With drive navigation system (even though              information to cellphone user by sending a text message. The
most people agree that it is not intelligent perfectly), we
can drive more safely without concerning about missing a
designated route. Also, the maintenance reminder system in
your car tells you the time to change engine oil or transmission
liquid, and shows alert lamp when it detects problems in the
part of mechanical system. Generally speaking, now we are
living with the intelligent systems.
   Recently, most of computer users now use a Widget as
their personal cyber secretary. Macintosh machine had already
provided the program which is similar to the widget, however
this vogue became more popular with the advent of Microsoft
Window Vista. The strongest aspect of the widget should be
visual attractive and easy to install. It is also a light application   Fig. 1.   Champaign-Urbana MTD STOPwatch.WIDGET.
Intelligent Bus Alarm using Nokia N95
FINAL PROJECT OF AE498MPA, DECEMBER 15, 2007                                                                                                2

retrieved information are all bus number[name] and expected                  • Faculties or students who commute school by C-U MTD
arrival time with given stopID.                                                bus.
   The organization of this paper is as follows. In section 2,               • User’s cellphone must have Symbian OS and Python
the system design is introduced. In detail, a brief discussion of              programmable.
nomenclatures, which are characters and symbols are used in                  • User whose rate plan provides unlimited data service
this paper, and target user group is presented in section 2.A and               ex) unlimited text messages, $15 per month.
2.B respectively. In section 2.C, we show data retrieval and                 • User who easily forget MTD bus schedule, then miss
the programming flow chart to perform the given tasks. The                      an important event.
method to infer the state of specific bus schedule is introduced
in section 3. In section 4, project result is presented. Section
5 will be the conclusion of this paper.
                                                                          C. Data Retrieval and Programming Flow
                        II. S YSTEM D ESIGN
                                                                             Figure 2 shows that how to send a text message to get
   Here, we introduce the system design of this project. First,           a bus schedule data, and what information can be retrieved
we describe the nomenclature of characters and symbols.                   by sending a text message [2]. This process can be done by
Second, we discuss about target user group we are aiming at.              simply typing 35890 in To:, then STOPwatch.TEXTMSG
Last, we explain how to retrieve data, and the flow of program            service will send you data as follows:
for the intelligent bus alarm application.
                                                                             35890: ILLNNNNGNRNGSD - 24
A. Normenclatures                                                            SCAMP N now DUE. 22 ILLINI
   Table I describes nomenclatures which defines the charac-                 S in 02 min. 10 GOLD W in 06
ters and symbols in this paper.                                              min. 24 SCAMP N in 06 min.
                                                                             as of 1:08:38 PM. Other chgs
                                                                             may apply.
                               TABLE I
                           N OMENCLATURES
                                                                          As you may notice that, data retrieving can be done by
 Characters / Symbols                      Definitions                    extracting keywords, such as 22, ILLINI, and 02. Here, we
                                                                          may have a problem: when does phone start to send a text
       stop ID                 a unique identification code that is       message from and what intervals? Therefore, to simply the
                                   assigned to every bus stop
                                                                          task, we restrict a user’s condition as follows:
          xt                      a state of bus schedule at t
                            xt = {Delayed, OnT ime, Advanced}                • User can get the desired stop within 30 minutes
          yt             a observation for bus running by msg data at t        by normal walking.
                                 yt = {slow, normal, f ast}                  • Time delay between send and receive text message is
                                                                               negligible.
        p(D)             a probability of bus schedule will be Delayed
                                        p(xt = Delayed)                      • It takes less than 5 minutes for user to wrap up the
                                                                               things that he/she is doing.
        p(O)             a probability of bus schedule will be OnT ime       • If the user should stop by somewhere before getting
        p(A)             a probability of bus schedule will be Advanced        the bus stop, user can set up the expected time to get
                                                                               there when he/she set up the alarm.
      p(D | s)           a probability of bus schedule will be Delayed       • User do NOT miss the bus on his/her purpose. If the user
                                        given y0 = slow
                                                                               would like to miss the bus, he/she turn off the alarm or
     p(O | s, n)         a probability of bus schedule will be OnT ime
                              given y0 = slow and y1 = normal

    p(A | s, n, f )      a probability of bus schedule will be Advanced
                           given y0 = slow, y1 = normal, y2 = f ast

B. Target User Group
   Our application has some constraints, because send/receive
text message costs a money (it depends on mobile service
provider and rate plan. it costs $0.30 average. Also, the usage
of this applicatoin is restricted at the city of Champaing-
Urbana. Lastly, user’s cellphone runs SymbianOS and pro-
grammable in Python. By these facts, we can determine the
target user group as follows.                                             Fig. 2.   Sending a text message(Left) and obtained data(Right)
FINAL PROJECT OF AE498MPA, DECEMBER 15, 2007                                                                                                                      3

     set it up again.
                                                                                                                          X
                                                                     p(xt | y0 , · · · , yt ) = ηp(yt | xt )                         p(xt | xt−1 )p(xt−1 | y0 , · · · , yt−1 )
Those restrictions make the program flow more clear.
                                                                                                                          xt−1
   Figure 3 depicts the total process of intelligent bus alarm.                                                                                                (1)
Note that no bus can follow its schedule perfectly; thus we          At initial state, we set up the probabilities as follows:
need to estimate the bus schedule as: Will it be possibly
[delayed][on time][advanced]? If yes, then what amount of
                                                                                                 1                               1                     1
time and what probabilities? The approach to handle these                          p(D) =                    p(O) =              3            p(A) =
                                                                                                 3                                                     3
questions will be introduced in the next section.
                                                                               p(s | D) = 0.6 p(s | O) = 0.25                                 p(s | A) = 0.1 (2)
                                                                               p(n | D) = 0.3 p(n | O) = 0.5                                  p(n | A) = 0.3
                         User Input
              stopID, Expected time to get the
                                                                               p(f | D) = 0.1 p(f | O) = 0.25                                 p(f | A) = 0.6
              stop

                                                                        For “the bus is running slow”, we can determine the speed of
                                                                     a bus running by the retrieved data from text message. Figure
                                                                     4 show how we can determine the bus is running slowly. If a
                             Timer                                   bus arrived should at the Illini Union 10:10, however the bus
                  Check the current time                             should have been at the Illini Union 10:00, we say “the bus is
                                                                     running slowly.” We also set up ±3 minutes interval for the
                                                                     normal running.
                                                                        The state transition probability is presented in Fig. 5. If
                                                                     the schedule is OnT ime now, it is reasonable to assume that
                          current time                               a bus will able to be Delayed or Advanced with probability
                          bus time < 45?
                                                     No              0.2, and still remains OnT ime with probability 0.6. Also,
                                                                     Delayed to Advanced and Advanced to Delayed should
                                                                     occur rarely, we assign 0.1 respectively.
                                 Yes

                     Bus Schedule Estimator
              Start to estimate bus schedule
                                                                                         slow                 normal                            fast

                                                                                         10:10       10:03     10:00                 09:57
                          Should user                                                                      Bus should have been at the Illini Union
                          leave now?
                                                     No                                   Bus is at the Illini Union now

                                 Yes                                 Fig. 4.    Determine bus running speed y from text message data.

                         Sound Alarm
                                                                                                                    0.6

Fig. 3.   Intelligent bus alarm programming flow diagram.                                                      OnTime

                                                                                                     0.2                                0.2

                                                                                                              0.4          0.4
     III. BAYES F ILTER AS B US S CHEDULE E STIMATOR                                                                0.1
                                                                                           Delayed                                       Advanced
   Bayes filter should be a good approach to estimate a state
                                                                                                                    0.1
of bus schedule. The reason is that Bayes filter allows us
to derive the posterior probability, p(xt | y0 , · · · , yt ) with                 0.5                                                                 0.5
a state transition probability and prior probability, p(xt−1 |
y0 , · · · , yt−1 ) by its recursive relationship [3][4].            Fig. 5. The state transition probability among Delayed, OnT ime, and
   For discrete state estimation, the well-known Bayes filter        Advanced.
equation is
FINAL PROJECT OF AE498MPA, DECEMBER 15, 2007                                                                                        4

  Let’s assume that we have already received 3-messages from                     Cesar Corzo is a senior in the department of
MTD service. Then we can determine the current state of a                        electrical and computer engineering of University
                                                                                 of Illinois at Urbana–Champaign. Cesar’s research
specific bus schedule as the result of Table II.                                 interest are: insect locomotion, robotics, and embed-
                                                                                 ded systems.
                          IV. C ONCLUSION
   In this paper, we proposed that intelligent bus alarm for
faculties and students who commute by Champaign-Urbana
MTD bus. We collected and arranged data from MTD web and
guide booklet. To estimates the state of schedule, we applied
Bayes filter under the pre-determined state probability, and
showed the result of estimated probabilities of bus schedule                     Kyle Smith is a senior in the department of
with assuming 3-text message observation.                                        aerospace engineering of University of Illinois at
   To complete the application, we should figure out bugs                        Urbana–Champaign. Kyle is interested with aero-
                                                                                 dynamics, planning algorithm, application program-
in Python code, especially data processing with a calender                       ming in Python.. He is also doing his minor in
module. Data retrieval from a text message was not easy part,                    mathematics department.
more works should be done to clear it. Also, installing an
identified application is really dangerous. It will crash Symbian
OS, so you may have no choice but the hard reset of your
phone. To display the result on desktop side, we tried to use
gnuBOX, which we had expected to help us for Bluetooth
connection. However, we found that gnuBOX did not work
with N95. This information was nowhere, so every student
developer or professional developer should not use it with
N95. Finally, further works should be done to complete the
project.

                        ACKNOWLEDGMENT
   We team Smith greatly thank to Prof. Tim Bretl for giving us
precious teaching and encouraging us to fight with numerous
developing skills of Nokia N95. Also, it was our honor to work
as team smith and took the 1st and 2nd place in the first and
the second class competition. We will never allow ourselves to
forget AE498MPA in Fall 2007 at Urbana-Champaign, sweat
and enthusiasm, and outstanding classmates.

                             R EFERENCES
[1] STOPwatchWIDGET. How to use STOPwatch.WIDGET. [Online]. Avail-
    able at http://www.cumtd.com/stopwatch/Widget.aspx.
[2] STOPwatchTEXTMSG. How to use it. [Online] Available at
    http://www.cumtd.com/stopwatch/ShortMsgService.aspx.
[3] S. Thrun, W. Burgard, and D. Fox, Probabilistic Robotics, MIT Press,
    2005.
[4] H. Choset, K. Lynch, S. Hutchinson, G. Kantor, W. Burgard, L. Kavaraki,
    and S. Thrun, Principle of Robot Motion, MIT press, 2005.

                        Han-Ul Yoon is the 2nd year graduate student in the
                        department of electrical and computer engineering
                        of University of Illinois at Urbana–Champaign. Han
                        is currently pursuing his Ph.D. degree with Prof.
                        Seth Hutchinson. His research interest are: artificial
                        intelligence, robot motion planning, and machine
                        learning.
FINAL PROJECT OF AE498MPA, DECEMBER 15, 2007                                 5

                                   TABLE II
          p(xt | y0 , y1 , y2 ) WITH RESPECT TO 3- OBSERVATIONS

  p(D|s, s, s)   0.629    Delayed     p(D|n, n, f )    0.079
  p(O|s, s, s)   0.328                p(O|n, n, f )    0.445
  p(A|s, s, s)   0.043                p(A|n, n, f )    0.476      Advanced

 p(D|s, s, n)    0.286                 p(D|n, f, s)    0.404
 p(O|s, s, n)    0.596    OnTime       p(O|n, f, s)    0.467      OnTime
 p(A|s, s, n)    0.118                 p(A|n, f, s)    0.129

 p(D|s, s, f )   0.152                 p(D|n, f, n)    0.133
 p(O|s, s, f )   0.473    OnTime       p(O|n, f, n)    0.613      OnTime
 p(A|s, s, f )   0.375                 p(A|n, f, n)    0.254

 p(D|s, n, s)    0.512    Delayed      p(D|n, f, f )   0.052
 p(O|s, n, s)    0.419                 p(O|n, f, f )   0.357
 p(A|s, n, s)    0.069                 p(A|n, f, f )   0.592      Advanced

 p(D|s, n, n)    0.197                 p(D|f, s, s)    0.563      Delayed
 p(O|s, n, n)    0.645    OnTime       p(O|f, s, s)    0.376
 p(A|s, n, n)    0.158                 p(A|f, s, s)    0.061

 p(D|s, n, f )   0.093                 p(D|f, s, n)    0.232
 p(O|s, n, f )   0.457    OnTime       p(O|f, s, n)    0.618      OnTime
 p(A|s, n, f )   0.449                 p(A|f, s, n)    0.150

 p(D|s, f, s)    0.438                 p(D|f, s, f )   0.112
 p(O|s, f, s)    0.450    OnTime       p(O|f, s, f )   0.450      OnTime
 p(A|s, f, s)    0.112                 p(A|f, s, f )   0.438

 p(D|s, f, n)    0.150                 p(D|f, n, s)    0.449
 p(O|s, f, n)    0.618    OnTime       p(O|f, n, s)    0.457      OnTime
 p(A|s, f, n)    0.232                 p(A|f, n, s)    0.093

 p(D|s, f, f )   0.061                 p(D|f, n, n)    0.158
 p(O|s, f, f )   0.376                 p(O|f, n, n)    0.645      OnTime
 p(A|s, f, f )   0.563    Advanced     p(A|f, n, n)    0.197

 p(D|n, s, s)    0.592    Delayed      p(D|f, n, f )   0.069
 p(O|n, s, s)    0.357                 p(O|f, n, f )   0.419
 p(A|n, s, s)    0.052                 p(A|f, n, f )   0.512      Advanced

 p(D|n, s, n)    0.254                 p(D|f, f, s)    0.375
 p(O|n, s, n)    0.613    OnTime       p(O|f, f, s)    0.473      OnTime
 p(A|n, s, n)    0.133                 p(A|f, f, s)    0.152

 p(D|n, s, f )   0.129                 p(D|f, f, n)    0.118
 p(O|n, s, f )   0.467    OnTime       p(O|f, f, n)    0.596      OnTime
 p(A|n, s, f )   0.404                 p(A|f, f, n)    0.286

 p(D|n, n, s)    0.476    Delayed      p(D|f, f, f )   0.043
 p(O|n, n, s)    0.445                 p(O|f, f, f )   0.328
 p(A|n, n, s)    0.079                 p(A|f, f, f )   0.629      Advanced

 p(D|n, n, n)    0.174
 p(O|n, n, n)    0.652    OnTime
 p(A|n, n, n)    0.174
You can also read