[242] wifi를 이용한 실내 장소...
TRANSCRIPT
WIFI를 이용한실내 장소 인식하기
구자형
로플랫
contents
1. Indoor Location Technology2. WIFI를 이용한 실내 위치 인식 기술3. WIFI로 실내 장소 인식하기 실전4. 여기 누가 있나요?
1.IndoorLocation Technology
1.1Smartphone Sensors
1. Sound
2. Bluetooth
3. WiFi
4. Magnetic
5. Accelerometer
6. Light
1.2 Sound (20 kHz)
1.3 iBeacon (2.4 GHz)
1.4 WIFI (2.4GHz, 5GHz)
1.5 Magnetic
3
As the company explains on its website, steel and concrete help create the unique magnetic fingerprints or signatures of buildings:
The company holds multiple patents for magnetic positioning. It says that, in contrast to Bluetooth beacons, magnetic positioning can in fact deliver “indoor GPS.”
The ‘Installation’ Process The company says magnetic positioning can maintain three to six feet accuracy (1-2 meters) in indoor environments. To support and prove that claim IndoorAtlas gave Opus Research a real world demonstration in a major U.S. retail store currently testing magnetic positioning.
The IndoorAtlas app maintained real-time location (exactly or within a few feet) as we moved throughout the many areas and departments of the store. We were impressed by its consistent accuracy during the course of our visit.
As mentioned, the IndoorAtlas approach doesn’t require installation of any hardware. Nor does it seek to rely on any existing hardware infrastructure.
The building floor plan is then uploaded to the cloud and the magnetic fingerprint data associated with that floor plan. IndoorAtlas says that it takes about an hour to cover roughly 25,000 square feet of space for six-feet accuracy. The company added that within of the completion of a structure’s magnetic fingerprint , indoor location becomes commercially available.
Figure 2: Magnetically ‘Fingerprinting’ a Building
»Magnetic Positioning: The Arrival of ‘Indoor GPS’
SOURCE: INDOORATLAS (2014)
1.6 Which one?
성능, 구축비용, 확장성
2.WIFI를 이용한실내 위치 인식 기술
2.1 Why WiFi?
In 2014, over 2.4 billion Wi-Fi enabled devices were shipped
10 billion Wi-Fi enabled devices shipped cumulatively in early 2015
161 million Consumer Wi-Fi Access Points Shipped in 2013
2.2 WIFI Access Point (AP)
BSSID AP MAC Address 0a:30:0d:88:dd:f2
SSID Network Name olleh_startbucks
RSS Received Signal Strength -48 dBm
frequency 2462
2.3 WIFI Signal Propagation
distance
rss
15~20 dBm
- 13 -
In this chapter, we linearly approximate the relationship between RSS and
distance, which is applied to a multilateration scheme. Through the linear
approximation, RSSs are usefully used in estimating AP location under the
situation where pathloss exponent and transmission power are unknown. The
performance of the proposed algorithm is evaluated by simulations.
2.2 RSS-based Multilateration
Consider an AP whose location is being estimated and m different positions where
RSSs are measured. The unknown location of the AP is denoted as (x0, y0), and the
ith measurement position as (xi, yi), where 1 ≤ i ≤ m and ri is the measured RSS at
the ith position. The distance between the AP and the ith reference position is
defined as:
(2.1)
Previous studies show that the indoor pathloss model follows the distance power
law: σ
XldnPri +−= )(log10 0100, where ri is the RSS in dB, P0 the signal
strength at the distance l0 from transmitter, and n the pathloss exponent. Xσ
represents the shadow noise and is modeled as a normal random variable with the
standard deviation σ dB [Rappa96]. Typically, l0 is set to 1 m. The value of n
depends on the surrounding environments. Given the measurement ri at the ith
measurement position, the distance id̂ from AP can be estimated as:
(2.2)
- 13 -
In this chapter, we linearly approximate the relationship between RSS and
distance, which is applied to a multilateration scheme. Through the linear
approximation, RSSs are usefully used in estimating AP location under the
situation where pathloss exponent and transmission power are unknown. The
performance of the proposed algorithm is evaluated by simulations.
2.2 RSS-based Multilateration
Consider an AP whose location is being estimated and m different positions where
RSSs are measured. The unknown location of the AP is denoted as (x0, y0), and the
ith measurement position as (xi, yi), where 1 ≤ i ≤ m and ri is the measured RSS at
the ith position. The distance between the AP and the ith reference position is
defined as:
(2.1)
Previous studies show that the indoor pathloss model follows the distance power
law: σ
XldnPri +−= )(log10 0100, where ri is the RSS in dB, P0 the signal
strength at the distance l0 from transmitter, and n the pathloss exponent. Xσ
represents the shadow noise and is modeled as a normal random variable with the
standard deviation σ dB [Rappa96]. Typically, l0 is set to 1 m. The value of n
depends on the surrounding environments. Given the measurement ri at the ith
measurement position, the distance id̂ from AP can be estimated as:
(2.2)
2.3 WIFI Signal Propagation
results do not differ significantly. Figure 4.6 shows the RSS distributions
according to the distance from an AP, which is located in the upper rightmost
corner in Figure 4.4.
Figure 4.6. Scatter plots of scanned RSSs according to a distance from the AP
located at right most and upper corner in Figure 4.4.
- 58 -
results do not differ significantly. Figure 4.6 shows the RSS distributions
according to the distance from an AP, which is located in the upper rightmost
(a) HTC Hero
(b) Motorola DroidX
(c) Samsung NexusS
Figure 4.6. Scatter plots of scanned RSSs according to a distance from the AP
located at right most and upper corner in Figure 4.4.
results do not differ significantly. Figure 4.6 shows the RSS distributions
according to the distance from an AP, which is located in the upper rightmost
Figure 4.6. Scatter plots of scanned RSSs according to a distance from the AP
2.4 WIFI APs
-40
-65
-85
AP1
AP3
AP2
2.5 삼변측량/삼각측량 법
(x1, y1)
(x2, y2)
(x3, y3)
(x’, y’)
5m
10m15m
2.6 Fingerprinting
2.6 Fingerprinting
?
?
?
(x1, y1)
-40
-65
-85
(x2, y2)(x3, y3)
3.WIFI로 장소 인식하기실전
3.1 Mute.ly
periodic wifi scan
3.2 WIFI Scan
3.3 Android WIFI Scan
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<receiver android:name=“.WifiReceiver" > <intent-filter> <action android:name="android.net.wifi.SCAN_RESULTS" /> </intent-filter> </receiver>
3.3 Android WIFI Scan
final WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); wifi.startScan();
public class WifiReceiver extends BroadcastReceiver {… public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if(action.equals(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) { WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); List<ScanResult> scanResults = wifi.getScanResults(); } }}
3.4 WIFI Scan Allowed?
3.4 WIFI Scan Allowed?
final WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);boolean wifiEnabled = wifi.isWifiEnabled(); boolean wifiScanEnabled=false; int currentapiVersion = android.os.Build.VERSION.SDK_INT; if (currentapiVersion >= Build.VERSION_CODES.JELLY_BEAN_MR2) { // 18 wifiScanEnabled = wifi.isScanAlwaysAvailable(); }
3.5 Android WIFI OFF
final WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);wifi.setWifiEnabled(true);
wifi.startScan();
wifi.setWifiEnabled(false);
==> WIFI ON 이 되지 않는 현상 발생
==> LG G2의 경우 2.4GHz 대역만 scan 되는 현상 발생
==> 생각보다 큰 power 소모가 발생한다
3.6 Android Background Service
장소를 monitoring하고 있는 서비스는계속 죽었다 살아났다 함
—―> 모든 status 변수는 non-volatile 메모리로 관리
3.7 Similarity Measure (Tanimoto)
AB
|| A ||2 + || B ||2 - ABT(A, B) =
3.7 Similarity Measure (Tanimoto)
scan1 scan2 scan1’ scan2’
AP1 -50 -45 40 45
AP2 -69 -75 21 15
AP3 -85 5 0
||S1||^2 = 40*40 + 21*21 + 5*5 = 2066
||S2||^2 = 45*45 + 15*15 + 0*0 = 2250
S1*S2 = 40*45 + 21*15 + 5*0 = 2115
2115
2066 + 2250 - 2115= 0.96
3.7 Similarity Measure (Cosine)
2115
sqrt(2066) * sqrt(2250)= 0.98
A B
|| A || || B ||cos(A, B) =
So Easy?
3.8 So Easy?
time —―>
signal strength
-30
-90
3.8 So Easy?
‘android’
‘iphone’
‘ollehegg’
…
3.8 So Easy?
02:e0:83:54:70:9X
3.8 So Easy?
WIFI AP 4개
vs.
WIFI AP 40개
3.8 So Easy?
wifi no similarity3 0.812 0.243 0.763 0.583 0.633 0.413 0.663 0.293 0.674 0.394 0.65
00.25
0.50.75
1
0
2
4
3.8 So Easy?
30 (Galaxy S3) vs. 50 (Galaxy S5)
10명 vs. 100명
…
3.9 실제 deploy 해서 검증해 보기
Mute.ly 를 통해서 오류보고하기 넣기
그래서.. 오류 받기...
3.9 실제 deploy 해서 검증해 보기
로그를 분석해서
오류사항 개선하기
4.여기 누가 있나요?
4.1 구조
4.1 To the Cloud
스캔
그리고 Cloud로
4.2 Similarity Measure in Cloud
모든 스캔을 다 비교?
Thank You
Scalable & Cost-effectiveIndoor Location Platform