Opportunism in Spectrum Sharing for Beyond 5G With Sub-6 GHz: A Concept and Its Application to Duplexing

With the envisioned massive connectivity era, one of the challenges for 5G/Beyond 5G (B5G) wireless systems will be handling the unprecedented spectrum crunch. A potential solution has emerged in the form of spectrum sharing, which deviates from a monopolistic spectrum usage system. This paper investigates the medium access control (MAC) as a means of increasing the viability of the spectrum sharing technique. We first quantify the opportunity of spectrum access in a probabilistic manner, a method referred to as opportunistic (OP) map. Based on the OP framework, we propose a random MAC algorithm in which the access of a node is randomly determined with its own OP value. As a possible application of our OP-map based random MAC, we propose a flexible half-duplex (HD)/full-duplex (FD) communication where each pair decides the duplexing mode according to the OP values of the two pair nodes. This approach fits well with the spectrum sharing system since it enables a flexible operation for the spectrum access according to the spectrum usage level. From the numerical analysis, we validate the feasibility and verify the performance enhancements by implementing a field-programmable gate array (FPGA) based real-time prototype. We further carry out extensive 3D ray-tracing based system-level simulations on investigating the network-level performance of the proposed system. Measurements and numerical results confirm that the proposed architecture can achieve higher system throughput than conventional LTE-TDD (time division duplex) systems.


