Disclosure of Invention
The invention aims to provide a method and a device for adjusting the transmitting power of network nodes, which realize the dynamic adjustment of the transmitting power of each network node in an ad hoc network system.
In order to solve the above technical problem, an embodiment of the present invention provides a method for adjusting a transmission power of a network node, including:
selecting a network node as a central network node;
obtaining distances L from N subordinate network nodes to a central network nodei(ii) a Wherein, i is 1,2,..., N, wherein N is the number of other network nodes except the central network node in the ad hoc network system;
according to said LiMaximum value of LmaxDetermining the transmission power P of the central network nodei;
According to the transmitting power P of the central network node
iDetermining the transmission power of the N slave network nodes
The embodiment of the present invention also provides a device for adjusting the transmission power of a network node, including: the device comprises a determining module, an obtaining module, a central network node transmitting power calculating module and a subordinate network node transmitting power calculating module;
the determining module is used for selecting a network node as a central network node;
the acquisition module is used for acquiring the distances L from the N subordinate network nodes to the central network nodei(ii) a Wherein, i is 1, 2., N, where N is the number of other network nodes in the ad hoc network system except the central network node;
the central network node transmitting power calculating module is used for calculating the transmitting power according to the LiMaximum value of LmaxDetermining the transmission power P of the central network nodei;
The slave network node transmitting power calculating module is used for calculating the transmitting power P of the central network node
iDetermining the transmission power of the N slave network nodes
Compared with the prior art, the method and the device for obtaining the distance L from the N subordinate network nodes to the central network node acquire the distance L from the N subordinate network nodes to the central network node according to the central network node selected in the ad hoc network system
iThen according to L
iMaximum value of L
maxDetermining a transmit power P of a central network node
iSo that the central network node is rootedDynamically adjusting the transmitting power P of each slave network node according to the maximum value of the distance from the slave network node to the central network node
iEach slave network node then transmits power P according to the central network node
iDetermining its transmission power
Therefore, the transmitting power of each slave network node is changed along with the change of the transmitting power of the central network node, and the dynamic adjustment of the transmitting power of each network node in the ad hoc network system is finally realized.
In addition, at said maximum value L
iDetermining the transmission power P of the central network node
iThen, at the transmitting power P according to the central network node
iDetermining the transmission power of the N slave network nodes
Before, still include: recording that the central network node maintains the transmit power P
iTime duration T of
1(ii) a Judging the duration T
1Whether it is equal to or greater than a first preset time period T
0(ii) a Wherein if the duration T
1Is equal to or greater than the first preset time length T
0Detecting whether to update the transmission power P of the central network node
iAnd upon detecting a need to update the transmission power P
iUpdating the transmission power P of the central network node
i(ii) a If the duration T
1Is less than the preset time length T
0Maintaining the transmission power P of the central network node
i。
Determining the transmit power of the N slave network nodes
Before, the period T of the transmitting power is updated according to the central network node
0Detecting whether the transmitting power of the central network node needs to be adjusted or not in advance, and enabling each subordinate network node to calculate the transmitting power of each subordinate network node according to the latest transmitting power of the central network nodeAnd on one hand, the radio power can ensure that each slave network node can normally communicate with the central network node to complete data transmission. On the other hand, the power consumption of the slave network node can be saved, and unnecessary power consumption caused by overlarge transmitting power of the slave network node is avoided.
In addition, whether the detection updates the transmission power PiThe method specifically comprises the following steps: reacquiring the distances S from the N slave network nodes to the central network nodei(ii) a Calculating the SiMaximum value of SmaxAnd the maximum value LmaxA difference Δ L of; according to the comparison between the difference value Delta L and a preset threshold Th, whether the transmitting power P of the central network node is updated or not is detectedi(ii) a The preset threshold Th is greater than zero; if the difference value delta L is larger than the preset threshold Th or the difference value delta L is smaller than the negative value of the preset threshold Th, the transmitting power P of the central network node is updatedi(ii) a If the difference value DeltaL is greater than or equal to the negative value of the preset threshold Th and the difference value DeltaL is less than or equal to the preset threshold Th, the transmitting power P of the central network node is maintainedi。
According to the change of the distance between the slave network node and the central network node, the distances S from the N slave network nodes to the central network node are obtained againiThen according to SiMaximum value of SmaxAnd LmaxDetecting whether the transmitting power P of the central network node needs to be updated or notiWhen the delta L is larger than the preset threshold Th or the delta L is smaller than the negative value of the preset threshold Th, the transmitting power P of the central network node is updatediWhen the delta L is larger than or equal to the negative value of the preset threshold Th and is smaller than or equal to the preset threshold Th, the transmitting power P of the central network node is kepti. By the change of the distance between the slave network node and the central network node, whether the transmitting power P of the central network node needs to be updated or not can be simply, conveniently and accurately judgedi。
Additionally, the updating of the transmit power P of the central network nodeiThe method specifically comprises the following steps: if the difference Δ L is greater than the pre-thresholdSetting a threshold Th, then transmitting power P of the central network nodeiIs updated to Pi+ Δ P; if the difference value Delta L is smaller than the negative value of the preset threshold Th, the transmitting power P of the central network node is determinediIs updated to Pi- Δ P; wherein the Δ P is a path loss calculated according to a wireless network transmission model.
Dynamically adjusting the transmitting power of the central network node according to the change of the distance between the slave network node and the central network node, and when delta L is larger than a preset threshold Th, adjusting the transmitting power P of the central network nodeiIs updated to Pi+ Δ P, increasing the transmission power of the central network node, and when Δ L is less than the negative value of the preset threshold Th, transmitting the power PiIs updated to Pi- Δ P, reducing the transmission power of the central network node. Through the adjustment, all slave network nodes needing to communicate with the central network node can be ensured to be normally accessed to the central network node, and unnecessary power consumption of the central network node is avoided while data transmission is carried out.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
A first embodiment of the invention relates to a method of adjusting a network node transmit power. The specific flow is shown in fig. 2.
In step 201, a central network node is selected, and in the ad hoc network system, a certain network node is selected as the central network node, which functions as a "host" and provides services for other network nodes in the ad hoc network system.
In step 202, the distance from each slave network node to the central network node is obtained.
Specifically, in the ad hoc network system, after the central network is selected, the rest network nodes are all used as slave network nodes to play a role of a router and perform data interaction with the central network node, at this time, the transmitting power of the central network node needs to ensure that all slave network nodes needing to communicate with the central network node can normally access and perform data transmission, and the transmitting power of the central network node is determined according to the farthest slave network node in the current ad hoc network system, so that the distance L from the N slave network nodes to the central network node needs to be acquirediAnd N is the number of other network nodes except the central network node in the ad hoc network system.
Further, the distance L
iCan be based on timing advance TA of each slave network node
iCalculating, or obtaining according to a global positioning system GPS carried by a slave network node, wherein if a timing advance TA is adopted
iCalculating, timing advance TA
iThe acquisition method of (1) is divided into the following two cases: when each subordinate network node is initially accessed to the central network node, namely, network connection is not established, timing advance TA of each subordinate network node is obtained according to detection of random access sequence
iWhen each slave network node does not initially access the central network node, i.e. a network connection has been established,obtaining timing advance TA of each slave network node according to channel estimation
iWherein, in the step (A),
and c represents the speed of light.
In step 203, the transmit power of the central network node is determined.
In particular, according to the distance L from each slave network node to the central network nodeiMaximum value of LmaxDetermining the transmission power P of the central network nodeiAnd ensuring that the data of all slave network nodes can be correctly received under the transmitting power, wherein Pi=PLi+Pslave_target_received_pwr,PLiIs expressed according to the maximum value LmaxAnd the transmission model and frequency adopted by the current ad hoc network system, the calculated path loss, Pslave_target_received_pwrIndicating the demodulation threshold of the slave network node, and further, in order to ensure the correctness of data transmission, a compensation value delta can be addediI.e. Pi=PLi+Pslave_target_received_pwr+δiWherein the compensation value deltaiThe central network node determines the modulation mode of the transmitted data and the allocated time-frequency domain resources.
In step 204, whether a period for updating the transmission power of the central network node is reached, if so, step 205 is executed, otherwise, step 204 is returned to.
In particular, the record center network node maintains the transmit power PiTime duration T of1According to the time length T1With updating the period of the transmission power of the central network node, i.e. the first predetermined duration T0Whether to update the transmitting power of the central network node is judged, wherein if the time length T is long1Is equal to or greater than a first preset time length T0If the period for updating the transmission power of the central network node is reached, step 205 is executed to detect whether to update the transmission power P of the central network nodeiIf the duration T is1Less than a preset time period T0If the transmission power of the central network node is not updatedAnd returning to the step 204 after the cycle of the rate.
In step 205, whether to update the transmission power of the central network node, if yes, step 206 is performed, otherwise step 207 is performed.
Specifically, whether the transmitting power of the central network node is updated or not is detected by firstly re-acquiring the distances S from the N subordinate network nodes to the central network nodeiThen recalculate SiMaximum value of SmaxAnd a maximum value LmaxAnd then detecting whether to update the transmission power P based on a comparison of the difference Δ L with a preset threshold ThiAnd the preset threshold Th is greater than zero. If the difference Δ L is greater than the preset threshold Th or the difference Δ L is less than the negative value of the preset threshold Th, step 206 is executed to update the transmission power P of the central network nodeiAnd notifying each slave network node, wherein the central network node puts the updated transmission power into a system message, notifies the N slave network nodes in a preset period, and if the difference value Δ L is greater than or equal to a negative value of a preset threshold Th and the difference value Δ L is less than or equal to the preset threshold Th, step 207 is executed to maintain the transmission power P of the central network nodei。
In step 206, the transmit power of the central network node is updated and the slave network nodes are notified.
In particular, when it is detected that the transmission power P of the central network node needs to be updatediUpdating the transmitting power of the central network node and informing each subordinate network node in a preset period through a system message, wherein if the difference value delta L is greater than a preset threshold Th, the transmitting power P of the central network node is indicatediIf the transmission power is too small, the transmission power of the central network node needs to be updated according to the delta P, namely the transmission power P of the central network nodeiIs updated to Pi+ Δ P, if the difference Δ L is smaller than the negative value of the preset threshold Th, it indicates that the transmission power of the central network node is too large, and the transmission power of the central network node needs to be updated according to Δ P, that is, the transmission power P of the central network node is equal to the transmission power P of the central network nodeiIs updated to Pi- Δ P, wherein Δ P is the path loss calculated from the wireless network transmission model.
In step 207, the transmit power of the central network node is maintained. When detecting that the transmission power of the central network node does not need to be updated, maintaining the transmission power P of the central network nodei。
In step 208, the transmit power of each slave network node is determined.
In particular, according to the received power R of the N slave network nodes
iAnd the transmission power P of the central network node in the system message received in the current period
iCalculating the path loss PL of the N slave network nodes
iThen according to the demodulation threshold Dth and path loss PL at the node of the central network
iAnd a compensation value for calculating the transmission power of N slave network nodes
Wherein the content of the first and second substances,
PL
i=P
i-R
icompensation value delta
iThe modulation mode of the data transmitted by the slave network node and the allocated time-frequency domain resources.
Compared with the prior art, in the embodiment, the distances L from the N slave network nodes to the central network node are obtained according to the central network node selected in the ad hoc network system
iThen according to L
iMaximum value of L
maxDetermining a transmit power P of a central network node
iThe central network node dynamically adjusts the transmitting power P of each subordinate network node according to the maximum value of the distance from each subordinate network node to the central network node
iAnd the central network node dynamically adjusts the transmitting power of the central network node periodically according to the distance between the farthest slave network nodes in two periods, so that all slave network nodes needing to communicate with the central network node can be normally accessed to the central network node and perform data transmission, and meanwhile, unnecessary power consumption of the central network node can be avoided. Each slave network node then transmits power P according to the central network node
iDetermining its transmission power
The transmission power of each slave network node is changed along with the change of the transmission power of the central network node, each slave network node can normally communicate with the central network node, data transmission is completed, and finally the dynamic adjustment of the transmission power of each network node in the whole ad hoc network system is realized.
A second embodiment of the invention relates to a method of adjusting a network node transmit power. The second embodiment is further improved on the basis of the first embodiment, and the main improvement is that: in the second embodiment of the present invention, a case of periodically updating the central network node is further given, so that each network node in the ad hoc network system can dynamically switch between the central network node and the slave network node, as specifically shown in fig. 3.
Steps 301 to 308 are substantially the same as steps 201 to 208 in the first embodiment, and are not described herein again.
In step 309, whether the period for updating the central network node is reached, if yes, step 310 is executed, otherwise, step 304 is returned.
In particular, the role of each network node in an ad hoc network system, i.e. functioning as a "master" or a "router", is assigned in time, e.g. a network node serves as a central network node for a certain period of time and as a slave network node for another period of time. Detecting whether the period for updating the central network node is reached, firstly, recording the time length T of the selected network node as the central network node2According to the time length T2Comparing the time length with a second preset time length T, and judging whether the central network node needs to be switched to another network node or not, wherein the second preset time length T is greater than the first preset time length T0. If the duration T2If the time length is greater than or equal to the preset time length T, step 310 is executed, and another network node is selected as a central network node in the ad hoc network system. Otherwise, the step 304 is returned.
In step 310, another network node is selected as the central network node. When the period of updating the central network node is reached, another network node is selected as the central network node in the ad hoc network system to play the role of a 'host'.
In this embodiment, not only the technical effects of the first embodiment can be achieved, but also the central network node can be periodically switched, so that each network node in the ad hoc network system can be dynamically switched between the central network node and the slave network node.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the steps contain the same logical relationship, which is within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A third embodiment of the present invention relates to an apparatus for adjusting transmission power of a network node, as shown in fig. 4, including: the device comprises a determining module 41, an obtaining module 42, a central network node transmission power calculating module 43, a recording module 44, a first detecting module 45, a second detecting module 46, a maintaining module 47, an updating module 48, and a slave network node transmission power calculating module 49, wherein the updating module 48 specifically comprises: the distance re-obtaining sub-module 481, the difference calculation sub-module 482 and the modification sub-module 483, wherein the modification sub-module 483 specifically includes: a first modification submodule 4831 and a second modification submodule 4832.
A determining module 41, configured to select a network node as a central network node;
an obtaining module 42, configured to obtain distances L from the N slave network nodes to the central network nodei(ii) a Wherein, i is 1,2, and N is the number of other network nodes except the central network node in the ad hoc network system;
a central network node transmission power calculation module 43 for calculating the transmission power according to LiMaximum value of LmaxDetermining the transmission power P of the central network nodei;
A recording module 44 for recording the central network node holding transmission power PiTime duration T of1;
A first detection module 45 for detecting the duration T1Whether it is equal to or greater than a first preset time period T0;
A second detection module 46 for detecting the duration T1Is equal to or greater than a first preset time length T0Detecting whether to update the transmitting power P of the central network nodei;
A holding module 47 for holding the duration T1Is less than the first preset time length T0Maintaining the transmission power P of the central network nodei。
An updating module 48 for updating the transmission power P of the central network node when detectingiUpdating the transmission power P of the central network nodei;
A distance reacquisition submodule 481 for reacquiring distances S from the N slave network nodes to the central network nodei;
A difference calculation submodule 482 for calculating SiMaximum value of SmaxAnd a maximum value LmaxA difference Δ L of;
a modification submodule 483, configured to modify the transmission power P of the central network node when the difference Δ L is greater than a preset threshold Th, or when the difference Δ L is less than a negative value of the preset threshold Thi;
A first modification submodule 4831 for modifying the transmission power P of the central network node when the difference Δ L is greater than a preset threshold ThiChange to Pi+ΔP;
A second modification submodule 4832 for modifying the transmission power P of the central network node when the difference Δ L is less than the negative value of the preset threshold ThiChange to Pi-ΔP;
A slave network node transmitting power calculating module 49 for calculating the transmitting power P according to the central network node
iDetermining the transmission power of N slave network nodes
It should be understood that this embodiment is a system example corresponding to the first embodiment, and may be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that other elements are not present in the present embodiment.
A fourth embodiment of the present invention relates to an apparatus for adjusting transmission power of a network node. The fourth embodiment is a further improvement on the third embodiment, and the main improvement lies in that: in the fourth embodiment of the present invention, a third detecting module 50 and a switching module 51 are further included, as shown in fig. 5, where the third detecting module 50 specifically includes: a time recording sub-module 501 and a comparison sub-module 502.
A third detecting module 50, configured to detect whether to switch the central network node to another network node in the ad hoc network system;
a time recording submodule 501 for recording the time length T of the selected network node as the central network node2;
A comparison submodule 502 for comparing the durations T2Whether the second preset time length T is greater than or equal to the second preset time length T, wherein the second preset time length T is greater than the first preset time length T0;
A switching module 51 for the current time length T2When the time length is more than or equal to a second preset time length T, the central network node is switched to the ad hoc network systemTo another network node.
Since the second embodiment corresponds to the present embodiment, the present embodiment can be implemented in cooperation with the second embodiment. The related technical details mentioned in the second embodiment are still valid in this embodiment, and the technical effects that can be achieved in the second embodiment can also be achieved in this embodiment, and are not described herein again in order to reduce the repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the second embodiment.
Those skilled in the art can understand that all or part of the steps in the method of the foregoing embodiments may be implemented by a program to instruct related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.