반응형

안녕하세요. 오늘은 Indoor Positioning에서 [cm]단위의 오차를 내는 UWB 관련 논문에 이야기하겠습니다. 

 

coding-yoon.tistory.com/136?category=910542

 

[무선 통신] Bluetooth Low Energy(BLE) 1. Physical Layer

microchipdeveloper.com/wireless:start Wireless Communications - Developer Help Microchip offers a broad portfolio of wireless solutions which are cost effective and very easy to implement. Depending..

coding-yoon.tistory.com

BLE는 기기간 수신신호세기(RSSI)를 이용해 Indoor Positioning을 하는 방면, UWB는 nanosecond(10e-9)의 길이를 갖는 매우 짧은 펄스를 이용하여 통신하는 방식입니다. 

 

시간 분해능이 매우 높아 최단 경로와 다중 경로간의 신호구별을 용이하여 수 cm이내의 정확도로 거리 측정이 가능하고 낮은 전력 밀도로 저전력 대용량 데이터 전송이 가능합니다. 

 

 

대표적으로 TWR(Two Way Ranging) 방식으로 Distance를 추정합니다. 

 

t_round A : 노드 A가 거리측적용 메세지를 송신한 순간부터 노드 B의 응답 메세지를 수신했을 때의 시간, 즉 거리 측정                 메세지의 왕복시간(Round Trip Time : RTT)

t_reply B : 노드 B의 응답시간 또는 처리 시간(Processing Time)

t_p : 거리 측정 메세지의 단방향 도달 시간

TOA = t_p, C : 전파속도, 광속도(3e8)

 

일반 TWR은 두 기기간의 하드웨어적 차이로 인해 시간 측정이 달라 TOA에 오차가 발생할 수 있어, SDS-TWR 등 많은 방식이 존재합니다.

< [UWB] IEEE 802.15.4a UWB 기반 실내 위치측정 시스템의 설계 및 구현 > 

 

 

기본적으로 UWR을 이용하여 거리를 구하는 방법을 알아보았으며, Non-Line of Sight 에 대해 알아보겠습니다. 

 

ieeexplore.ieee.org/document/9108193

 

UWB NLOS/LOS Classification Using Deep Learning Method

Ultra-Wide-Band (UWB) was recognized as its great potential in constructing accurate indoor position system (IPS). However, indoor environments were full of complex objects, the signals might be reflected by the obstacles. Compared with the Line-Of-Sight (

ieeexplore.ieee.org

 

논문의 아이디어는 UWB LOS/NLOS 분류를 딥러닝을 통해 성능을 향상시키는 것입니다. 

(Line of Sight, Non-Line of Sight)

 

실내 환경은 다양한 장애물(책상, 캐비넷, 책장 등)으로 가득차있으며, 이 장애물을 통해 UWB 신호는 반사될 수 있으며, 신호 수신은 직접 수신 된 신호에 비해 거리 정보에 더 긴 전송 시간을 가져오고 추가적인 Time-varying bias를 유발합니다. 

cf) UWB 신호의 오차는 대게 양의 값(+)을 가집니다. UWB 신호는 Nanosecond 단위로 시간측정 방식이기 때문에, 신호가 반사되면 지연 시간이 더해져 오차로 발생하기 때문입니다.

 

반사를 통해 오차를 일으킨 NLOS를 제거하면, 정확한 거리를 구할 수 있습니다. 

 

가장 직접적인 접근 방식은 UWB 신호 전파 경로 손실 모델 또는 CIR (Channel Impulse Response)을 기반으로 NLOS / LOS 신호 특성을 분석하는 것입니다.

 

위 논문은 Doctor Klemen Bregar providing the UWB NLOS/LOS open source data 를 이용

github.com/ewine-project/UWB-LOS-NLOS-Data-Set

 

ewine-project/UWB-LOS-NLOS-Data-Set

Repository with UWB data traces representing LOS and NLOS channel conditions in 7 different indoor locations. - ewine-project/UWB-LOS-NLOS-Data-Set

github.com

 

이 포스팅은 두 편을 걸쳐 진행됩니다. ( 1편 : 오픈소스 데이터셋 전처리, 2편 : 논문 기반 네트워크를 통해 학습 )

 