I. INTRODUCTION
The emergence of the sharing economy has changed the way people live and get around, such as a car or house sharing.
The associate editor coordinating the review of this manuscript and approving it for publication was Arun Prakash .
This form of sharing improves the efficiency of resource utilization. It brings a breakthrough to the conventional ownership based usage system where resources are often used sub-optimally. This sharing not only improves the way people live, it actually plays a bigger role in solving scarcity. The scarcity of the licensed spectrum is also a never-ending VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ subject in 5G and beyond 5G (B5G) networks. As the spectrum scarcity of wireless technologies increase, these phenomena have fueled a growing interest in solutions that tackle spectral efficiencies such as sharing radio resources. The effect of sharing increases when the resource is scarce and more valuable, such as spectrum resource in wireless networks. In fifth generation (5G) systems, especially in massive Machine Type Communications (mMTC), the value of spectrum that aims to accommodate 1,000-fold more wireless devices, skyrockets. The traditional monopolistic spectrum allocation is unable to cope with such a rise in demand since 5G/B5G is expected to cover massive data traffic. Hence, known for its spectral efficiency (bps/Hz), through dynamic spectrum access, more and more researchers are turning their interest to spectrum sharing in which multiple networks coexist in one spectrum band [2]- [5]. This paper considers how to design a spectrum sharing network that can address the unevenly utilized spectrum in time and space. Recent measurements [6] showed that several frequency bands are vastly under-utilized, where we can apply the proposed systems. Spectrum sharing, which permits the access of under-utilized spectrums, can solve this imbalance. To this end, the sharing network should accurately track the degree of spectrum usage level in real-time.
In the conventional spectrum sharing technologies such as carrier-sense multiple access (CSMA) or listen-before-talk (LBT) [7], the network utilizes spectrum sensing to check the spectrum usage level. This way, the network deterministically decides whether the access opportunity exists or not, in this snapshot, we do not consider backoff status whether it has random persistent. Drawbacks to this technique, however, include the usage of spectrum varying spatiotemporally and the deterministic decision scheme. First, since each sensor only provides the local sensing information, uncertainty arises regarding the detection of spectrum usage. Measuring the spectrum occupancy with an ultra-dense resolution can be a straightforward solution, but this requires an expensive installation. Second, the deterministic opportunity decision may incur frequent transmission collisions because the access opportunity is spatially correlated. Nodes with high access opportunities are likely to be located close together. In this case, the deterministic access decision may make neighboring nodes transmit simultaneously, thereby causing more collision and wastage of energy. In contrast, the probabilistic decision scheme has less probability of making collision (i.e., collision probability = probability × probability).
We thus propose a new sharing paradigm in which the spatiotemporal randomness of the spectrum usage level is quantified in a probabilistic manner so that with this probability, a decision is made regarding the access of the node. Concretely, we predict the spectrum usage level at locations where sensors are not installed and represent the access opportunity level as a probability, namely opportunistic (OP) map. The probabilistic approach enables one to check the opportunity using only a small number of sensors, achieving a cost-efficient network, a priority for the 5G system [8].
Besides, the benefit of the proposed OP-map based medium access control (MAC) scheme lies in probabilistic transmission, which is the key characteristic of mMTC applications that are delay tolerant [3], [9]. The probabilistic transmission allows exceptions for both cases when the OP value is high and low. When the OP value is high, the proposed scheme can reduce the transmission collision by decreasing the simultaneous transmission, while guaranteeing the energy efficiency. On the other hand, when the OP value is low, the proposed scheme allows a few transmissions of nodes, whereas no node can transmit because of low OP value under the deterministic one. It thereby increases the spatial reuse. For extensive connectivity such as in IoT devices for 5G/B5G, we consider a cost-efficient environment in which deviceto-device (D2D) communication is applied via appropriate scattered sensors. In doing so, each paired node determines whether to send data to the other based on the given OP. Then, the division (time or frequency) must be different through system appointments because the other pair's signal can act as interference. In this regard, applying full-duplex (FD) technology that eliminates this interference can reduce the system overhead. Further, because the proposed MAC is applicable to FD networks, it allows more nodes to access the medium, compared with half-duplex (HD) based random MAC, leading to significant spectral efficiency improvements Also, with the emergence of recent works [10], [11], cognitive radio (CR), which is expected to allow unlicensed nodes to coexist in licensed bands, enabled the realization of massive connectivity [12].
As mentioned above, FD, which is an emerging key technology for 5G, can theoretically double the spectral efficiency by using the same frequency band at the same time. Implementing FD in practice, it is required to cancel the selfinterference (SI) signal, which is the echo of a transmitter and interferes its own receiver, to the noise floor. Accordingly, researchers have focused on canceling out the maximum amount of the SI. Based on advanced SI cancellation techniques, several studies have been underway to verify the concept of FD in practice. Researchers have proved that the actual results differ significantly from what the theories propose [13]- [21].
With the advent of the feasibility of FD, listen-andtalk (LAT) strategy, which transmits and senses spectrum usage simultaneously, was introduced [22]. This beneficial method, however, still has several problems, such as additional energy/cost consumptions of secondary nodes and cognitive capability for wideband sensing in user terminals. These problems hinder the adoption of the LAT strategy in D2D scenarios. Also, the sensing performance degrades due to the residual transmitting signal.
To overcome these obstacles, in this paper, we propose 'OP-map based flexible duplex systems' in a sensor-aided mode [23]. One might argue that the spectrum sharing network must guarantee primary users rather than any other performance. Over the past decade, however, research efforts in this area are mostly limited to academia, due to the difficulty of the accurate spectrum/spatial sensing. Although they have shown great potential, accurate sensing is not yet sufficient to meet the needs of commercial deployments [24]. In this light, even if the primary node's performance is guaranteed to a lesser degree, if a certain level of probability is satisfied for a sufficient threshold, there must be situations where it is advantageous to increase system performance. Thereby we tried to describe the characteristic of secondary access more rather than the primary network's condition.
The main contributions of this paper are elaborated in three-fold: • OP-map based spectrum sharing network: We propose the OP-map based flexible duplex system tailored for the spectrum sharing network in the PHY/MAC layer. We showed that the proposed system shows a significant improvement in spectral efficiency comparing to other conventional schemes.
• Real-time field-programmable gate array (FPGA) based flexible duplex platform and its performance verification: The main contribution of this paper lies in providing the characteristics of the spectrum sharing network with FD radios in a real-time implemented software-defined radio SDR) platform for the first time. We evaluate the feasibility of the proposed algorithm and the designed system through actual prototype implementations.
• Performance evaluation via realistic system-level simulation: Based on the measured data from the 3D environment system-level simulation (SLS) tool, we evaluate the system-level performance of our proposed architecture in a realistic 3D multi-path indoor scenario.
The rest of this paper is organized as follows. First, in Section II, we describe the architecture of OP-map based flexible duplex system and the proposed OP detection algorithm with MAC analysis. In Section III, we present our entire testbed set-up to protocol design. Following that, in Section IV, we evaluate the proposed system in the linklevel experiment results and the SLSs. Finally, we make some concluding remarks in Section V.

II. SYSTEM ARCHITECTURE AND OP DETECTION WITH MAC SCHEME
This section briefly introduces the proposed system architecture and concepts of our OP map with MAC analysis. Consider a general spectrum sharing system composed of communication nodes, spectrum sensors, and a distributed server that only provides the OP value (see Fig. 1). Deployed spectrum sensors periodically measure the interference level at their locations to check the spectrum usage level. Sensors send the measured results to the distributed server. VOLUME 8, 2020 FIGURE 2. A system model that shows how to compute OP in a stochastic geometry manner. A and B, respectively, decide to transmit data or not based on OP2 and OP1. d is a distance between two nodes.
The server calculates the OP value at every location with a given measured interference level of the nearest sensor. Each pair has a respective OP value given from the server. Based on this OP map, each transmitting node makes a decision for transmission. Thus, paired nodes flexibly transmit signals between FD mode, HD mode, and no data transmission. These transmissions affect not only the pair's communication performance but also the other pair's link quality. Therefore, the access probability should be determined by regarding both, which is discussed further in Section II-B.

