Disclosure of Invention
The application aims to provide a resource allocation method and device for a wireless energy supply edge computing network, which are used for overcoming the technical difficulties and achieving higher computing speed.
In order to achieve the above purpose, the technical scheme of the application is as follows:
A method of resource allocation for a wireless powered edge computing network comprising a wireless device and a gateway comprising a radio frequency energy transmitter and an edge computing server, the method of resource allocation for a wireless powered edge computing network comprising:
Step S1, sequentially selecting a current energy supply duration proportion from a value range of the energy supply duration proportion according to a set step length, and carrying out the following iteration to determine the energy proportion of each wireless device for task unloading communication and the task unloading communication duration proportion under the condition of the current energy supply duration proportion;
Step S1.1, selecting a first wireless device from a wireless energy supply edge computing network, and initializing the range of the energy proportion of the first wireless device for task unloading communication;
Step S1.2, setting the energy ratio x 1 of the first wireless device for task offload communication as a mean value of the upper limit value and the lower limit value of the range, and calculating the energy ratio of any other wireless device for task offload communication according to the following formula:
Wherein x 1 is the energy proportion of the first wireless device for task offload communication, x i is the energy proportion of the ith wireless device for task offload communication, h 1 is the channel gain of the first wireless device, and h i is the channel gain of the ith wireless device;
step S1.3, calculating the task unloading communication duration proportion of the wireless device according to the following formula:
Wherein t i is the task unloading communication duration proportion of the ith wireless device, B is the wireless communication bandwidth, phi is the CPU cycle number required by the wireless device to locally process a bit task, k e is the calculation energy efficiency coefficient of the wireless device, N 0 is the noise power, a is the energy supply duration proportion, mu is the energy capturing efficiency, and P is the radio frequency energy transmitting power of the radio frequency energy transmitter;
Step S1.4, at If the search accuracy is greater than xiThen taking x 1 as the upper limit value of the range of the energy proportion of the first wireless device for task offloading communication, updating the range of the energy proportion of the first wireless device for task offloading communication and returning to the step S1.2, otherwise taking x 1 as the lower limit value of the range of the energy proportion of the first wireless device for task offloading communication, updating the range of the energy proportion of the first wireless device for task offloading communication and returning to the step S1.2, wherein the step S1.2 is thatWhen the search precision xi is smaller than or equal to the search precision xi, calculating the total calculation rate of the wireless energy supply edge calculation network, and ending iteration;
Step S2, selecting the energy supply duration proportion when the total calculation rate of the wireless energy supply edge calculation network is maximum, setting the radio frequency energy transmitter to wirelessly supply energy to the wireless equipment at the beginning of each time frame, configuring each wireless equipment to carry out task unloading communication according to the task unloading communication duration and the energy distribution proportion corresponding to the selected energy supply duration proportion in each time frame, and configuring each wireless equipment to carry out local task calculation according to the residual energy in each time frame.
Further, the computing wireless energy supply edge computing network total computing speed has the following formula:
where N is the number of wireless devices.
Further, the wireless devices perform task offloading communication in a time division multiplexing manner.
Further, the energy supply duration ratio has a value range of [0,1], and the step length is 0.01.
Compared with the traditional optimization method, the resource allocation method of the wireless energy supply edge computing network provided by the application can solve a complex non-convex problem in the wireless energy supply edge computing network using a TDMA communication mode and a partial unloading mode, can rapidly calculate partial unloading energy allocation and time allocation schemes, and simultaneously obtains higher network calculation rate.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
As shown in fig. 1, the wireless powered edge computing network includes a wireless device and a gateway that includes a radio frequency energy transmitter for powering the wireless device and an edge computing server for computing tasks offloaded from the wireless device.
In one embodiment, as shown in fig. 2, there is provided a resource allocation method of a wireless powered edge computing network, including:
Step S1, sequentially selecting the current energy supply duration proportion from the value range of the energy supply duration proportion according to the set step length, and carrying out the following iteration to determine the energy proportion of each wireless device for task unloading communication and the task unloading communication duration proportion under the condition of the current energy supply duration proportion.
The present embodiment is described by taking a wireless energy supply edge computing network composed of one gateway and 10 wireless devices as an example. The gateway integrates a radio frequency energy transmitter and an edge calculation server, the task calculation of the wireless device is based on time frames, and T is the length of one time frame.
AT the beginning of each time frame, the gateway wirelessly supplies power to 10 wireless devices, wherein the wireless power supply duration is a frame length which is a times of the wireless power supply duration, namely the power supply duration is aT,0< a <1, and a is the power supply duration proportion.
The energy captured by the i-th wireless device is denoted as E i=μPhi aT, where μ is the energy capture efficiency, P is the rf energy transmit power of the rf energy transmitter, h i is the channel gain of the i-th device aT the current time frame, i E {1, 2..10 }, h= [ h 1,h2,…,h10 ] represents the channel gain of 10 wireless devices within one time frame.
In this embodiment, the ith device uses (1-x i)Ei energy for local computation of T-duration, x i Ei energy for task offload communications, x i is the energy ratio for task offload communications, and 1-x i is the energy ratio for local computation in each time frame.
Starting aT for supplying energy in each time frame, and in the rest time period (1-a) T, performing task unloading by using a part of captured energy by 10 devices based on wireless communication, wherein the task unloading communication of 10 devices is based on a time division multiplexing mode, the i-th wireless device performs task unloading communication by using x iEi energy, the unloading energy allocation proportion of 10 wireless devices is x= [ x 1,x2,…x10 ], the communication duration of the i-th device is T i times of frame length, and the communication duration of 10 wireless devices is t= [ T 1T,t2T,…t10 T ].
The range of the energy supply duration ratio in the embodiment is [0,1], and the step length is 0.01. The energy supply duration ratio takes on the value in [0,1] according to the step length of 0.01, namely the different value of the energy supply duration ratio a is 0.01,0.02. The step size used may be set to other values, for example 0.02, etc., depending on the actual situation.
Under the condition that the current energy supply duration proportion is determined, the energy proportion of each wireless device for task unloading communication and the task unloading communication duration proportion are calculated through the following steps:
Step S1.1, selecting a first wireless device from a wireless energy supply edge computing network, and initializing the range of the energy proportion of the first wireless device for task unloading communication.
For example, the range of the transmission task energy allocation ratio x 1 of the 1 st wireless device is initialized, x 1max represents the upper limit value of x 1, x 1max=1,x1min represents the lower limit value of x 1, and x 1min =0.
Step S1.2, setting the energy ratio x 1 of the first wireless device for task offload communication as a mean value of the upper limit value and the lower limit value of the range, and calculating the energy ratio of any other wireless device for task offload communication according to the following formula:
Wherein x 1 is the energy ratio of the first wireless device for task offload communication, x i is the energy ratio of the ith wireless device for task offload communication, h 1 is the channel gain of the first wireless device, and h i is the channel gain of the ith wireless device.
The embodiment initializes x 1 to the value
According toA value of x i is obtained where i e {2,3,..10 }, so that the energy fraction of each wireless device for task offload communications can be obtained.
Step S1.3, calculating the task unloading communication duration proportion of the wireless device according to the following formula:
Where t i is the i-th wireless device task offload communication duration ratio, B is the wireless communication bandwidth, phi is the number of CPU cycles required by the wireless device to locally process a bit task, k e is the calculated energy efficiency coefficient of the wireless device, N 0 is the noise power, a is the energy supply duration ratio, μ is the energy capture efficiency, and P is the radio frequency energy transmit power of the radio frequency energy transmitter.
And the parameters are brought into a formula, so that the task unloading communication duration proportion of each wireless device can be obtained.
Step S1.4, atIf the search accuracy is greater than xiThen taking x 1 as the upper limit value of the range of the energy proportion of the first wireless device for task offloading communication, updating the range of the energy proportion of the first wireless device for task offloading communication and returning to the step S1.2, otherwise taking x 1 as the lower limit value of the range of the energy proportion of the first wireless device for task offloading communication, updating the range of the energy proportion of the first wireless device for task offloading communication and returning to the step S1.2, wherein the step S1.2 is thatAnd when the search precision xi is smaller than or equal to the search precision xi, calculating the total calculation rate of the wireless energy supply edge calculation network, and ending the iteration.
The number of wireless devices in this embodiment is N, and in the case of setting the search accuracy ζ, by the above determination, inAnd when the search accuracy xi is greater than the search accuracy xi, updating the range of the energy proportion of the first wireless device for task unloading communication, and continuing to return to the step S1.2 for recalculation.
In particular, ifX 1max=x1 is set, and the step returns to the step S1.2, and the energy proportion and the task unloading communication duration proportion of each wireless device for task unloading communication are calculated again. If it isX 1min=x1 is set, and the step returns to the step S1.2, and the energy proportion and the task unloading communication duration proportion of each wireless device for task unloading communication are calculated again.
Up toAnd when the search precision xi is smaller than or equal to the search precision xi, calculating the total calculation rate of the wireless energy supply edge calculation network, and ending the iteration.
Step S2, selecting the energy supply duration proportion when the total calculation rate of the wireless energy supply edge calculation network is maximum, setting the radio frequency energy transmitter to wirelessly supply energy to the wireless equipment at the beginning of each time frame, configuring each wireless equipment to carry out task unloading communication according to the task unloading communication duration and the energy distribution proportion corresponding to the selected energy supply duration proportion in each time frame, and configuring each wireless equipment to carry out local task calculation according to the residual energy in each time frame.
For any selected energy supply duration proportion a, the total calculation rate of the wireless energy supply edge calculation network, the energy proportion of each corresponding wireless device for task unloading communication and the task unloading communication duration proportion can be calculated. And finally, selecting the energy supply duration proportion when the total calculation rate is the maximum, and the energy proportion and the task unloading communication duration proportion of each corresponding wireless device for task unloading communication as parameters of the wireless edge calculation network to work.
Specifically, the radio frequency energy transmitter is set to wirelessly supply energy to the wireless device aT the beginning of each time frame according to the selected energy supply duration proportion, and the radio frequency energy transmitter wirelessly supplies energy to the wireless device within the energy supply duration aT after the beginning of the current time frame, which belongs to energy supply time.
And configuring each wireless device to carry out task unloading communication according to the task unloading communication duration corresponding to the selected energy supply duration proportion and the energy proportion for the task unloading communication in each time frame. Each wireless device is configured to perform local task calculations with the remaining energy in each time frame.
According to the energy supply time length obtained through calculation, the communication time length of each wireless equipment task unloading and the occupied energy distribution proportion, a wireless energy supply edge calculation network is further configured to work.
And each wireless device performs task unloading according to the calculated task unloading communication duration. All wireless devices carry out task unloading communication in a time division multiplexing mode, and the communication duration of the ith wireless device is T i T. And performing energy allocation with the calculated energy ratio for the task offload communication, the ith wireless device performs the task offload communication with the energy of x iEi.
Each wireless device also performs local task calculations, which can be performed with the remaining energy throughout the time frame, and the i-th device performs local calculations of the T-duration with the remaining energy (1-x i)Ei).
In a specific embodiment, for a given energization period ratio a, the wireless energization edge calculates a network total calculated rate Q (x, t) as:
Where φ is the number of CPU cycles required by the wireless device to process a bit task locally, k e is the computational energy efficiency coefficient of the wireless device, B is the wireless communication bandwidth, N 0 is the noise power, Q (x, t) is a concave function about x i、ti and is 0.ltoreq.t i.ltoreq.1, And x i is more than or equal to 0 and less than or equal to 1, and the energy distribution ratio x and the communication duration t of the maximized Q (x, t) under the given a are obtained by adopting the existing methods for solving the convex optimization problem, such as an interior point method, a Lagrange dual method and the like.
Where N is the number of wireless devices, t i is the task offload communication duration ratio of the ith wireless device, and the communication duration of the ith wireless device is t iT.xi is the energy ratio for task offload communication.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.