## 4 Cognitive Solutions for HetNets and M2M Communications
### Long-Term Cognitive Approaches  
In long-term cognitive approaches, the main problem is making a cognitive device aware--in an autonomic manner--of which frequency sub-bands are not used by the primary system, and hence, able exploit the transmission opportunities. Therefore, the secondary system plans periodic sensing intervals during which it measures the energy in the whole sub-bands in order to detect primary system activity. Several spectrum sensing approaches can be used among those proposed in the literature [48]. The spectrum sensing algorithms can be classified into blind detection and feature detection. The former is applicable to all the primary signals, even unknown, since prior information on the signal is not required. The most-known and simplest blind method is Energy Detector, but it has the drawback that it suffers heavy degradation in the case of noise uncertainty and in a low signal-to-noise ratio (SNR) regime. Differently, feature detectors such as matched filter, waveform-based, and cyclostationary sense specific characteristics of the primary signals that must be known \"a priori\". These methods can provide accurate sensing performance even in the presence of noise. In particular, great attention has been devoted to the methods based on the cyclostationarity property of the signal induced by the Cyclic Prefix (CP) in Orthogonal Frequency Division Multiplexing (OFDM) signals, such the ones used in most of the current wireless systems (_i.e._, LTE-A, WiFi, WiMAX). Different sub-optimal methods exploiting cyclostationarity have been proposed and evaluated to limit the computational complexity. In smart city environments, the selection of the sensing scheme should be suitably driven by the desired trade-off between implementation complexity, estimation time, and performance in terms of false alarm and detection probability. In particular, when low complexity devices are involved (_i.e._, sensors), low complexity algorithms should be preferable--adopting different strategies, such as distributed sensing [49], to improve the reliability of the produced output. Figure 2: Spectrum Opportunities. In the literature, some examples of long-term cognitive approaches can be found. In [50], the authors proposed a selective method that permits the secondary user to exploit not only the sub-bands left unused by the primary system (Opportunistic approach) but also the sub-bands that result underutilized by adopting suitable subcarrier. This solution can be useful either in HetNets or M2M communications. However, underlay communications are particularly suitable for M2M applications characterized by short range communications, and therefore low power emissions. In particular, depending on the primary systems' signal strength, the CM2M network is able to determine the maximum power that can be used without causing high interference. This issue was considered in [51], where the authors analyzed the feasibility of implementing a CM2M network by using primary cellular bands. A hierarchical network structure was proposed, where cluster heads gather M2M traffic and forward it to the primary cellular network. In addition, the cluster head--on the basis of a previous sensing phase--estimates the maximum allowable power for M2M communications and broadcasts this information to all M2M devices within its area. In [38; 52], CM2M communications have been investigated to be applied in smart environments. In [38], the authors designed a cognitive medium access control protocol, based on packet reservation multiple access. The protocol is centralized and utilizes a specialized frame structure for supporting the coexistence of the CM2M network with the primary H2H network. In this case, spectrum sensing is not performed by each machine, but a low-cost dynamic spectrum access solution realized in the form of master-slave operation is considered. It means that only the gateway of the M2M network, which is supposed to be a more powerful device, performs sensing and then makes a decision on the resource access.