Spectrum Allocation Scheme Based on Stable Matching in Hierarchical Cognitive Satellite Network

Aiming at the problem that the number of users and available bandwidth of the current satellite service are increasing significantly, and the spectrum utilization rate of the existing spectrum allocation scheme is low, this paper first establishes a space-earth integrated spectrum resource sharing model, and analyzes the scenario of using the idle spectrum of the ground network to recognize the satellite downlink. Furthermore, a spectrum allocation algorithm based on stable matching is proposed for cognitive satellite network. According to the transmission characteristics of satellite communication, utility functions of cognitive satellite are given. Users can form stable matching between PUs and SUs through independent negotiation. The spectrum allocation algorithm proposed in this paper has low complexity and can adapt to dynamic networks. Experiments show that the proposed algorithm is superior to greedy matching and random matching in utility value, average sum rate, throughput and spectrum utilization ratio, so as to effectively allocate satellite spectrum.

mation loss caused by the disaster has not been effectively prevented. In recent years, cognitive radio technology has become a hot topic of reusing the same spectrum resources between satellite networks and terrestrial communication.
To realize the cooperative communication between satellite networks and terrestrial networks, the spectrum allocation technology of cognitive satellite networks is researched and developed. In [5] and [6] puts forward a system architecture of adding cognitive radio technology to the integrated network of satellite and ground, which is early research of cognitive satellite communication network. Applying the spectrum allocation technology in cognitive radio to the satellite ground integrated network can realize the spectrum sharing between satellite and ground communication networks and improve the spectrum utilization rate of the satellite communication system. At present, the satellite channel allocation method is to select channels from available channels in sequence or randomly, and then switch to other available channels when the channel quality drops to a certain degree. The purpose of switching and channel selection is to select channels from available channels in sequence or randomly. This allocation method does not consider the adaptability of channels to the communication environment and does not distinguish the channels in the frequency band in terms of environmental adaptability. All channels have equal availability probability in the area covered by satellite beams [7].
Spectrum allocation is the key technology of cognitive radio. Under specific network requirements, the appropriate available spectrum can be allocated to the corresponding users according to certain spectrum allocation criteria, and it will not cause interference to primary users. Zuo et al. [8] the spectrum resource allocation problem of cognitive satellite communication downlink, because of the characteristics of Low Earth orbit (LEO) satellite's fast movement, ensures the high efficiency of service, proposes a heuristic algorithm to quickly allocate frequency band and dedicated beam, and takes the maximization of throughput as the goal of cognitive communication. In addition, Jia et al. [9] proposed a downlink spectrum allocation scheme for cognitive satellites based on service priority, which adopted a matrix conversion method. When SUs and cognitive spectrum changed dynamically, spectrum allocation could still be carried out, and the total throughput could be maximized. Because the spectrum conflict between satellite communication and terrestrial communication restricts the development of satellite communication systems, to make more rational use of wireless spectrum resources, Liu et al. [10] proposes a spectrum allocation algorithm for satellite terrestrial communication based on game theory. The experimental results show that the game process has a steady-state solution and can reasonably allocate wireless spectrum resources without affecting PU communication. Wang et al. [11] studied a distributed joint resource allocation algorithm for nonideal spectrum sensing cognitive satellite ground network based on convex optimization theory. The influence of channel condition parameters on channel delay under the condition of a non-ideal spectrum sensing is revealed. The numerical results show that the transmission delay of SUs is reduced after resource allocation. Lagunas et al. [12] studied that the fixed satellite service (FSS) satellite network can transmit its information by sensing the spectrum of the fixed service (FS) ground network. In the downlink scenario of cognitive satellite, the spectrum of cognitive satellite ground terminal is allocated by the Hungarian algorithm. However, the Hungarian algorithm can only solve the problem of one-to-one allocation of the balanced matrix. In addition, Gu et al. [13] mentioned in the research that when the available channels are insufficient, time-division multiplexing (TDM) is used for satellite signal transmission. At this time, some signal transmission delays will be caused, which will affect the performance of users with high real-time requirements. In recent years, the matching market model of resource allocation in wireless networks has been applied in many fields. To control the interference of SU to PU, Zhong et al. [14] considered the uplink resource allocation in cognitive satellite networks, considered the interference limitation and satellite antenna acceptance ability, and proposed a joint resource allocation scheme based on the bargaining theory of game theory. Compared with the existing methods, the simulation study shows that this algorithm is Pareto optimal and can achieve a better balance between user fairness and the total capacity of the whole network. In [15], the bilateral stable matching framework is applied to resource allocation in wireless networks, and the simulation results show its advantages in distributed implementation and efficiency. In [16] and [17], one-toone stable matching is considered, where SUs and PUs use the same utility function. In this case, the stable matching between SUs and the primary channels is proved to be unique. Gale and Shapley were the first to explore stable matching [18], and verified the existence of stable matching for the first time. In their pioneering work, they mainly explored the problems of marriage matching and college entrance and proposed a delayed acceptance algorithm to achieve stable matching. The matching theory is widely regarded as a powerful mathematical tool to solve the problem of resource allocation [19]. The ultimate goal of spectrum allocation is to complete the reasonable allocation of available spectrum through a reasonable spectrum allocation mechanism and improve the utility and spectrum utilization of cognitive satellite networks. At present, most of the spectrum allocation methods only consider the utility function of SUs, such as throughput, energy efficiency, and interference limitation on PU. Game theory uses the competitive relationship between SUs to model and solve the equilibrium solution of the problem. However, few studies comprehensively consider the different performances of SUs and PUs.
In order to improve the utilization rate of spectrum resources, a spectrum allocation scheme of cognitive satellite network based on stable matching is proposed. Combined with the structure characteristics of multi-layer space of satellite network, a satellite network model based on hierarchical cluster is established. According to the real-time performance, the two-sided matching theory of economics is introduced, and the performance of PUs and SUs is jointly considered. A spectrum allocation algorithm based on dynamic collaboration between cognitive users and authorized users is constructed. SUs and PUs generate preference information according to corresponding utility functions and form a final resource allocation scheme through autonomous negotiation.
The remainder of this paper contains the next parts. Section II defines the system model including the satellite network architecture, the definition of SUs and PUs utility functions.Section III introduces the spectrum resource allocation algorithm based on stable matching and gives four definitions of stable matching.Section IV verify the proposed algorithm by simulation and depicts the results with figures.Section V summarize some important conclusions of this work.

