Gain control method and device, storage medium and wireless communication system
By sampling and calculating signal energy in the wireless communication system, dynamically adjusting the gain of the preamplifier, the signal distortion problem caused by dynamic changes in the level signal is solved, and high-quality communication in the wireless communication system is achieved.
Patent Information
- Application Number
- CN202510052814.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-08
AI Technical Summary
In mobile wireless communication, the trusted end needs to adapt to the large dynamic range of level signals, resulting in signal distortion problems. Especially in burst communication systems and time division multiplexing communication modes, it is difficult for conventional AGC to achieve high-quality communication.
By continuously sampling the signal output by the analog-to-digital conversion module in the wireless communication system, determining whether synchronization information is received, calculating the average signal energy of a specific window length in the signal, and adjusting the gain of the preamplifier based on this energy and the preset threshold to achieve dynamic adjustment of AGC.
This method can avoid gain amplitude jump in the case of frames or time slots or OFDM symbol alignment, ensure the stability of system equalization and demodulation and decoding, thereby realizing high-quality communication of wireless communication systems.
Smart Images

Figure CN119789192A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communication technology, and more specifically, to a gain control method, device, storage medium and wireless communication system. Background Art
[0002] In mobile wireless communications, due to the mobility of communication terminals, the wireless channel has a strong fading effect (such as path loss, shadow fading, multipath fading, etc.), and there is signal interference from other devices and changes in business load, which leads to large changes in the level or power received by the receiving end. This requires the receiver to have the ability to adapt to level signals with a large dynamic range. Automatic Gain Control (AGC) is an effective technology to improve the dynamic range of analog-to-digital converters, which can effectively solve the signal distortion problem caused by the large dynamic range of level signals.
[0003] In burst communication systems, the signal is discontinuous, so a single continuous AGC may cause the gain to be adjusted to the maximum when there is no signal. At this time, if a useful signal is suddenly transmitted, it will cause reception saturation and thus no reception. In the time division multiplexing communication mode, the signal is also discontinuous, and in the multi-user mode, there may be interference from other users' transmission signals to the end user, so it is difficult to achieve high-quality communication with the conventional AGC method. In the OFDM communication mode, system processing, such as channel estimation and equalization, is usually based on OFDM symbols. If the gain is changed in the middle of the OFDM symbol, the performance of the system channel estimation and equalization may deteriorate, especially in the high-order modulation mode, which may not be demodulated correctly. Summary of the invention
[0004] Embodiments of the present application provide a gain control method, device, storage medium and wireless communication system, which achieve high-quality communication in the wireless communication system.
[0005] The embodiment of the present application provides a gain control method, which is applied to a wireless communication system having a preamplifier and an analog-to-digital conversion module, wherein the output end of the preamplifier is connected to the input end of the analog-to-digital conversion module, and the gain control method includes: Continuously sampling the signal output by the analog-to-digital conversion module and determining whether synchronization information is received; the synchronization information includes a synchronization position; When the synchronization information is received, a first window length is determined according to a unit time, and the synchronization position is determined as a first starting position; a first average signal energy of a first window length of sampling signals starting from the first starting position in the sampling signal is calculated; and a gain of the preamplifier is adjusted according to the first average signal energy and a preset threshold; wherein the unit time is the duration of a frame of the wireless communication system or the duration of a time slot or the duration of an OFDM symbol plus a CP header.
[0006] In an exemplary embodiment, when the synchronization information is not received, the second average signal energy of the sampling signal of the second window length starting from the second starting position in the signal is calculated; and the gain of the preamplifier is adjusted according to the second average signal energy and a preset threshold.
[0007] In an exemplary embodiment, before adjusting the gain of the preamplifier according to the first average signal energy and a preset threshold, the method further includes: filtering the first average signal energy according to the first average signal energy and the first average signal energy calculated last time; Before adjusting the gain of the pre-amplifier according to the second average signal energy and the preset threshold, the method further includes: The second average signal energy is filtered according to the second average signal energy and the second average signal energy calculated last time.
[0008] In an exemplary embodiment, determining the first window length according to the unit time includes: The number of sampling points within the unit time is used as the first window length.
[0009] In an exemplary embodiment, the step of calculating a first average signal energy of a first window length of sampled signals starting from a first starting position in the sampled signal includes: Calculating the signal energy of a single sampled signal based on the real part and the imaginary part of the single sampled signal; Taking the average value of the sum of signal energies of the first window length sampling signals starting from the first starting position as the first average signal energy; Calculating the signal energy of a single sampled signal based on the real and imaginary parts of the single sampled signal includes: The sum of the square of the real part and the square of the imaginary part of the single sampling signal is taken as the signal energy of the single sampling signal.
[0010] In an exemplary embodiment, adjusting the gain of the preamplifier according to the first average signal energy and a preset threshold includes: When the first average signal energy is less than a preset threshold, increasing the gain of the preamplifier with a first variable step size; When the first average signal energy is equal to a preset threshold, keeping the gain of the pre-amplifier unchanged; When the first average signal energy is greater than a preset threshold, the gain of the pre-amplifier is reduced with a second variable step size.
[0011] In an exemplary embodiment, when the first average signal energy is less than a preset threshold, the greater the difference between the first average signal energy and the preset threshold, the smaller the first variable step size; when the first average signal energy is greater than the preset threshold, the greater the difference between the first average signal energy and the preset threshold, the larger the second variable step size.
[0012] In an exemplary embodiment, adjusting the gain of the preamplifier according to the second average signal energy and a preset threshold includes: When the second average signal energy is less than a preset threshold, increasing the gain of the pre-amplifier with a fixed step size; When the second average signal energy is equal to a preset threshold, keeping the gain of the pre-amplifier unchanged; When the second average signal energy is greater than a preset threshold, the gain of the pre-amplifier is reduced with a third variable step size.
[0013] In an exemplary embodiment, when the second average signal energy is greater than a preset threshold, the greater the difference between the second average signal energy and the preset threshold, the greater the third variable step size.
[0014] The embodiment of the present application also provides a gain control device, including a memory and a processor. The memory is used to store a program for the gain control method; The processor is used to read a program for executing the gain control method, and execute the method described in any one of the above embodiments.
[0015] An embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to enable the computer to execute the method described in any one of the above embodiments.
[0016] The embodiment of the present application also provides a wireless communication system, including a preamplifier, an analog-to-digital conversion module, a synchronization detection device and the above-mentioned gain control device; Wherein, the output end of the pre-amplifier is connected to the input end of the analog-to-digital conversion module; the input end of the gain control device is connected to the output end of the analog-to-digital conversion module; the output end of the gain control device is connected to the input end of the pre-amplifier; The pre-amplifier is configured to amplify the received analog signal according to the gain output by the gain control device; The analog-to-digital conversion module is configured to convert the amplified analog signal into a digital signal; The synchronization detection device is configured to detect whether the wireless communication system is in a synchronization state, and send synchronization information to the gain control device if it is determined that the wireless communication system is in a synchronization state.
[0017] The gain control method of the embodiment of the present application determines the first window length according to the duration of the frame or the duration of the time slot or the duration of the OFDM symbol plus the CP header of the wireless communication system, determines the synchronization position as the first starting position, and calculates the first average signal energy according to the first window length and the first starting position, and adjusts the gain of the pre-amplifier according to the first average signal energy. In this way, it can be ensured that the AGC adjustment is based on the alignment of the frame or the time slot or the OFDM symbol, thereby ensuring that there are no large amplitude jumps within the frame, the time slot or the OFDM symbol, ensuring system balance, and making demodulation and decoding more stable, thereby achieving high-quality communication in the wireless communication system.
[0018] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained through the structures particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0020] Figure 1 A schematic diagram of a gain control method according to an embodiment of the present application; Figure 2 A schematic diagram of a data flow without synchronization according to an embodiment of the present application; Figure 3 A schematic diagram of data flow in a synchronous situation according to an embodiment of the present application; Figure 4 A schematic diagram of gain adjustment in a synchronous state according to an embodiment of the present application; Figure 5 A schematic diagram of an example of a frame structure of an embodiment of the present application; Figure 6 A schematic diagram of another gain control method according to an embodiment of the present application; Figure 7 A schematic diagram of a gain adjustment control point in an unsynchronized state according to an embodiment of the present application; Figure 8 A schematic diagram of a gain adjustment control point in a synchronization situation according to an embodiment of the present application; Fig. 9 A schematic diagram of a gain control device according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present application more clear, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other arbitrarily without conflict.
[0022] Figure 1 Schematic diagram of a gain control method of an embodiment of the present application, the gain control method is applied to a wireless communication system having a pre-amplifier and an analog-to-digital conversion module, the output end of the pre-amplifier is connected to the input end of the analog-to-digital conversion module, such as Figure 1 As shown, the gain control method includes the following steps 11 to 13: Step 11, continuously sampling the signal output by the analog-to-digital conversion module; Step 12, determining whether synchronization information is received; Step 13, when the synchronization information is received, determine the first window length according to the unit time, and determine the synchronization position as the first starting position; calculate the first average signal energy of the first window length sampling signals starting from the first starting position in the sampling signal; adjust the gain of the pre-amplifier according to the first average signal energy and the preset threshold.
[0023] The synchronization information includes a synchronization position.
[0024] The unit time is the duration of a frame or a time slot of the wireless communication system or the duration of an OFDM symbol plus a CP header.
[0025] The gain control method of the embodiment of the present application determines the first window length according to the duration of the frame or the duration of the time slot or the duration of the OFDM symbol plus the CP header of the wireless communication system, determines the synchronization position as the first starting position, and calculates the first average signal energy according to the first window length and the first starting position, and adjusts the gain of the pre-amplifier according to the first average signal energy. In this way, it can be ensured that the AGC adjustment is based on the alignment of the frame or time slot or OFDM symbol, thereby ensuring that there is no large amplitude jump within the frame, time slot or OFDM symbol, ensuring system balance, and demodulation and decoding are more stable, thereby achieving high-quality communication of the wireless communication system.
[0026] In step 11, the sampling rate can be preset as needed. For example, the sampling rate can be 122.88 MHz.
[0027] In step 12, the synchronization information is used to indicate that the wireless communication system is in a synchronization state.
[0028] like Figure 2 As shown, when the local reference OFDM symbol is slidingly correlated with the data stream, that is, when the correlation peak of the decision threshold is not reached, the system is considered to be out of synchronization. Among them, data stream sliding correlation refers to using a sliding window to gradually analyze the received data stream and compare it with the known OFDM symbol. Specifically, the sliding window moves on the received data, and the similarity between the data in the current window and the local reference signal is evaluated by calculating the correlation value. This method can effectively identify the starting point of the symbol, thereby achieving synchronization. The sliding window refers to a time period of fixed length for sampling the received signal. The correlation value is a value obtained by calculating the similarity between the data in the window and the reference signal. The larger the value, the higher the similarity between the two. The correlation peak of the decision threshold refers to the process of determining whether the current correlation value is high enough by setting a threshold when performing symbol synchronization to confirm whether the system has reached the synchronization state. The correlation peak refers to the maximum correlation value calculated during the sliding correlation process. If the peak value is higher than the decision threshold, the system is considered to have successfully synchronized.
[0029] like Figure 3 As shown in FIG. 1 , the correlation peak of the local reference OFDM symbol reaches the decision threshold, indicating that the system is synchronized. The position indicated by the arrow is the synchronization position.
[0030] Step 13 Figure 4 As shown, the process includes the following steps 131 to 133: Step 131, when the synchronization information is received, determining a first window length according to a unit time, and determining a first starting position according to the synchronization information; Step 132, calculating a first average signal energy of a signal of a first window length starting from a first starting position in the signal; Step 133, adjusting a gain of the preamplifier according to the first average signal energy and a preset threshold.
[0031] In step 131, in an exemplary embodiment, determining the first window length according to the unit time may include: The number of sampling points per unit time is taken as the first window length.
[0032] In an exemplary embodiment, the unit time may be the duration of a frame, the duration of a time slot, or the duration of an OFDM symbol plus a CP header.
[0033] The frame structure is as follows Figure 5 As shown, one frame includes 10 time slots, and one time slot includes 14 OFDM symbols and a CP header. One frame may be 10 ms long, and one time slot may be 1 ms long.
[0034] Exemplarily, the first window length may be 10 ms or 1 ms.
[0035] In an exemplary embodiment, the synchronization information includes a synchronization position; The determining the first starting position according to the synchronization information includes: The synchronization position is taken as the first starting position.
[0036] The synchronization position may be a frame header position, a timeslot header position, or an OFDM symbol header position.
[0037] In step 132 , illustratively, assuming that the effective time length is 0.01 milliseconds and the sampling rate is 122.8 MHz, the first window length may be 1228 (122.8×0.01×1000).
[0038] The first average signal energy is equal to the sum of the signal energies of the first window length sampling points starting from the first starting position divided by the first window length, that is: ; Among them, the total energy of the first window length N sampling points The calculation formula is as follows: ; Among them, the signal energy of a single sampling point Equal to the sum of the squares of the real parts of the signals Add the sum of the squares of the imaginary parts of the signal ,Right now: .
[0039] In step 133, adjusting the gain of the preamplifier according to the first average signal energy and a preset threshold includes: When the first average signal energy is less than a preset threshold, increasing the gain of the preamplifier with a first variable step size; When the first average signal energy is equal to a preset threshold, keeping the gain of the pre-amplifier unchanged; When the first average signal energy is greater than a preset threshold, reducing the gain of the pre-amplifier with a second variable step size; Exemplarily, when the first average signal energy is less than a preset threshold, the greater the difference between the first average signal energy and the preset threshold, the smaller the first variable step size; when the first average signal energy is greater than the preset threshold, the greater the difference between the first average signal energy and the preset threshold, the larger the second variable step size.
[0040] In actual systems, the preamplifier is usually adjusted in dB. For example, the fixed step size may be 1 dB.
[0041] Exemplarily, if the first average signal energy is less than 0.65 times the reference energy, the preamplifier gain is increased by 2 dB; If the first average signal energy is less than 0.75 times the reference energy, the preamplifier gain is increased by 1 dB; If the first average signal energy is between 0.75 and 1.25 times the reference energy, the preamplifier gain remains unchanged; If the first average signal energy is greater than 1.25 times the reference energy, the preamplifier gain is reduced by 1 dB; If the first average signal energy is greater than 1.625 times the reference energy, the preamplifier gain is reduced by 2 dB; The preset threshold is equal to between 0.75 and 1.25 times of the reference energy.
[0042] In an exemplary embodiment, the gain control method further includes: In the case where the synchronization information is not received, a second average signal energy of a signal of a second window length starting from a second starting position in the signal is calculated; and a gain of the preamplifier is adjusted according to the second average signal energy and a preset threshold.
[0043] The method for calculating the second average signal energy is the same as the method for calculating the first average signal energy.
[0044] Exemplarily, the second starting position may be 0. Assuming that the effective time length is 0.1 milliseconds and the sampling rate is 122.88 MHz, the second window length may be 12288 (122.88×0.1×1000).
[0045] When no synchronization information is received (ie the system is not in a synchronized state), the signal validity period is long.
[0046] The calculation method of the second average signal energy is the same as the calculation method of the first average signal energy, which will not be described in detail here.
[0047] In an exemplary embodiment, adjusting the gain of the preamplifier according to the second average signal energy and a preset threshold includes: When the second average signal energy is less than a preset threshold, increasing the gain of the pre-amplifier with a fixed step size; When the second average signal energy is equal to a preset threshold, keeping the gain of the pre-amplifier unchanged; When the second average signal energy is greater than a preset threshold, reducing the gain of the pre-amplifier with a third variable step size; The greater the multiple of the second average signal energy being greater than the preset threshold, the larger the variable step length is.
[0048] For example, if the second average signal energy is less than 0.75 times the reference energy, the preamplifier gain is increased by 1 dB; If the second average signal energy is between 0.75 and 1.25 times the reference energy, the preamplifier gain remains unchanged; If the second average signal energy is greater than 1.25 times the reference energy, the preamplifier gain is reduced by 1 dB; If the second average signal energy is greater than 1.625 times the reference energy, the preamplifier gain is reduced by 2 dB; If the second average signal energy is greater than twice the reference energy, the preamplifier gain is reduced by 3dB; If the second average signal energy is greater than 4 times the reference energy, the preamplifier gain is reduced by 6dB; If the second average signal energy is greater than 8 times the reference energy, the preamplifier gain is reduced by 12 dB.
[0049] The preset threshold is equal to between 0.75 and 1.25 times of the reference energy.
[0050] In an exemplary embodiment, before adjusting the gain of the preamplifier according to the first average signal energy and a preset threshold, the method further includes: filtering the first average signal energy according to the first average signal energy and the first average signal energy calculated last time; Before adjusting the gain of the pre-amplifier according to the second average signal energy and the preset threshold, the method further includes: The second average signal energy is filtered according to the second average signal energy and the second average signal energy calculated last time.
[0051] A first-order smoothing filter can be used.
[0052] For example, the second average signal energy after filtering It can be determined by the following formula: ; in, represents the filter coefficient, represents the second average signal energy calculated in the current window, The second average signal energy calculated for the window before the current window.
[0053] The filtering method adopted for the first average signal energy is the same as the filtering method adopted for the second average signal energy.
[0054] Figure 6 FIG. 2 is a schematic diagram showing another gain control method according to an embodiment of the present application. Figure 6 As shown, the gain control method includes: continuously sampling the output signal of the ADC module, judging whether the synchronization information is received, and when the synchronization information is not received, calculating the average signal energy of N1 sampling points according to the default starting position and the window length N1, smoothing and filtering the average signal energy of the N1 point, reducing the amplifier gain when the average signal energy after filtering is greater than the threshold, keeping the amplifier gain unchanged when the average signal energy after filtering is within the threshold, increasing the amplifier gain when the average signal energy after filtering is less than the threshold, and performing gain control on the pre-amplifier according to the determined amplifier gain. When the synchronization information is received, determining the starting position of the energy calculation according to the synchronization information, determining the window length N2 according to the system requirements, calculating the average signal energy of the N2 point according to the window length N2 and the determined starting position, smoothing and filtering the average signal energy of the N2 point, reducing the amplifier gain when the average signal energy after filtering is greater than the threshold, keeping the amplifier gain unchanged when the average signal energy after filtering is within the threshold, increasing the amplifier gain when the average signal energy after filtering is less than the threshold, and performing gain control on the pre-amplifier according to the determined amplifier gain.
[0055] The gain control method of the present application is illustrated below using the 5G-NR time division multiplexing mode as an example.
[0056] The gain control method for the 5G-NR time division multiplexing mode includes an automatic gain control method when there is no synchronization in the early stage and an automatic gain control method after synchronization.
[0057] First, in the initial state, that is, when the system has not established a receiving connection, an automatic gain control method without synchronization is adopted.
[0058] The first step is to initialize the starting position and window length.
[0059] The starting position can be 0. The window length can be set to a shorter value to ensure that the system can respond quickly to the received signal. For example, for a system with a sampling rate of 122.88MHz and a window time of 0.1 milliseconds, the window length N1 is 122.88×0.1×1000=12288. At this time, the signal valid enable is set to long valid to ensure that the system can perform continuous synchronization without synchronization.
[0060] The second step is to calculate the average signal energy.
[0061] The signal energy of a single sampling point is the sum of the square of the real part and the square of the imaginary part of the signal at the sampling point.
[0062] Sum the window length N1 sampling points to get the total energy of N1 sampling points, and then divide it by N1 to get the average signal energy in the window The average energy serves as the main reference for AGC adjustment.
[0063] The third step is to filter the average energy value.
[0064] For each average signal energy calculated in the second step N1 clock intervals are required (the clock intervals between N1 sampling points). For each average signal energy, a first-order smoothing filter can be performed. The filter coefficient can be set to 0.9 by default.
[0065] The fourth step is to determine the gain amplitude value of the pre-amplifier that needs to be adjusted according to the average signal energy after filtering and the preset threshold.
[0066] For the 5G-NR time division multiplexing mode, the system terminal needs to turn off the receiving RF signal when the signal is transmitted. However, for the system that has not been synchronized, it must be in the receiving state all the time, that is, at this time, there is no data transmitted on the base station side, and the signal received by the terminal will be very small. Under normal circumstances, there is only white noise at this time, so AGC is required to achieve a wide range of adjustments. For the time division multiplexing mode, there are two sudden changes in the signal from nothing to something, and from something to nothing. Different adjustment strategies can be used to achieve this. When the receiving gain needs to be increased, that is, when the receiving signal changes from large to small, a fixed 1dB gain is used as a step adjustment; when the receiving gain needs to be adjusted down, that is, when the receiving signal changes from small to large, a step-by-step variable gain is used for adjustment, specifically including five gears of 12dB, 6dB, 3dB, 2dB, and 1dB. This adjustment strategy can ensure that the time division multiplexing system can achieve better synchronization.
[0067] In actual systems, the preamplifier usually adjusts the gain in dB, but the calculated average signal energy is the amplitude value, so it can be calculated by , convert the amplitude into dB. Assuming that the gain control method of this application is implemented by FPGA, then considering the complexity and resource consumption of FPGA implementation, it is only necessary to directly give the corresponding adjustment amplitude range of the first few gain levels to make judgments and gain adjustments. The specific values are as follows: When the average signal energy after filtering is less than 0.75 times the reference energy, the gain of the preamplifier is increased by 1 dB; When the average signal energy after filtering is between 0.75 and 1.25 times the reference energy, the gain of the preamplifier remains unchanged; When the average signal energy after filtering is greater than 1.25 times the reference energy, the gain of the preamplifier is reduced by 1dB; When the average signal energy after filtering is greater than 1.625 times the reference energy, the gain of the preamplifier is reduced by 2dB; When the average signal energy after filtering is greater than twice the reference energy, the gain of the preamplifier is reduced by 3dB; When the average signal energy after filtering is greater than 4 times the reference energy, the gain of the preamplifier is reduced by 6dB; When the average signal energy after filtering is greater than 8 times the reference energy, the gain of the preamplifier is reduced by 12 dB.
[0068] When the wireless communication system is not synchronized (such as Figure 7As shown in the figure, the starting position in the data stream is not fixed, and the position where the preamplifier performs gain adjustment is also not fixed. In order to meet the initial fast gain adjustment, the window length will also be less than the length of an OFDM symbol, so there is a high possibility that gain adjustment will be performed in the middle of the OFDM symbol, resulting in inaccurate subsequent signal estimation and equalization, and reducing the performance of demodulation and decoding.
[0069] Secondly, after the system receives the synchronization information, a synchronized automatic gain control method is adopted.
[0070] The first step is to determine the starting position, window length N2 and effective duration after synchronization.
[0071] According to the synchronization information, the position information of the signal when it is received is obtained, such as the frame position or time slot position or OFDM symbol position, and then the position of the frame header, time slot header or OFDM symbol header is determined according to the system frame structure, and the frame header position or time slot header position or OFDM symbol header position is used as the starting position. In this way, it can ensure that the AGC adjustment is based on the alignment of the frame or time slot or OFDM symbol, so as to ensure that there is no large amplitude jump within the frame, time slot or OFDM symbol, ensure system balance, and make demodulation and decoding more stable.
[0072] For example, Figure 8 As shown, after synchronization, taking the window length equal to the CP length plus the OFDM symbol length as an example, the position of the gain adjustment can be controlled at the starting position of the CP, ensuring that the gain does not change within an entire OFDM, thereby ensuring that the signal estimation and equalization remain unchanged in an OFDM, thereby improving the link performance.
[0073] The number of sampling points generated by the same duration can be obtained based on the duration of the frame, the duration of the time slot, or the duration of the OFDM symbol header plus the CP header, and the number of sampling points is used as the window length N2.
[0074] Application scenario 1: In the 5G-NR scenario, the frame length is 10ms. If the frame is used as the window, at a sampling rate of 122.88MHz, N2=1228800 points. For a time division multiplexing system or a frequency division multiplexing system based on frames, the window length can be set to this value in a relatively fixed wireless communication scenario.
[0075] Application scenario 2: In a time division multiplexing system or frequency division multiplexing system with subframes as units, when the AGC adjustment period is 1ms and the channel changes are not too drastic, the subframe duration can be used as the window. For example, at a sampling rate of 122.88MHz, N2=122880 points.
[0076] Application scenario 3: Taking OFDM symbol as window, since the frequency width occupied by subcarriers varies and the number of subcarriers contained in OFDM symbols is not fixed, N2 is not a fixed value, but changes with the size of OFDM symbols. In 5G-NR, the CP length of OFDM symbols is also not fixed, so the window length N2 needs to change with time. For example, for OFDM symbols with 4096 points, there are two CP lengths of 288 and 352, that is, there are two window lengths of 4384 and 4448 corresponding to N2. Although the change of window length N2 increases the complexity of automatic gain control, this AGC method can ensure that the signal in each OFDM symbol is stable, and there will be no signal mutation during equalization, so that the signal can be better demodulated and decoded.
[0077] The effective receiving range is determined according to the frame protocol, which is used to control the effective duration of the AGC calculation. The effective duration is very important in non-continuous communication, especially in the time division multiplexing communication mode. It is the basis for ensuring that the time division multiplexing mode can communicate correctly and uninterruptedly, that is, the AGC calculation and control of the received signal is performed only when the enable is valid. In order to maintain the continuity of the system, when the enable is invalid, the average signal energy can be stored for direct use when filtering the average signal energy when the enable is valid.
[0078] The second step is to calculate the average signal energy.
[0079] The average signal energy in the window is calculated according to the effective time, the starting position and the window length N2 determined after synchronization.
[0080] The calculation method of average signal energy is the same as above.
[0081] The third step is to filter the average signal energy.
[0082] Each average signal energy obtained in the second step requires N2 clock intervals. A first-order smoothing filter can be used to update the new average signal energy. The filter coefficient can be set to 0.9. The filter formula uses the above formula.
[0083] This step needs to be performed when the enable is valid. When the enable is invalid, the average signal energy can be stored for direct use when filtering the average signal energy when the enable is valid.
[0084] The fourth step is to compare the average signal energy after filtering with a preset threshold to determine the gain amplitude value of the pre-amplifier.
[0085] When the system is synchronized, even for the 5G-NR time division multiplexing mode, the received signal can be regarded as a continuous signal during the enabling process, and its signal energy will not have a large dynamic range in a relatively short time. Therefore, an AGC adjustment strategy different from that before the system synchronization mode is adopted.
[0086] In the AGC adjustment strategy after synchronization, for the time-division multiplexing communication mode, the period when there is no signal at the receiving end has been excluded from the AGC adjustment range through enabling control, that is, the amplifier is not adjusted by AGC in the two sudden changes from no to present and from present to no. At this time, the system AGC is equivalent to gain control of continuous signals. When the received signal changes from large to small, the gain is increased by 2dB and 1dB as a step adjustment; when the received signal changes from small to large, the gain is reduced by 2dB and 1dB. This solution can more effectively ensure better synchronization in the time-division multiplexing system.
[0087] The specific values of the corresponding adjustment range are as follows: When the average signal energy after filtering is less than 0.625 times the reference energy, increase the amplifier gain by 2 dB; When the average signal energy after filtering is less than 0.75 times the reference energy, increase the amplifier gain by 1 dB; When the average signal energy after filtering is between 0.75 and 1.25 times the reference energy, the amplifier gain remains unchanged; When the average signal energy after filtering is greater than 1.25 times the reference energy, reduce the amplifier gain by 1dB; When the average signal energy after filtering is greater than 1.625 times the reference energy, the amplifier gain is reduced by 2dB.
[0088] The present application also provides a gain control device, such as Fig. 9 As shown, it includes a memory 100 and a processor 200, The memory 100 is used to store a program for the gain control method; The processor 200 is configured to read a program for executing the gain control method, and execute the method described in any one of the above embodiments.
[0089] The present application also provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to enable the computer to execute the method described in any of the above embodiments.
[0090] The present application also provides a wireless communication system, comprising a preamplifier, an analog-to-digital conversion module, a synchronization detection device and the above-mentioned gain control device; Wherein, the output end of the pre-amplifier is connected to the input end of the analog-to-digital conversion module; the input end of the gain control device is connected to the output end of the analog-to-digital conversion module; the output end of the gain control device is connected to the input end of the pre-amplifier; The pre-amplifier is configured to amplify the received analog signal according to the gain output by the gain control device; The analog-to-digital conversion module is configured to convert the amplified analog signal into a digital signal; The synchronization detection device is configured to detect whether the wireless communication system is in a synchronization state, and send synchronization information to the gain control device if it is determined that the wireless communication system is in a synchronization state.
[0091] The present application describes multiple embodiments, but the description is exemplary rather than restrictive, and it is obvious to those skilled in the art that there may be more embodiments and implementations within the scope of the embodiments described in the present application. Although many possible feature combinations are shown in the drawings and discussed in the specific embodiments, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with any other feature or element in any other embodiment, or may replace any other feature or element in any other embodiment.
[0092] The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements disclosed in the present application may also be combined with any conventional features or elements to form a unique invention scheme. Any features or elements of any embodiment may also be combined with features or elements from other invention schemes to form another unique invention scheme. Therefore, it should be understood that any feature shown and / or discussed in the present application may be implemented individually or in any appropriate combination. Therefore, except for the limitations made according to the attached claims and their equivalents, the embodiments are not subject to other restrictions. In addition, various modifications and changes may be made within the scope of protection of the attached claims.
[0093] In addition, when describing representative embodiments, the specification may have presented the method and / or process as a specific sequence of steps. However, to the extent that the method or process does not rely on the specific order of the steps described herein, the method or process should not be limited to the steps of the specific order described. As will be understood by those of ordinary skill in the art, other sequences of steps are also possible. Therefore, the specific sequence of the steps set forth in the specification should not be interpreted as a limitation to the claims. In addition, the claims for the method and / or process should not be limited to the steps of performing them in the order written, and those skilled in the art can easily understand that these sequences can be changed and still remain within the spirit and scope of the embodiments of the present application.
[0094] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As is known to those skilled in the art, the term "computer storage medium" includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0095] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include at least one of the features.
[0096] In the description of the present application, “plurality” means at least two, for example, two, three, etc., unless otherwise clearly and specifically defined.
[0097] In this application, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0098] In the present application, unless otherwise clearly specified and limited, a first feature being “above” or “below” a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being “above”, “above”, and “above” a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being “below”, “below”, and “below” a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0099] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0100] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in the field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A gain control method, characterized in that: Applied to a wireless communication system having a preamplifier and an analog-to-digital conversion module, the output end of the preamplifier is connected to the input end of the analog-to-digital conversion module, and the gain control method includes: Continuously sampling the signal output by the analog-to-digital conversion module and determining whether synchronization information is received; the synchronization information includes a synchronization position; When the synchronization information is received, a first window length is determined according to a unit time, and the synchronization position is determined as a first starting position; a first average signal energy of a first window length of sampling signals starting from the first starting position in the sampling signal is calculated; and a gain of the preamplifier is adjusted according to the first average signal energy and a preset threshold; wherein the unit time is the duration of a frame of the wireless communication system or the duration of a time slot or the duration of an OFDM symbol plus a CP header.
2. The gain control method according to claim 1, characterized in that: In the case where the synchronization information is not received, a second average signal energy of a sampling signal of a second window length starting from a second starting position in the signal is calculated; and a gain of the preamplifier is adjusted according to the second average signal energy and a preset threshold.
3. The gain control method according to claim 2, characterized in that: Before adjusting the gain of the pre-amplifier according to the first average signal energy and the preset threshold, the method further includes: filtering the first average signal energy according to the first average signal energy and the first average signal energy calculated last time; Before adjusting the gain of the pre-amplifier according to the second average signal energy and the preset threshold, the method further includes: The second average signal energy is filtered according to the second average signal energy and the second average signal energy calculated last time.
4. The gain control method according to claim 1, characterized in that: The determining the first window length according to the unit time includes: The number of sampling points within the unit time is used as the first window length.
5. The gain control method according to claim 1, characterized in that: The step of calculating a first average signal energy of a first window length of sampled signals starting from a first starting position in the sampled signal comprises: Calculating the signal energy of a single sampled signal based on the real part and the imaginary part of the single sampled signal; Taking the average value of the sum of signal energies of the first window length sampling signals starting from the first starting position as the first average signal energy; Calculating the signal energy of a single sampled signal based on the real and imaginary parts of the single sampled signal includes: The sum of the square of the real part and the square of the imaginary part of the single sampling signal is taken as the signal energy of the single sampling signal.
6. The gain control method according to claim 1, characterized in that: The step of adjusting the gain of the pre-amplifier according to the first average signal energy and a preset threshold includes: When the first average signal energy is less than a preset threshold, increasing the gain of the pre-amplifier with a first variable step size; When the first average signal energy is equal to a preset threshold, keeping the gain of the pre-amplifier unchanged; When the first average signal energy is greater than a preset threshold, the gain of the pre-amplifier is reduced with a second variable step size.
7. The gain control method according to claim 6, characterized in that: When the first average signal energy is less than the preset threshold, the greater the difference between the first average signal energy and the preset threshold, the smaller the first variable step size; when the first average signal energy is greater than the preset threshold, the greater the difference between the first average signal energy and the preset threshold, the larger the second variable step size.
8. The gain control method according to claim 2, characterized in that: The step of adjusting the gain of the pre-amplifier according to the second average signal energy and a preset threshold comprises: When the second average signal energy is less than a preset threshold, increasing the gain of the pre-amplifier with a fixed step size; When the second average signal energy is equal to a preset threshold, keeping the gain of the pre-amplifier unchanged; When the second average signal energy is greater than a preset threshold, the gain of the pre-amplifier is reduced with a third variable step size.
9. The gain control method according to claim 8, characterized in that: in, When the second average signal energy is greater than a preset threshold, the greater the difference between the second average signal energy and the preset threshold, the greater the third variable step size.
10. A gain control device, comprising a memory and a processor, characterized in that: The memory is used to store a program for the gain control method; The processor is used to read a program for executing the gain control method, and execute the method according to any one of claims 1 to 9.
11. A computer-readable storage medium storing computer-executable instructions, wherein: The computer executable instructions are used to cause the computer to execute the method according to any one of claims 1 to 9.
12. A wireless communication system, comprising a preamplifier, an analog-to-digital conversion module, a synchronization detection device and the gain control device according to claim 11; in, The output end of the pre-amplifier is connected to the input end of the analog-to-digital conversion module; the input end of the gain control device is connected to the output end of the analog-to-digital conversion module; the output end of the gain control device is connected to the input end of the pre-amplifier; The pre-amplifier is configured to amplify the received analog signal according to the gain output by the gain control device; The analog-to-digital conversion module is configured to convert the amplified analog signal into a digital signal; The synchronization detection device is configured to detect whether the wireless communication system is in a synchronization state, and send synchronization information to the gain control device if it is determined that the wireless communication system is in a synchronization state.