A. OP DETECTION
This section proposes the OP detection algorithm in which given the channel sensing result, the OP value at each node's location is calculated based on the predicted level of interference, i.e., where θ and I represent the access threshold and the measured interference level at the nearest sensor, respectively. Note that the access threshold θ implies the transmission requirement, so the OP represents the predicted probability of the transmission success.
To represent the OP numerically, we focus on the spatial correlation of interference between the node and its nearest spectrum sensor. The amount of correlation is highly contingent on the spatial difference between the node and the sensor; this changes in a topological environment, as with interferer locations. Specifically, when the node and the sensor are co-located, it is evident that they meet the same level of interference (where a distance between the node and the sensor, r ≈ 0, as shown in Fig. 2). As the distance between them lengthens (r 0), the similarity decreases, and finally they become independent. In our previous study [25], [26], we figured out, with the aid of stochastic geometry (SG), this spatial correlation in the form of conditional probability.

1) SYSTEM MODEL
To this end, we yielded the distance R I between a sensor and its nearest interferer (e.g., primary TX) from the sensed interference level. Suppose we make a circle with radius R I around the sensor, and then no interferer exists inside the circle, which is called an empty ball (Fig. 2). Then interferers located farther than the nearest interferer were assumed to follow poisson point process (PPP) from the node viewpoint [27]. With this condition, the expected value of interference at the sensor is represented below with the aid of Campbell's theorem [28].
from the nearest one where P 1 , α, and T 1 , respectively, denote the level of the primary TX's power, path-loss exponent, and the nearest primary TX. We assume that the primary TXs follow a homogeneous PPP 1 with density λ 1 . x 1 (i) and h (i) denote the distance from the i-th nearest primary TX and its Rayleigh channel. Note that, the transmitted signals experience Rayleigh fading with a mean of unity appropriate (i.e., h ∼ exp(1)).

2) PROBLEM FORMULATION
From the measured interference (2), we have R I by applying the Laplace transform of I r (L(s) = E e −sI r ) and the probability generating functional for the PPP distribution.
We represent the OP value (1) that is divided by the SIR level from the T 1 and the rest. Then the access probability is where x, P 2 , d, and r respectively are the distance between a typical secondary RX and T 1 , the secondary TX's power, the distance between paired secondary nodes, and the distance from the sensor to secondary RX (see Fig. 2). Noting that, we calculated OP to detect OP 2 in Fig. 2, while the opposite case OP 1 was calculated as well. Utilizing a triangular function and the property of moment generating function of exponential, we achieve (5) from (3) that is SIR level affected by T 1 . Under the assumption of empty ball condition mentioned above, we know that there is the empty ball of radius R I guaranteeing no primary TX inside. Imagine a thin circular ring with radius y at a typical secondary RX. A secondary RX does not have any interferer at the intersected area with the empty ball. From that point of view, the intensity function of primary interferer becomes By applying (4) and the probability generating functional for the PPP, we can finally express the term OP, 2πP 1 θd α y −α+1 P 2 + P 1 θd α y −α dy. It is worth noting that this probabilistic approach plays a role in transforming the real interference value to the level of the OP in a stochastic manner. Note that considered topology that is expanded to the two-user scenario is utilized from our previous study [25], [26]. The measured interference level at the sensor itself cannot provide an accurate prediction of the interference level at the node of interest because it depends on various parameters such as the density of TXs and transmit power. For instance, even though the measured interference at the sensor seems to be relatively high, there can be more OPs around the node, especially when the density of TXs is low. SG can reflect these kinds of parameters within one metric in a probabilistic form, which thus harmonizes with the operation of the proposed OP-map based spectrum sharing system.