II. SYSTEM MODEL
This paper will introduce the adopted layer cluster cognitive satellite ground network architecture. Fig.1 shows the layered cluster cognitive satellite ground network scenario. Fixed ground station, user and base station as PU, Geostationary Earth Orbit (GEO) satellite is used as the spectrum Service Center for spectrum allocation, and the LEO satellite is used as the SU to use the free spectrum of the PU on the ground. Assuming that the relevant information of PU has been known by SU, the available spectrum set is {CH 1 , CH 2 , · · · , CH k }, there are K available spectra in total, each available spectrum is allocated to one PU, the occupied available spectrum PU is PU k , the bandwidth of each spectrum is B k , the aggregation of ground PUs is {PU 1 , PU 2 , · · · , PU K }, the secondary user set is {SU 1 , SU 2 , · · · , SU N }, and there are N users in total, a stable matching algorithm is introduced to solve the problem of available spectrum allocation, To meet the needs of SUs and system performance. In this paper, the centralized implementation is considered, and the GEO satellite is used as the central unit to obtain the spectrum occupation state of the whole network.
To represent the resource allocation results, N × K dimensional allocation matrix A is defined to represent the relationship between SUs and primary channels. Element, x n,k indicates whether the user s n occupies the primary channel CH k , x n,k = 1 indicates that the user s n occupies CH k , otherwise, x n,k = 0. Since each primary channel can only be allocated to a single SU, the following constraints can be obtained: Similarly, since each SU can only access one primary channel, the constraint conditions can be obtained: Considering the quality of service (QoS) index of SUs in a cognitive satellite network, the characteristics of primary channels can be distinguished by the available time, bandwidth, and switching rate of the spectrum, and the utility function of SUs can be constructed based on this.