Doctor Klemen Bregar providing the UWB NLOS/LOS open source data를 딥러닝을 위해 전처리 과정이 필요합니다. 

 

오픈소스 데이터 구성

오픈소스는 csv, 데이터를 불러오는 모듈로 구성되어 있습니다. 

4년 전 데이터이므로 pandas 버전 오류 해결을 위해 uwb_dataset.py를 약간 변경했습니다.

 

uwb_dataset.py

"""
Created on Feb 6, 2017
@author: Klemen Bregar 
"""

import os
import pandas as pd
from numpy import vstack


def import_from_files():
    """
        Read .csv files and store data into an array
        format: |LOS|NLOS|data...|
    """
    rootdir = '../dataset/'
    output_arr = []
    first = 1
    for dirpath, dirnames, filenames in os.walk(rootdir):
        for file in filenames:
            filename = os.path.join(dirpath, file)
            print(filename)
            output_data = [] 
            # read data from file
            df = pd.read_csv(filename, sep=',', header=0)
            # ------------------------ update Mar 3, 2021 ----------------------------- #
            columns_name = df.columns.values
            # ------------------------ update Mar 3, 2021 ----------------------------- #
            

            # ------------------------ update Mar 3, 2021 ----------------------------- #
            # input_data = df.as_matrix()
            # df.as_matrix() was depriciated after the version 0.23.0 use df.values()
            input_data = df.values
            
            # ------------------------ update Mar 3, 2021 ----------------------------- #
            
            # append to array
            if first > 0:
                first = 0
                output_arr = input_data
            else:
                output_arr = vstack((output_arr, input_data))
    
    return columns_name, output_arr

if __name__ == '__main__':

    # import raw data from folder with dataset
    print("Importing dataset to numpy array")
    print("-------------------------------")
    data = import_from_files()
    print("-------------------------------")
    # print dimensions and data
    print("Number of samples in dataset: %d" % len(data))
    print("Length of one sample: %d" % len(data[0]))
    print("-------------------------------")
    print("Dataset:")
    print(data)

 

1. Load UWB data

import numpy as np
import pandas as pd
import uwb_dataset

# import raw data
data = uwb_dataset.import_from_files()

# divide CIR by RX preable count (get CIR of single preamble pulse)
# item[2] represents number of acquired preamble symbols
for item in data:
	item[15:] = item[15:]/float(item[2])

print("\nColumns :", columns.shape, sep=" ")
print("Data :", data.shape, sep=" ")
print(type(data))

 

2. Create UWB(CIR) Pandas Dataframe

cir_n = len(columns[15:])

print("Columns :", columns, sep=" ")
print("Channel Inpulse Response Count :", cir_n, sep=" ")

df_uwb = pd.DataFrame(data=data, columns=columns)
print("Channel 2 count :", df_uwb.query("CH == 2")['CH'].count())
print("Null/NaN Data Count : ", df_uwb.isna().sum().sum())
df_uwb.head(3)

# LOS/NLOS Count
los_count = df_uwb.query("NLOS == 0")["NLOS"].count()
nlos_count = df_uwb.query("NLOS == 1")["NLOS"].count()

print("Line of Sight Count :", los_count)
print("Non Line of Sight Count :", nlos_count)

# Columns CIR Extract
df_uwb_data = df_uwb[["CIR"+str(i) for i in range(cir_n)]]
print("UWB DataFrame X for Trainndarray shape : ",df_uwb_data.values.shape)
df_uwb_data.head(5)

 

Columns : Sampling 1016 CIR

LOS : 21000, NLOS : 21000  Pandas Dataframe 

 

다음 글은 생선된 위 데이터 프레임을 이용해 논문에 제시된 CNN+LSTM 모델을 Pytorch로 구현하겠습니다.

coding-yoon.tistory.com/139

 

[무선 통신] UWB LOS/NLOS Classification Using Deep Learning Method (2)

안녕하세요. WB LOS/NLOS Classification Using Deep Learning Method(1)에서 UWB CIR Dataset을 생성하였다면, 2편으로 논문에서 제시한 CNN_LSTM 네트워크를 약간 변형하여 구성하겠습니다. coding-yoon.tistory..

coding-yoon.tistory.com

 

728x90
반응형

+ Recent posts