B. FUNDAMENTALS OF MAC FOR SPECTRUM SHARING NETWORKS
In this subsection, we examine some criteria for designing a MAC algorithm. An intuitive way to maximize spectral efficiency is to select pairs of the nodes optimally. Such a centralized manner requires, however, a coordinator to exactly know the locations of nodes and real-time channel qualities of all communication links. Because it is hard to be realized in practice, however, we consider a distributed manner instead of the centralized operation to design a practical MAC algorithm.
In sharing networks, the nodes should not transmit with their maximum power in every time slot for coexistence and harmony with other networks (e.g., primary protection in cognitive radio networks). We can infer the level of interference using the OP value in our framework, and the presumption of interference level helps us to judge the success probability of communication of the node. Hence, we adjust the transmission probability using the OP value in our MAC algorithm.
Let us focus on two transmission pairs in the network, as shown in Fig. 2, of which the OP of a receiver is 0.8 (OP 1 ), and that of the other is 0.5 (OP 2 ). We categorized some possible cases of transmission, which are described in Fig. 3a. Then, we compared three typical cases in terms of interference management of two paired users. Figs. 3b and 3c show the example of SIR regions of two receivers for the cases where the mutual interference is small and large, respectively (Detailed mathematical analysis and parameters are specified in [29]). Each figure has three distinguishable points that denote SIR averages of each comparing access mode described in Fig. 3a. For instance, in the maximal power case, we controlled the transmit power of nodes A and B from zero to P max that denotes blue line and red line, respectively. Thus, the circle (vertex) point in the graph means the SIR when both nodes A and B use the maximal power P max . For the random access case, we controlled both node's opportunity, while we controlled the transmit power in the reduced power case. In Fig. 3b, maximal power transmission shows the highest sum of SIR among three cases. Though reduced power transmission and random access show slightly smaller values than that, they produce less interference because the nodes spend a smaller value of (transmission time) × (transmission power). We see that random access increases the average SIR of the node with a smaller OP (y-axis) compared to the power reduction scheme. It comes from the scheduling effect of the probabilistic access.
From the low OP node's viewpoint, the node has an opportunity of communication without interference from the high OP node (x-axis) in the random access if it transmits while the high OP node does not transmit. That means the low OP node can communicate with the smallest interference for a given external interference. In the reduced power transmission, however, the high OP node always transmits with greater transmission power, and there is no possibility of SIR improvement. The mutual interference mitigation is much more of a benefit for nodes with the low OP. In Fig. 3c, the random access shows higher sum-throughput than the maximal power transmission as the mutual interference becomes large. It can be inferred that random access is more efficient in interference management and can increase fairness than reducing power transmission. Thus, we use the random access as the basis of our MAC. It is noting that random access schemes are not only used in WLAN systems but also in cellular networks, especially when user terminals are initiating a data transfer, which is called a random-access channel (RACH).
For the ways of random access, we can consider CSMA or ALOHA that is a typical distributed MAC scheme, and there is a difference that CSMA's contention operation has a dependency in time axis whereas ALOHA is independent. In snapshots, however, we can model active transmitters by stochastically thinning both operations [30], so we analyze the ALOHA-like scheme for analytical convenience. Noting that we use random access, not deterministic access, as the basis of our MAC, as mentioned above. The result can be directly applied to the ALOHA scheme, but it can also be applied to the CSMA scheme by adjusting the contention window size so that the average transmission probability is the same. Also noting that, unlike conventional MAC schemes like ALOHA or CSMA, our contribution is based on novel OP values that are adopted in conventional MAC schemes to enhance both the protection criterion and maximizing the system throughput. Thereby, the proposed system provides a useful guideline to realize massive connectivity of 5G/B5G such that given the local interference information, each device enables to control its access decision optimally to maximize the spectral efficiency without the centralized decision process.
From the fundamentals that we examined, we design our MAC to set the transmission probability of the nodes in proportion to their own OP value. 1 For instance, when the pair nodes have 0.8 and 0.6 as their OP values, respectively, the pair utilizes the FD with a probability of 0.48.

III. TESTBED DESIGN A. HARDWARE ARCHITECTURE
The communication system, including all node terms such as the primary node, the secondary node, and the sensor is implemented using LabVIEW system design software, and an FPGA based PXIe SDR platform, as shown in Figs. 4 and 5. Most notably, the FD nodes that play a role as the secondary nodes consist of the following four main components: 1) A dual-polarized antenna for passive analog SI cancellation using high cross-polarization discrimination (XPD) without any power consumption. 2) PXIe-8880 real-time (RT) controller for controlling the applications and performing basic baseband processes supported by an octa-core processor [31]. In this part, which is a host session (Fig. 4), we can design functional blocks such as manipulating data, parameters, and outputting results. Although it has a relatively slower clock rate than FPGAs ( 200 MHz), the amount of memory is much more substantial and more flexible. 3) NI 5791 RF transceiver module for providing dual 130 ms/s capability with 100 MHz bandwidth and 14/16-bit accuracy for ADC and DAC, respectively [32]. 4) PXIe-7975R FPGA module, coupled to the 5791 RF, for high-throughput baseband processing with a Kintex-7 [33]. 63,500 slices and 28,620 Kb of block random access memory (RAM) are deployed in the FPGA module. Assigning this resource to the right place is imperative. Temporary memory such as SI rebuilding is usually stored in the block RAM, and the slice is mainly used for dedicated and independent operations such as calculating inverse channel vector h −1 [34], [35].
Note that one FD node consists of 1), 3), and 4) components. The primary node is made up of USRP RIO 2953R with the FPGA module based on a selected subset of the 3GPP LTE Release 10 [36]. It has the same operating controller that is connected through PXIe-8374. The deployed sensor that operates in 20 ms/s consists of USRP 2922, whose maximum IQ rate is 25 ms/s for 16-bit sample width [37]. It is also assigned an individual IP address.
All these modules are equipped in NI PXIe-1082 chassis that plays a crucial role in data aggregation with both FPGA processor sides and an RT controller for real-time signal processing [38]. Above all else, it also supplies synchronizing frequency offset (CFO) to enable data processing precisely.
As shown in Fig. 4, from the sensor to the transceiver, via the server, transmitting data such as OP map and sensing DB are transmitted by using Transmission Control Protocol/Internet Protocol (TCP/IP) with our several implemented agents.

