Technical vs Technology Challenges
In This blog I will be discussing the requisites on "Technical" and "Technology" Challenges to incorporate into my project.
Technical Challenges:
=========================
- AWS Cloud SQL database creation
- AWS Cloud APIs to access database
- AWS Cloud connect
- AWS Cloud AI/ML (Clustering algorithm) service and integration with project
- PSoc boards bring-up
- BLE Beacon Protocol Implementation (use of APIs to build application)
- RFID Card/Reader (BLE Enabled) integration with platform
Technology Challenges:
===========================
This Challenge will test my skills on the use of the these technologies.
BLE Beacons:
We have two kinds of communication protocol to choose from
a) iBeacons (developed by Apple)
b) Eddystone (developed by Google)
Characteristics required for our project, These provisions are made available for sharing in BLE protocols.
1) Unique Universal ID (UUID)
- is a 128-bit id which is grouped into 3 pools and based on these pool we can identify the device type and the action required.
a) Stationary objects (Bus stops),
b) inhuman objects (buses),
c) human objects (Users)
- UUID assign to a Bus-Stop and mapped to its GPS coordinate will provide information related to where it is geographically located in the map or route
- UUID assign to a Bus will map to its Bus-Profile for e.g. driver assigned, Bus depot, license plate, route assigned, amnesties like AC or non-AC etc
- UUID assign to a User will map to his/her User-Profile for e.g. each user is mapped to his UUID, wallet balance, Name, National ID, address, mobile, etc
2) Ability to wake up user device (feature available in iBeacons)
As we propose to use BLE Enabled RFID Cards (similar in size to a Credit Card) except that these cards will be battery operated.
In order to save power they must operate in passive mode and when they come in range of a BLE Beacon the card should have the ability to wake-up.
This ability avoid the need for remote device to perform active scan.
3) Advertising device should be "LE Discover-able"
This is a flag bits in Beacon frame to announce that the advertising device is discover-able.
4) Tx Power (supported by iBeacon and Eddystone)
Is used for location tracking of user devices.
Advertising device sends a calibrated Tx power value in each of its Beacons, The user device receiving this Tx-Power and couple with RSSI of the received packet can compute an estimated distance between the advertiser and User.
The formula I borrowed from the Internet
Tx Power: Beacon output power calibrated at a distance of 1 mtr.
RSSI : represent the power level of the received frame.
ratio of powers in db gives
(ratio_db = txpower - rssi)
linear ratio is
ratio_linear = 10 ^ (ratio_dB / 10)
Power = Power_at_1_meter / r^2
r = Sqrt(ratio_linear)
This formula might give me inaccurate results for location tracking coz the data generated is Noisy.
5 Noisy Data Handling
- Both rssi and r will have noisy data and will cause the outcome values to jump therefore to smooth out the noise I plan to use the following algorithm.
a) Moving average (MA)
b) Weighted moving average (WMA)
c) Kalman filter
- Data is collected over a period of 1 second. For e.g. from each Beacon received its rssi value is collected over a period of 1 second and averaged in-case of (a) (b)
- Digging for some solution over the Internet I came across "Kalman filter" which claims is good enough to handle noisy data. Probably I will continue to explore other algorithm which can handle noisy data.
6. k-mean clustering algorithm
Its an unsupervised algorithm which takes n observations and divides them into k clusters where each observation belong to a cluster. Each observation here denotes a User carrying the BLE Enabled RFID Card. Purpose here is one of the many technique to find the cluster group of users at the bus-stop or inside the bus and will help figure how many Users are waiting at the bus-stop or are into the Bus. This is again experimental and my goal is to figure if this will work and gives expected results.
7. RFID Card Reader (BLE Enabled)
This is a fallback to the k-mean clustering method. Users left out of the cluster group (near bus-stop) will then be subject to check if User had swipe-in via RFID reader, if so then the user data point (rssi or r) is subject to review and included into k-method cluster.
8. Database:
The Database is created (resides) in AWS Cloud and is structured under these categories
- User Profile: <record>
- Bus Profile: <record>
- Bus-Stop Profile: <record>
- Route Map: <record>
- Data-Points-1: <record>, @busstop (betw busstop, user)
- Data-Point-2: <record>, @busstop, (betw busstop, bus)
- Data-Point-3: <record>, @bus, (betw bus, user)
- Tariff-Chart: <record>, fare charged based on Bus type (ac/non-ac), premium route, child, adult, luggage, etc
This database is not accurate and requires re-tweaking and re-organised 1st into excel sheet and then into AWS Cloud.
******************************************* Database ************************************************************************
User Profile: <record>
- UUID String
- Name String
- DoB Date
- Address String
- City String
- State String
- Area-code number
- Mobile Number
- Email String
- National-ID String
- isMinor flag
- SplCategory flag (studant, disabled, vip, gov-empl, etc)
- Wallet-Balance Number
Bus Profile: <record>
- UUID String
- Bus Name String
- Bus No String
- License No. String
- Chassis No. String
- Make/Model String
- Mft. Date Date
- Registration Date
- Registration RTO String
- User-count-per-day Number
- User-count-total Number
Bus-Stop Profile: <record>
- UUID String
- Stop-Name String
- Stop-ID String
- Prev-Stop-ID String
- Prev-Stop-distance Number
- Next-Stop-ID String
- Next-Stop-distance Number
- route-id Number <bitmap>
- route-name String
- google +code String
- Location String
- City String
- State String
- Area-code number
- User-count-per-day Number
- User-count-total Number
Route Map: <record>
- UUID String
- Route-ID Number
- Route-Name String
- Count Number
- Stops String[]
- User-count-per-day Number
- User-count-total Number
Data-Points-1: <record>, @busstop (betw busstop, user)
- Stop-ID (UUID) Number
- User-ID (UUID) Number
- User-wait-time Number (in sec)
- Date-time-stamp Number
- User-infocus Number (timestamp user swipe-in)
- User-outfocus Number (timestamp user swipe-out)
Data-Point-2: <record>, @busstop, (betw busstop, bus)
- Stop-ID (UUID) Number
- Bus-ID (UUID) Number
- Bus-route-id (UUID) Number
- date-time-stamp Number
- Bus-wait-time Number
- UserCount-in-Bus Number (on arrival)
- UserCount-in-Bus Number (upon leaving)
Data-Point-3: <record>, @bus, (betw bus, user)
- Bus-ID (UUID) Number
- User-ID (UUID) Number
- stop-id (UUID) Number (boarding)
- stop-id (UUID) Number (alight)
- User-Credits Number
- distance-travelled Number
- tariff-id Number (child, adult, etc)
Tariff-Chart: <record>, fare charged based on Bus type (ac/non-ac), premium route, child, adult, etc
- id Number
- fare-per-km Number
- Bus-multiplyer Number
- Route-multiplyer Number
- isChild Number
******************************************* Database ************************************************************************
PREV Blog NEXT Blog
Smart City - Connected Bus Transport System Blog#3: Watch Skeleton Video (a subset) of my project.