1) AVAILABLE DURATION OF SPECTRUM
Considering the difference in the available time of the primary frequency band in a cognitive satellite network, T OFF,k is used to represent the available time of spectrum k, and the available time of frequency band k follows an exponential distribution, and its parameter is λ OFF,k [20]. When the available spectrum k is accessed and SU uses the frequency band, the available duration of the available spectrum k has lasted t, then the probability that the remaining available duration of the available spectrum is not less than T (T ≤ T OFF,k − t) is as follows: It can be seen from the above formula that the greater the R k (T ), the greater the probability that SU can complete data transmission in the [t, t + T ] time period, and the more conducive it is for SUs to carry out data transmission.

2) CHANNEL TRANSMISSION RATE
Because the gain of different channels is also different, and it is closely related to the speed of information transmission, the transmission speed will also change due to different channels. We can use the following formula to express the rate of SU N when transmitting on channel k.
where B t k represents the bandwidth of each channel; ω indicates the power of SUs when transmitting signals; h n,k indicates channel gain; σ 2 represents the variance of noise, and n ∈ 1, 2, · · · N .
When SU initiates the use of a frequency band at time point t, its data transmission within [t, t + T ] time will not be interrupted only when the length of time that frequency band k can be used by SU is at least T . Therefore, considering the available time and transmission rate of the spectrum, the amount of data that SU can transmit when communicating with the available frequency band is designed as the utility function of SUs in time t, as shown in the formula:

B. PRIMARY USER UTILITY FUNCTION
PUs, as the owner of primary channels, should consider their influence due to spectrum sharing when allocating resources. When PUs restart, SUs can continue to use within the power range allowed by PUs. The central controller formulates differentiated payment rules according to SU's transmission rate, quality of experience (QoE), etc. and PU is willing to lease primary channels of PUs to SU who pay high fees, so the utility of PU is set as the product of achievable rate (opportunity rate) and revenue: where, the price factor ρ S n > 1, P K 0 represents the probability that the primary channel K is idle, P P m represents the transmission power of PU P m , h P m represents the gain between PU receiving transmitters, and h s n P m represents the channel gain between SU s n transmitter and PU P m receiver.

III. SPECTRUM RESOURCE ALLOCATION ALGORITHM BASED ON STABLE MATCHING
The spectrum allocation model based on the stable matching algorithm in this paper is a centralized spectrum allocation scheme, that is, the spectrum allocation is completed in the GEO satellite fusion center. The centralized spectrum allocation method is adopted, and the multi-objective optimization of SU and PU performance is considered. One way to solve the multi-objective optimization problem is the weighted sum of optimization objectives [21]. Therefore, the weighted sum of utility functions is adopted here.
where, λ is a parameter, which is used to adjust the priority of one target to another through λ ∈ [1, 0] weighting factor. When λ increases close to 1, pay attention to the performance of SUs; when λ decreases close to 0, pay attention to the performance of PUs to protect the communication quality of PU. The value of λ must be defined according to the network specification. The spectrum division problem can be modeled as an optimization problem as follows: SUs choose to access the primary channel occupied by PUs, which can be regarded as a one-to-one bilateral matching problem. Its performance is equivalent to that of a centralized scheme, but its complexity is extremely low. The matching theory indicates that in two independent sets, users in one set have a preference relationship with users in the other set, that is, one user has a priority when selecting users in the other set. Each SU has a strict preference for each available spectrum. Similarly, each available spectrum has a strict preference for each SU. Symbols are used to express the preference relationship of each user, and symbol k is used as the preferred relationship of primary channel K ; For SU s n , the preference relationship s n can express the preference for PU. Establish a preference matrix and the spectrum resource allocation problem based on stable matching can be expressed as where CH K represents the set of primary channels, s n represents the set of SUs, and the formulas of U PU k and U s n have been given by the above formula.