B. FLEXIBLE DUPLEX FRONT-END: FABRICATION AND MEASUREMENTS
In this section, we examine the manufactured dualpolarization antenna as a passive analog SIC canceller. Our fabricated 2.52 GHz dual-polarization antennas have the purpose of isolating the received signal from the transmitted signal by using different polarized poles. Thus, it is utilized to provide the good SI cancellation level in the analog domain. Conventionally several antenna designs were adapted in full-duplex radios. Antenna spacing and constructing another signal are one of the representative solutions, but there are physical limitations or extra power consumption. The authors in [14] suggested a circulator that is a magnetic device to isolate the signal, however, it could not meet the SIC requirement level without additional active SIC. Therefore, prototyping full-duplex radios by utilizing a dual-polarization antenna was suggested to achieve the target SIC level.
The dual-polarization antenna used in [15], [16], [39], however, has few drawbacks in the structure, which is devised to increase the isolation level. Emission radiation is shielded through RF circuit to RF head by separating the poles, which hinders commercialization and uniformed performance. To tackle these issues, we manufactured our own dual-polarized antenna, as shown in Fig. 5.
Then we measured the beam pattern and the isolation level of the antenna through the actual anechoic chamber ( Table 1). The antenna properties are utilized to analyze the proposed  Moreover, we achieved 37.6 dB SIC level in analog domain, which is enough to mitigate the receiver noise. Also, the requirement of the digital SIC level is guaranteed within the dynamic range, which is the capability of ADC's quantization level (Dynamic range = 6.02 × n (14 bit ADC) + 1.76 = 86.04 dB).

C. FLEXIBLE DUPLEX PHYSICAL LAYER 1) SIGNAL MODEL
Consider a signal model with a time index n and a subcarrier index k to define metrics, which denote the k-th sample of the n-th orthogonal frequency division multiplexing (OFDM) symbol. With the indices noted above, after a fast Fourier transform (FFT), the received signal y at each node can be VOLUME 8, 2020 written as where x D and x SI are the desired signal from the opposite node and the SI signal, respectively, and z is a thermal noise. h D and h SI are single-input and single-output channels with the same subscripts as x.

2) PHYSICAL LAYER BLOCK DESIGN
More specifically, the secondary nodes performing FD communications have reference signals and several specifications that are set to the LTE standard to operate in the duplex mode. For simplicity, we assume D2D link structure as the frame structure of the LTE downlink, which is based on 2048 OFDM symbols with an extended cyclic prefix (CP, 512 lengths). Therefore 1 half frame (5 ms) comprises 10 slots, which are made up of 6 symbols each. Note that a primary synchronization signal (PSS) that is utilized to synchronize the time offset of both SI and the desired signal, placed in the sixth OFDM symbol of every first slot of the half frame.
The PSS is modulated by a 62-length Zadoff-Chu sequence given as where i ∈ {1, 2} denotes two different PSS signals for the SI signal and the desired signal. Thereby in our prototype, root indices n (1) and n (2) are 25 and 29 to estimate the SI signal and the desired signal, respectively. Contrary, on the opposite node, 29 and 25 to estimate the SI signal and the desired signal, respectively. Note that the Zadoff-Chu sequence is located on both sides of the DC-carrier by 31 pieces, and the physical design is extended from our previous study [15], [16]. To synchronize both signals at the receiver, we utilize the PSS signal by achieving the maximum value of the cross-correlation. Accordingly, we get the cross-correlation between every received filtered signal from the low-pass filter (LPF) and the PSS sequence to define the start point of the received signal.
The maximized cross-correlation value is After detecting both SI signal and the desired signal, we utilize the pilot signal to estimate the channel state per subcarrier. Conventionally, in LTE SISO system, there are 4 latticed downlink pilot resource elements in every single slot in one physical resource block to estimate the SI and downlink channel. Likewise, 4 latticed uplink pilot resource elements are allocated to estimate the uplink channel. In the full-duplex system, on the other hand, suppressing residual SI signal is a key role in detecting even more precise desired signal. Therefore, we need to rebuild the SI signal and subtract it from the received signal to get the desired signal. The rebuilt SI signal by the subcarrier based SI channel estimation is given asŷ whereĥ SI is the estimated SI channel and x SI is the SI signal. Thus, desired signal after subtracting is shown aŝ Then the estimated decoded symbol iŝ is a decoding equalizer that we applied here is a zero-forcing decoder.
We implemented core blocks of these processes using Xilinx IP in an FPGA domain; these blocks are the LPF, the FFT, the channel estimation block that exploits the pattern of cellspecific reference signals, and zero-forcing based channel equalizer block.
With our proposed flexible duplex algorithm, each node decides whether to transmit data using a duplex mode decision block (see Fig. 4, FPGA area) in every single half frame (5 ms). Thereby our platform could operate the half-duplex mode, the full-duplex mode, and the silent mode precisely. If the timing of changing modes is different from each paired node, data transmission may not be appropriately performed, because each half frame includes exactly one PSS, and it can make an error. Also, if the mode duration is lower than 5 ms, it may not be appropriately performed, because it is imperative to maintain the difference between the SI and the desired signal's over-the-air propagation delays within CP duration in the FD system [17].

