Abstract
For the existing heterogeneous wireless M2M network architectures, different data link layers lack a common structure. In this paper, the concept of attribute assembly layer has been proposed, and an adaptive architecture for wireless M2M network has been built, based on the hierarchical heterogeneous modeling of Ptolemy II. Finally, saturated and unsaturated conditions network experiments have been designed in the part of system test. Experimental results show that this architecture has a low memory occupation and less time cost. It unifies the data link layers for heterogeneous networks and is compatible well with the existing platforms, communication protocols, and network mechanisms. The self-adaptive network has more connected sets. The proposed architecture has good adaptive capacity and it can apply to potential communication protocols.
1. Introduction
With the rapid development of wireless communication technology and wireless M2M networks, there emerge lots of typical wireless communication technologies, mainly including 3G [1] based wireless WAN, IEEE802.16 [2] based wireless MAN [3], IEEE802.11 [4] based wireless LAN [5], wireless PAN based on IEEE802.15 [6] and blue tooth technique [7], ad hoc networks [8], sensor networks [9], wireless mesh networks [10], NGEO satellite mobile communications [11], and vehicle area networks [12]. For the diversity of existing wireless communication technology, applications and protocols of the wireless network would run over different link layers and data transferring also cannot depend on the same link-layer mechanism. Therefore, we need to consider, over the existing communication protocol architecture for wireless M2M network, if there is a mechanism independent of link layers to develop applications and protocols.
Communication protocol architecture with common operability has a good code reuse and it can meet the needs of compatibility, interoperability, and scalability for the link layer. Thus, such architecture has a great advantage in the development for wireless M2M network. Many organizations associated with M2M network have put forward various communication protocol architectures for heterogeneous networks. For instance, for the heterogeneous network composed of UMTS and WLAN, the European Telecommunication Standards Institute has defined two kinds of fusion structure, namely, the loosely coupled one [13] and the tightly coupled one [14]. The loosely coupled structure is a research focus at present [15], while the tightly coupled one is rarely applied in actual projects, which is due to the high complexity and large investment for implementing tight coupling. In the research on flight information system, US Johns Hopkins University Applied Physics Laboratory has studied how to make the mobile ad hoc networks, wireless local area networks, and satellite communication networks within the American national aviation system work synergistically on the basis of an internet-like core network [16]. In the study of utilizing the general interfaces for the wireless honeycomb communication network to extract and send information for wireless M2M networks, Athens University put forward a framework and provided the business implementation based on application [17]. Taking GSM/DECT and GSM/WLAN as the examples, Attalah and Ismail have analyzed the problems caused by multimode operation in the terminal design and proposed corresponding solutions [18]. In the research of Japan's e-Japan plan, a structure for future mobile communication systems MIRAI has been proposed [19]. This method attempts to realize a universal access to the local network for end users, but it has not considered the universal access to multiple networks. In addition to the previous method. Sachs has proposed the concept of general link layer (GLL) [20]. This technique designs the wireless link layer to be a general mode with compatibility, but the link layer protocols for all the wireless networks need to be changed. Finally, IETF has designed the architecture of 6LowPAN [21], shown as Figure 1(b). This architecture can be well extended on the application and protocol. However, it has not fundamentally solved the problem of automatic matching for protocols, but just adds a 6LowPAN adaptation layer to perform the protocol format conversion from IPv6 to IEEE802.15.4.