1) DEFINITION 1
one-to-one matching: matching µ is the mapping of sets CH K ∪ SU N → CH K ∪ SU N , ∀CH k ∈ CH K , ∀s n ∈ SU N and there are: (1)|µ(CH k )| = 1, and if so µ(CH k ) / ∈ SU N , then µ(CH k ) = CH k ; (2)|µ(s n )| = 1, and if so µ(s n ) / ∈ CH K , then µ(s n ) = s n ; (3)If and only µ(s n ) = CH k , µ(CH k ) = s n . Using stable matching for spectrum allocation ensures that the current users will not deviate from the matching result, that is, the desired allocation result is as stable and reasonable as possible, rather than the objective function of the optimal problem [22]. In the above definition, µ(s n ) means SU and PU CH k are matched or SUs are self-matched, and µ(CH K ) similarly.

2) DEFINITION 2 a: BLOCKING PAIRS
Note that the goal of SU is to find PU with a larger utility function value. If there is an allocation scheme that meets the following conditions, it indicates that the s n preference list forms a blocking pair (s n , CH k ) with the available channel CH k . Suppose that in the current iteration, the first element in the s n preference list is CH k . However, if another available channel CH k * appears and the utility value is greater, SU places CH k * as the first element in the preference list and uses the symbol k * s n k to represent that SU prefers CH k * . This replacement operation is determined by the blocking pair and meets the: SU-PU pair (n, k * ) ∈ (SU N , CH K ), k * s n k meeting the following conditions: (1)U s n (CH k * ) > U s n (CH k ) (2)U PU k (s n ) < U PU k (s n * ), s n * CH K s n and SU s n * allocated the available spectrum CH k .
First, if s n finds another CH k * with a greater utility value and the transmission requirements of SU can be met, and the replacement operation is required. On the other hand, s n * is allocated spectrum from CH k * . If CH k * prefers s n to s n * and meets the transmission requirements of s n , replacement operation is required.

3) DEFINITION 3 a: STABLE
There is no blocking pair in the match µ.
Due to the scattered geographical location, each user may have different channel rewards in the same channel in time. Usually, it is expected to get a reasonable and stable allocation result as much as possible, to maximize the utility of the whole network. This paper gives the utility functions of PUs and SUs respectively, and users can form a stable match through independent negotiation. This paper proposes a stable dynamic spectrum allocation algorithm, which includes initialization, SUs application, and channel decision. The specific implementation steps of the algorithm are as follows: The above algorithm introduces the spectrum allocation based on stable matching in detail. Firstly, initialize the preference matrix, allocation matrix, and set of steps 1-3; In step 5, each SU applies to the preferred item in the preference list; Step 6: PUs decides on the application of SUs; Repeat the above process until S um is empty or the preference list of all CH K is empty.