D. OP COMPUTATION AND UPDATE PROCEDURE WITH TRANSCEIVER
With our designed blocks (see Fig. 4), we describe our realtime proposed testbed with the sequence order. Note that the sensor and the transceiver are in a fixed location, and every single datum exchanged through agents, is sent over the TCP/IP link. Feedback data also refers to the duplex decision information for each secondary node.
Step 1: While the primary is off, calculate the distances between the sensor and the secondary nodes by measuring power for each of the four modes (FD, two kinds of HD, and silence).
Step 2: The sensor measures the data every 1 ms (= 20 MHz × 1ms/20 MS/s) sensing time = sensing range × acquisition time IQ rate via the energy detection method.
Step 3: In parallel with Step 2, the transceiver initially sends the feedback to the server with the silence mode.
Step 4: Servers compute the OP for each secondary node with the latest data in the sensing DB and the feedback (since the sensing DB changes much more frequently than the feedback, the operation cycle of computing the OP is 1 ms).
Step 5: Each secondary node considers the computed OP to determine the duplex mode. Step 6: Each secondary node sends the feedback to the server.
Step 7: Proceed iteratively from Step 4 to Step 6.

E. TEST SCENARIO
We present the measurement campaign scenario that was conducted in Veritas Hall Building C, 332 at Yonsei University, as shown in Fig. 6 (4.63 m × 6.2 m). Through parameters, as illustrated in Table 2, with the fixed location of the secondary pair nodes and the sensor, we placed the primary node in unknown spots and measured for enough measurement time to meet the accuracy target.
First, we measured the interference level at the sensor for the full-duplex mode, the half-duplex mode, and the silence mode. Therefore the interference level is defined as where σ denotes the noise variance of z. Then we measured the system throughput of primary nodes and secondary nodes based on bit-error-rate (BER) performance in our testbed. Throughput is calculated as follows:

IV. PERFORMANCE EVALUATION A. EXPERIMENTAL EVALUATION
In this section, we provide experimental results of our OPmap based flexible duplex system in an indoor testbed. From our experimental results, we verified and characterized the link-level performance of our proposed algorithm with several conditions. We measured the time delay of each procedure before starting the experiment. The measured time delay of TCP/IP per link was about 1 ms in the lab, and took about 2.5 ms, even though the distance between Seoul (where the server is) and Incheon (where the testbed is located) was taken into account. The time delays of the feedback and the sensor were 5 ms and 1 ms, respectively (see Section III-C and Step 2 of III-D). Thus, as in the situation briefly described below, in the worst-case scenario, the total time delay amounts to 5+2.5+ 1 + 2.5 + 4 = 15 ms (using a server in the same region (Incheon), 5 + 1 + 1 + 1 + 2 = 10 ms). In Step 1, with the primary condition changed, the time delay of the updated new feedback value can be up to 5 ms. Then, after the feedback is sent to the server in Step 2 (2.5 ms), the server starts to send the OP calculation (up to 1 ms) in Step 3 (It is the same as the sensor update period). The computed OP is sent to the transceiver in Step 4 (up to 2.5 ms), and the arriving OP is considered in duplex decision block for 4 ms (the total feedback time should be a multiple of 5 ms as mentioned above).
Despite the assumption of the worst-case, and even with all these time delays, the OP calculation time of about 132 ms using Matlab dominates over the proposed testbed system. Note that the system latency is limited by the TCP/IP, and Matlab calculations. This can be further optimized by implementing all these procedures in an FPGA chip and applying the low bound of OP calculation (17 ms) [25].
Consider all of the above, the transceiver is set to 3 seconds to update reading OP period and the primary node is set to every 11 seconds to update a transfer decision with a probability of 0.4. Though it incurs more error rates, we focused on investigating the characteristics of our proposed algorithm under several conditions. The throughput with the access threshold (by using a paired two secondary nodes) in the random MAC decision is investigated in Section IV-A1. In contrast, the throughput with the deterministic MAC decision is investigated in Section IV-A2. In addition, we conducted a multi-node scenario to make it similar to multi-device networks, which is described in Section IV-A3. A multi-node scenario with more primary nodes and secondary nodes is evaluated in Section IV-B.

