Disclosure of Invention
In order to solve the above problems, the present invention provides a method for accessing a spectrum by delay sensing, which is used for reducing the loss caused by delay switching. In the cognitive radio scenario of the present invention, the entire system operates on discrete time units while dividing the spectrum resources in the target CRN into non-overlapping orthogonal channels that are licensed for PU use, but which are spectrum shared with the unlicensed SU by CBS scheduler in order to increase the utilization of spectrum resources. Modeling this problem as a problem of channel allocation, taking into account the loss of throughput and energy consumption that occurs when a user switches to a new operating frequency, by allocating frequency and time slots to SU, aims to minimize throughput and energy consumption taking into account the frequency separation distance.
In order to achieve the above purpose, the present invention provides the following technical solutions:
s1, constructing and initializing a centralized radio system, wherein the system comprises a PU, an SU and a base station;
s2, constructing an SU frequency spectrum allocation optimization problem with the aim of minimizing the system throughput loss and the energy consumption caused by the SU switching frequency;
s3, solving the problem of optimization of SU frequency spectrum allocation through a polynomial heuristic algorithm, and obtaining a combination scheme of time slots and frequencies of the SU.
Further, the centralized radio system constructed in step S1 operates in discrete time units, and the number of time slots in operation is T and the number of available frequencies is F.
Further, the optimization problem model constructed in step S2 is expressed as:
C5:bi,t =(j,0)+ ,j<t and Xi,f,j =1
Wherein,,represents a set of N SUs, < >>Represents the set of F frequencies available, +.>Representing a set of T time slots; λ is a balancing factor, which is more focused on minimizing energy during the entire scheduling period when λ=1, whereas when λ=1, the problem is more focused on throughput loss due to frequency switching during the entire scheduling period; η represents a constant, e represents the energy consumed by SU to transmit a unit of data packet, Ci,f,t Indicating throughput loss of ith SU when switching to the f-th frequency in the t-th time slot, Ei,f,t Representing the energy consumption of the ith SU when switching to the f-th frequency in the t-th time slot, Bi,f,t Representing the maximum number of data packets transmitted by the ith SU when the ith time slot is switched to the f frequency; x is Xi,f,t As a binary variable, if the f-th frequency is assigned to the i-th SU at the t-th time slot, then Xi,f,t =1, otherwise Xi,f,t =0; constraint C1 indicates that each SU is at least allocated with a combination of time slots and frequencies, so that time fairness is guaranteed, and starvation caused by the fact that some SUs cannot allocate channels for a long time is avoided; constraint C2 indicates that at the t-th time slot, the f-th frequency can only be allocated to one SU; constraint C3 indicates that at time slot t, one SU can only be allocated one frequency; constraint f in C4i,t Indicating the frequency to which the ith SU is assigned on the t-th time slot; constraint b in C5i,t An index representing the closest busy slot of the ith SU before the t slot; constraint k in C6i,f,t Indicating the number of frequencies the ith SU is to undergo a handover in the middle of switching to the f-th frequency in the t-th time slot, a +>Indicating that the ith SU is at bi,t The allocated frequency on the time slot, α represents the switching delay of the unit frequency, Ts The length of each slot is represented and is in milliseconds.
Further, throughput loss C of ith SU when switching to the f-th frequency at the t-th time sloti,f,t The calculation formula of (2) is as follows:
wherein U isi,f Representing the maximum number of packets that an ith SU can transmit in any slot using frequency f during the entire schedule of T slots.
Further, energy consumption E of ith SU when switching from the t time slot to the f frequencyi,f,t The calculation formula of (2) is as follows:
Ei,f,t =βki,f,t
where β represents the switching energy consumption per unit frequency.
Further, the maximum data packet number B transmitted by the ith SU when the ith time slot is switched to the f frequencyi,f,t The calculation formula of (2) is as follows:
wherein (+ Representation (x)+ =max(0,x),Ui,f Representing the maximum number of packets that an ith SU can transmit in any slot using frequency f during the entire schedule of T slots.
Further, step S3 solves the SU spectrum allocation optimization problem by a polynomial heuristic algorithm, including:
s31, initializing parameters, and enablingΦ represents the SU set that has not been assigned a slot during the algorithm execution;
s32, entering the t time slot, and calculating the i not-used time slotWeighted sum Z of throughput loss and energy consumption generated when switching SU assigned time slot to f-th frequencyi,f Expressed as:
where λ represents the balance factor, η represents a constant, e represents the energy consumed by SU to transmit a unit of data packet, Ci,f,t Indicating throughput loss of ith SU when switching to the f-th frequency in the t-th time slot, Ei,f,t Representing the energy consumption of the ith SU when switching to the f-th frequency in the t-th time slot, Bi,f,t Representing the maximum number of data packets transmitted by the ith SU when the ith time slot is switched to the f frequency;
s33, calculating a weighted sum of the total throughput loss and the energy consumption of each SU which is not allocated with the time slot, wherein the weighted sum is expressed as:
wherein Z isi,f A weighted sum of throughput loss and energy representing the ith SU using the F-th frequency in a particular time slot, F representing the total number of frequencies;
s34, arranging weighted sum ascending of total throughput loss and energy consumption of all the SUs which are not allocated with time slots, and selecting the SUs of the first N/T time slots which are not allocated with time slots to add into a set ψ; wherein N is the total number of SUs, and T is the total number of time slots in one scheduling period;
s35, constructing an integer programming problem for the N/T SUs without assigned time slots selected in the step S34, and solving a frequency assignment scheme of the N/T SUs without assigned time slots by adopting an ILP method; the integer programming problem is expressed as:
where N' represents the number of SUs in the set ψ, Xi ′,f As a binary decision variable, if the ith SU uses the f-th frequency, Xi ′,f =1, otherwise Xi ′,f =0; s36, kicking out a set phi from the SU allocated with at least one frequency according to the solving result of the step S35;
s37, setting X in the time slot t according to the solving result of the step S35i,f,t =Xi ′,f ,Initializing a set ψ as an empty set;
s38, judging whether T > T is met, if yes, ending the algorithm to obtain a frequency allocation scheme of N SUs; if not, let t=t+1 and return to step S32.
The invention has the beneficial effects that:
the invention focuses on the delay problem caused by frequency switching. To ensure proper transmission of the PU, the SU may waste a portion of time switching from one frequency to a new frequency, which may not be negligible. Considering the problem of frequency spectrum allocation of SU in centralized CRN, minimizing throughput and energy loss by allocating frequency and time slots to SU, and improving system performance by minimizing throughput and energy consumption by allocating frequency and time slots to SU with the aim of considering frequency spacing distance. And an algorithm of a polynomial is designed to solve the proposed problem. Providing a good solution for SU devices to operate in a wider frequency range in the future.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides a delay-aware spectrum access method, which allocates residual spectrum holes for SU under the condition that the occupation frequency of PU is known, as shown in figure 1, and comprises the following steps:
s1, constructing and initializing a centralized radio system, wherein the system comprises a PU, a SU and a base station.
In particular, the network architecture of the centralized radio system constructed by the present invention is shown in fig. 2. In this embodiment the centralized radio system operates in discrete time units and the number of time slots in operation is T and the number of available frequencies is F.
S2, constructing an SU spectrum allocation optimization problem with the aim of minimizing system throughput loss and energy consumption caused by SU switching frequency.
Specifically, the invention minimizes throughput and energy loss by allocating frequency and time slots to SU; further, frequency and time slots are allocated to SU in consideration of the frequency separation distance, so as to minimize throughput and energy loss and improve system performance. For the purpose of the present invention, the following analysis was performed.
A. Busy slot analysis:
because the SU does not have to be allocated certain frequencies in every time slot, it is also possible that one SU is not allocated any frequencies in certain time slots. The time slots are defined in the present invention as follows: assuming that the ith SU is not assigned any frequency in the t-th time slot, the t-th time slot is an idle time slot for the ith SU, otherwise the t-th time slot is a busy time slot for the ith SU. The same time slot may belong to different time slot types for different SUs.
Considering a special case, when the ith SU is to perform frequency switching in the t time slot, if the t time slot belongs to an idle time slot of the ith SU, the ith SU does not have any throughput loss when performing frequency switching in the t time slot; in contrast, if the t-th time slot belongs to a busy time slot of the i-th SU, the i-th SU occupies a part of time when performing frequency switching in the t-th time slot, which causes a certain throughput loss, so it is important to analyze whether each time slot belongs to an idle time slot or a busy time slot for each SU.
Specifically, fi,t Defined as the frequency at which the ith SU is allocated on the t-th slot, and satisfies:
wherein X isi,f,t As a binary variable, if the f-th frequency is assigned to the i-th SU at the t-th time slot, then Xi,f,t =1, otherwise Xi,f,t =0。
Specifically, the index values are attached to T slots in order from 1 to T according to the time relationship. Let enter the t-th slot, where the index relationship of the t-th slot to the nearest previous busy slot belonging to the i-th SU is:
bi,t =(j,0)+ j < t and Xi,f,j =1
Wherein bi,t An index representing the closest busy slot of the ith SU before the t slot; b if the t-th slot is the first busy slot of the i-th SU in the scheduleri,t =0; if the ith SU has another busy slot before the nth slot, j is the index value of the immediately preceding busy slot immediately adjacent to the nth slot, and bi,t =j. It follows that the number of free slots of the ith SU between the current slot t and the previous busy slot j is equal to t-bi,t -1。
B. Channel switching delay analysis:
the number of frequencies that the ith SU needs to switch when using the f-th frequency in the t-th time slot is calculated to determine the time required to complete the switch. The channel switching delay problem refers to the hardware switching delay of the frequency synthesizer in case the SU has determined to switch to an idle channel, which delay depends on the relative position of the two frequencies on the frequency spectrum, which switching delay has a great influence on the throughput of the CRN and therefore has to be taken into account.
In particular, the invention employs ki,f,t Indicating the number of frequencies that the ith SU needs to switch when using the f-th frequency in the t-th slot, consider the following two cases in total.
B1. When bi,t When=0, it indicates that the t-th slot is the first busy slot of the i-th SU in the schedule period, i.e., the i-th SU is not allocated any frequency before the t-th slot. In this case, ki,f,t =0, indicating that the ith SU is preconditioned to the first frequency used at the t-th slot.
B2. When 0 < bi,t When < t-1, i.e. the f-th frequency is not the first frequency used by the i-th SU, the i-th SU has a busy slot b before the t-th sloti,t In this case, the ith SU uses busy slot bi,t And the idle time slot between the first time slot and the t time slot is switched to the f frequency. At this time, the ith SU shifts the frequency from busy slot b at the t-th sloti,t The frequency used is switched to a new frequency, i.e. the number of frequencies to be spanned on the f-th frequency is expressed asI.e. < ->Wherein,,busy slot b before the t-th sloti,t The allocated frequency.
Analysis of the handover required by the ith SU to use the f-th frequency in the t-th time slotAfter the number of frequencies of (b), busy slot bi,t The number of the part of the free time slots with the t-th time slot can be calculated as (t-bi,t -1) each time slot has a length Ts Millisecond. The switching delay per frequency is denoted by α, then in this free slot the number of frequencies that the ith SU is allowed to switch is [ (t-b)i,t -1)Ts ]To switch to the target frequency f, the number of frequencies that need to be spanned isFor this part of the frequencies only busy time slots are occupied to complete the frequency switch.
Based on the above analysis, the expression of the number of frequencies that the ith SU needs to switch to use the f-th frequency in the t-th slot is:
C. loss analysis:
definition Ci,f,t The throughput loss of the ith SU when the ith time slot is switched to the f frequency is represented, and the calculation formula is as follows:
wherein α represents a switching delay of a unit frequency, Ui,f During the entire schedule consisting of T slots, the i-th SU uses the maximum number of packets that can be transmitted using frequency f in any slot;
assuming that β is the switching energy consumption of the unit frequency, since the switching energy consumption is related to the number of switching frequencies, the energy consumption E generated when the ith SU switches to the f-th frequency in the t-th time sloti,f,t =βki,f,t . Meanwhile, define e as the energy consumed by the SU to send a unit of data packet, without loss of generality, assume e is the same for all SUs. Therefore, the energy consumption over the entire scheduling period can be expressed as:
wherein B isi,f,t Indicating the maximum number of packets that the ith SU transmits when switching to the f-th frequency in the t-th time slot.
Based on the foregoing A, B, C three-point analysis, constructing an optimization problem model that takes into account frequency switching is expressed as:
C5:bi,t =(j,0)+ ,j<t and Xi,f,j =1
Wherein,,for a set of N SU's in the entire CRN, and (2)>Representing the set of F frequencies available in the whole cell,/or->Representing a set of T time slots throughout the scheduling period. λ represents a balance factor, this problem being more focused on minimizing the energy during the whole scheduling period when λ=0; when λ=1, the problem is more focused on the throughput loss due to frequency switching over the entire scheduling period. η represents a larger constant that prevents the energy consumption from being too small to be ignored. e represents the energy consumed by SU to transmit a unit of data packet, Ci,f,t Indicating throughput loss of ith SU when switching to the f-th frequency in the t-th time slot, Ei,f,t Representing the energy consumption of the ith SU when switching to the f-th frequency in the t-th time slot, Bi,f,t Representing the maximum number of data packets transmitted by the ith SU when the ith time slot is switched to the f frequency; x is Xi,f,t As a binary variable, if the f-th frequency is assigned to the i-th SU at the t-th time slot, then Xi,f,t =1, otherwise Xi,f,t =0。
Constraint C1 indicates that each SU is assigned at least one time slot and frequency combination; constraint C2 indicates that at the t-th time slot, the f-th frequency can only be allocated to one SU; constraint C3 indicates that at time slot t, one SU can only be allocated one frequency; constraint C4 represents a combination of one time slot and one frequency to which one SU is allocated, so as to ensure time fairness and avoid starvation caused by that some SU cannot allocate channels for a long time; constraint C5, which means that in one time slot, one frequency can only be allocated to one SU, avoids collisions between SU; at the same time, more than one cognitive user transmits in the same frequency and time slot, which may cause the total interference experienced by the PU to exceed the maximum tolerable interference limit. Constraint C6 indicates that a SU can only transmit using no more than the number of its transceivers in a time slot, since a transceiver can only be tuned to one frequency.
S3, solving the problem of optimization of SU frequency spectrum allocation through a polynomial heuristic algorithm, and obtaining a combination scheme of time slots and frequencies of the SU.
Specifically, a scheduling period including T time slots is taken as a unit period, an algorithm is adopted to obtain a scheduling decision of the scheduling period before entering one scheduling period each time, and then frequency switching is performed for SU. As shown in fig. 3, the specific process of performing frequency switching for SU in one scheduling period by using a heuristic algorithm includes the following steps:
s31, initializing parameters, and enablingΦ represents the SU set that has not been assigned a slot during the algorithm execution;
s32, entering the t time slot, and calculating a weighted sum Z of throughput loss and energy consumption generated when the SU of the i unassigned time slot is switched to the f frequencyi,f Expressed as:
where Φ represents the SU set of unassigned slots;
s33, calculating a weighted sum of the total throughput loss and the energy consumption of each SU which is not allocated with the time slot, wherein the weighted sum is expressed as:
wherein Z isi,f A weighted sum of throughput loss and energy representing the ith SU using the F-th frequency in a particular time slot, F representing the total number of frequencies;
s34, arranging weighted sum ascending of total throughput loss and energy consumption of all the SUs which are not allocated with time slots, and selecting the SUs of the first N/T time slots which are not allocated with time slots to add into a set ψ; wherein N is the total number of SUs, and T is the total number of time slots in one scheduling period;
s35, constructing an integer programming problem for the N/T SUs without assigned time slots selected in the step S34, and solving a frequency assignment scheme of the N/T SUs without assigned time slots by adopting an ILP method; the integer programming problem is expressed as:
wherein N 'represents the number of SUs in the set ψ, X'i,f Is a binary decision variable, 1 if SUi uses frequency f, or 0 otherwise.
S36. it is checked whether the integer programming problem assigns at least one frequency to each SU. According to the result of the solution of step S35, the SU assigned at least one frequency is kicked out of the set Φ, i.e. ifΦ++Φ - { i };
s37, executing X 'of integer programming problem according to S35'i,f Setting X for the particular time slot ti,f,t I.e. Xi,f,t =X′i,f ,According to the result of the solution of step S35, SU assigned at least one frequency is kicked out of the set Φ.
S38, judging whether T > T is met, if yes, ending the algorithm to obtain a frequency allocation scheme of N SUs; if not, let t=t+1 and return to step S32.
In the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "configured," "connected," "secured," "rotated," and the like are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intermediaries, or in communication with each other or in interaction with each other, unless explicitly defined otherwise, the meaning of the terms described above in this application will be understood by those of ordinary skill in the art in view of the specific circumstances.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.