**5.2 Massive MIMO module design and implementation**

Once we modified the physical layer in order to support the specifications of the VHT standard including the error model and modulations, we designed the massive MIMO antenna modules. The antenna modules are defined in the *physicallayer* package, as depicted in **Figure 12**. Actually, the default antennas in the *physicallayer* package are:

• *ConstantGainAntenna*: A simple antenna having a unique basic parameter: the gain. As suggested by the name, the gain set in the configuration file remains constant, while a simulation run is executed.

**Figure 13.**

*Error model designing at the receiver.*


However, the detailed description of all kinds of antennas is beyond the scope of this chapter, which instead aims to illustrate the features of the designed massive MIMO modules.

**Listing 3** illustrates the main definition parameters of the *MassiveMIMOURPA* antenna module. Note that the module inherits the basic features of the *AntennaBase* module; besides the main antenna array parameters such as the *length* the *distance* and the *frequency* the module provides for the setting of the steering angle *thetazero* in order to support the beam piloting; as already mentioned in Section 3.1.1, *M* and *N* represent the number of elements to be placed on the y- and x-axis, respectively. As a further example, in order to understand the implementation of the logic operations of the modules, the following pseudocode illustrates a portion of the *MassiveMIMOURPA.cc* definition:

The algorithm in **Figure 14** depicts the main functions of the *MassiveMIMOHPA*.*cc* class. The function *getMaxGain* computes the maximum

**101**

mations of Eq. (9).

set parameters.

**5.3 Planar massive MIMO model validation**

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

gain according to Eq. (10); the function *getNumAntennas* returns the total number of antennas of the massive MIMO; the result of double integral (given by the *risInt* variable) is evaluated by implementing the Simpson method in C++ in the function *computeIntegral*; Observe that the integral could be computed by using some mathematical software tools such as Matlab and then passed to *Omnet++*, but in this case, we decided to implement the evaluation in C++ because the computation is once and because the use of MATLAB with this kind of very complex antenna module could significantly slow down the simulation. Finally, the function *computeGain* evaluates the gain in function of the direction *EulerAngles* components and the steering angle according to Eq. (9) (that however does not consider the scan term); the portion of code of *computeGain* function that is shown in **Figure 14** is related to the implementation of the sum-

The validation of the designed models is accomplished by illustrating some log screens related to the debug runs and by analyzing some useful statistics extracted from the simulations. The following table includes the most important simulation

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

**Listing 3.**

**Figure 14.**

*MassiveMIMOUHPA.cc pseudo-code.*

*MassiveMIMOURPA.ned definition.*

**Listing 2.** *Nist error model, BER computation example.* *Smart Antenna Systems Model Simulation Design for 5G Wireless Network Systems DOI: http://dx.doi.org/10.5772/intechopen.79933*

### **Listing 3.**

*Array Pattern Optimization*

• *CosineAntenna*: It is the cosine pattern antenna designed in [32]. This model

• *DipoleAntenna*: The well-known dipole antenna; it is possible to set in the con-

• *InterpolatingAntenna*: This antenna model computes the gain in function of the

• *IsotropicAntenna*: It is the classical omnidirectional/isotropic antenna; it provides for unity gain by radiating the signal at the same way toward all directions.

• *ParabolicAntenna*: This model is based on a parabolic approximation of the

However, the detailed description of all kinds of antennas is beyond the scope of this chapter, which instead aims to illustrate the features of the designed massive

**Listing 3** illustrates the main definition parameters of the *MassiveMIMOURPA* antenna module. Note that the module inherits the basic features of the *AntennaBase* module; besides the main antenna array parameters such as the *length* the *distance* and the *frequency* the module provides for the setting of the steering angle *thetazero* in order to support the beam piloting; as already mentioned in Section 3.1.1, *M* and *N* represent the number of elements to be placed on the y- and x-axis, respectively. As a further example, in order to understand the implementation of the logic operations of the modules, the following pseudocode illustrates a portion of the

The algorithm in **Figure 14** depicts the main functions of the

*MassiveMIMOHPA*.*cc* class. The function *getMaxGain* computes the maximum

figuration file the length of the dipole (expressed in meters).

results very usefully for W-CDMA systems.

direction of the signal, using linear interpolation.

main lobe radiation pattern.

*MassiveMIMOURPA.cc* definition:

*Nist error model, BER computation example.*

MIMO modules.

**Figure 13.**

*Error model designing at the receiver.*

**100**

**Listing 2.**

*MassiveMIMOURPA.ned definition.*


#### **Figure 14.**

*MassiveMIMOUHPA.cc pseudo-code.*

gain according to Eq. (10); the function *getNumAntennas* returns the total number of antennas of the massive MIMO; the result of double integral (given by the *risInt* variable) is evaluated by implementing the Simpson method in C++ in the function *computeIntegral*; Observe that the integral could be computed by using some mathematical software tools such as Matlab and then passed to *Omnet++*, but in this case, we decided to implement the evaluation in C++ because the computation is once and because the use of MATLAB with this kind of very complex antenna module could significantly slow down the simulation. Finally, the function *computeGain* evaluates the gain in function of the direction *EulerAngles* components and the steering angle according to Eq. (9) (that however does not consider the scan term); the portion of code of *computeGain* function that is shown in **Figure 14** is related to the implementation of the summations of Eq. (9).