4) DEFINITION 4
The above algorithm is stable.
In step 1 of the proof algorithm, the preference matrix P is established according to the utility function of the above formula. It is assumed that two pairs of (s i , CH j ) and (s i * , CH j * ) in the unstable factor design set, and the relationship between them is CH j * s i CH j anad s i CH j * s i * According to the G-S algorithm, SU s i application to channel CH j is the last time. If SU s i has applied for channel CH j * , channel CH j * is higher than channel CH j in SU s i preference list, that is, SU s i prefers channel CH j * . However, channel CH j * makes SU s i apply for channel SU s i because SU s i is rejected, that is, channel CH j * does not prefer SU s i , which is contrary to the assumption. If SU s i has not applied for channel CH j * , the channel CH j on SU s i preference list is higher than channel CH j * , that is, SU s i prefers channel CH j , which is contrary to the hypothesis, so there is no blocking pair in the matching. According to the fact that stable matching is a matching strategy without blocking pairs, the algorithm is stable. The certificate is completed.
2 Theorem Table 1 The solution of the algorithm is weakly Pareto optimal for SUs Proof: Using the method of counter evidence. Suppose there is a match µ * satisfying µ * (s n ) s n µ(s n ) and ∀s n ∈ S N . According to the above algorithm, assuming that SU s n prefer matching µ * it can be seen that matching µ * makes SU s n match the channel that has rejected it in the matching µ and represents the channel set that has rejected it as µ * (S N ). These channels in the matching µ are not applied by SU s n , so µ * (S N ) must have corresponding SU s n matching µ(µ * (S N )) = S N . From the above, it can be seen that each SU has a matching channel in the matching µ and µ * and µ * (S N ) = µ(S N ), so there is no application for SU rejected by the channel in the matching µ; According to the assumption µ * (s n ) S k i µ(s n ), the channel is not matched in the matching µ * , which is inconsistent with µ * (S N ) = µ(S N ), so the assumption is not tenable.

IV. SIMULATION ANALYSIS A. EXPERIMENTAL SETUP
In this section, for simulation verification, STK simulation software was used to simulate the ground network architecture of the layered cognitive satellite, NS3 was used to build a spectrum allocation simulation platform, and on this basis, MATLAB was used to simulate the proposed algorithm. During the simulation, it is considered that all cognitive LEO satellites in the cluster are distributed at an altitude of 800-2000km and cover the same area at the same time. The number of available spectrum K is taken as K =5 and K =10 respectively, while the number of SUs N changes dynamically within [1, K ]. The following Fig. 2 shows the distribution diagram of SUs and PUs. According to relevant studies in literature [8], the power of the PUs transmitter is 5W, the transmission power of SUs ω is 8W, the weighting factor is 0.6, the idle probability of the primary channel is P k 0 = 0.6, and the price factor is set as ρ s n = 1.5. The relevant parameters of the simulation are shown in Table 2.

