A kind of system and method for automatic adjusting dish-order device strength of transmitted signals
Technical field
The invention belongs to the short-distance wireless communication field, especially relate to the order dishes system and method for precious strength of transmitted signals of a kind of automatic adjusting.
Background technology
Traditional treasured of ordering dishes does not have strength of transmitted signals control, no matter apart from the base station distance, all sends with same intensity, when the treasured of ordering dishes is nearer apart from the base station, has caused the precious unnecessary power consumption penalty of ordering dishes.
In order to overcome the tradition precious power consumption penalty problem unnecessary when nearer apart from the base station of ordering dishes, according to the precious distance apart from the base station of ordering dishes, adjust strength of transmitted signals, when the treasured of ordering dishes is far away apart from the base station, increase the signal emissive porwer, when the treasured of ordering dishes is nearer apart from the base station, reduce the signal emissive porwer, realize reducing the purpose of power consumption.
Summary of the invention
The invention provides the order dishes system of precious strength of transmitted signals of a kind of automatic adjusting, this system comprises:
The base station comprises computing unit and RSSI status register, and this computing unit is used for averaging acquisition RSSI mean value by the instantaneous value of baseband I, Q signal power calculation RSSI and to all instantaneous values; This RSSI status register is used for the mean value of the RSSI of storage calculating;
The treasured of ordering dishes, comprise receiving system and judgment means, described receiving system is used for receiving packet from the base station, reads the mean value of RSSI, and described judgment means is used for judging according to RSSI mean value and predetermined threshold value and decides increase or reduce the signal emissive porwer.
Preferably, this treasured of ordering dishes comprises that further signal sends intensity register, if RSSI mean value greater than predetermined threshold, then the signal value that sends intensity register subtracts 1, if RSSI mean value less than predetermined threshold, the value that signal sends intensity register adds 1.
Preferably, the base station comprises lead code with the precious packet of communicating by letter of ordering dishes, synchronization character, and length field, address field, data field, check code, the RSSI field in the data field is for receiving the signal strength signal intensity indication.
The invention provides the order dishes method of precious strength of transmitted signals of a kind of automatic adjusting, it may further comprise the steps:
Step (1) is under the precious emission mode of ordering dishes, and the base station is by the instantaneous value of baseband I, Q signal power calculation RSSI;
Step (2) is under the precious emission mode of ordering dishes, and the value in the RSSI status register of base station is upgraded continuously, till the inner demodulator module of radio frequency chip detects a packet synchronization character;
Step (3) averages the RSSI instantaneous value of all calculating and obtains RSSI mean value;
When step (4) receives packet when the treasured of ordering dishes, in the data field of packet, read RSSI mean value;
Step (5) if RSSI mean value greater than predetermined threshold, the value that signal sends intensity register subtracts 1, waits for when receive packet next time, rejudges RSSI mean value, until the value that RSSI mean value equals predetermined threshold or sends intensity register is for minimum;
Step (6) if RSSI mean value less than predetermined threshold, the value that signal sends intensity register adds 1, waits for when receive packet next time, rejudges RSSI mean value, until the value that RSSI mean value equals predetermined threshold or sends intensity register is for maximum.
Preferably, the base station comprises lead code with the precious packet of communicating by letter of ordering dishes, synchronization character, and length field, address field, data field, check code, the RSSI field in the data field is for receiving the signal strength signal intensity indication.
Description of drawings
Fig. 1 is that the treasured of ordering dishes exceeds the schematic diagram of base station scope;
Fig. 2 is the schematic diagram of treasured when being positioned at the border, base station of ordering dishes;
Fig. 3 is near the precious schematic diagram apart from the base station time of ordering dishes;
Fig. 4 be order dishes precious just away from the schematic diagram of base station;
Fig. 5 is the schematic diagram of data packet format that the base station sends;
Fig. 6 is the flow chart according to a specific embodiment of the inventive method.
Embodiment
Below with reference to accompanying drawings the present invention is described in more detail, has wherein represented the preferred embodiments of the present invention, should be appreciated that those skilled in the art can revise the present invention described here and still realize beneficial effect of the present invention.Therefore, following description is appreciated that extensively knowing for those skilled in the art, and not as limitation of the present invention.
RSSI receives the signal strength signal intensity indication, is used for judging link quality, and whether needs to increase signal transmission intensity.The RSSI value is the assessed value to signal power level in the current channel, when the base station receives information, it is precious under emission mode to order dishes, and the calculation element in the base station carries out the instantaneous value that baseband I, Q signal power integration obtain RSSI, i.e. RSSI (instantaneous value)=sum (I^2+Q^2) in 104us; Instantaneous value to 8192 RSSI averages the mean value (different instantaneous value calculated rates can be set according to different environment) that obtains RSSI in about 1 second then, be RSSI (on average)=sum (RSSI (instantaneous))/8192, provide the maximum of RSSI instantaneous value in 1 second and RSSI instantaneous value simultaneously greater than the ratio of a certain thresholding, since RSSI by carry out at numeric field the power integration then the anti-antenna opening of shifting onto obtain the inconsistent precision that influences RSSI of backward channel signal transmission characteristics.Under emission mode, the value in the RSSI status register in the base station is upgraded continuously, till the inner demodulator module of radio frequency chip detects a packet synchronization character.At this moment, the RSSI value is no longer upgraded, and begins to receive valid data automatically, till the treasured of next time ordering dishes enters emission state.
The precious default setting of ordering dishes is that peak signal sends, and when distance is near, weakens wire size automatically according to RSSI mean value and sends intensity, to reduce power consumption.
As shown in Figure 1, when base station and the precious distance of ordering dishes exceeded communication range, it was precious with the maximum power transmission signal to order dishes, and searches the base station.
As shown in Figure 2, the treasured of ordering dishes searches the base station, logins or reply ACK, and its receiving system receives packet and obtains RSSI mean value, the distance of judging distance base station from the base station.
As shown in Figure 3, it is precious nearer apart from the base station to order dishes, and the RSSI signal is stronger, and it is precious according to RSSI mean value to order dishes, and the precious signal emissive porwer that reduces automatically to order dishes returns to set point up to RSSI mean value.
As shown in Figure 4, when the treasured of ordering dishes was far away apart from the base station, the RSSI value can reduce, and the precious meeting of ordering dishes add the large-signal emissive porwer automatically according to RSSI mean value.
As shown in Figure 5, base station and the precious data packet format of communicating by letter of ordering dishes, a packet comprises lead code, synchronization character, length field, address field, data field, check code.The RSSI field is for receiving the signal strength signal intensity indication in the data field, the judgment means of ordering dishes in the treasured is judged according to RSSI mean value and predetermined threshold value, be increase or reduce the signal emissive porwer, LQI is the link-quality indication, the quality of assessment current demand signal, data albefaction district, in this district if having continuous a plurality of 0 or a plurality of 1, can impact reception, by the data albefaction, make 0 and 1 random distribution.The forward error correction district, when sending, this district adds error correction information, can correct automatically error code within the specific limits when making the recipient receive data, the cyclic check district be to this district carry out cyclic check and with check code relatively, if it is equate that it is correct then to receive packet, if unequal, then receive wrong, the jettisoning packet.
As shown in Figure 6, be the flow chart according to the specific embodiment of the inventive method, when the treasured of ordering dishes receives packet, in packet, read RSSI mean value in the data field, when if RSSI mean value equals predetermined threshold value 85, illustrate that signal strength signal intensity is moderate, if it is near apart from the base station that RSSI greater than 85, illustrates, signal strength signal intensity is big, the value that signal sends intensity register subtracts 1, wait for when receive packet next time, rejudge RSSI mean value, until RSSI mean value equal 85 or the value that sends intensity register for minimum, if RSSI mean value is far away apart from the base station less than 85 explanations, signal strength signal intensity is less, and the value that signal sends intensity register adds 1, waits for when receive packet next time, rejudge RSSI mean value, until RSSI mean value equal 85 or the value that sends intensity register for maximum.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.