Comparison of network architectures.
In order to ensure the adaptive capacity of communication architectures, this paper has proposed an adaptive general structure for M2M networks, shown as Figure 1(c), which is based on traditional network architecture, shown as Figure 1(a), and inspired by 6LowPAN. The proposed architecture has reassembled the network structure and brought in attribute assembly layer. The attribute assembly layer consists of two parts, which are the attribute factory and the assembly factory. The proposed architecture has been designed to adapt to different types of potential communication protocols, and such ability is revealed by the compatibility with the existing different link layers.
Saturated and unsaturated conditions network experiments have been designed in a part of system test [22]. The simulation experiments show that the adaptive network architecture can be well mapped to traditional wireless M2M network protocols, including packet distribution, packet collection, and mesh routing. With the attribute assembly layer, this proposed architecture can effectively analyze the packet attributes conveyed from the upper communication mechanisms and adapt them to the specific link layer protocol.
2. Adaptive Communication Architecture
Adaptive adaptation layer is the core of the adaptive architecture and it represents the general communication architecture of wireless M2M, shown as Figure 2. The adaptive architecture has unified and simplified the specific communication protocols for various M2M networks. Therefore, it can keep good interoperability between the protocols above the adaptation layer and the layers below (MAC layer and link layer) [23], which is due to attribute factory. The adaptive adaptation layer separates communication protocols and applications from the header formats of output packets, and the standard header format of packets is generated by the independent packet format conversion module of the assembly factory. The adaptive communication architecture consists of three parts, namely: the attribute factory, the application and communication protocol, and the assembly factory. The attribute factory provides a serial of communication interfaces for above applications, so the application and communication protocol are running over the attribute factory. The assembly factory is designed to encapsulate the packets delivered from the attribute factory.

Attribute factory of the prototype.
2.1. Attribute Factory
The protocol stack of attribute factory has defined a serial of communication prototypes, and the specific communication prototypes are shown in Table 1. Applications and protocols above the attribute factory can call any one or more communication prototypes. The protocol stack has a hierarchical structure, and a complicated protocol is composed of relatively simple protocols. The hierarchical structure for the protocol stack of attribute factory is shown as Figure 3.
Communication protocol prototype.

Self-adaptive communication architecture.
The attribute factory supports the transmission prototypes of single hop and multihop. The multihop prototype does not specify how the packets through the network perform routing, and the routing work is assumed by the communication protocol above. The communication protocol chooses an appropriate next-hop address according to the header field of a packet. The separation of multihop model from routing protocol contributes to implementing any one or more types of routing protocol. When multiple types of routing protocol are needed, we only need to add them, and the specific transmission of multihop is done by communication prototype. In a certain sense, the communication model has provided a high abstraction of data transmission and it has separated the transmission model from the protocol logic.
The attribute factory substitutes the header of a packet with some packet attributes, which contain the same information required in communication as the traditional packet header. Therefore, packet attributes are abstract representation for the data of header field. The attribute factory has predefined some packet attributes, including id of a packet, type of a packet, addresses of the sender and receiver, hop count, lifetime, number of retransmission, reliability, and link conditions. The application and protocol can also define additional attributes.
2.2. Assembly Factory
The assembly factory can not only generate the packet header encapsulated in the way of bit, but also generate the packet header for a specific link layer. The application and protocol pass data of the application layer to the attribute factory, which is a response for adding packet attributes, then the attribute factory passes the application data and packet attributes to the assembly factory. According to the packet attributes and the specific link layer, the packet header format conversion module of the assembly factory will generate a corresponding header and then deliver it to the sending module. Finally, the MAC layer of the sending module will decide how to transmit a packet according to the meaning of the packet header field.
Packet headers are generated by independent third party header conversion modules. These modules encapsulate corresponding data and packet attributes and consequently generate packets with typical formats. All the work mentioned above is done by the various assembly factories of the adaptive adaptation layer. Different assembly factories make different standards for the packet header and generate corresponding packets. For example, through the adaptive adaptation layer, data of the application layer can be easily encapsulated into packets with 802.15.4 MAC layer headers and those with UDP/IP headers.
Compared with the traditional protocol architecture, the advantage of adaptive adaptation layer is that applications running over it have no need to consider whether to be compatible with the underlying communication protocols or potential ones. This is because the assembly factory can generate packet headers required according to the communication protocol of link layer.
2.3. Data Flow Process
The main purpose of this paper is to implement the protocol in the platform integration and assembly. In order to achieve “reads Properties” services and protocol stack, they were separated in the platform. The former is provided by BRPfunC component, and application layer protocol stack data encapsulation, network layer, and the virtual link layer are implemented by the BC components. Figure 4 describes the transfer processes of protocol data unit between BRPfunC and BC. BRPfunC components are used to collect data and attribute assignment. BRPfunC component calls AdcReadClientC system components read interface for reading data by the sensing device, while the data is assigned to the corresponding BRPfunC object's attribute. BRPfunC component called rpfunc interface again, for the data transmission between application layer and the network layer.