B. ANALYSIS OF SIMULATION RESULTS
To illustrate the performance of the algorithm, the result of random matching is measured by the average of 1000 simulation results, and the method is compared with the optimal solution and random matching in formula (8). In this paper, the optimal matching solution is obtained by calculation VOLUME 10, 2022   under the assumption that the spectrum allocation is Pareto optimal. A total of three groups of experimental data were set for comparison. From Fig. 3 and Fig. 4, it can be observed that the utility value of SUs, PUs and global utility value all increase with the increase of the number of cognitive users, and the solution of the stable matching algorithm proposed in this paper is always between the optimal solution and the random matching solution. Since the stable matching spectrum allocation scheme adopted is weak Pareto optimal, the stable matching algorithm will always approach the optimal solution in the results, but cannot really reach the optimal solution. Therefore, it can be seen from Fig. 3 and Fig. 4 that the effect of global utility value and SUs utility  value under the stable matching algorithm is very close to that of optimal matching, and is always higher than that of random matching. When the number of SUs is 5, the difference between the utility value of PUs under stable matching and the optimal matching is less than 0.1, and the difference between the utility value and the random matching is more than 0.4. At the beginning, the global utility value of stable matching is almost the same as that of optimal matching, but compared with random matching, the utility value of stable matching is always higher than that of random matching, and the utility gap is increasing with the increase of the number of SUs. In particular, considering only the utility value of PUs, when the number of SUs is less than 9, the utility value of the stable match is always almost equal to the optimal match. It proves the high efficiency and stability of stable matching in spectrum allocation. Meanwhile, it can be concluded that as long as enough spectrum is applied, the overall utility can be improved to the greatest extent.
The following figure shows the change in average and rate of PUs and SUs when signal noise ratio(SNR) increases. The number of SUs is N = 10, the number of the available spectrum is K = 10, and all available spectrums obey the Rayleigh distribution.
It can be observed from Fig. 5 that in the stable matching scheme, the average rate of PUs under different SNR is  always between the optimal matching and random matching, which proves the effectiveness of the algorithm. Meanwhile, it can be concluded that the performance loss in the stable matching is very low. In Fig. 6, compared with the random matching scheme, the average and rate of SUs using stable matching is always larger. For example, when SNR = −16dB, the average and rate of SUs increases by 50%, but there is still some gap between the maximum possible and the rate of SUs. Note that the maximum possible sum rate here is obtained at the lowest point of PUs and rate, which is unsatisfactory for cognitive networks, where PUs communication is always preferred. Fig. 7 shows the changes of throughput in different number of cognitive users, with one available spectrum per user and a maximum bandwidth equal to 30Mbps. Among them, the value of optimal matching is calculated by introducing Pareto optimal theory in the paper, and the value of greedy matching and random matching can be obtained according to the relevant research of literature [8]. It can be seen from the figure that with the increase of the number of SUs, the throughput of optimal matching, stable matching and random matching gradually increases. This is because with the increase of the number of SUs, the amount of available spectrum also keeps increasing, and the probability of SUs obtaining spectrum revenue from PUs will increase. When the number of SUs reaches 9, the throughput gap between stable matching and the other two algorithms reaches the largest, which is 1.46 times that of greedy matching and 2 times that of random matching. It can be seen from the figure that the throughput of the stable matching algorithm is always higher than that of greedy matching and random matching, because the stable matching algorithm considers not only the preference state of SUs but also that of PUs. After several iterations, the most appropriate spectrum resource is finally found. It can be seen from the results that the stable matching result is always good and closest to the optimal matching. The greedy matching only considers the preference state of SUs, so the overall throughput is not as good as stable matching.
Spectrum utilization is another important index of spectrum allocation algorithms. This paper verifies the validity of the spectrum allocation algorithm in spectrum utilization by changing the number of SU. It can be observed from Fig. 8 that with the increase of the number of SU, spectrum utilization of random matching and stable matching presents a trend of increasing. This is because when the number of SUs is small, their transmission requirements are also small. Compared with random matching, the spectrum utilization rate of stable matching is always higher. With the change of SU number, the maximum spectrum utilization rate of random matching is always less than 0.5, while the maximum spectrum utilization rate of stable matching algorithm can reach 0.9, which proves the effectiveness of stable matching in maintaining a high spectrum utilization rate.

V. CONCLUSION
In order to solve the problem that the number of satellite service users and available bandwidth increase significantly, the spectrum utilization rate of spectrum allocation algorithm is low. A hierarchical cognitive satellite network model is established, and the scenario in which the cognitive satellite downlink uses idle spectrum of ground network is analyzed. On this basis, a spectrum allocation algorithm based on stable matching is proposed in the hierarchical VOLUME 10, 2022 cognitive satellite network. The idea of stable matching is introduced in the spectrum allocation process, and the utility functions of SUs and PUs are adjusted according to the satellite characteristics. The utility functions of SUs and PUs were jointly considered for analysis, and the final ''stable'' spectrum allocation scheme was formed by independent matching, which improved the overall utility and spectrum resource utilization. The simulation results show that the spectrum allocation algorithm based on stable matching can effectively improve the performance of utility value, average sum rate, throughput and spectrum utilization rate, so as to achieve efficient allocation of satellite spectrum resources. In general, the goal of the matching algorithm adopted in this paper is not to globally optimize an index, but to carry out mutually beneficial matching, focusing on improving the overall utility, and making the matching results tend to be optimal in many aspects as far as possible without reducing the performance of other indicators. The research content of this paper is that there are several available spectrum in a time slot, and then spectrum allocation is carried out according to the stable matching principle proposed in this paper. The amount of available spectrum is different in different time slots, and the total amount of spectrum resources is also different. In the future work, we will further explore the spectrum allocation in the cognitive satellite network based on multi-frequency Time division Multiple access (MF-TDMA) under the condition that one spectrum can meet the needs of multiple users, so as to improve the spectrum utilization rate.