**4. SAS design and implementation on Omnet++**

Omnet++ [27] is a discrete event simulation environment that provides component architecture for models. Components (modules) are programmed in C++, and then assembled into larger components and models using a high-level language (NED). There are several reasons for using Omnet++ for implementing a SAS or a Massive MIMO. Firstly, it is an open source instrument allowing the reusability of models for free. Yet, it provides a full set of features and protocols especially relating to wireless network; hence, the end user developer can create new modules or extend the default models quite comfortably. Nevertheless, it provides an extremely intuitive user interface for both in developing and simulations. Unfortunately, by default, Omnet++ does not support asymmetrical communication between nodes. For enabling the simulator to support directional communications and so the SAS, some modifications on the original source code are required. Let us suppose that we aim to implement the most simple SAS technology, that is the switched beam, the first step needed is to design the module. For example, a phased array system could be implemented. In our case, we created a new directive antenna model and the relative module called *PhasedArray* that implements all features of a phased array system [28]. The main definition of the class could be synthetized as follows (**Figure 7**).

The function *initialize* initializes the module in the simulation setup. Basically, the function *computeGain*, as the name suggests, computes the antenna gain; in the omnidirectional case, this function simply returns 1. This function could be modified by implementing the expression defined by Eq. (2). The second step concerns the modifications related to the mobile node module used in Omnet, that is, the *StandardHost* module.

**Figure 8** illustrates the typical *StandardHost* structure which consists of submodules organized according to the TCP/IP layer stack. In this regard, several modifications in the physical layer are required. The physical layer defines the functions relating to channel model propagation, power management, and modulation. More specifically, the *ScalarAnalogModelBase* class implements the channel propagation

**Figure 7.** *PhasedArray main parameters class definition.*

*Array Pattern Optimization*

**Figure 5.**

*Massive MIMO HPA example.*

**94**

*3.1.3 Massive MIMO CPA*

*Massive MIMO CPA example.*

**Figure 6.**

following [25, 26]:

*AFUCPA* = 1 + ∑

ϕ*<sup>n</sup>* = \_\_\_\_ <sup>2</sup>*<sup>n</sup>*

The geometry structure of a circular planar array is very similar to a HPA, except from the fact that the hexagonal ring is replaced by a circular ring. As assumed for the HPA, we can consider the widespread configuration having 6*m* antenna ele-

**Figure 6** illustrates the CPA configuration that consists of a certain number of circular rings having same center but different radius with the antenna elements placed on the circumference of each ring. Because a CPA is a particular case of the hexagonal structure, the array factor equation is quite similar to the HPA expression. In case of isotropic elements, the array factor could be expressed by the

*e*<sup>−</sup>*j*(*m*sinθcos(ϕ−ϕ*n*)+β*M*) (11)

<sup>3</sup>*m*; <sup>β</sup>*<sup>M</sup>* <sup>=</sup> sinθ<sup>0</sup> cos(ϕ<sup>0</sup> <sup>−</sup> <sup>ϕ</sup>*n*) (12)

*m*=1 *M* ∑ *n*=1 6*m*

ments uniformly placed around the circular edge of the *m*th radius.

<sup>6</sup>*<sup>m</sup>* <sup>=</sup> \_\_\_ *<sup>n</sup>*

model that provides for a static power assignment by default, for example, in the case of isotropic antenna, both the transmission and the reception power are set to 1. This issue can be fixed by inserting a simple power algorithm for node power management in order to create a dynamic power quantity assignment based on transmission direction and angular position of each node (**Figure 9**).

The *offset* term is a function of two parameters: the *mainLobeAngle* and the *spreading factor*. The first term, as already mentioned, represents the angle of maximum radiation; the second term can vary from −1.5 to 2 according to the number of radiating elements of the array. In particular, the larger is the number of elements, the greater is the *spreading factor* value. This feature allows to take into account the spreading effect that affects the overall pattern varying the number of elements. In Algorithm 1, it can be observed that based on the *transmissionDirection* value, the power is fractioned opportunely. If the *transmissionDirection* value is not related to any sidelobe level, the power is reduced to 0. Therefore, if we want to implement an adaptive array system, the main problem is to individuate the best way for executing the adaptive algorithm into the simulation. A possible efficient solution could be

#### **Figure 8.**

*StandardHost module Omnet++ structure.*


**97**

using TCP sockets.

**Figure 10.**

*Co-simulation for SAS adaptive array.*