The transfer processes of protocol data unit between BRPfunC and BC.
In the system, BC components have the following main functions. Firstly, it provides the rpfunc interface to receive the “Read Properties” services generated packets; secondly, to support application-layer protocol stack, network layer, and the virtual link layer functions. In the application layer, control information APCI is added to the front of the original data, forming an application layer protocol data unit APDU. In the network layer, control information NPCI is added to the APDU packets, forming a network layer protocol data unit NPDU. BC components add virtual link layer protocol control information BVLC to NPDU, forming a BACnet protocol data unit BPDU. Data transmission has been achieved between BC component and IPC component, by calling udpclient interface provided with the IPC component.
3. Ptolemy II Based Adaptive Communication Architecture for Wireless M2M Network
Ptolemy is a platform for the study of heterogeneous modeling, simulation, and design for parallel or real-time embedded systems [24], which is developed by UC Berkeley University, USA. The design of wireless M2M network system in this paper has followed the requirements for role-oriented modeling and simulation. This paper has analyzed the principle and mechanism for the fusion of heterogeneous architectures in the wireless M2M network system and it has completed the system modeling based on the modeling and simulation platform of Ptolemy II.
3.1. Establishment of the Whole Model for Wireless M2M Network
Based on the wireless M2M network prototype proposed in the literature [25], this paper has extended the processing module of the heterogeneous architecture for wireless M2M network. The main UML class structure is shown as Figure 4. A complete model for wireless M2M network system is composed of four parts, namely, the wireless director (WirelessDirector), the node models (NodeModels), the wireless channel (WirelessChannel), and the wireless IO port (WirelessIOPort), and all other parts can be extended by these four main classes. The wireless director is a response for commanding all of the system behaviors in the wireless M2M network system and it determines the nodes listening to broadcast by wireless channel. The node models take charge of creating wireless I/O port and can check whether the input port has received wireless signals or not. If no signal is at present, this node will broadcast to all the nodes in its reachable area. Node model is an atomic role. Therefore, for the wireless M2M network systems with different characteristics, the feature of a node depends on the synthesis of such role. The wireless channel determines the transmission of wireless signals among nodes. It not only judges which nodes within the transmission range, but also considers the delay and stability of signals in the transmission. The delay and transmission range of channels are determined by the signal range parameters and signal stability of the sender. The wireless channel is the backbone of the wireless M2M network system and it is a response for the transmission of all information in the network. The wireless I/O port is one type of the Ptolemy II I/O ports and it is designed to send and receive wireless signals.
The logic layer structures for attribute factory and assembly factory based on wireless channel are shown as the red boxes in Figure 5. The attribute factory encapsulates behaviors of the upper applications, communication protocols, and routing protocols, while the assembly factory is a response for producing packet headers and distributing the packets to corresponding networks.

UML modeling for the wireless M2M network architecture based on Ptolemy II.
3.2. Establishment of Heterogeneous System Model
As shown in Figure 6, based on the system-level behavior description of Ptolemy II for the heterogeneous network communication system of wireless M2M, the attribute factory model of the heterogeneous network communication system of wireless M2M can be divided into four channel modules, wherein applications correspond to the module of ApplicationChannel, communication protocols correspond to that of CommunicationProtocolChannel, and routing protocols correspond to that of RoutingProtocolChannel, respectively. The assembly factory has simulated the communication among the heterogeneous networks of 802.15.4, 802.11 and Ethernet.

