Gain control method, apparatus, wireless signal receiving circuit, and related device
By adjusting the gain circuit in real time in the wireless communication terminal and predicting the target signal strength and gain based on the demodulation results, the signal instability problem caused by fixed gain is solved, and the accuracy of data packet reception and anti-interference capability are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BESTECHNIC SHANGHAI CO LTD
- Filing Date
- 2023-06-16
- Publication Date
- 2026-07-07
AI Technical Summary
When a wireless communication terminal is in motion, the signal strength is unstable due to fixed gain adjustment, which affects demodulation performance and leads to excessively high packet error rate and packet loss rate.
By acquiring the demodulation results, the target signal strength of the next data packet is predicted. The target receiving gain is determined according to the preset signal strength and gain relationship, and the gain circuit is adjusted in real time to ensure that the data packet signal strength meets the demodulation requirements.
It reduces packet error rate and packet loss rate, improves the anti-interference capability of data packet reception and demodulation, and enhances the stability of wireless communication equipment.
Smart Images

Figure CN116761246B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more specifically, to a gain control method, apparatus, wireless signal receiving circuit, and related equipment. Background Technology
[0002] After receiving a wireless signal, the antenna of a wireless communication terminal adjusts the gain of the signal to ensure proper demodulation. When the wireless communication terminal is in motion, the distance between it and the wireless access point (AP) changes. This change in distance affects the signal transmission loss between the terminal and the AP, thus impacting the signal strength received by the terminal.
[0003] Currently, the gain used when adjusting wireless signals is usually fixed. Since the received wireless signal is unstable, using a fixed gain to adjust the wireless signal may result in the input wireless signal being too large or too small, which will ultimately affect the demodulation performance and lead to a high false alarm rate or packet loss rate. Summary of the Invention
[0004] In view of this, this application aims to provide a gain control method, apparatus, wireless signal receiving circuit and related equipment to adjust the signal receiving gain of a wireless communication terminal, reduce the packet error rate and packet loss rate of wireless communication, and improve the anti-interference capability of receiving and demodulating data packets.
[0005] In a first aspect, embodiments of this application provide a gain control method, comprising: acquiring the demodulation result of a logarithmic packet, the demodulation result indicating whether the data packet was successfully demodulated; predicting the target signal strength of the next data packet based on the demodulation result; determining the target receiving gain corresponding to the target signal strength from a preset correspondence between signal strength and gain; and adjusting the gain circuit according to the target receiving gain.
[0006] The signal strength of adjacent data packets typically changes little; therefore, the signal strength of the next data packet can be predicted based on the current data packet. In this embodiment, since the success or failure of demodulation may be due to different signal strengths of data packets, predicting the target signal strength of the next data packet based on the demodulation result makes the predicted target signal strength more consistent with the actual situation of the next data packet, improving the accuracy of the target signal strength. This, in turn, makes the determined target receiving gain more accurate. By adjusting the gain circuit with this target receiving gain, the signal strength of the data packet after adjustment by the gain circuit can meet the requirements of normal demodulation, thereby reducing the packet loss rate and packet error rate. In this embodiment, since the receiving gain of the next data packet is adjusted, it is equivalent to determining a corresponding receiving gain for each data packet. Therefore, the determined receiving gain changes in real time and continuously, which can effectively reduce packet loss and packet error caused by untimely or inaccurate determination of the receiving gain, and improve the anti-interference capability of data packet reception and demodulation.
[0007] In one embodiment, predicting the target signal strength of the next data packet based on the demodulation result includes: if the demodulation result indicates that the data packet was successfully demodulated, then determining the corresponding signal strength of the data packet as the target signal strength.
[0008] In this embodiment of the application, if demodulation is successful, the corresponding signal strength of the current data packet is determined as the target signal strength, and the receiving gain for the next data packet is determined based on the corresponding signal strength of the current data packet. Thus, real-time and continuous adjustment of the gain can be achieved, thereby reducing the packet error rate and packet loss rate caused by untimely gain demodulation, and improving the anti-interference capability of data packet reception and demodulation.
[0009] In one embodiment, predicting the target signal strength of the next data packet based on the demodulation result includes: if the demodulation result indicates that the demodulation of the data packet has failed, then obtaining a timing value; the timing value is the time from packet reception to demodulation failure; and determining the target signal strength based on the relationship between the timing value, a preset threshold, and the target signal strength, wherein the preset threshold is a preset waiting time for processing the data packet.
[0010] In this embodiment of the application, the reason for the data packet demodulation failure can be determined by the timing value and the preset threshold. The target signal strength can be determined based on the reason for the demodulation failure, which can make the target signal strength more accurate, thereby improving the accuracy of the determined target receiving gain.
[0011] In one embodiment, determining the target signal strength based on the relationship between the timing value, the preset threshold, and the target signal strength includes: if the timing value is less than the preset threshold, then the signal strength of the previous data packet is determined as the target signal strength.
[0012] In this embodiment, the receiving gain corresponding to the signal strength of the previous data packet is the receiving gain of the current data packet. If the timing value is less than a preset threshold, it indicates that the signal strength of the demodulated data packet is sufficient for demodulation, and the next data packet can continue to be received at the current gain. This reduces the impact of gain adjustment on data packet demodulation, avoids situations where further gain adjustment makes the data packet undemodulation impossible, and reduces packet error rate and packet loss rate.
[0013] In one embodiment, determining the target signal strength based on the relationship between the timing value, the preset threshold, and the target signal strength includes: if the timing value is greater than the preset time threshold, then determining the difference between the signal strength of the data packet and the preset step value as the target signal strength; in the preset correspondence between signal strength and gain, the receiving gain corresponding to the signal strength of the data packet is less than the receiving gain corresponding to the difference.
[0014] In this embodiment, if the timing value is greater than a preset time threshold, it indicates that the signal strength of the currently demodulated data packet is too low and the demodulation time is too long. The difference between the signal strength of the current data packet and the preset step value is determined as the target signal strength. The receiving gain corresponding to the signal strength of the current data packet is less than the receiving gain corresponding to the difference. Therefore, a larger gain can be used to perform gain processing on the reception of the next data packet, thereby improving the signal strength of the next data packet so that it can be demodulated normally, thereby reducing the packet error rate and improving the anti-interference capability of data packet reception.
[0015] In one embodiment, the correspondence between signal strength and gain includes a plurality of consecutive signal strength ranges and a gain value corresponding to each signal strength range; determining the target receiving gain corresponding to the target signal strength based on the preset correspondence between signal strength and gain includes: determining the gain value corresponding to the target signal strength range in which the target signal strength is located based on the preset correspondence between signal strength and gain; wherein, the gain value corresponding to the target signal strength range is the target receiving gain.
[0016] In this embodiment, multiple consecutive signal strength ranges are set, and a gain corresponding to each signal strength range is set. Thus, for each determined target signal strength, it can fall into the corresponding signal strength range, and the corresponding target receiving gain can be determined. This reduces the occurrence of situations where the receiving gain corresponding to the target signal strength cannot be determined, thereby improving the accuracy of receiving and demodulating data packets, reducing packet error rate and packet loss rate, and improving the anti-interference capability of receiving and demodulating data packets.
[0017] Secondly, embodiments of this application provide a gain control device, comprising: an acquisition module for acquiring demodulation results of data packets, the demodulation results indicating whether the data packets were successfully demodulated; a prediction module for predicting the target signal strength of the next data packet based on the demodulation results; a gain module for determining the target receiving gain corresponding to the target signal strength based on a preset correspondence between signal strength and gain; and an adjustment module for adjusting the gain circuit according to the target receiving gain.
[0018] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the gain control method as described in the first aspect.
[0019] Fourthly, embodiments of this application also provide a gain control circuit, including: a processor, the processor being configured to execute the gain control method as described in any of the first aspects.
[0020] In one embodiment, the gain control circuit further includes a timer connected to the processor, the timer being used to record the time from packet reception to demodulation failure.
[0021] Fifthly, embodiments of this application also provide a wireless signal receiving circuit, including the gain control circuit described in any of the fourth aspects; a gain circuit connected to the gain control circuit; the gain circuit is used to receive the next data packet based on the control of the gain control circuit and according to the target receiving gain determined by the gain control circuit.
[0022] In a sixth aspect, embodiments of this application also provide an electronic device, including the wireless signal receiving circuit as described in the fifth aspect. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 A flowchart of a gain control method provided in an embodiment of this application;
[0025] Figure 2 This is a flowchart illustrating the target signal strength provided in an embodiment of this application;
[0026] Figure 3 This is a schematic diagram of a gain relationship table provided in an embodiment of this application;
[0027] Figure 4 This is a structural block diagram of a gain control device provided in an embodiment of this application;
[0028] Figure 5 This is a schematic diagram of the gain control circuit provided in an embodiment of this application;
[0029] Figure 6 This is a schematic diagram of the structure of a wireless signal receiving circuit provided in an embodiment of this application;
[0030] Figure 7 This is a schematic diagram of the structure of a wireless communication system provided in an embodiment of this application.
[0031] Icons: Gain control device 200; Acquisition module 210; Prediction module 220; Gain module 230; Adjustment module 240; Timing module 250; Gain control circuit 300; Processor 310; Timer 320; Wireless signal receiving circuit 400; Gain circuit 410; Main receiving circuit 420; Antenna 430; Wireless communication system 500; Electronic device 510; Wireless switch 520. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0033] This application provides a gain control method that can be applied to wireless communication terminals, such as mobile phones and computers, or to IoT (Internet of Things) devices such as speakers and headphones. The wireless communication terminal is connected to an access point (AP) to transmit data with the AP, which can be a wireless switch, router, or similar device.
[0034] The communication quality between the wireless communication terminal and the access point (AP) may change, causing variations in the signal strength of the data packets received by the wireless communication terminal. This can be due to factors such as changes in the distance between the wireless communication terminal and the AP, or the presence of substances that interfere with signal transmission. For example, when the distance between the AP and the wireless communication terminal changes, the strength of the data packets received by the wireless communication terminal from the AP may change. For instance, as the terminal moves away from the AP, the signal strength of the data packets received by the terminal gradually weakens; conversely, as the wireless communication terminal moves closer to the AP, the signal strength of the data packets received by the wireless communication terminal increases. Furthermore, the presence of multiple walls between the wireless communication terminal and the AP can also affect the communication quality between them, thereby affecting the signal strength of the received data packets.
[0035] Wireless communication terminals have varying demodulation capabilities for data packets with different signal strengths. For example, data packets with excessively strong signals may cause back-end circuit saturation and decreased linearity, both of which can affect demodulation. Similarly, data packets with weak signals may experience a decrease in the signal-to-noise ratio of the back-end circuit, also affecting demodulation. In this embodiment, a gain circuit can be provided between the receiving circuit of the wireless communication terminal that receives data packets and the module that processes data packets to amplify the received data packets and adjust the signal strength of the data packets to be demodulated.
[0036] This embodiment also provides a gain control method. This gain control method can be applied to a module connected to the data packet receiving circuit and the data packet demodulation module, and the module can be circuitally connected. By adjusting the gain circuit through the gain control method, the gain circuit can more accurately adjust the signal strength of the data packet, thereby reducing the packet error rate during demodulation. For example, in some embodiments provided in this application, the gain control method can be applied to the automatic gain control (AGC) module of the wireless communication terminal. The AGC module is connected to the gain circuit, and the AGC module can control the gain circuit to increase the gain of the data packets received by the wireless communication terminal.
[0037] Please see Figure 1 , Figure 1 A flowchart illustrating a gain control method provided in an embodiment of this application. The gain control method includes:
[0038] S110, obtain the demodulation result of the data packet.
[0039] In this embodiment, the data packet can be a signal. The demodulation result indicates whether the data packet was successfully demodulated, that is, whether the module in the wireless communication terminal that demodulates the data packet successfully demodulated it.
[0040] It's understandable that the demodulation module, regardless of whether demodulation is successful or not, will send feedback to the front end indicating demodulation completion, i.e., the demodulation result of the data packet. For example, successful demodulation means that the data packet was successfully received and demodulated by the wireless communication terminal. In this case, the demodulation module can send feedback to the front-end receiving circuit to ensure successful demodulation, allowing the receiving circuit to receive the next data packet. Demodulation failure means that the wireless communication terminal has attempted demodulation of the data packet for a long time without completing the demodulation. In this case, the demodulation module can send feedback to the front-end receiving circuit to indicate demodulation failure.
[0041] In this embodiment, the demodulation result of the data packet can, to some extent, characterize whether the relationship between the signal strength and gain of the data packet received by the wireless communication terminal is within a normal range. For example, successful demodulation indicates that the wireless communication terminal can demodulate the data packet normally, and also indicates that the signal strength of the data packet after gain adjustment is within a range that can be demodulated normally. In this case, the gain of the gain circuit is more in line with the current communication requirements. Conversely, if demodulation fails, it indicates that the signal strength of the currently received data packet is not within a range that can be demodulated normally after the current gain adjustment.
[0042] In some embodiments, if the demodulation module does not return demodulation results, the demodulation of data packets by the demodulation module can be monitored to obtain the demodulation results. It is understood that there are multiple ways to obtain demodulation results, which will not be elaborated upon here.
[0043] Therefore, in the embodiments of this application, it can be determined whether the gain of the current gain circuit for the data packet meets the requirements by obtaining the demodulation result of the data packet.
[0044] S120, predicts the target signal strength of the next data packet based on the demodulation results.
[0045] The communication quality between a wireless communication terminal and an access point (AP) is usually constantly changing. For example, when a user's handheld terminal device moves in space, the signal reception in wireless communication has high real-time performance and the frequency of receiving and demodulating data packets is relatively fast. When two consecutive data packets are received, the signal strength of the two data packets usually does not change significantly, and the demodulation results of the two packets also do not change significantly. Therefore, in the embodiments of this application, the demodulation result of the current data packet can be used to predict the signal strength of the next data packet.
[0046] Please see Figure 2 , Figure 2 This is a flowchart for determining the target signal strength according to an embodiment of this application.
[0047] In one embodiment, if the demodulation result indicates that the current data packet was successfully demodulated, then the corresponding signal strength of the current data packet is determined as the target signal strength.
[0048] In this embodiment, if the demodulation result indicates successful demodulation of the data packet, it means that the current gain, after adjusting the gain of the data packet, can meet the signal strength requirements of the demodulation module. However, since the wireless communication device may move in real time, the gain currently used may have been determined when the wireless communication device was at the previous position. If the wireless communication device continues to move, the signal strength of the data packet received at the next position after adjusting the gain value of the currently used gain value will not meet the requirements for accurate demodulation, resulting in demodulation failure and packet errors or loss. Therefore, in the embodiments of this application, even if the data packet demodulation is successful, it is still necessary to re-determine the target signal strength to determine the corresponding gain.
[0049] In general, the receiving position of the next data packet will not change significantly compared to the receiving position of the current data packet, and the signal strength between the two data packets will not change significantly. Therefore, if the current data packet is successfully demodulated, the signal strength of the current data packet can be predicted as the signal strength of the next data packet. That is, the signal strength of the current data packet is determined as the target signal strength, so as to determine the receiving gain of the next data packet based on the target signal strength.
[0050] For ease of understanding, the above process will be described at this distance, exemplarily.
[0051] If three data packets A, B, and C are received consecutively, the wireless communication device moves in the same direction while receiving these three data packets. Let the signal strength of A be 'a', the signal strength of B be 'b', and the signal strength of C be 'c'. If demodulation of A is successful, 'a' is used as the predicted target signal strength for B, and 'a' is used to determine the receiving gain for B. If demodulation of B is successful, 'b' is used as the predicted target signal strength for C, and 'b' is used to determine the receiving gain for C.
[0052] In the above embodiments, if the communication quality between the wireless communication device and the AP is continuously changing, the determined gain will also be adjusted differently according to the data packets received at different times, so that each data packet received at different times has a corresponding gain. After the corresponding gain adjustment, the data packet can be accurately demodulated, thereby improving the anti-interference capability of the wireless communication device in receiving data packets and reducing the occurrence of packet loss and errors.
[0053] During demodulation, both excessively high and low signal strength in the data packets can lead to demodulation failure. The required gain differs depending on the signal strength. For example, if the signal strength is too high, the demodulation failure is usually unrelated to the signal strength, and no gain adjustment is needed. Conversely, if the signal strength is too low, the data packets may not be accurately demodulated, thus requiring an increase in gain. In the embodiments of this application, when determining the target signal strength, the target signal strength of the next data packet can be predicted based on different reasons for demodulation failure.
[0054] In wireless communication devices, if the front-end receiving circuit does not receive feedback from the back-end demodulation module regarding successful data packet demodulation for an extended period, demodulation failure can be determined, potentially resulting in packet loss or errors. The demodulation module can only provide feedback on the demodulation failure, without specifying the exact reason for the failure or indicating whether the failure was due to insufficient signal strength or other factors. Therefore, some embodiments of this application provide methods for determining the specific cause of demodulation failure.
[0055] In some optional embodiments of this application, if the demodulation result indicates that the demodulation of the data packet has failed, a timing value can be obtained, and the reason for the demodulation failure can be determined based on the timing value and a preset threshold.
[0056] The demodulation time varies depending on whether the signal strength of the data packet is too high or too low. For example, a low signal strength will result in a longer demodulation time, potentially exceeding the maximum demodulation time. Conversely, a high signal strength may result in a demodulation failure even if the demodulation time is within the normal range, possibly due to backend line saturation or reduced data packet linearity. Therefore, the specific cause of demodulation failure can be determined by analyzing the demodulation time.
[0057] In this embodiment, a preset threshold can be set in advance. If the demodulation time exceeds the preset threshold, it indicates that the signal strength of the current data packet is still too low after gain, and the receiving gain for the next data packet should be increased. Conversely, if the demodulation time is less than the preset threshold but demodulation still fails, there may be other reasons unrelated to gain.
[0058] The preset threshold can be reasonably set according to the demodulation time of data packets by different wireless communication devices. Different wireless communication devices can be set with different preset thresholds. The preset threshold can be a preset waiting time for processing data packets, which can also be called the waiting time for signal decline.
[0059] In wireless communication devices, if the demodulation time of a data packet is too long, a response message may be required for the access point (AP) to retransmit the data packet. In some embodiments of this application, the preset threshold can be greater than the waiting time for processing the data packet but less than the time for determining the retransmission time. Therefore, based on this preset threshold, the target signal strength can be determined before retransmission, thus not affecting the retransmission of the data packet and ensuring that the retransmitted data packet can be accurately demodulated, reducing the packet error rate.
[0060] Next, in this embodiment, the time from packet reception to demodulation failure can be recorded to obtain a timing value. This timing value can then be compared with a preset threshold to determine the cause of demodulation failure and thus determine the appropriate target signal strength to control the receiving gain of the next data packet. For example, if the timing value is greater than the preset threshold, it indicates that the demodulation failure is due to insufficient signal strength, and the receiving gain of the next data packet can be increased. Conversely, if the timing value is less than or equal to the preset threshold, it indicates that the demodulation failure is due to excessive signal strength, and the gain can remain unchanged.
[0061] In the above embodiments, the relationship between the timing value and the preset threshold can characterize the possible reasons for demodulation failure. Therefore, in some embodiments of this application, if demodulation fails, the target signal strength can be determined based on the relationship between the timing value, the preset threshold and the target signal strength.
[0062] In some embodiments, the signal strength of the data packet after gain can be recorded, and the gained strength can be compared with the endpoint values of a preset range. If the signal strength is lower than the minimum value of the preset range, the demodulation failure is determined to be due to insufficient gain; conversely, if the signal strength is greater than the maximum value of the preset range, the cause may be something other than gain. The preset range is the range of signal strengths within which the data packet can be demodulated normally. Therefore, the corresponding target strength can be determined based on the determined cause of the demodulation failure.
[0063] In one embodiment, if the demodulation failure is unrelated to gain or signal strength, such as a timing value being less than or equal to a preset threshold, then the signal strength of the previous data packet can be determined as the target signal strength.
[0064] If the timing value is less than or equal to the preset threshold, it indicates that the demodulated data packet is not demodulated for a long time due to insufficient signal strength, but due to some other reason. This reason is usually unrelated to the signal strength of the data packet, such as the synchronization algorithm or other reasons. This also indicates that the current gain meets the gain requirement for demodulating the current data packet. Therefore, the next data packet can continue to be demodulated with the current gain.
[0065] The current gain is determined by the signal strength of the previous data packet, which can then be used as the target signal strength. For ease of understanding, we will continue with data packets A, B, and C. If A is successfully demodulated, the receive gain for B is configured with 'a' as the target signal strength. If B fails to demodulate, the receive gain for C can be configured with A's signal strength 'a' as the target signal strength.
[0066] In some embodiments, if the timing value is less than or equal to a preset threshold, the signal strength corresponding to the current data packet or a value greater than the signal strength corresponding to the current data packet can be determined as the target signal strength. The value smaller than the current receiving gain is then determined as the receiving gain, and the next data packet is received with a smaller receiving gain, thereby reducing the impact of excessive data packet signal strength on demodulation.
[0067] In one embodiment, if the demodulation failure is due to the signal strength of the demodulated data packet being too low, such as a timing value being greater than a preset time threshold, then the difference between the signal strength of the data packet and the preset step value is determined as the target signal strength; wherein, in the preset correspondence between signal strength and gain, the receiving gain corresponding to the signal strength of the current data packet is less than the receiving gain corresponding to the difference.
[0068] If the signal strength of the demodulated data packet is too low, the receiving gain of the next data packet can be increased. In this embodiment, a preset step value can be subtracted from the signal strength of the current data packet to obtain the difference between the two. This difference is less than the signal strength of the current data packet. The gain determined using this difference will be greater than the gain determined using the signal strength of the current data packet. Therefore, after amplifying the next data packet, the signal strength of the amplified data packet can be effectively improved, thus enabling the next data packet to be accurately received.
[0069] In the embodiments provided in this application, after receiving the demodulation result of the data packet, the timing value can be reset so that the target signal strength can be accurately determined subsequently.
[0070] In this application, the signal strength of the received data packet is usually continuously changing, and the gain is readjusted after each data packet is received. When a demodulation failure occurs, the previous data packet is usually successfully demodulated. Therefore, the gain determined by the signal strength of the previous data packet can be used as the gain corresponding to the current data packet, that is, the gain does not change.
[0071] In some embodiments, the corresponding target signal strength can also be determined in other ways. The above methods are only some embodiments provided in this application. In other ways of determining the target signal strength, it is only necessary to satisfy the following: if the current data packet is successfully demodulated, the gain can be determined based on the signal strength of the current data packet; if the current data packet fails to demodulate, if the reason for the demodulation failure is not due to excessive signal strength, the target signal strength is kept unchanged; if the reason for the demodulation failure is due to excessive signal strength, the target signal strength of the predicted next data packet is reduced.
[0072] S130, based on the preset correspondence between signal strength and gain, determines the target receiving gain corresponding to the target signal strength.
[0073] In this embodiment, the correspondence between signal strength and gain is implemented as a relationship table between signal strength and gain, a relationship formula between gain and signal strength, etc. Different types of correspondence between signal strength and gain can be set in different scenarios, which will not be elaborated here.
[0074] In some embodiments, the relationship between signal strength and gain may include an inverse relationship between signal strength and receiver gain. For example, a higher signal strength corresponds to a lower receiver gain, and vice versa. This ensures that after gaining, the signal strength of the data packet is within the range of data packet signals that the demodulation module can normally demodulate.
[0075] In general, the signal strength of the received data packet changes continuously, and the corresponding gain value will be re-determined. However, in some cases, the signal strength of the data packet changes too drastically. For different signal strength ranges, a corresponding gain value is set. If the predicted target signal strength and the actual signal strength are not within the same gain range, the gained signal strength of the data packet will be outside the range that can be normally demodulated, resulting in demodulation failure. For example, if the range of normally demodulated signal strength is 20-40, and the predicted signal strength is 15 (falling within the range of 10-20), the corresponding gain is 2. If the actual signal strength is 25, and a gain of 2 is applied to 25, the gained signal strength is 50, which cannot be normally demodulated. Since the signal strength of the received data packet cannot be directly controlled, the gain can be reduced. Therefore, in this embodiment, the signal strength and gain can be set to an inverse relationship. The above is merely an example and is not intended to illustrate this application.
[0076] In one optional embodiment, the correspondence between signal strength and gain may include a plurality of consecutive signal strength ranges and a gain value corresponding to each signal strength range.
[0077] For example, the correspondence between signal strength and gain may include signal strength ranges [a, b], (b, c], and (c, d], with gains g1, g2, and g3 respectively. It is understood that there are more signal strength ranges and corresponding gains in the correspondence between signal strength and gain; the above is merely an example and should not be construed as a limitation of this application.
[0078] In this embodiment, setting multiple consecutive signal strength ranges and corresponding gains ensures that each determined target signal strength has a corresponding gain, thereby enabling the next data packet to be accurately demodulated after gaining. This reduces the occurrence of situations where the target signal strength does not have a corresponding gain, thus preventing the next data packet from being accurately gained and demodulated. This reduces the packet error rate and improves the anti-interference capability of the wireless communication device in receiving data packets.
[0079] Accordingly, determining the target receiving gain corresponding to the target signal strength from the preset correspondence between signal strength and gain may include: determining the target signal strength range in which the target signal strength is located from the correspondence between signal strength and gain, wherein the gain value corresponding to the target signal strength range is the target receiving gain.
[0080] For example, the correspondence between signal strength and gain includes signal strength ranges [a, b], (b, c], and (c, d], with corresponding gains of g1, g2, and g3, respectively. When the target signal strength is a1, a1 is greater than a and less than b, then the gain corresponding to the target signal strength is determined to be g1. The above is merely an example and is not intended to limit this application.
[0081] Please see Figure 3 , Figure 3 This is a schematic diagram of a gain relationship table provided in an embodiment of this application.
[0082] In one optional implementation, the correspondence between signal strength and gain can be a gain table. The gain table can include eight levels: 0, 1, 2, 3, 4, 5, 6, and 7. Each level corresponds to a different signal strength range, and each level corresponds to a receiving gain, from stage 0 to stage 7, where 0 is the minimum and 7 is the maximum. J0 is the transition point between level 0 and level 1. Similarly, JP1 to JP6 are the transition points between different levels. Each level range includes a maximum and a minimum value, with the maximum value being the transition point. When the target signal strength is between the transition point and the minimum value of that level, the target signal strength is determined to fall within that level, and the gain corresponding to that level is determined as the target receiving gain. For example, if the target signal strength is less than JP0, stage 0 can be determined as the target receiving gain. If the target signal strength is between JP0 and JP1, then stage 1 will be selected as the next receiving gain, and so on.
[0083] Among them, the handover points JP0 to JP7 can be configured according to the signal strength range that different wireless communication devices can normally demodulate data packets, so as to meet the needs of different wireless communication devices and improve the anti-interference capability of different wireless communication devices in receiving data packets.
[0084] S140 adjusts the gain circuit according to the target receiving gain.
[0085] In this embodiment, after obtaining the target receiving gain, the gain circuit of the data packet can be adjusted according to the target receiving gain, so that the data packet can be accurately demodulated after the gain is applied.
[0086] In this embodiment, the target signal strength of the next data packet is predicted based on the demodulation result, making the predicted target signal strength more accurate. This, in turn, makes the determined target receiving gain more accurate. The gain circuit is adjusted using this target receiving gain, ensuring that the strength of the data packet after gaining by the gain circuit meets the requirements of normal demodulation, thereby reducing packet loss and error rates. In this embodiment, since the receiving gain is adjusted for the next data packet—that is, a corresponding receiving gain is determined for each data packet—the determined receiving gain changes in real time and continuously. This effectively reduces packet loss and error rates caused by untimely or inaccurate determination of the receiving gain, improving the anti-interference capability of data packet reception and demodulation.
[0087] Based on the same inventive concept, embodiments of this application also provide a gain control device 200. Please refer to... Figure 4 , Figure 4 This is a schematic diagram of the structure of a gain control device 200 provided in an embodiment of this application. The gain control device 200 includes: an acquisition module 210, a prediction module 220, a gain module 230, and a control module 240.
[0088] The acquisition module 210 is used to acquire the demodulation result of the data packet, and the demodulation result indicates whether the data packet was successfully demodulated.
[0089] The prediction module 220 predicts the target signal strength of the next data packet based on the demodulation results.
[0090] Gain module 230 is used to determine the target receiving gain corresponding to the target signal strength based on a preset correspondence between signal strength and gain.
[0091] The control module 240 is used to control the gain circuit according to the target receiving gain.
[0092] In one embodiment, the prediction module 220 is further configured to determine the corresponding signal strength of the data packet as the target signal strength if the demodulation result indicates that the data packet was successfully demodulated.
[0093] In one embodiment, the gain control device 200 further includes a timing module 250, which records the time from packet reception to demodulation failure to obtain a timing value. The prediction module 220 is further configured to, if the demodulation result indicates that the demodulation of the data packet has failed, obtain the timing value, and determine the target signal strength based on the relationship between the timing value, a preset threshold, and the target signal strength, wherein the preset threshold is a preset waiting time for processing the data packet.
[0094] In one embodiment, the prediction module 220 is further configured to determine the signal strength of the previous data packet as the target signal strength if the timing value is less than or equal to a preset threshold.
[0095] In one embodiment, the prediction module 220 is further configured to determine the difference between the signal strength of the data packet and the preset step value as the target signal strength if the timing value is greater than a preset time threshold; in the preset correspondence between signal strength and gain, the receiving gain corresponding to the signal strength of the data packet is less than the receiving gain corresponding to the difference.
[0096] In one embodiment, the correspondence between signal strength and gain includes multiple consecutive signal strength ranges and the gain value corresponding to each signal strength range. The gain module 230 is further used to determine the gain value corresponding to the target signal strength range where the target signal strength is located based on the preset correspondence between signal strength and gain; wherein, the gain value corresponding to the target signal strength range is the target receiving gain.
[0097] It is understood that the function implemented by the gain control device 200 corresponds to the content of the gain control method. For details, please refer to the aforementioned gain control method, which will not be repeated here.
[0098] It is understood that the gain control device 200 provided in this application corresponds to the gain control method provided in this application. In order to keep the specification concise, the same or similar parts can be referred to the content of the gain control method section, and will not be repeated here.
[0099] Each module in the aforementioned gain control device 200 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the server in hardware form or independently of it, or stored in the server's memory in software form, so that the processor can call and execute the operations corresponding to each module. The processor can be a central processing unit, a microprocessor, a microcontroller, etc.
[0100] The above-described gain control method or gain control device 200 can be implemented as a computer-readable instruction, with a computer program stored in a readable storage medium. When the computer program is run on a computer, it causes the computer to execute the gain control method provided in any of the above embodiments.
[0101] Based on the same inventive concept, this application also provides a gain control circuit 300. Please refer to [link to relevant documentation]. Figure 5 , Figure 5 This is a schematic diagram of a gain control circuit 300 provided in an embodiment of the present application. The gain control circuit 300 includes a processor 310, which can execute the gain control method provided in any of the above embodiments.
[0102] In this embodiment, the processor 310 can be configured to connect to a receiving circuit in a wireless communication device that receives data packets, and to connect to a module in the wireless device that demodulates data packets. The receiving circuit may include a gain circuit or a gain device for amplifying data packets, and the processor 310 is connected to the gain circuit or gain device to adjust the gain of the gain circuit or gain device according to a determined target receiving gain.
[0103] The gain circuit can be connected to the receiving circuit of the wireless terminal device, or it can be a component or module of the receiving circuit. For example, the gain circuit can include a low-noise amplifier in the receiving circuit.
[0104] In this embodiment, the processor 310 is a device with processing functions such as a central processing unit or a microprocessor. The processor can also be a processor in some modules of a wireless communication device, such as a communication module or an AGC module. The specific structure and connection method of the processor 310 can be referred to the prior art, and will not be described in detail here.
[0105] In one embodiment, the gain control circuit 300 may further include a timer 320, which is connected to the processor 310 and configured to connect to the module that demodulates data packets. The timer 320 records the time from packet reception to demodulation failure in the data packet demodulation module, obtaining a timing value. The processor 310 can obtain the timing value from the timing value to determine the target signal strength. The structure of the timer 320 can be referenced from existing technology and will not be described in detail here.
[0106] Based on the same inventive concept, this application also provides a wireless signal receiving circuit 400. Please refer to... Figure 6 , Figure 6 This is a schematic diagram of the structure of a wireless signal receiving circuit 400 provided in an embodiment of this application. The wireless signal receiving circuit 400 includes a gain control circuit 300 and a gain circuit 410.
[0107] The gain control circuit 300 can be the gain control circuit 300 provided in any of the above embodiments or a circuit with similar functions.
[0108] Gain circuit 410 is connected to gain control circuit 300.
[0109] In this embodiment, the gain circuit 410 is used to increase the next data packet based on the target receiving gain determined by the gain control circuit 300.
[0110] In some embodiments, the wireless signal receiving circuit 400 may further include a main receiving circuit 420 and an antenna 430, and the wireless signal receiving circuit 400 may receive data packets sent by the AP through the main receiving circuit 420 and the antenna 430.
[0111] The gain circuit 410 may be disposed within the main receiving circuit 420, appearing as a portion of the circuitry or a device with gain functionality within the main receiving circuit 420. In some embodiments, the gain circuit 410 may be independent of the main receiving circuit 420 but connected to it and configured to connect to the data packet demodulation module. The gain circuit 410 may perform gain processing on the data packets output by the main receiving circuit 420 and output them to the data packet demodulation module.
[0112] Based on the same inventive concept, this application also provides an electronic device, which may include the wireless signal receiving circuit 400 provided in the above embodiments.
[0113] In this embodiment, the electronic device can be a computer, server, or other device that can be directly used and provide services. Alternatively, it can be a wireless communication device equipped with the wireless signal receiving circuit 400 and manufactured and applied as a component of various devices. The electronic device can be the wireless communication device mentioned in the above embodiments.
[0114] Based on the same inventive concept, this application also provides a wireless communication system 500. Please refer to [link to relevant documentation]. Figure 7 , Figure 7 This is a schematic diagram of the structure of the wireless communication system 500 provided in the embodiment of this application. The wireless communication system 500 includes: a wireless switch 520 and an electronic device 510.
[0115] Wireless switch 520 is configured to connect to a wired network and provide a wireless network for devices that communicate with it. The implementation of wireless switch 520 can refer to existing technologies and will not be elaborated upon here.
[0116] Electronic device 510 is communicatively connected to a wireless switch to access a wired network via wireless switch 520. The electronic device may be the electronic device provided in the above embodiments or a device with similar functions, or the wireless communication device mentioned in the above embodiments.
[0117] The features of the above embodiments can be combined with each other to obtain new embodiments without conflict.
[0118] The above detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0119] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0120] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the term "connection" should be interpreted broadly. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0121] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A gain control method, characterized in that, include: Obtain the demodulation result of the data packet, wherein the demodulation result indicates whether the data packet was successfully demodulated; Predict the target signal strength of the next data packet based on the demodulation results; Based on the preset correspondence between signal strength and gain, the target receiving gain corresponding to the target signal strength is determined; The gain circuit is adjusted according to the target receiving gain; The step of predicting the target signal strength of the next data packet based on the demodulation result includes: if the demodulation result indicates that the demodulation of the data packet has failed, then obtaining a timing value; the timing value is the time from the receipt of the data packet to the demodulation failure; and determining the target signal strength based on the relationship between the timing value, a preset threshold and the target signal strength, wherein the preset threshold is a preset waiting time for processing the data packet. The step of determining the target signal strength based on the relationship between the timing value, the preset threshold, and the target signal strength includes: if the timing value is less than or equal to the preset threshold, then the signal strength of the previous data packet is determined as the target signal strength; if the timing value is greater than the preset threshold, then the difference between the signal strength of the data packet and the preset step value is determined as the target signal strength; in the preset correspondence between signal strength and gain, the receiving gain corresponding to the signal strength of the data packet is less than the receiving gain corresponding to the difference.
2. The gain control method according to claim 1, characterized in that, The step of predicting the target signal strength of the next data packet based on the demodulation result includes: If the demodulation result indicates that the data packet was successfully demodulated, then the corresponding signal strength of the data packet is determined as the target signal strength.
3. The gain control method according to claim 1 or 2, characterized in that, The correspondence between signal strength and gain includes multiple consecutive signal strength ranges and the gain value corresponding to each signal strength range; The step of determining the target receiving gain corresponding to the target signal strength based on a preset correspondence between signal strength and gain includes: Based on the preset correspondence between signal strength and gain, the gain value corresponding to the target signal strength range where the target signal strength is located is determined; wherein, the gain value corresponding to the target signal strength range is the target receiving gain.
4. A gain control device, characterized in that, include: The acquisition module is used to acquire the demodulation result of the data packet, wherein the demodulation result indicates whether the data packet was successfully demodulated; The prediction module predicts the target signal strength of the next data packet based on the demodulation results. The gain module is used to determine the target receiving gain corresponding to the target signal strength based on a preset correspondence between signal strength and gain. The control module is used to control the gain circuit according to the target receiving gain; The prediction module is configured to obtain a timing value if the demodulation result indicates that the demodulation of the data packet has failed; the timing value is the time from the receipt of the data packet to the demodulation failure. Based on the relationship between the timing value, the preset threshold, and the target signal strength, the target signal strength is determined, and the preset threshold is a preset waiting time for processing the data packet; The prediction module is further configured to: if the timing value is less than or equal to the preset threshold, determine the signal strength of the previous data packet as the target signal strength; The prediction module is further configured to: if the timing value is greater than the preset threshold, determine the difference between the signal strength of the data packet and the preset step value as the target signal strength; in the preset correspondence between signal strength and gain, the receiving gain corresponding to the signal strength of the data packet is less than the receiving gain corresponding to the difference.
5. A computer-readable storage medium, characterized in that, The readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the gain control method as described in any one of claims 1-3.
6. A gain control circuit, characterized in that, include: A processor for performing the gain control method as described in any one of claims 1-3.
7. The gain control circuit according to claim 6, characterized in that, The processor is used to execute the gain control method as described in claim 1 or 3; The gain control circuit further includes a timer connected to the processor, which is used to record the time from packet reception to demodulation failure.
8. A wireless signal receiving circuit, characterized in that, include: The gain control circuit as described in claim 6 or 7; A gain circuit, connected to the gain control circuit; The gain circuit is used to increase the gain of the next data packet based on the target receive gain determined by the gain control circuit, according to the control of the gain control circuit.
9. An electronic device, characterized in that, include: The wireless signal receiving circuit as described in claim 8.
10. A wireless communication system, characterized in that, include: Wireless switch; The electronic device as described in claim 9 is communicatively connected to the wireless switch.