RFID Adaptor for Detecting and Handling Data/ Events in Internet of Things

The Internet of Things (IoT) remains that things will be able to detect information from the environment, and communicate with the physical world. We previously proposed middleware to integrate and interoperate information based on the DDS standard. The proposed middleware consists of REST, Zigbee, and RFID adaptors. It allows the adaptors to share information by data/events/services topic matching. In this paper, we propose an RFID adaptor for RFID tags’ data/events in the IoT as a part of the middleware. The adaptor publishes data/events topic among data/events/services considering the characteristics of RFID technology. Employing the publish-subscribe model of the DDS, the RFID adaptor can detect data from RFID tags and publish the data/events to the DDS. Other adaptors in the middleware can then subscribe the data/events. As a simulation of the RFID adaptor, we can identify the interoperation of RFID and DDS. Through applying the RFID adaptor in IoT environment, it can interoperate data/events of other applications in IoT.


Introduction
The Internet of Things (IoT) is becoming a familiar concept and an important research topic.In today's society people directly use many things such as cell phones, tablets, and smart TVs.These things not only can transmit information to the web or receive information from it but they also can share information and communicate with each other.The main objects that share information have been expanded from devices such as cell phones and tablets to things around us.We are entering a new era where instead of people requesting specific information directly, things can be aware of the environment around them and provide detected and created information for people.Things can be connected with each other and share information from anywhere, anytime 1,2 .The term 'IoT' was first proposed by Kevin Ashton, who was the executive director of the Auto-ID center in 19993.IoT is a concept of providing a more convenient environment to people by connecting different things.While many studies and experts have provided definitions of IoT, the main goal of IoT remains the same: things around us can detect the environment, gather data, and communicate with the physical world.In addition, it uses existing internet services for transmission, application, and communication and also generates more valuable information for people 1 The IoT has essential components, including sensors to measure actual data from things, actuators to operate and control devices, and network technologies such as Radio Frequency Identification (RFID), Zigbee, Bluetooth, WSN, and WiFi4.The kinds of information generated from things can be categorized into data/ events/services5.Data indicate the information to be collected and generated from devices such as sensors.

Data Distributed Service
In the DDS, different applications can share their data by topic matching.A topic is the most basic description of the data to be published and subscribed.It associates a name (unique in the domain), a data type, and QoS related to the data itself.DDS is different from other publish-subscribe systems in its binding of a topic to a data-type.As showed in Figure 1, different adaptors publish their data by a publisher and subscribe to other applications' data by a subscriber.The different adaptors in the middleware proposed by the authors can share their data based on the DDS standard in this manner 7,8 .
RFID is arguably the core technology in the IoT.RFID is a wireless communication technology for identifying objects and uses radio frequency for gathering data from certain objects.RFID technology is typically used for detecting and tracking objects in industrial and commercial systems such as supply-chain management.The use of RFID systems can be categorized into when they are used in event situations and when they are focused on actual data that RFID tags send.Event situations refer to scenarios such as access control when a person touches an access card that has a RFID tag to a RFID reader.Situations focusing on RFID data include when a RFID reader collects data that RFID tags have, such as reading data of RFID tags attached to goods or sensing values of RFID tags [9][10][11] .
The RFID system transfers identifying data from tagged objects to a reader.The RFID system typically consists of a tag attached to objects, a reader to detect the tag, and a network.The tag contains a chip that stores the identifying data from certain objects and an antenna to communicate with the reader using radio waves.The RFID system has a simple operation process where the tag transfers information to the reader by an RF field that the reader generates.The reader also transfers the information to a server 11 .
Events are information to be generated when a certain situation happens, and services indicate the control of devices when a request arrives 6 .
In the IoT, to connect and communicate with things that have different kinds of information and protocols, it is necessary to resolve the issue of the heterogeneity of things.To address this problem, we previously proposed middleware to integrate and interoperate information in the IoT based on the Data Distribution Service (DDS) standard8.The DDS is a standard for real-time systems and it allows different applications to share information and communicate with each other by topic matching.The middleware we proposed consists of REST, Zigbee, RFID adaptors, etc.It allows different adaptors to share their information by data/events/services topics' matching.In this paper, we propose a RFID adaptor for information that RFID tags send as part of the middleware.The adaptor publishes data and events among data/events/services considering the characteristics of RFID technology.
The DDS is standard middleware for real-time systems made by Object Management Group (OMG).The purpose of the OMG DDS is to provide a common-application-level interface and make applications to manage the distributed data in a distributed system based on a publishsubscribe model.The publish-subscribe model consists of different processes, called participants.Even though different participants do not know each other's information, they can share data by the publish-subscribe model.

