applied research project (arp) gsm application - nti · · 2013-03-08applied research project...
TRANSCRIPT
Applied Research Project (ARP)GSM Application
24 months
Start: 1 /2/2012
Report 2: From 1 /8/2012 to 31/1/2013
Introduction
TMUA will be designed to interconnect public transport vehicles andbus stations to “Central Room” to monitor the vehicles & traffic status.
Based on the collected data and via analyzing road condition, arrivaltimes will be computed and transmitted to all relevant stations.
Waiting time for the next bus(s) to arrive will be displayed on screensto commuters on the bus station.
Passengers in buses will be notified of the next bus stop using visual &audio announcements.
Achieving these main features will cause major improvement in publictransport convenience and safety.
2
Accomplished Task Belongs to Phase Q1-Y1 Q2-Y1 Q3-Y1 Q4-Y1 Q1-Y2 Q2-Y2 Q3-Y2 Q4-Y2
Ph
ase 1
M
ileston
e
Project Plan Review Planning Phase √
Requirement Gathering Analysis Phase v
Study the amount of data to be transmitted Analysis Phase √
Study different Testing Scenarios Analysis Phase √
Study the GPRS data Capacity Analysis Phase √
Study the high level SW algorithm Analysis Phase v
Gantt Chart (Report 1)
3
Accomplished Task Belongs to Phase Q1-Y1 Q2-Y1 Q3-Y1 Q4-Y1 Q1-Y2 Q2-Y2 Q3-Y2 Q4-Y2
Ph
ase 2
Milesto
ne
Study the authentication methods Analysis Phase√
Study the encryption methods Analysis Phase√
Study the standard CAN bus protocol Analysis Phase√
Study the calculation algorithm of the bus arrival time Analysis Phase√
Select the appropriate Displays Analysis Phase√
Study the Network Security Analysis Phase√
Components, Equipments and Computers Purchasing Phase
Software Purchasing Phase x
GPRS Data Enhancement Design Phase√
GPS Integration with the system Design Phase√
Communication protocol design Design Phase√
Authentication method selection Design Phase√
High level software design Design Phase√
Gantt Chart (cont.) (Report 1)
4
Phase 3 Milestone
Kits , components, Lab materials Purchasing phase √
Encryption method selection Design Phase √
Communication Interface Design Phase √
Enclosure Design Design Phase √
Bus Control Unit Design Phase √
Final PCB Design Design Phase √
Audio player design Design Phase √
Power Amplifier Design Phase √
Data Base Structure Design Design Phase √
Calculation algorithm of the bus arrival time Design Phase √
Communication protocol implementationImplementation Phase √
Authentication method implementationImplementation Phase √
Encryption method implementationImplementation Phase √
Enclosure prototype implementationImplementation Phase √
Gantt Chart (cont.) (Report 2)
5
Phase 4 Milestone
Components Purchasing phase √
CAN bus protocolImplementation Phase √
Implementation for central point software
Implementation Phase √
Processing engine implementationImplementation Phase √
Portal Implementation (Software)Implementation Phase √
Data Base ImplementationImplementation Phase √
Audio Player for prerecorded audioImplementation Phase √
Power amplifierImplementation Phase √
Communication Protocol Verification Lab Testing Phase √
Calculation algorithm of the bus arrival time Lab Testing Phase √
Unit Testing Lab Testing Phase √
Gantt Chart (cont.) (Report 2)
6
Phase 5 Milestone
Software Testing Field Testing Phase
System Testing Field Testing Phase
Security Testing Field Testing Phase
Redo work Testing Phase
Phase 6 Milestone
Preparation of the production files Finalization Phase
Phase 7 Milestone
Final PCB Fabrication Finalization Phase
Enclosure Fabrication Finalization Phase
Phase 8 Milestone
Product Documentation Finalization Phase
Release Documents Finalization Phase
Brochures Finalization Phase
Gantt Chart (cont.) (Field Test)
7
Project main structure
8
Main Outlines
System Network
System Software
System Hardware
System Installation and lab testing
9
10
Communication Protocols and Frame Structure
TCP/IP run over GPRS mobile operator network
Transmitted frames to/from the server and bus/bus-stops categories:
1- Frames between Buses and Server:
Bus registration frame
Bus Route Frame
Bus periodic frame
2- Frames between Server and Stations:
Station registration frame
Arrival time prediction frame
11
1- Frames between Buses and Server:
12
Frames between Server and Stations:
13
Bus/Station Identification
In the designed system all busses/stations are defined in the server database though the admin GUI using the IMEI of the GSM module installed in each bus/station.
The IMEI is the unique GSM serial code that can be extracted through AT commands via GSM module controller.
IMEI is typed by the manufacturer on the GSM module and can be used as the in-bus/station unit serial number.
This proposed method gives ease for remote and flexible control and management of all busses/stations in the designed system.
All buses in the designed system remotely load and save the route stations data.
14
Network Traffic Analysis
The network traffic is estimated mainly as a result of two frames:
1-The bus periodic frame (from bus to sever).
2-The arrival time prediction frame (from server to station). The overall rate of this type (2) of frame is too small to be considered and to cause heavy traffic on network
1-The bus periodic frame
= 20 bytes
91 bytes (Table 1-1)
20 bytes
132 byte
15
Expected Received Traffic
16
0.0
200.0
400.0
600.0
800.0
1000.0
1200.0
0 50 100 150 200
To
tal
Tra
ffic
Tra
nsm
itte
d f
rom
on
e
bu
s (b
ps)
Duration between IP packet transmission (sec)
•Average IP traffic transmitted from one
bus vs. duration between IP packets
transmission
0
1000
2000
3000
4000
5000
6000
1 10 100 1000 10000
To
tal
Tra
ffic
re
ceiv
ed
fro
m t
he
bu
ses
(kb
ps)
Number of Buses
•Totaltrafficreceivedatthe“Central
Room”servervs.numberofbuses
Design and implementation of AES
The AES is designed, implemented and simulated using hardware and software
The hardware design has taken different considerations into account:
1. Compact design based on saving the memory resources.
2. Code based design to save hardware resources.
3. Adaptable AES algorithm which includes all available block sizes (256, 192, and 128).
17
Overall Network Considerations1. Comparison between different available transport protocols (UDP and TCP) was
done:
In the designed system the TCP protocol was selected to be able to establish a reliable connection
2. Comparison between different available methods for sending to the server address (IP and URL):
In the designed system a fixed IP address was used to be able to host the data in the network or even to map this fixed IP address to URL.
3. Selecting the proper connection at the initial bus stations or at the final bus stations (GPRS with server side security or GPRS with VPN connection):
In the designed network the GPRS with server side security was selected to be able to work through different scenarios (i.e. with or without ADSL).
18
19
Database structure design
Database is designed using MySQL
Database structure:1. Buses Table: contains the data about the buses.
2. Routes Table: contains the data about the routes.
3. Station Table: contains the data about the stations such as station lattitude, station longitude, station IMIE, station audio code…etc.
4. Gps Packet Table: contains the data about received packets such as: packet sequence, packet lattitude, packet longitude…etc.
5. Route_Station Table data dictionary: Represent the relation between the routes and stations in the system
6. Kalman_data Table: contains the data that are needed to make kalman calculations.
7. Neural_output Table: contains the neural rules.
8. Users Table data dictionary: contains the username and passwords for each user
20
Database design
21
Bus arrival time calculation algorithm
Two models are suggested for bus arrival time prediction:
Machine Learning technique (ANN) for off line estimationusing previously collected data from traffic database.
Model- based approach (Kalman filter) for online calculations in case of wide deviation between offline estimation and real time data (special cases).
22
Flowchart of the proposed algorithm
23
The implemented Neural Network
24
Kalman filter
25
• A modified Kalman Filter algorithm is used in the current project
0
5
10
15
20
25
30
35
S0-S1 S0-S2 S0-S3 S0-S4 S0-S5
Sunday
Kalman
Real
0
10
20
30
40
50
S0-S1 S0-S2 S0-S3S0-S4S0-S5
Wednseday
Kalman
Real
Comparison between the actual, ANN, and KF results
26
0
5
10
15
20
25
30
35
S0-S1 S0-S2 S0-S3 S0-S4 S0-S5
Sunday
Neural
Kalman
Real
0
5
10
15
20
25
30
35
S0-S1 S0-S2 S0-S3 S0-S4 S0-S5
Monday
Neural
Kalman
Real
0
10
20
30
40
50
S0-S1 S0-S2 S0-S3 S0-S4 S0-S5
Tuesday
Neural
Kalman
Real
0
10
20
30
40
50
S0-S1 S0-S2 S0-S3 S0-S4 S0-S5
Wednseday
Neural
Kalman
Real
Web site design (User)
27
• Web Site provides the user with relevant bus route information and
bus arrival time prediction.
Web site design (Admin) •The admin in the designed system has full access to add new
system or modify existing system data such as:
1. Routes.
2. Stations per route.
3. Buses.
4. Schedules for each bus.
28
29
The proposed system units
30
Central office
Bus stops unit
In Bus unit
The system is composed of two main units:
1. In bus unit.
2.Bus stops unit.
In-Bus unit
31
The different modules attached to Main controller in IN_BUS unit:
GSM/GPRS, GPS, LED/LCD, and Audio announcement system
GSM/GPRS Module (GSM0308):
32
• GSM0308 module is a fully Type-approved GSM/GPRS
device, enabling application-specific, two-way
communication and control
GPS Module (SKM53)
• GPS receiver communication is defined within the
specification of the National Marine Electronics
Association (NMEA).
• The NMEA data include the complete PVT
(position, velocity, time) solution computed by the GPS
receiver.
• A minimum of 4 GPS satellite signals are required to
compute positions.
Dual SIM
33
Due to the problems that have been noticed due to link failure according to
signal coverage which required the use of dual SIM card holder controller
design to switch between different GSM service providers in case of link failure
Storage Module
The EEPROM user module is used to store the bus stationsdata of the route (coordinates (latitude and longitude), audiocode, and the station name).
EEPROM Memory Calculations: Assume the average length of the station name is 18 for Arabic characters (using
UNICODE-UTF8 format) and an audio code of 3 characters
The estimated station data length is 41 Byte
Since the ROM of CY8C29466 is 32 K-Byte
Code occupies around 44% from total memory (14 KByte)
Taking a safety factor of about 20% (6 Kbyte)
Then the maximum number of station can be given is: 299 Stations/Bus
34
PSoC Station Configuration
35
• The main core of station unit is divided into two main modules:
Communication module and display interface module
Station Unit
System Displays
In the designed system LED or LCD VGA controlled displays are used in both busses and stations.
The displays are controlled via cypress PSoC technology.
The data are received from the sever through GPRS link using GSM module
36
Characters bit map The system is designed to support Arabic and English characters using
different bit maps for each.
An 8x8 bit map was used for English and Arabic characters, as English characters are characterized by two forms (capital and small letters), also Arabic characters has been characterized in our system by two forms (intermediate and final letters).
The Unicode UTF-8 was used in our system to represent the different characters.
Unlike the English characters where each capital or small letter has its own Unicode with one byte format, Arabic characters in either form are specified by a single Unicode with two bytes format.
The bit map of the different characters and languages are saved and arranged in an EEPROM with a manner to simply the accessibility of the characters with a relation between the memory address and the characters Unicode
37
Audio announcement Module
38
• Driving the announcement system using Cypress PSoC Technology
• The PSoC is used to manage and control the sound module.
• The sound module used in the system “WT588D” supports a serial control mode
with timing guidelines that imitate the standard SPI communication
Sound Modules
39
• Thetwosoundmodules’clockanddatapinsareconnectedtogether,while
the chip select pin of each one is controlled individually.
• Selecting one module to operate is by toggling its CS pin to low.
• The sound module used (WT588D) has a memory of size 32M
• Sampling rate of 20 KHz was selected to improve the voice quality.
• This results of about 150 stations per module
Audio amplifier Sound module (WT588D) can drive a 0.5W/8Ω speaker
directly without any external amplification circuit.
System must produce a loud voice that could be heard clearly by the passengers.
The audio amplifier circuit in the system is a differential input LM386 based audio amplifier
40
PCB Design Considerations Minimizing power losses - impedance from external power
supply to module power pins was designed to be as low as possible with large traces and sufficient bulk decoupling capacitance
Lowest possible EMI emissions and maximum thermal conductivity - all metal tabs on the GSM/GPS modules shield was soldered down onto a continuous ground plane that runs under the entire module
Thermal reliefs around pads were used to improve solder-ability
41
PCB Design
42
GND
J1A
GSM_CONNECTOR
13579
111315171921232527293133353739414345474951535557596163656769717375777981838587899193959799
2468101214161820222426283032343638404244464850525456586062646668707274767880828486889092949698100
GND
v [5]
J9
mini_prog
12345
GND
P1_1P1_0
XRES
GSM & GPS Control Circuit
GND
GND
simv cc
GND
GNDTXDO
RXDORING
GND
TXD
PW_ON
GND
GND
V[4]
C200.1uf
GNDGNDGNDGNDGNDGNDGNDGND
V[4]V[4]V[4]V[4]V[4]V[4]V[4]V[4]V[4]
gndsimrst
P2_4 GPS_rxP2_3
XRESP1_5PW_C P1_6P1_6P1_6P1_6 RXD
P1_2
P2_0P2_1m
P0_2
P2_1P2_0m
P0_1
P2_2P2_2 Control
P2_6P2_6
P0_6 RING
P2_5
P1_0P1_1P1_3
P2
C8Y29466
11
33
55
77
99
1111
1313
1515
1717
1919
2121
2323
2525
2727
22
44
66
88
1010
1212
1414 16
16
1818
2020
2222
2424
2626
2828
P0_4
P0_7P0_5AUDIOTX
P0_3
V[3.3]
P0_0
TXDOP1_4P1_4
RXDO P1_7
J7
GPS_G229
123456
GPS_rx
simclk
GND
simio
V[5]
SW1
SW PUSHBUTTON
R3
47K
GND
D1
Ringer
R1
2.2k
GND
Q12N1070
D5
LED
PW_ON
R2
10K
R14
2.2k
PW_C
P0_0
GND
GND
GND
C34
0.1U
1
2
VCC[5]
VCC[5]
CS_SM2
VCC[5]
CS_SM1m
+
-
U8
LM386
3
25
6
14 87
P1_1A
GND
C21
0.1U
1 2
J12
mini_progA
12345
XRESA
P1_0A
C22
0.1U
1 2C23
0.047U
1
2
C24
0.1U
1 2
R16
1M
21
R17
1M
21R18
10
2
1
AMP (-)
AMP (+)
VCC[12]
Audio amplifier
J13
sound module
123456789
1011121314
19202122232425262728
15161718
J14
SPEAKER
12
P1_2 (CLK)CS_SM1
AMP (+)
P1_3 (Data)AMP (-)
Reset
D7
R19
1K
21 VCC[5]
Resetm ResetCS_SM1m CS_SM1CLK P1_2 (CLK)Data P1_3 (Data)CS_SM2 P1_4 (CS_SM2)
J19
sound module
123456789
1011121314
19202122232425262728
15161718
P1_4 (CS_SM2)P1_2 (CLK)
AMP (+)
P1_3 (Data)
Reset
gnd
AMP (-)D8
VCC[5]R20
1K
21
C25
220u
gnd
C26100N
GND
ResetmXRESA
AUDIOTX
CLKP1_0A
DataP1_1A
P3
C8Y29466
11
33
55
77
99
1111
1313
1515
1717
1919
2121
2323
2525
2727
22
44
66
88
1010
1212
1414 16
16
1818
2020
2222
2424
2626
2828
C35
0.1U1
2
Audio Control Circuit
GND
C2810UF
C32
10UF
GND
C33
0.1U1
2
VCC[5]
GND
gnd
R25100
CLKV
C36100nf
VCC[5]
gnd
J21
CLOCK
1234
P1_7V
P1_6V
P1_4V
GND
P1_5VCLKV
VCC[5]
P1_4V RED
VCC[5]
P1_7VBLUE
P1_1V
GND
J5
mini_progV
12345
XRESV
P1_0V
gnd
C27100N
XRESV
RXDV P2_6
P1_6VP1_6P1_6P1_6 GREEN
TXDVP2_3
P1_1VV_SYNC
P4
C8Y29466
11
33
55
77
99
1111
1313
1515
1717
1919
2121
2323
2525
2727
22
44
66
88
1010
1212
1414 16
16
1818
2020
2222
2424
2626
2828
V_SYNCH_SYNC
GND
J17
VGA
123456789
101112131415
470
470
470
P1_0VH_SYNC
VGA Control Circuit
J23
analog_sw
123456
J10
SIM1
12
simio1
J11
SIM2
12
gndsimio2simio
simrstsimclk
gnd
V[5]
simio1
J2
sim holder1
123456
C9100nf
gnd
C1122PF
gnd
simv cc
Control
simv ccsimclk
gnd
simio2
simrst
J3
sim holder2
123456
C10100nf
gnd
C1222PF
gnd
Dual Sim Circuit
P1_0m P1_1m
XRESm
VCC[5]
C29
100N
gnd
GND
VCC[5]
P1_1m
J15
mini_progm
12345
AES Controller P1_0m
XRESmgndP2_7m
TXDm
P2_0m
P1_6mRXDm
P2_1m
J24
CON40
1234567891011121314151617181920212223242526272829303132333435363738394041424344
GND
U7
L5973D
1
2
34 5
6
7
8
9
C16220uF
C19470uFC18
22nFC17220pF
R124.7K
R132.2K
R1110K
GND
L1
15uH
GND
GND
D4
DIODE 2A
GND
GND
V12
GNDGND
J4
CON2
12
D3 DIODE
GND
gnd
U4v 3.3
VIN3
AD
J1
VOUT2
v o4
C15100nf
V[3.3]
+
C14
10u
V12
+
C13
10uf
Power Circuit
V[4]
+
C8
10u
U2MIC29302WU
GN
D3
Vin
2
En1
VO
UT
4
AD
J5
GND
V12
U3LM7805C/TO
IN1
OUT3
GN
D4
R410K
J8
CON2
12
R64.7K
GND
V[5]VCC[5]
R52.2k
VCC[12]
D2
LED
Design versions
43
Third version
Second version
First version
44
The designed prototype
The designed prototype main features:
1. GSM/GPRS based.
2. Plug and play.
3. GUI user friendly based.
4. Remote reconfigurable.
5. Dual GSM/GPRS system providers.
6. Adaptable for any transportation means e.g. (public transportation, railway, river-Nile transportation, travel agencies …etc).
7. Upgradable as a microcontroller based.
45
GUI based information system parameters
46
Main components of lab test
47
Experiment setup:
48
IN-BUS unit Station unit
Lab experiment scenario
49
Change Route
50
Results and comments
The lab test scenario has shown acceptable results for different
system components (Network, Software, and hardware) :
The two proposed arrival time calculation algorithms were
tested.
Remote and flexible control and management of all
busses/stations in the designed system were tested
Web access for administrator and user was tested
Dual SIM card holder control to switch between different
GSM service providers in case of link failure was tested
51
Conclusion
1. This Phase has shown the design and implementation of different system components, network, hardware, and software.
2. A lab scenario was proposed to test the designed system components.
3. Problems expected from zone radius selection and road crossing with the stations locations will be taken into consideration in the field testing phase
4. Environmental condition (temperature, vibration, humidity, dust ... etc) will be taken into consideration in the field testing phase.
52
Future Work
1. System will be tested through a field test using the NTI bus fleet which consists of 10 different routes with a total of about 150 stations.
2. The hardware will be finalized and cased in a proper casing according to the field requirements.
3. Designed encryption algorithm will be integrated in the system.
4. Software will be also enhanced according to the field test results and the GUI will support the Arabic language and
will be more user friendly.
53
54