Heterogeneous system model.
3.3. Network Connectivity
To establish the coordinate system, set the length of a region as
Definition 1.
R is the node supporting wireless LAN protocol maximum transmission distance. So that
Because of
So, the exponential distribution is
Inference 1.
For a particular distance x in region L, if there are k nodes, the connectivity probability between node i and node
For the distance of the node in the region L, the connectivity probability between nodes is presented as
The connectivity probability of nodes in L region is presented as
Analyze the distribution of the position coordinates of the
As
Take formula (1) into formula (12), a cumulative distribution function about
From the above equation, the probability mass function of
With formula (14),
These conclusions will be applied to the network under conditions of saturated and nonsaturated conditions model simulation experiments.
3.4. Saturated and Unsaturated Conditions
In the traditional methods, the paper [22] proposed using a two-dimensional Markov chain model for modeling wireless network. By the steady-state calculation of Markov chain model, transmission probability of nodes and transmit data collision probability were obtained in any slot, which lead to major system performance indicators: saturation throughput. However, the radio channel supposed as an ideal channel in this theory, which does not consider the problem of hidden node, exposed node and channel error conditions in multihop wireless networks. Traffic nodes are at saturation, which means data has been in the queue. Capacity of each node's MAC layer transmission queue is infinite for overflow condition. Under construction modeling process, the situation are not be considered, which are the limited number of retransmissions, the back off freezing, difference of maximum number of retransmissions and the maximum backward progression.
In order to solve the above problems, researchers have proposed the corresponding improvement model to study the system throughput, latency, and energy consumption performance. Establish improved nonsaturated conditions wireless network analysis model, using the two-dimensional Markov model simplicity, considering the practical application of saturated and unsaturated traffic situation, and consider the protocol bakeoffs timer frozen state and limited number of retransmissions. Combining the steady-state solving Markov model and queuing model, we deduce the type throughput and delay performance model under different loads.
4. System Test
The experiments were done on a machine, which is configured with Pentium Dual-Core 2.5 G CPU, 1 G SDRAM, and 5400RPM IDE, with the operation system of Windows2000 Server. In order to facilitate comparison of the topology, we have fixed the network scale with 100 m * 100 m * 100 m and the number of nodes with 200 m. Meanwhile, the node radius has been fixed with the best coverage radius of the network.
4.1. Analysis of Network Communication
As shown in Figure 7(a), 200 M2M nodes are randomly deployed in the test area. The simulation diagrams, shown as Figures 7(b)–7(e), show that the context of the virtual topology is very clear and there is good connectivity among the nodes. In Figures 7(b) and 7(d), the black line represents the communication link based on 802.15.4, the blue one represents that based on 802.11, and the red one represents that based on Ethernet. Whenever it is in the initial condition or after the attenuation of the communication capacity, effective network communication architecture can be well built.

Experimental simulation for the self-adaptive network.
To set the scene of a unified simulation and modeling, modify Ptolemy simulation platform chosen at random bakeoffs value function and the propagation delay function and suppose that all the network nodes can communicate with each other that there are no hidden nodes in the network. Nodes using the basic access, the node's physical layer mechanism for debugging, network simulation parameters, and the model parameters are shown in Table 2.
Parameter values for simulation and model.
Define that the normalized throughput S is the unit of data transmission slots. Payload length ratio and the time slot [26], which means that the formula is
4.2. Memory Cost
Since the memory of a M2M node is limited, space occupation of the adaptive adaptation layer becomes an important measure of the feasibility and validity. The total memory occupation can be divided into two parts, wherein one part is used by the precompiled code, which is stored in on-chip ROM, and the other is the data segment for code running, including various kinds of buffers. Adaptive buffer contains applications and various packet attributes, and the drivers have system priority while writing. The queue buffer for the physical layer is allocated dynamically by the queue pool and its initial content is replicated from the adaptive buffer. The specific number and management of the queue buffers are decided by the corresponding application. The loading conditions of all the modules are shown in Table 3.
Module load status.
The experimental result shows that the cost of the queue buffers is the largest, which depends on the number of queue buffers and the allocation of the application and protocol.
4.3. Data Round-Trip and Execution Time
To measure the impact of the cost of packet attributes in the adaptive adaptation layer on packet transmission, we have compared the communication performances of 802.11, 802.15.4, Ethernet, and self-adaptive network. For the link layer protocols, we have tested the transmission between two nodes with unicast and broadcast, respectively. As shown in Figure 8, the round-trip time of the above four protocol stacks is nearly the same, which is because that the round-trip time largely depends on the time waiting for the waking up of another node.

Comparison for the round-trip time.
The execution time of a prototype is calculated from an application calling the performance function of the adaptive adaptation layer to the successful sending of packets. In this paper, a comparison of asb, ssb, sh, sha, and mh was made. Considering the impact of data load size, we have tested the prototypes above using 802.11, 802.15.4, Ethernet, and self-adaptive network, respectively. The execution time for different prototypes is shown in Figure 9.