1) IMPACT OF THE ACCESS THRESHOLD
As can be seen in Fig. 7a, the y-axis represents the current mode decision of each node, and we can verify that the tracking method works well. Also, with the increment of the access threshold, the system throughput and the secondary node's throughput are slightly reduced, while the primary's throughput is increased (see Fig. 7b, the solid lines). Note that the primary node transmits data with a probability of 0.4, which incurs the throughput degradation of the primary node compared to the secondary node. In contrast, the secondary throughput includes the throughput of paired two nodes, which could operate in the FD mode. The nodes' throughput, which is based on BER, is also shown in Fig. 7b, and we can verify that the primary node's BER decreases while the secondary increases. We only considered 0.4 probability of transmission in the BER graph of the primary node and confirmed that the primary could be protected to some extent above the sufficient access threshold.

2) DETERMINISTIC MAC ANALYSIS
With the result from Fig. 7b, the dashed lines were performed by the deterministic value of 0.5, in which the node decides the transmission depending on whether the OP is greater than 0.5. The secondary nodes began to stop transmitting signals at a low OP (the primary's transmission), in the access threshold of 0, which represents a high chance of transmission of the primary node. Therefore, it degrades the system and the secondary nodes' throughput, while it increases the primary node's throughput. Thus, the primary node's throughput increases higher than the random MAC decision while the secondary decreases, because the deterministic MAC does not allow the transceivers to transmit signals. Also, the dotted lines representing the deterministic value of 0.7 indicates that the secondary nodes do not transmit signals if there is a transmission of the primary node in the access threshold from -3 to 2. From the access threshold 3, the deterministic MAC stops the secondary nodes from transmitting signals more frequently regardless of whether the primary node is transmitting a signal or not.
In summary, compared to the dashed/dotted lines representing the throughput of the primary node without any secondary nodes, the primary node is guaranteed to be an ideal value at the high access threshold, or the proper FIGURE 7. Experiment results. a) The secondary node's tracking results in our proposed algorithm. The number 1 in y-axis means half-duplex transmission (red line) and 2 in y-axis means full-duplex transmission for paired secondary nodes (red line) and transmission for the primary node (blue line). Also, 0 means no transmission for both paired secondary nodes, and the primary node. b) The system throughput, the secondary node's throughput, and the primary node's throughput with different access thresholds. c) The throughput analysis based on multi-nodes with different primary node's probabilities. deterministic value. At the same time, the random MAC should consider some performance degradation. From the system-level perspective, however, the random MAC ensures stable high performances even for a single pair analysis, whereas the deterministic MAC exhibits a relatively much lower performance. Moreover, since the access threshold is the transmission requirement, it is not an easy task to iteratively control the access threshold based on the results. Thus, the random MAC that is less affected by the access threshold and generally provides good results, is better than the deterministic MAC, which occasionally produces good results depending on the access threshold.