Radio Frequency Identification 2.3 Research on Managing Data in a RFID System
Existing research has focused on managing tag data in RFID systems.The research can be categorized into two types of groups.Studies of the first group include 12,13, an d 14 .
These studies are about detecting and managing data from RFID tags. 12makes location data from raw RFID data and gains event data using entity data. 13is a framework that transforms raw RFID event data into contextual events. 14is a middleware design that addresses both application   15,16 .These studies consider not only general RFID tags to be used in event situations but also RFID tags that have embedded sensors (Table 1).
All the studies described above focus on only data in a RFID system.In this paper, we design a RFID adaptor that can manage both RFID tags to be used in event situations and to contain sensors inside.The adaptor distinguishes both kinds of RFID data by sensing values that RFID tags have.In addition, to manage all kinds of data in the IoT, we use the OMG DDS specifications.If the RFID adaptor publishes RFID data to the DDS, the other adaptor in the middleware we developed can subscribe the published data based on the topic defined in the DDS.Therefore, we can interoperate data in the IoT.

The Design of The RFID Adaptor
The RFID adaptor is for data that RFID tags send as part of the middleware proposed by the authors.The adaptor publishes data and events among data/events/ services considering the characteristics of RFID technology.The DDS standard allows different applications to share data by topic matching.The RFID adaptor publishes information that RFID tags carry to the DDS, and the other adaptors in the middleware can subscribe to the published information based on the DDS standard.

Data/Events Definition in RFID Adaptor
In a RFID system, a RFID reader simply sends the collected data from RFID tags and sends it to a server.RFID tags only store data without actuating something.In this paper, data in the RFID adaptor are different from data used in a general RFID system.Due to this characteristic, we define two types of data of the RFID system, data and events.
In the RFID adaptor, data are information that should be collected continuously from RFID tags, such as temperature, humidity, pressure, and so on.In addition, events are information to be published when a value or status from a RFID tag is different from the previous value stored.

•
A Data Topic consists of the fields, the ID of the adaptor that publishes a topic instance to the DDS (ID), the unique ID of a tag (DATA), and a name and value of a tag (VALUE).
• An Event Topic consists of the fields, the ID of the adaptor that publishes a topic instance to the DDS (ID), the unique ID of a tag (EVENT), the name of a tag, and the value and status (VALUE).

Handling Data/Events in RFID Adaptor
The RFID adaptor publishes data/events topics among data/events/services topics.There are differences between how to handle data and events in a RFID adaptor (Figure 2).First, for a data topic, if a tag has a sensing value, the adaptor continuously publishes the tag information with the value.If a tag does not have a sensing value, it publishes the tag information without the value.
For an event topic, if a tag has a sensing value, it publishes the tag information when the sensing value is different from a previous value stored in metadata.If a tag does not have a sensing value, it adjusts the status.The status is a flag to represent the entry of a person who has a tag embedded in an access control card.As shown in Figure 3, when a tag is identified in the range of a reader per clock cycle, if the status of the tag is 0, it changes the status to 1 and publishes it to the DDS because it decides that the tag is not in the range of a reader.If the status is 1, it changes the status to 0 and publishes it to the DDS, and it decides that the tag is in the range of the reader.

Components of RFID Adaptor
In the adaptor, there are four kinds of components as followed in Figure 4.  • RFID Reader: The RFID reader is connected to a RFID reader shield hardware and manages raw RFID data that is transferred from the RFID reader shield.If the RFID reader shield identifies tag information from RFID tags, it transfers the ID of the identified tag and the value to be measured by the RFID reader of the adaptor.The RFID reader then transfers the tag information to the metadata manager.
• Metadata Manager: The metadata manager manages all tag information stored in the adaptor.
The metadata manager has a temporary storage called metadata.Through the metadata manager, we can insert new tag information in metadata and modify and delete tag information from metadata.The content of metadata is as listed in Table 2.

