Chapter 2 - Literature Review
In this project, the RFID technology has been embedded with RMA Management System to reduce the human mistakes during data entry, perform fast data tracing and tracking. Before delving into details of the project, it is better to understand the fundamental concepts and work principles of RFID Technology.
Introduction of RFID Technology
Radio frequency identification (RFID) technology uses radio waves to automatically identify physical objects. The range of objects identifiable using RFID includes virtually everything on this planet. In fundamental concepts, RFID actually uses electromagnetic waves with frequencies between 30KHz and 5.8GHz which are created by electrons in motion and consist of oscillating electric and magnetic fields. It embedded information in modulations in order to transfer data and obtain automatic identification. Regarding Radio-frequency identification, that comprises RFID readers and RFID tags.
Most RFID tags contain at least two parts. One is an integrated circuit for storing and processing information, modulating and demodulating a radio-frequency (RF) signal, and other specialized functions. The second is an antenna for receiving and transmitting the signal. There are generally three types of RFID tags: active RFID tags, which contain a battery and can transmit signals autonomously, passive RFID tags, which have no battery and require an external source to provoke signal transmission, and battery assisted passive (BAP) which require an external source to wake up but have significant higher forward link capability providing great read range.
An RFID system is an integrated collection of components that implement an RFID solution. Data is stored on a Tag (or transponder). The power supply to the Controller and the data exchange between the Controller and the Reader are achieved with electromagnetic fields via Reader Antenna. Software System will be some kind of information system and database system integrated for storing or retrieving data. Communication Infrastructure will be a collection of both wired and wireless network and serial connection infrastructure needed to connect the all components together to effectively communicate with each other.
Advantages of RFID Technology
Contactless. An RFID tag can be read without any physical contact between the tag and the reader to transmit data. Also, Absence of physical contact means there is no wear and tear on the readers as well as on the tags for reading and writing data.
Writable data. The data of a read-write tag can be rewritten from 10,000 times to 100,000 times. Also the original tag data can be overwritten with new data, thus allowing the tag to be reused.
Absence of line of sight. A line of sight is generally not required for and RFID reader to read an RFID tag. That mean An RFID reader can read a tag through obstructing materials that are RF-lucent for the frequency used. It is the most distinguishing feature of RFID.
Rugged. A passive RFID tag has few moving parts and can therefore be made to withstand environmental conditions such as heat, humidity, corrosive chemicals, mechanical vibration and shock. Even an active and semi-active tag that has on-board electronics with a battery is generally more susceptible to damage compared to a passive tag. But plenty of room exists for improvement in the future.
Read Accuracy. The read accuracy of RFID is very accurate that can offer the effective, consistent and error-free data transmission or automatic identification.
The potential application of RFID technology is only to one's imagination. Some prevalent application types are as follows:
Item tracking and tracing. Baggages passing through the Hong Kong International Airport are individually tagged with "HKIA" RFID tags as they navigate the airport's baggage handling system, which improves efficiency and reduces misplaced items.
Electronic payment. In Hong Kong, mass transit is paid for almost exclusively through the use of an RFID technology, called the Octopus Card. Originally it was launched in September 1997 exclusively for transit fare collection, but has grown to be similar to a cash card, and can still be used in vending machines, fast-food restaurants and supermarkets. The card can be recharged with cash at add-value machines or in shops, and can be read several centimeters from the reader.
Inventory monitoring and control. In 2004, Boeing integrated the use of RFID technology to help reduce maintenance and inventory costs on the Boeing 787 Dreamliner. With the high costs of aircraft parts, RFID technology allowed Boeing to keep track of inventory despite the unique sizes, shapes and environmental concerns. During the first six months after integration, the company was able to save $29,000 in labor alone.
Access control. This application type is relatively mature compared to some other prevalent application types in terms of the RFID technology and systems that go with it. One of the characteristics of a mature technology is the existence of standards. The ISO 15693 vicinity cards standard is widely accepted by 13.56MHz access control products. The 75th Academy Awards in Los Angeles used a passive 13.56 MHz RFID security system to provide access control to about 11,000 attendees. The U.S. Army prototyped this application in 2003.
Database Management System Application
Database Management System is an essential sector of the RMA management system. It is an integrated collection of logically-related records consolidated into a common pool that provides data for different department in order to offer quicker response time for customer and ad-hoc reporting and so on. More details about database system are as follow.
Introduction of Database
A database is defined as a usually large connection of data organized especially for rapid search and retrieval by computer. However, we now are looking at a suite of libraries, applications, and utilities. And database management system (DBMS) which relieve an application developer form the burden of worrying about the details of details of storing and managing data as well as providing facilities for searching and updating records.
During the 1960s and 1970s, database were developed which solved the repeating groups problem in several deferent ways. This development resulted in what are termed models for database systems. Research performed at IBM provided much of the basis for these models that are still in use today. There are three models of database systems types which are Hierarchical Database Model, Network Database Model and Relational Database Model. According to the wikibooks open-content textbooks "Design of Main Memory Database System/Overview of DBMS", it indicated the most popular DBMS as of 2009[update] implement a relational model because it is easier to understand and use as developed in "relation" concept.
Database Management System
Notice the difference between the term database and database management system (DBMS). A DBMS is an integrated set of programs used to define, update, and control databases. The responsibilities of a DBMS include:
- Creating the database
- Providing query and update facilities
- Keeping an audit trail
- Managing the security of the database
- Maintaining referential integrity
Some systems will manage on large file and create on or more databases inside it, others may use many operating system files or utilize a raw disk partition directly. Users need no worry about the low-level structure of these files, as DBMS provides all of the access developers and users need.
A DBMS will have a method of asking for data that matches certain criteria. Now the most popular is through SQL language to query and update data.
When a database is used by several applications or is accessed concurrently by several users at the same time, DBMS will make sure that each user's request is processed without impacting the others.
A DBMS will keep a log of all the changes to the data for a period of time. This can be used to investigate errors but perhaps even more importantly can be used to reconstruct data in the event of a fault in the system.
Only authorized users can manipulate the data held in the database as DBMS can provide access controls to add and delete users, set permission, specify which feature of the database system they are able to use.
Many database systems provide features that help to maintain referential integrity, the correctness of the data. Typically, they will disallow a data change and report an error when an insert or update wills beak the relational model rules.
Nowadays, there are many popular DBMS products in the world and well implemented in the different size of companies. For example: Oracle Database Server, Microsoft SQL Database Server, PostgreSQL Database Server, MySQL Database Server and so on. The Figure 2.3 is one of the Oracle Database Management System.
Relational Database Model
Relational database systems were originally developed because of familiarity the terminology of tables, rows and columns Is not intimidating to most users. During the early years of relational database, the simplicity and familiarity of relational database had strong appeal especially as compared to the procedural orientation of other data models that existed at the time. Despite the familiarity and simplicity of relational databases, there is a strong mathematical basis also. The mathematics of relational databases involves thinking about tables as sets.
A relation is defined as a set of tuples that have the same attributes. A tuple usually represents an object and information about that object. Objects are typically physical objects or concepts. A relation is usually described as a table, which is organized into rows and columns. All the data referenced by an attribute are in the same domain and conform to the same constraints.
The relational model specifies that the tuples of a relation have no specific order and that the tuples, in turn, impose no order on the attributes. Applications access data by specifying queries which use operations such as select to identify tuples, project to identify attributes, and join to combine relations. Relations can be modified using the insert, delete, and update operators. New tuples can supply explicit values or be derived from a query, identify tuples for updating or deleting. It is necessary for each tuple of a relation to be uniquely identifiable by some combination of its attribute values. This combination is referred to as the primary key. Figure 2.5 is the example of entity-relationship diagram with primary key connecting different tables.
Structured Query Language (SQL)
Structured Query Language (SQL) is a database computer language designed for managing data in relational database management systems (RDBMS), and originally based upon Relational Algebra. Its scope includes data query and update, schema creation and modification, and data access control. It is a standardized language, the most commonly used definition is ISO/IEC 9075:1992., "Information Technology ?V Database Languages ?V SQL". The SQL language comprises three types of commands. They are related to data manipulation, data definition, and data controlling:
- Data Manipulation Language (DML)
- Data Definition Language (DDL)
- Data Control Language (DCL)
This is the part of SQL that it will be used 90% of the time. It is made up of the commands for inserting, deleting, updating and most importantly selecting data from the database.
There are the commands for creating tables and controlling others aspects of the database that are more structural than data related.
This is a set of commands that generally control permissions on the data such as defining access rights. Many database users will never use these commands because they work in larger company environments where a database administrator is employed or even several specifically to manage the database. Usually one of the roles of administrator is to control permissions.
The most common operation in SQL is the query, which is performed with the declarative SELECT statement. SELECT retrieves data from one or more tables, or expressions. Standard SELECT statements have no persistent effects on the database. Some non-standard implementations of SELECT can have persistent effects, such as the SELECT INTO syntax that exists in some databases. Figure 2.6 is showing a example of using SELECT command to retrieve the table.
Information System Management
There are RFID device as interface to provide fast and accurate data in and out. Hence, DBMS handles all of data storages, data retrieving and multi-user access. However, in this project, it is necessary to have a middleware to connect all of them. It is defined as Information System which is not just a program to communicate between RFID device and DBMS server, but also as bridge anchored between business process and employee to streamline the RMA work flow, reduce the human mistakes and increase the productivity.
Introduction of Information System
An information system is a system of communication between people. It is involved in the gathering, processing, distribution and use of information as well as support human activity. Information system can be paper-based or computer-based. But today, most of information system will be assumed as computer-based information systems which are complementary networks of hardware/software that people and organizations use to collect, filter process, create and distribute data. Figure 2.7 provides examples illustrating how the information system works in the real life to support the human activity and run the businesses.
Bar Code scanners and computers identify the items sold and calculate the bill
University registration system permits students to sign up for specific class sections
Word processing system used fro typing and revising chapters
Interactive system top managers use to monitor their organization's performance
System that identifies people by scanning and analyzing voice prints.
Information system generally linked up five knowledge frameworks in business which is foundation concepts, information technology, business application and development process and management challenges.
- Foundation Concepts:
- Information Technology:
- Business Applications:
- Development Processes:
- Management Challenges:
Fundamental behavioral, technical, business and managerial concepts
Hardware, software, networks, data management and Internet-based technology.
Major uses of the IS in the organization
How to plan, develop and implement IS to meet business opportunities.
The challenges of effectively and ethically managing IT
Types of Information System
Information system can be classified in various ways. In general we may classify information system along a vertical dimension and a horizontal dimension. Vertically we make a distinction in terms of three levels of human activity and decision-making that the information systems support. Horizontally we make distinction in terms of the types of organization in which the information systems are applied. These two dimensions are illustrated in Figure 2.8.
In horizontal information systems, much of the modern literature focuses on information systems relevant to private sector organizations or businesses. Hoewever, information systems are equally important to organizations in the public sector. A classic example is the information system needed to support the activities of the UK National Health Service (NHS).
In vertical information systems, one of the conventional typologies distinguishes between three major types of system. There are transaction processing system (TPS), management information systems (MIS) and decision support system (DSS). Each of these systems builds upon the other. DSS rely on data from MIS that in turn relies on data from TPS. Below is showing more details of these three types:
- Transaction Processing System (TPS)
- Management information system (MIS)
- Decision Support System (DSS)
These are the operational information system of the organization. In a a business organization examples include order entry, accounts payable and stock control systems.
These are used particularly by some operational layers of management to monitor the state of the organization at any one time.
It is used to enable effective long-term tactical decisions about the operation of the organization and it will utilize the management data generated by MIS to model short-term and long-term scenarios of company performance.
Business Process is a related group of steps or activities in which people use information and other resources to create value for internal or external customers. These steps are related in time and place, have a beginning and end and have inputs and outputs. In this project, the business process is focusing on the RMA process which is an action and handling of in-house repair unit. It deals with repair time, repair location, customer need and the fulfillment.
Process modeling is key element to illustrate the business process and also is an essential part of information system development because it helps clarify the problem the information system attempts to solve and the way it goes about solving that problem. One of process-modeling technique is particular valuable for building information systems which is data flow diagrams as it show how the structure of the business process depends on the storage and flow of data. The Figure 2.9 is the example of simple data flow diagrams.
Information System Development
Information systems development is the science and art of designing and making with economy and elegance, information systems that support the activity of particular organizations. There are four key activities in the development process in this project:
Conception is the phase in which we develop the key business case for an information system. In such a business case the information system is evaluated strategically in terms of its contribution to organizational performance.
Analysis is the phase concerned with documenting the workings of existing system and establishing requirements for new system. The requirements specification for some application will be a key input into the development of information system.
Design is the process of planning the shape of some new information system and ideally it associated human activity system.
Implementation involves first testing the system in terms of its specification, then the delivery of the system into its context of use. Users are normally required to formally accept the system into its context of use.
Chapter 3 - Methodology & Implementation
Application of RFID Technology
The Chinetek Group's MIFARE Contactless Smart Card has been used in this project. This hardware is from the previous FYP student with another project. Now, I made use of this hardware and put this into my real situation for RMA management.
Hardware Description of Mifare Cntactless Card and Reader
The MIFARE Classic 1k offers 1024 bytes of data storage, split into 16 sectors; each sector is protected by two different keys, called A and B. They can be programmed for operations like reading, writing, increasing value blocks, etc.). MIFARE Classic 4k offers 4096 bytes split into forty sectors, of which 32 are same size as in the 1K with eight more that are quadruple size sectors. MIFARE Classic mini offers 320 bytes split into five sectors. For each of these card types, 16 bytes per sector are reserved for the keys and access conditions and can not normally be used for user data. Also, the very first 16 bytes contain the serial number of the card and certain other manufacturer data and are read only. That brings the net storage capacity of these cards down to 752 bytes for Classic 1k, 3440 bytes for Classic 4k, and 224 bytes for Mini. The following
Speification of Mifare Contactless Card
The MF1 IC S50 chip consists of the 1 Kbyte EEPROM, the RF?Interface and the Digital Control Unit. Energy and data are transferred via an antenna, which consists of a coil with a few turns directly connected to the MF1 IC S50. No further external components are necessary.
- Clock Regenerator
- Power On Reset
- Voltage Regulator Anti-collision: Several cards in the field may be selected and operated in sequence.
- Authentication: Preceding any memory operation the authentication procedure ensures that access to a block is only possible via the two keys specified for each block.
- Control & Arithmetic Logic Unit: Values are stored in a special redundant format and can be incremented and decremented.
- Crypto unit: The field-proven CRYPTO1 stream cipher of the MIFARE - Classic family ensures a secure data exchange.
- EEPROM: 1 Kbyte are organized in 16 sectors with 4 blocks each. A block contains 16 bytes. The last block of each sector is called "trailer", which contains two secret keys and programmable access conditions for each block in this sector.
Speification of Mifare Contactless Controller
Philips has developed the MIFARE MF1 IC S50 to be used in contactess smart cards according to ISO/IEC 14443A. The communication layer ( MIFARE RF Interface) complies to parts 2 and 3 of the ISO/IEC 14443A standard. The security layer sports the field-proven CRYPTO1 stream cipher for secure data exchange of the MIFARE Classic family.
Contactless Energy and Data Transfer
In the MIFARE system, the MF1 IC S50 is connected to a coil with a few turns and then embedded in plastic to form the passive contactless smart card. No battery is needed. When the card is positioned in the proximity of the Read Write Device (RWD) antenna, the high speed RF communication interface allows to transmit data with 106 kBit/s.
An intelligent anti-collision function allows operating more than one card in the field simultaneously. The anti-collision algorithm selects each card individually and ensures that the execution of a transaction with a selected card is performed correctly without data corruption resulting from other cards in the field.
The MIFARE system is designed for optimal user convenience. The high data transmission rate for example allows complete ticketing transactions to be handled in less than 100 ms. Thus, the MIFARE card user is not forced to stop at the RWD antenna leading to a high throughput at gates and reduced boarding times onto busses. The MIFARE card may also remain in the wallet during the transaction, even if there are coins in it.
Special emphasis has been placed on security against fraud. Mutual challenge and response authentication, data ciphering and message authentication checks protect the system from any kind of tampering and thus make it attractive for ticketing applications. Serial numbers, which cannot be altered, guarantee the uniqueness of each card.
The MIFARE system offers real multi-application functionality comparable to the features of a processor card. Two different keys for each sector support systems using key hierarchies.
MIFARE interface (ISO/IEC 14443 A)
- Contactless transmission of data and supply energy (no battery needed)
- Operating distance: Up to 100mm (depending on antenna geometry)
- Operating frequency: 13.56 MHz
- Fast data transfer: 106 kbit/s
- High data integrity: 16 Bit CRC, parity, bit coding, bit counting
- True anti-collision
- Typical ticketing transaction: < 100 ms (including backup management)
- 1 Kbyte, organized in 16 sectors with 4 blocks of 16 bytes each (one block consists of 16 byte)
- User definable access conditions for each memory block
- Data retention of 10 years.
- Write endurance 100.000 cycles
- Mutual three pass authentication (ISO/IEC DIS9798-2)
- Data encryption on RF-channel with replay attack protection
- Individual set of two keys per sector (per application) to support
- Multi-application with key hierarchy
- Unique serial number for each device ?
- Transport key protects access to EEPROM on chip delivery
The commands are initiated by the RWD and controlled by the Digital Control Unit of the MF1 IC S50 according to the access conditions valid for the corresponding sector. Below several steps are showing the transition sequence.
REQUEST STANDARD / ALL
After Power On Reset (POR) of a card it can answer to a request command-sent by the RWD to all cards in the antenna field by sending the answer to request code (ATQA according to ISO/IEC 14443A).
In the anti-collision loop the serial number of a card is read. If there are several cards in the operating range of the RWD, they can be distinguished by their unique serial numbers and one can be selected (select card) for further transactions. The unselected cards return to the standby mode and wait for a new request command.
With the select card command the RWD selects one individual card for authentication and memory related operations. The card returns the Answer To Select(ATS) code (= 08h), which determines the type of the selected card.
After selection of a card the RWD specifies the memory location of the following memory access and uses the corresponding key for the 3 pass authentication procedure. After a successful authentication all memory operations are encrypted.
After authentication any of the following operations may be performed:
- Read block
- Write block
- Decrements the contents of a block and stores the result in a temporary internal data-register
- Increments the contents of a block and stores the result in the data-register
- Moves the contents of a block into the data-register
- Writes the contents of the temporary internal data-register to a value block
DLL control module
Chinetek Group's Mifare contactless smart card reader is base on Mifare technology. With this reader, it can be read and written any location of a Philips Mifare contactless smart card. They have two DLLs for the user to write their program to control our reader. In this project, I have used the MFTR32.dll control module for the information system development. Below is more details about the function of this DLL file.
For MFTR32.dll, It has the following function:
This function open the serial port of the PC.
Int OpenComm(int com)
Serial port you use on the PC
1 = serial port 1
2 = serial port 2
3 = serial port 3
4 = serial port 4
Open comm port error
Open comm port is OK
This function close the serial port of the PC.
This function checks the card and read the card at the working area of the reader.
Int ReadCard(int sector, int block, unsigned long* serial, char* data)
Sector Sector number of the mifare card
Can be 0 to 15
Block number of the mifare card
Can be 0 to 2
If card exist, it will return the serial number or the mifare card. (It can work in mifare L card too)
If card exist, and the "key" are OK, it will return 16 byte data of the block of the mifare card
Have card, but the "key" is wrong. You can get the mifare card serial number.
Read card OK
This function wrtie the data on the mifare card that on the working area.
Int WriteCard(int sector, int block, char* data)
Sector number of the mifare card
Can be 0 to 15
Block number of the mifare card
Can be 0 to 2
Data for you to write on the card
Write card fail
Write card OK
This function force the reader to generate a "Beep" sound
Use of Database Management System
MySQL is a popular open source database for web applications and acts as the database component of the Windows, Apache, MySQL, PHP (WAMP) platform. Since MySQL is an open source database, which can be available any time and it has no cost of development purpose. Therefore, it is suitable for this project to minimize the development cost and maximize the extensibility.
Introduction of MySQL Server
MySQL is the world's most popular open source database software, with over 100 million copies of its software downloaded or distributed throughout it's history. With its superior speed, reliability, and ease of use, MySQL has become the preferred choice for Web, Web 2.0, SaaS, ISV, Telecom companies and forward-thinking corporate IT Managers because it eliminates the major problems associated with downtime, maintenance and administration for modern, online applications.
Many of the world's largest and fastest-growing organizations use MySQL to save time and money powering their high-volume Web sites, critical business systems, and packaged software X including industry leaders such as Yahoo!, Alcatel-Lucent, Google, Nokia, YouTube, Wikipedia, and Booking.com.
The flagship MySQL offering is MySQL Enterprise, a comprehensive set of production-tested software, proactive monitoring tools, and premium support services available in an affordable annual subscription.
MySQL is a key part of LAMP (Linux, Apache, MySQL, PHP / Perl / Python), the fast-growing open source enterprise software stack. More and more companies are using LAMP as an alternative to expensive proprietary software stacks because of its lower cost and freedom from platform lock-in.
MySQL was originally founded and developed in Sweden by two Swedes and a Finn: David Axmark, Allan Larsson and Michael "Monty" Widenius, who had worked together since the 1980's. More historical information on MySQL is available on Wikipedia
Want the MySQL database to be:
- The best and the most-used database in the world for online applications
- Available and affordable for all
- Easy to use
- Continuously improved while remaining fast, secure and reliable
- Fun to use and improve
- Free from bugs
Want the people working on MySQL to:
- Subscribe to the Open Source philosophy
- Aim to be good citizens
- Prefer partners that share our values and mindset
- Answer email and give assistance to users, customers, partners and co-workers
- Be a virtual organization, networking with others
In the RMA management system, there are 5 tables in the MySQL database.
- Table of RMA database - rmadb
- Table of Inventory Database - inv_rept
- Table of New RMA Number Database - newrmano
- Table of Parts Required Database - partrequireddb
- Table of RFID Records Database - rfidrecord
Below is the entity-relationship diagram of this database system. RMA number is the most important data field to link up several tables and second is the part number in RMA management system.
Tables of Database
Table of RMA database - V rmadb
This table is transferred from the old excel file which was using for RMA management in office. It contains RMA number, Customer information and all of dates related to the repair. It is the master database table in this system.
Table of Inventory Database - inv_rept
This table is used to store the information of spare parts inventory such as part number, parts description and standard cost as well as the location code. As the RMA management system is able to record the spare parts required to consume for repair. This table is the further information of each spare parts or part number in the system.
Table of New RMA Number Database - newrmano
As the master RMA database table is transferred from old access file, New RMA Number Table has been setup for generating a new RMA number. Therefore, it does not affect the old RMA database table structure as the new table is independent. Also, this new table is dedicated for generating a new RMA number. It will be more flexible for medication and change in the future.
Table of Parts Required Database - partrequireddb
The parts required database is used to store the required parts for each RMA after repair evaluation. It contains the specific RMA number, which of spare parts required for the repair and how many of them. It can also for the spare parts demand calculation that estimate how many spare parts required to order later on.
Table of RFID Records Database - V rfidrecord
The RFID Records Database will record all the RFID card transaction or updates. It contains RFID card serial number, RMA number belong to, status of the RMA number and update time/date.
Development of Information System
In this project, the most important is to develop a suitable middleware between database system and RFID device in order to fulfill the business need in reality. The Visual Basic 6.0 has been used to program the middleware for RMA management. From repairs receiving to finishing, then shipping back to customer, this RMA management system can guide the process without missing occurred.
Introduction of Visual Basic 6.0
The VB6 IDE (Integrated Development Environment) is among the easiest and most fully featured IDEs available for any programming language. One major thing which is far easier in VB6 than most other programming IDEs is GUI design.
Like the BASIC programming language, Visual Basic was designed to be easily learned and used by beginner programmers. The language not only allows programmers to create simple GUI applications, but can also develop complex applications. Programming in VB is a combination of visually arranging components or controls on a form, specifying attributes and actions of those components, and writing additional lines of code for more functionality. Since default attributes and actions are defined for the components, a simple program can be created without the programmer having to write many lines of code. Performance problems were experienced by earlier versions, but with faster computers and native code compilation this has become less of an issue.
In the RMA management system, there are included several forms in the Visual Basic 6.0 program. Below is the design interface of this program and the windows of top-right corner is the full list of form of this RMA management system.