according to the IEEE802.11ac.

**5.1 IEEE802.11ac implementation**

*Smart Antenna Systems Model Simulation Design for 5G Wireless Network Systems*

to provide for a co-simulation. The co-simulation, for instance, can be performed using any combination of network simulators and Matlab [29]. Matlab enhances the working of network, simulating tool, and increases the speed of testing and processing by using different toolboxes. In this case, it is possible to divide the overall task, that is, the simulation into two subtasks. The first subtask is handled by Omnet++ that provides for the network scenario; while the second subtask is managed by Matlab that performs the adaptive algorithm operations [30].

**Figure 10** represents the communication process between the two parts based on a client-server paradigm. Omnet++ executes the simulation and dynamically sends the physical parameters (the power and noise in this case) related to a certain communication between couple of nodes to Matlab; Matlab executes the adaptive algorithm (the least mean algorithm in this case) based on the data received in input, computes the updated weighted vector, and sends backwards the data to Omnet++. The communication between the two parts can be easily realized by

The latest release of the Omnet++ simulator (the 5.3 version), does not offer a support to asymmetrical communications and does not implement the latest IEEE802.11ac standard. More specifically, Omnet++ offers a complete support for 802.11b/g and the most recent 802.11n standard, but does not support the specifications related to the 802.11ac standard. Furthermore, these features are not sufficient for emulating the latest massive MIMO technologies in the simulator. In fact, the maximum data rate supported in the *radio* module used in the current latest version of Omnet++ is 54 Mbps, along with a 64-QAM modulation, according to the 802.11n specifications. In view of these issues, it is possible to extend the Omnet++ features both by providing a full 802.11ac radio environment and a new massive MIMO antenna module suitable for 5G wireless network environments operating

The first step consists of the implementation of the 802.11ac standard in the physical modules of Omnet++. Basically, this process involves modifications as regards two microlayers: the *error model* and the *modulation*. The error model determines the computation of the bit error rate (BER) curves and the error probability in function of the data rate. Obviously, as already stated, the current error models

**5. Massive MIMO design and implementation on Omnet++**

*DOI: http://dx.doi.org/10.5772/intechopen.79933*

**Figure 9.** *Power algorithm pseudo-code.*

*Smart Antenna Systems Model Simulation Design for 5G Wireless Network Systems DOI: http://dx.doi.org/10.5772/intechopen.79933*

**Figure 10.**

*Array Pattern Optimization*

model that provides for a static power assignment by default, for example, in the case of isotropic antenna, both the transmission and the reception power are set to 1. This issue can be fixed by inserting a simple power algorithm for node power management in order to create a dynamic power quantity assignment based on

The *offset* term is a function of two parameters: the *mainLobeAngle* and the *spreading factor*. The first term, as already mentioned, represents the angle of maximum radiation; the second term can vary from −1.5 to 2 according to the number of radiating elements of the array. In particular, the larger is the number of elements, the greater is the *spreading factor* value. This feature allows to take into account the spreading effect that affects the overall pattern varying the number of elements. In Algorithm 1, it can be observed that based on the *transmissionDirection* value, the power is fractioned opportunely. If the *transmissionDirection* value is not related to any sidelobe level, the power is reduced to 0. Therefore, if we want to implement an adaptive array system, the main problem is to individuate the best way for executing the adaptive algorithm into the simulation. A possible efficient solution could be

transmission direction and angular position of each node (**Figure 9**).

**96**

**Figure 9.**

**Figure 8.**

*StandardHost module Omnet++ structure.*

*Power algorithm pseudo-code.*

*Co-simulation for SAS adaptive array.*

to provide for a co-simulation. The co-simulation, for instance, can be performed using any combination of network simulators and Matlab [29]. Matlab enhances the working of network, simulating tool, and increases the speed of testing and processing by using different toolboxes. In this case, it is possible to divide the overall task, that is, the simulation into two subtasks. The first subtask is handled by Omnet++ that provides for the network scenario; while the second subtask is managed by Matlab that performs the adaptive algorithm operations [30].

**Figure 10** represents the communication process between the two parts based on a client-server paradigm. Omnet++ executes the simulation and dynamically sends the physical parameters (the power and noise in this case) related to a certain communication between couple of nodes to Matlab; Matlab executes the adaptive algorithm (the least mean algorithm in this case) based on the data received in input, computes the updated weighted vector, and sends backwards the data to Omnet++. The communication between the two parts can be easily realized by using TCP sockets.