•
Topic Instance Manager: The topic instance manager plays a role as the bridge between metadata and a topic instance.Since taginformation must be published as a topic instance format, it converts information into a topic instance.
First, the topic instance manager receives tag information from the metadata manager and converts tag information (tag ID, tag name, status, value) and other information (adaptor ID, topic type) into a topic instance.The topic instance manager then transfers the converted topic instance to the DDS entity manager.The DDS entity manager that receives the topic instance publishes it to the DDS.
• DDS Entity Manager: The DDS entity manager manages DDS entities and other work related to the DDS.After the manager of the adaptor selects data or an event topic, the DDS entity manager creates and deletes the selected topic and related the DDS entities.
The DDS entities are participants, topics, publishers, subscribers, data writers, and data readers.The most important role of the DDS entity manager is to publish topic instances to the DDS.The first task to perform to accomplish this is to register the topic instance to the data writer attached to the publishers.After registering the topic instance to the data writer, the DDS entity manager can write the topic instance to the DDS through the data writer.As the DDS entity manager can register and write the topic instance, it also can unregister the topic instance from the data writer and dispose of a topic instance that was published before from the DDS.

Contents Description
Tag ID Unique ID for a RFID tag attached to a thing Ex) 0xCD0x080xA00xF7 Tag name A name of a thing to which an RFID tag is attached, Ex) desk506, temperature tag07

Status
This refers to whether an RFID tag is identified in the range of the reader, Ex) out(0), in Value This is a measured value if a RFID tag has a sensor inside, Ex) 25.5 oC

Operation Process of RFID Adaptor
The operation process of the adaptor can be categorized into design-time and run-time.Design-time is the period that the adaptor starts being composed when the adaptor restarts or starts.Run-time is the period that the adaptor is operating.There are four cases for this.The first case is when the manager of the adaptor adds tag data in the metadata.The second case is when the manager of the adaptor deletes tag data from the metadata.The third case is when a RFID tag is identified in the range of the reader.The final case is when the adaptor is terminated.Design-time (Case 1): "When the adaptor starts or restarts" -When the adaptor starts being composed, the adaptor starts reading information of tags stored in a file and stores the information in metadata through calling the metadata manager.After the process, the manager should choose the topic type, data, and events.The adaptor creates the chosen topic and other DDS entities through the DDS entity manager.The DDS entity manager takes all tag information from metadata and publishes it to the DDS.
• Run-time (Case 2): "When the manager of the adaptor adds tag data in the metadata" -As illustrated in Figure 5, the manager can insert a new tag data by writing the tag ID and tag name.The metadata manager takes the written tag information and adds metadata.In this process, the metadata manager searches metadata with the tag ID that the manager wants to add; if there is a duplicated tag ID, it returns false.The topic instance manager takes the added tag information and converts it into data or an event topic instance.The DDS entity manager then registers the information of the converted topic instance to the data writer and writes it to the DDS.
• Run-time (Case 3): "When the manager of the adaptor deletes tag data from metadata" -This process is similar to case 2 of run-time.The manager can delete a tag data stored in metadata by writing only the tag ID.The metadata manager then takes the written tag ID and searches metadata with the tag ID.If there is no duplicated tag ID, it returns false.After that, the topic instance manager takes the corresponding tag information from the metadata manager and converts the information into data or an event topic instance.Then the DDS entity manager unregisters the converted topic instance from the data writer (Figure 6).
• Run-time (Case 4): "When a RFID tag is identified in the range of the reader" .The RFID reader puts the identified tag

Scenario
In this section, we simulate how the RFID adaptor operates.Figure 7 and Figure 8 show how the RFIDadaptor publishes a data topic instance to the DDS when a tag has a sensing value.The adaptor first publishes a data topic instance without a value at design time.When a tag is identified in the range of the reader, the adaptor publishes a data topic instance including the value to be measured.
Figure 9 and Figure 10 also show how the RFID adaptor publishes an event topic instance to the DDS when a tag has a sensing value.The operation process is similar to that for a data topic.information in the queue which stores a raw tag data temporarily.If there is tag data in the queue, the adaptor takes the information from the queue and distinguishes the tag ID and tag name from it.The process operated in the next part is to divide the information depending on data or an event topic.After storing the changed tag information in metadata, the topic instance manager converts the changed tag information in metadata into data or an event topic instance.The DDS entity manager then registers the converted topic instance to the data writer and writes it to the DDS.

Figure 1 .
Figure 1.Basic structure of DDS standard.

Figure 2 .
Figure 2. Example of data and events in RFID adaptor.

Figure 3 .
Figure 3. Status change per clock cycle.

Figure 7 .
Figure 7. Publish a data topic instance at design time.

Figure 8 .
Figure 8. Publish a data topic instance when a tag is identified in the range of a reader.

Figure 9 .
Figure 9. Publish an event topic instance at design time.

Figure 9 .
Figure 9. Publish an event topic instance at design time.

Table 1 .
Comparison of related work needs and the constraints of passive RFID technology.However, these studies only address RFID tags that are used as event situations and exclude RFID tags that have embedded sensors.Research in the other group includes