3) MULTI-DEVICE ANALYSIS
We jointly implemented our proposed algorithm with a single pair secondary node in the above sections. It is obvious that there are wide discrepancies between multiple devices and single device analysis, specifically random MAC vs. deterministic MAC. In this section, we have tried to find out how our algorithm will be applied when the number of nodes increases by adding a pair of secondary nodes (see Fig. 6, multi nodes). In order to reduce complexity, it is assumed that two pairs of secondary nodes select the closest FIGURE 8. A realistic model for 3D-ray tracing. We designed a 3D map based on this specific building, and we set a simulation scenario on the third floor where our testbed is located. Sensors are deployed in a fixed location, and the others are randomly distributed.
identical sensor (In the algorithm, the secondary node selects the closest sensor). Since the primary nodes are scheduled, it is assumed that only one primary node is considered. As can be seen in Fig. 7c, we compared the random MAC with the high OP and low OP in a situation where the access threshold is 2 (the situation where the secondary node shoots when the primary node does not shoot at the current position in the deterministic MAC), and the deterministic value is 0.5. VOLUME 8, 2020 FIGURE 9. a) The instance of system-level throughput results of the primary throughput without secondary node, the primary throughput with interference from secondary nodes, the secondary throughput, and the throughput of the whole system, which is sum of the primary and secondary throughput. The dash-dot one shows the result of the simple random selection algorithm (the conventional ALOHA scheme), the solid one shows that of the proposed OP-map based algorithm, and the dashed one shows the random selection with the probability of OP (OP=0.723, threshold=5, and the number of primary pairs=10). b) Throughput results for a few cases with the number of primary pairs and the access threshold.
First, according to the characteristics of the primary node's probability, the closer the probability is to 0.5, the lower the overall throughput because the state of the node changes more frequently. In the case of the primary node (blue lines of Fig. 7c), both MACs are almost linear because the primary node's probability is independent of the OP. In the case of the secondary node (red lines of Fig. 7c), the throughput decrease rate was lower than that of the deterministic one. This is because, in the case of the deterministic MAC, collisions occur more frequently among adjacent secondary nodes. Also, as the number of nodes increases (compared to Fig. 7b), the throughput of the primary node does not change much in the case of the deterministic MAC, but the amount of the random MAC decreases by twice (see Fig. 7c, the dashed blue line, and the solid blue line). This is due to the deterministic MAC, unlike the random MAC, which tries to completely suppress the transmission when the primary node is in use.

B. SYSTEM-LEVEL PERFORMANCE ANALYSIS
To show how our proposed algorithm affects the system and the primary node's throughput, we simulate the SLS under several conditions. As can be seen in Fig. 8, first, we modeled a 3D map based on a real building and deployed five sensors on the third floor where we conducted the linklevel experiment with a real-time demo system. Each sensor is modeled by an isotropic antenna, while the secondary nodes are equipped with the dual-polarization antenna, according to Table 1. We dropped both primary and secondary nodes randomly, while the paired secondary nodes are considered to be paired with each other. For simplicity, we assumed that all primary nodes are transmitting data simultaneously, while the interference between primary nodes is cancellated with a perfect scheduling algorithm. We considered the general sharing system that the primary's power is 100 times larger than the secondary's power. In every iteration of the node deployments, we simulated pathlosses between all transmitting nodes by With Wireless System Engineering (WiSE), a 3D ray-tracing tool developed by Bell Labs [40], [41]. Then we calculated SINR and throughput. More detailed parameters are listed in Table 3.
Figs. 9a and 9b show the results of the ergodic throughput of the proposed OP-map based algorithm, a simple random selection algorithm, and a random selection algorithm with a probability of OP. The simple random selection algorithm, which can be referred to as the conventional ALOHA scheme, makes the secondary nodes transmit with a probability of 0.5. It does not reflect the distribution of the primary users, so it can be considered as a performance lower bound. The results in Fig. 9a show that with the proposed OP-map based algorithm, the system throughput (the sum of the primary and secondary throughputs) significantly increases with a small loss of the primary throughput compared to the random selection algorithm (the dashed-dot one). The simulation results confirm that the proposed OP-map based algorithm shows 24% improvement of the whole-system throughput. The random selection with the probability of OP also shows the increment of the system throughput compared to the random selection algorithm. Fig. 9b shows average throughput results when the numbers of primary pairs are 5, 10, and 30 with the access thresholds are -10 and 20 dB. Except for the over-threshold adjustment of 20 dB, the performance is superior in consideration of OP probability compared to the random selection algorithm. Although the considered scenarios are indoor systems that have difficulty in the geometric approach due to a large number of walls, OP-map based algorithms are somewhat better in performance. We also compare the HD system with our proposed algorithm. The throughput results are shown in Fig. 9b and flexible duplex system utilized the number of FD nodes 9.219, 5.775, 8.568, 3.450, 6.486, and 0.722, respectively, compared to HD systems.

V. CONCLUSION
This paper proposed the novel spectrum sharing MAC to support massive connectivity networks in 5G/B5G. It was based on an OP framework that represents the spectrum usage level in a probabilistic manner. We first validated the feasibility of random MAC in which each node accesses the spectrum with a probability that proportionally increases with its OP value. Utilizing the OP-map based random MAC, we also proposed flexible HD/FD communications where the duplex mode of each pair is dynamically determined based on the OP value. Through link-level evaluations based on the SDR testbed, we confirmed that the proposed algorithm showed great potential compared to the deterministic MAC in single/multi-node environments. We focused on the secondary access more, but also considered the primary networks that we measured the system throughput and service quality of primary networks through indoor scenarios. We expect our study to provide in-depth insights into PHY/MAC design of spectrum sharing for 5G/B5G. Future work will enhance the spectrum utilization of mmWave bands [42], [43].