Comparison for the execution time.
As the experimental results show, there is no significant difference between the execution time of the underlying prototypes, such as asb, ssb, and sh, and that of communication prototypes for the traditional protocol stack, while the execution time of the upper prototypes, such as sha and mh, is more than that of the traditional protocol stack, usually 0.5 ms. The reason for the above phenomenon is that the upper communication prototypes need to perform packet attributes conversion, which the protocol stacks of 802.11 and 802.15.4 do not need, and in such process they need additional time to transfer data from the adaptive buffer to the queue buffer.
4.4. Network Connectivity Test
To verify the model, this paper generates multiple sequences in consistent Poisson process; the maximum transmission distance between nodes is 100 m. Figure 10 shows the connectivity probability between any two nodes. In the case of constant node density, number of nodes into the same set connected increases, the probability of internode communication increasing with maximum communication distance between nodes increasing. With node density increasing in the region, the connecting probability transition width, of any two nodes in this region, becomes narrower. Self-adaptive network connectivity has higher degree, in order to make significant changes to this phenomenon, self-adaptive network connectivity has higher degree.

The relationships between probability of connectivity and transmission distance.
Figure 11 shows the connected sets diameter (length) and the maximum communication distance between nodes relationship, as connected sets diameter maximum communication distance between nodes increases exponentially in a growing trend, and with the increase in node density and connected sets diameter growing faster, self-adaptive network has more connected sets.

The relationships between connected sets and node density.
4.5. Transmission Rate and Throughput
To compare the performance of the adaptive architecture protocol stack with that of IEEE802.15.4, 802.11, and Ethernet, their channel transmission capacity and throughput have been measured, respectively, and we have made a comparison of them. As shown in Figure 12, in the initial stage, channel transmission rates of the four architectures have similar linear changes. With the increase in the node load, the transmission rates of the architectures have slight changes but still maintain at a high level. Owing to the channel adaptation of protocols, the channel utilization of the adaptive architecture can reach more than 98%, which is higher than that of the other two architectures. As shown in Figure 13, the node throughput capacity will decrease with the increase in node number, which is because of the channel congestion caused by the increase in node number. As the protocol stack of IEEE802.15.4 is simple and it needs much less buffers, the throughput of IEEE802.15.4 is the highest among the four and it remains relatively stable. Both the adaptive structure and 802.11 add the adaptation layer, and for the implementation of congestion control, the protocol complexity is increased. In addition, the common operability and matching support for different channels need to be considered in certain situations. For the above reasons, the node throughput of 802.11 and the adaptive structure would reduce accordingly. However, their node throughputs tend to be unchanged with the increase in node number.

Compared with the transmission.

Compared with the throughput.
5. Conclusion
In view of current development situation of the wireless M2M networks and the existing various architectures, this paper has proposed novel adaptive communication architecture. The architecture with adaptive adaptation mechanism can well solve the problem of cross-layer communication. For the protocol stack with hierarchy, the division for different protocol logics can ensure the application to mask the underlying platform and it can also provide unified attribute interface services for the upper layer and there is no need to break the existing protocol rules. Moreover, using the lightweight adaptive communication architecture can reduce the developing complexity, which is caused by the need for changing the code frequently to implement different communication protocols. The architecture proposed in this paper has good scalability and operability. Not only can it be well compatible with the MAC layer of 802.11, Ethernet, and IEEE802.15.4, but also be independent of the link layer and can interconnect with any network seamlessly. In order to specify the traffic loads of the nodes, we make definition and inference about network connectivity and it has been applied to the network under conditions of saturated and nonsaturated conditions model simulation experiments. As proved by the simulation tests, the memory occupation and time cost of the proposed architecture are relatively low. Because of self-adaptive network for the model with a more flexible regulation, its connectivity has higher degree and has more connected sets. What is more, it has high channel utilization and moderate throughput. In a word, the proposed architecture can adapt to all kinds of wireless M2M network applications.
Footnotes
Acknowledgments
This research has partially been supported by the National Natural Science Foundation of China under Grant nos. 60673190, and 61203244, National Natural Science Foundation of Jiangsu Province under Grant no. BK2009199, MOE (Ministry of Education in China) Project of Humanities and Social Sciences under Grant no. 12YJCZH020, and Science and Technology Support Program of ZhenJiang City under Grant no. GY2010023.
