Peak detection circuit and peak detection method
By self-calibrating and adjusting the bias voltage in the peak detection circuit, the problems of cumbersome calibration and low efficiency in the existing technology are solved, and high-precision and high-efficiency peak detection is achieved, which is suitable for large-scale applications.
Patent Information
- Application Number
- CN202410497384.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2024-08-23
AI Technical Summary
The calibration process of existing peak detection circuits is cumbersome and inefficient. It is affected by factors such as manufacturing process, power supply voltage, and temperature. It requires multiple calibration circuits and complex sequences for calibration, and needs to obtain parameter information such as temperature.
A peak detection circuit including a digital control module, calibration signal injection module, bias voltage controller, square law amplifier and analog-to-digital conversion module is designed. The gain and level are adjusted automatically by adjusting the bias voltage in calibration mode. Calibrate to determine the target bias voltage, avoid obtaining temperature parameters, simplify the structure and improve calibration efficiency.
It improves the peak detection accuracy, simplifies the calibration process, improves calibration efficiency, and is suitable for large-scale applications without the need to obtain parameter information such as temperature.
Smart Images

Figure CN118534393A
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of electronic circuits, and in particular to a peak detection circuit and a peak detection method. Background Art
[0002] A peak detection circuit is a circuit that detects the peak value of a signal. Since the performance of a peak detection circuit is affected by factors such as manufacturing process, power supply voltage, and temperature, it is usually necessary to calibrate the peak detection circuit.
[0003] However, the inventors found that the prior art has at least the following defects during implementation: when calibrating the peak detection circuit, the prior art usually sets multiple calibration circuits according to the different principles of the peak detection circuit being affected by factors such as manufacturing process, power supply voltage, and temperature, and the multiple calibration circuits are calibrated in sequence in a specific order. During the calibration process, it is necessary to obtain parameter information such as temperature, and the calibration circuit is relatively cumbersome and the calibration efficiency is low. Summary of the invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a peak detection circuit and a peak detection method that overcome the above problems or at least partially solve the above problems.
[0005] According to one aspect of an embodiment of the present invention, a peak detection circuit is provided, comprising: a digital control module, a calibration signal injection module, a bias voltage controller, a first square-law amplifier, a second square-law amplifier, a gating switch, and an analog-to-digital conversion module; wherein the calibration signal injection module is connected to the digital control module and the first square-law amplifier; the bias voltage controller is connected to the first square-law amplifier, the second square-law amplifier, and the digital control module; the gating switch is connected to the analog-to-digital conversion module and the digital control module; and the analog-to-digital conversion module is connected to the digital control module;
[0006] The digital control module is used to send a calibration signal injection instruction of a target amplitude to the calibration signal injection module, send a voltage adjustment instruction to the bias voltage controller, send a calibration mode selection instruction to the selection switch, and determine the target bias voltage or send a new voltage adjustment instruction to the bias voltage controller according to the comparison result between the target amplitude and the calibration digital output signal; the digital control module is also used to switch to the detection mode after determining the target bias voltage, send a voltage adjustment instruction corresponding to the target bias voltage to the bias voltage controller, send a detection mode selection instruction to the selection switch, and generate a peak detection result according to the detection digital output signal in the detection mode;
[0007] The calibration signal injection module is used to generate a calibration signal of a target amplitude according to a calibration signal injection instruction, and input the calibration signal into the first square-law amplifier;
[0008] The bias voltage controller is used to apply a bias voltage matching the voltage regulation instruction to the first square-law amplifier and the second square-law amplifier;
[0009] The first square-law amplifier is used to receive a calibration signal and output a calibration analog output signal in a calibration mode;
[0010] The second square-law amplifier is used for receiving the signal to be tested and outputting a detection analog output signal in the detection mode;
[0011] The gating switch is used to enable connection with the first square-law amplifier according to the calibration mode gating instruction; and to enable connection with the second square-law amplifier according to the detection mode gating instruction;
[0012] The analog-to-digital conversion module is used to convert the calibration analog output signal into a calibration digital output signal and to convert the detection analog output signal into a detection digital output signal, and to transmit the calibration digital output signal and the detection digital output signal to the digital control module.
[0013] In an optional embodiment, the digital control module is used to: in the calibration mode, if the currently received calibration digital output signal does not match the target amplitude, send a new voltage adjustment instruction to the bias voltage controller; if the currently received calibration digital output signal matches the target amplitude, use the bias voltage currently applied to the first square-law amplifier as the target bias voltage.
[0014] In an optional embodiment, the digital control module is used to: in the calibration mode, if the currently received calibration digital output signal does not match the target amplitude, determine the voltage adjustment direction according to the size relationship between the calibration digital output signal and the target amplitude, and determine a new voltage adjustment instruction according to the voltage adjustment direction.
[0015] In an optional embodiment, the digital control module is used to: in a calibration mode, determine the digital signal representation of the target amplitude; if the difference between the currently received calibration digital output signal and the digital signal representation of the target amplitude is less than a preset threshold, determine that the currently received calibration digital output signal matches the target amplitude; if the difference between the currently received calibration digital output signal and the digital signal representation of the target amplitude is greater than or equal to the preset threshold, determine that the currently received calibration digital output signal does not match the target amplitude.
[0016] In an optional embodiment, the digital control module is used to: in the calibration mode, if the currently received calibration digital output signal does not match the target amplitude and the number of comparisons reaches a preset number, determine a new target amplitude and send a calibration signal injection instruction for the new target amplitude to the calibration signal injection module.
[0017] In an optional implementation, design parameters of the first square-law amplifier and the second square-law amplifier are consistent.
[0018] In an optional implementation, in the calibration mode, no signal is injected into the second square-law amplifier;
[0019] In the detection mode, no signal is injected into the first square-law amplifier.
[0020] In an optional implementation, the peak detection circuit further includes a low-pass filter;
[0021] The low-pass filter is connected to the first square-law amplifier and the second square-law amplifier respectively, and the low-pass filter is used to filter the high-frequency components of the calibration analog output signal and / or the detection analog output signal.
[0022] In an optional implementation, the calibration analog output signal and / or the detection analog output signal output by the low-pass filter is a differential DC signal.
[0023] According to another aspect of an embodiment of the present invention, a peak detection method is provided. The peak detection method is applied to the above peak detection circuit. The peak detection method includes:
[0024] The digital control module sends a calibration signal injection instruction of a target amplitude to the calibration signal injection module, sends a voltage adjustment instruction to the bias voltage controller, and sends a calibration mode selection instruction to the selection switch in the calibration mode; the calibration signal injection module generates a calibration signal of a target amplitude according to the calibration signal injection instruction, and the selection switch selects the connection with the first square-law amplifier according to the calibration mode selection instruction;
[0025] The bias voltage controller applies a bias voltage matching the voltage regulation instruction to the first square-law amplifier;
[0026] The first square-law amplifier receives the calibration signal and outputs a calibration analog output signal;
[0027] The analog-to-digital conversion module converts the calibrated analog output signal into a calibrated digital output signal and transmits it to the digital control module;
[0028] The digital control module determines whether a target bias voltage can be determined; wherein the target bias voltage is determined based on a comparison result between a target amplitude and a calibration digital output signal;
[0029] If so, the digital control module switches to the detection mode, and in the detection mode, sends a voltage adjustment instruction corresponding to the target bias voltage to the bias voltage controller and sends a detection mode selection instruction to the selection switch; the bias voltage controller applies the target bias voltage to the second square-law amplifier, and the selection switch selects the connection with the second square amplifier according to the detection mode selection instruction. The second square-law amplifier receives the signal to be tested in the detection mode and outputs a detection analog output signal, and the analog-to-digital conversion module converts the detection analog output signal into a detection digital output signal and inputs it into the digital control module; the digital control module generates a peak detection result according to the detection digital output signal;
[0030] If not, a new voltage adjustment instruction is sent to the bias voltage controller.
[0031] In an optional embodiment, the digital control module determines whether the target bias voltage can be determined, including: in the calibration mode, if the currently received calibration digital output signal and the target amplitude do not match, a new voltage adjustment instruction is sent to the bias voltage controller; if the currently received calibration digital output signal and the target amplitude match, the bias voltage currently applied to the first square-law amplifier is used as the target bias voltage.
[0032] In an optional embodiment, the digital control module determines whether the target bias voltage can be determined, including: in the calibration mode, if the currently received calibration digital output signal and the target amplitude do not match, determining the voltage adjustment direction according to the size relationship between the calibration digital output signal and the target amplitude, and determining a new voltage adjustment instruction according to the voltage adjustment direction.
[0033] In an optional embodiment, the digital control module determines whether the target bias voltage can be determined, including: in a calibration mode, determining a digital signal representation of a target amplitude; if a difference between a currently received calibration digital output signal and a digital signal representation of a target amplitude is less than a preset threshold, determining that the currently received calibration digital output signal matches the target amplitude; if a difference between a currently received calibration digital output signal and a digital signal representation of a target amplitude is greater than or equal to a preset threshold, determining that the currently received calibration digital output signal does not match the target amplitude.
[0034] In an optional implementation, the digital control module determines whether the target bias voltage can be determined, including: in the calibration mode, if the currently received calibration digital output signal does not match the target amplitude, and the number of comparisons reaches a preset number, determining a new target amplitude;
[0035] The method further includes: sending a calibration signal injection instruction with a new target amplitude to the calibration signal injection module.
[0036] The peak detection circuit and peak detection method provided by the present invention first perform self-calibration of the peak detection circuit before peak detection to improve the peak detection accuracy of the peak detection circuit. During the self-calibration process, the gain of the peak detection circuit and the level of the calibration digital output signal are adjusted by adjusting the bias voltage applied to the first square-law amplifier, and the target bias voltage corresponding to the calibration digital output signal closest to the target amplitude is determined by comparing the calibration digital output signal and the target amplitude. Therefore, in the subsequent detection mode, the target bias voltage is applied to the second square-law amplifier for formal peak detection to ensure the calibration accuracy; and the peak detection circuit in this solution can realize the calibration of the peak detection circuit without obtaining parameter information such as temperature, and the peak detection circuit has a simple structure and high calibration efficiency, which is suitable for large-scale application and implementation.
[0037] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation method of the embodiment of the present invention is specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the embodiments of the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0039] Figure 1 A schematic diagram of a peak detection circuit provided in Embodiment 1 of the present invention is shown;
[0040] Figure 2 A schematic diagram of a peak detection circuit provided in Embodiment 2 of the present invention is shown;
[0041] Figure 3 A schematic flow chart of a peak detection method provided in Embodiment 3 of the present invention is shown. DETAILED DESCRIPTION
[0042] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0043] Embodiment 1
[0044] Figure 1FIG. 1 is a schematic diagram of a peak detection circuit provided by Embodiment 1 of the present invention. Figure 1 As shown, the peak detection circuit includes: a digital control module 110 , a calibration signal injection module 120 , a bias voltage controller 130 , a first square-law amplifier 140 , a second square-law amplifier 150 , a gating switch 160 and an analog-to-digital conversion module 170 .
[0045] Among them, the calibration signal injection module 120 is connected to the digital control module 110 and the first square-law amplifier 140; the bias voltage controller 130 is connected to the first square-law amplifier 140, the second square-law amplifier 150 and the digital control module 110; the first square-law amplifier 140 is respectively connected to the bias voltage controller 130 and the calibration signal injection module 120; the second square-law amplifier 150 is connected to the bias voltage controller 130; the selection switch 160 is connected to the analog-to-digital conversion module 170 and the digital control module 110; the analog-to-digital conversion module 170 is connected to the selection switch 160 and the digital control module 110; the digital control module 110 is respectively connected to the calibration signal injection module 120, the bias voltage controller 130, the selection switch 160 and the analog-to-digital conversion module 170.
[0046] The digital control module 110 is a unit in the peak detection circuit for processing digital signals, issuing corresponding instructions, and data processing. Specifically, the digital control module 110 is used to control the working mode of the peak detection circuit, and the working mode of the peak detection circuit includes a calibration mode and a detection mode. The detection mode is a mode for performing formal peak detection on the signal to be tested. In this detection mode, the peak detection circuit processes the input signal to be tested and obtains the peak information of the signal to be tested; the calibration mode is a mode in which the peak detection circuit performs self-calibration before formal peak detection. The digital control module 110 controls the peak detection circuit to enter the calibration mode before performing formal peak detection on the signal to be tested.
[0047] In the calibration mode, the digital control module 110 sends a calibration signal injection instruction of a target amplitude to the calibration signal injection module 120. The calibration signal injection instruction is used to control the calibration signal injection module 120 to generate a calibration signal, and the amplitude value of the calibration signal is the target amplitude. The calibration signal injection module 120 is used to generate a calibration signal of the target amplitude according to the calibration signal injection instruction, and input the calibration signal into the first square-law amplifier 140, so as to stably inject the calibration signal into the first square-law amplifier 140 in the calibration mode, and the amplitude value of the calibration signal is the target amplitude.
[0048] In the calibration mode, the digital control module 110 also sends a voltage adjustment instruction to the bias voltage controller 130, and the voltage adjustment instruction is used to control the bias voltage output by the bias voltage controller 130. In the actual implementation process, under different gain-affecting parameter combinations (process parameters, voltage parameters, and temperature parameters), the gain of the detection circuit is different. By adjusting the bias voltage output by the bias voltage controller 130, the purpose of adjusting the gain of the detection circuit can be achieved, so that different gain-affecting parameter combinations are simulated by adjusting the bias voltage, and then the corresponding bias voltage under the optimal state is found in the calibration mode. Specifically, the bias voltage controller 130 is used to apply a bias voltage matching the voltage adjustment instruction to the first square-law amplifier 140 and the second square-law amplifier 150, and the bias voltage is specifically a DC voltage. The voltage adjustment instruction contains a specific value of the bias voltage, and the bias voltage controller 130 outputs a bias voltage of a corresponding value according to the voltage adjustment instruction. If the bias voltage applied to the first square-law amplifier 140 by the bias voltage controller 130 is different, the output level of the first square-law amplifier 140 will be different, and the gain of the peak detection circuit in the calibration mode will also be different.
[0049] In the calibration mode, the digital control module 110 also sends a calibration mode selection instruction to the selection switch 160. The selection switch 160 is specifically a two-choice switch. The selection switch 160 receives the calibration mode selection instruction in the calibration mode, and selects the connection with the first square-law amplifier 140 according to the calibration mode selection instruction, so that the output signal of the first square-law amplifier can be transmitted to the subsequent analog-to-digital conversion module 170, and then transmitted to the digital control module 110. In addition, in the calibration mode, the selection switch 160 does not select the connection with the second square-law amplifier 150, so that the output signal of the second square-law amplifier 150 cannot be transmitted to the subsequent analog-to-digital conversion module 170.
[0050] In the calibration mode, the first square-law amplifier 140 is injected with a calibration signal. The first square-law amplifier is specifically a square-law detector, which can use the square-law characteristics of the transistor to convert the calibration signal into a DC signal. The level of the DC signal is proportional to the square of the amplitude value of the calibration signal, that is, the input and output of the first square-law amplifier 140 meet the square-law characteristics. In the present invention, the first square-law amplifier 140 is used to receive the calibration signal and output the calibration analog output signal, that is, the DC signal output by the first square-law amplifier 140 is the calibration analog output signal. The calibration analog output signal will be transmitted to the analog-to-digital conversion module 170, and the analog-to-digital conversion module 170 is used to convert the calibration analog output signal into a calibration digital output signal and transmit it to the digital control module 110. The analog-to-digital conversion module 170 is specifically a module with an analog-to-digital conversion function or a sampling function, which can convert the analog signal into a corresponding digital signal. The present invention does not limit the specific structure and type of the specific analog-to-digital conversion module 170.
[0051] Each time the digital control module 110 sends a voltage adjustment instruction to the bias voltage controller 130 in the calibration mode, it will receive the calibration digital output signal at the bias voltage corresponding to the voltage adjustment instruction, and compare the current target amplitude with the calibration digital output signal, and determine the target bias voltage or send a new voltage adjustment instruction to the bias voltage controller 130 according to the comparison result between the target amplitude and the calibration digital output signal. After receiving the new voltage adjustment instruction, the bias voltage controller 130 adjusts the output bias voltage, and the first square-law amplifier 140 outputs a new calibration analog output signal at the new bias voltage, and converts it into a calibration digital output signal through the analog-to-digital conversion module 170, and transmits it to the digital control module 110, and the digital control module 110 continues to compare the new calibration digital output signal with the target amplitude. And so on, until the digital control module 110 determines the target bias voltage. The calibration digital output signal generated under the target bias voltage matches the target amplitude.
[0052] After determining the target bias voltage, the digital control module 110 completes the self-calibration of the peak detection circuit and switches the working mode from the calibration mode to the detection mode.
[0053] In the detection mode, the digital control module 110 sends a voltage adjustment instruction corresponding to the target bias voltage to the bias voltage controller 130, and the bias voltage controller 130 applies a bias voltage matching the current voltage adjustment instruction to the first square-law amplifier 140 and the second square-law amplifier 150, that is, the applied bias voltage is the target bias voltage, so that in the detection mode, the bias voltage of the second square-law amplifier 150 is maintained near the target bias voltage. In the detection mode, a signal to be measured is injected into the second square-law amplifier 150, and the signal to be measured is a signal to be peak detected. The second square-law amplifier 150 is specifically a square-law detector, which can convert the signal to be measured into a DC signal using the square-law characteristics of the transistor, and the level of the DC signal is proportional to the square of the amplitude value of the calibration signal, that is, the input and output of the second square-law amplifier 150 meet the square-law characteristics. In the present invention, the second square-law amplifier 150 is used to receive the signal to be measured and output a detection analog output signal, that is, the DC signal output by the second square-law amplifier 150 is a detection analog output signal.
[0054] In the detection mode, the digital control module 110 also sends a detection mode selection instruction to the selection switch 160, and the selection switch 160 selects the connection with the second square amplifier 150 according to the detection mode selection instruction, and disconnects the connection with the first square amplifier 140, so that the detection analog output signal in the detection mode can be transmitted to the analog-to-digital conversion module 170. The analog-to-digital conversion module 170 converts the detection analog output signal into a detection digital output signal, and transmits the detection digital output signal to the digital control module 110. The digital control module 110 generates a peak detection result according to the detection digital output signal.
[0055] It can be seen that in the peak detection circuit provided by the embodiment of the present invention, the peak detection circuit is self-calibrated before the formal peak detection to improve the peak detection accuracy of the peak detection circuit. During the self-calibration process, the gain of the peak detection circuit and the level of the calibration digital output signal are adjusted by adjusting the bias voltage applied to the first square-law amplifier, and the target bias voltage corresponding to the calibration digital output signal closest to the target amplitude is determined by comparing the calibration digital output signal and the target amplitude. Therefore, in the subsequent detection mode, the target bias voltage is applied to the second square-law amplifier to perform formal peak detection to ensure the calibration accuracy; and the peak detection circuit in the present invention does not need to obtain parameter information such as temperature, the detection circuit structure is simple, the calibration efficiency is high, and it is suitable for large-scale application and implementation.
[0056] Embodiment 2
[0057] Figure 2 FIG. 2 shows a schematic diagram of a peak detection circuit provided by Embodiment 2 of the present invention. Figure 2As shown, the peak detection circuit includes: a digital control module 110, a calibration signal injection module 120, a bias voltage controller 130, a first square-law amplifier 140, a second square-law amplifier 150, a selection switch 160, an analog-to-digital conversion module 170 and a low-pass filter 180.
[0058] The low-pass filter 180 is connected to the first square-law amplifier 140 and the second square-law amplifier 150 respectively, and is used to filter the calibration analog output signal and / or detect the high-frequency component of the analog output signal, thereby reducing noise interference in subsequent signal analysis and improving circuit calibration and peak detection accuracy. Figure 2 As shown, the low-pass filter 180 includes a connection port n and a connection port p, wherein the connection port n is connected to the signal output end of the first square-law amplifier 140, and the connection port p is connected to the signal output end of the second square-law amplifier 150. In the calibration mode, after receiving the calibration mode selection instruction, the selection switch 160 selects the connection port n connected to the low-pass filter 180, so that the calibration analog output signal after filtering by the low-pass filter can be transmitted to the analog-to-digital conversion module 170; in the detection mode, after receiving the detection mode selection instruction, the selection switch 160 selects the connection port p connected to the low-pass filter 180, so that the detection analog output signal after filtering by the low-pass filter can be transmitted to the analog-to-digital conversion module 170.
[0059] In an optional implementation, the design parameters of the first square-law amplifier 130 and the second square-law amplifier 140 in the present invention are completely consistent, and the design parameters include the internal structure of the square-law amplifier and the models and parameters of each internal component, etc. In this way, the gain of the detection circuit under different gain influencing parameter combinations can be simulated in the calibration mode, so that the target bias voltage obtained in the calibration mode can adapt to the detection mode, thereby improving the calibration accuracy.
[0060] In an optional embodiment, the peak detection circuit of the present invention further includes a balanced mode, which can also be called an initial mode. In the balanced mode, the first square-law amplifier 140 and the second square-law amplifier 150 are both static DC biased, and there is no signal input to the first square-law amplifier 140 and the second square-law amplifier 150. In the balanced mode, the differential output level of the first square-law amplifier 140 and the second square-law amplifier 150 is a reference level, and the analog-to-digital conversion module uses the reference level as a sampling reference.
[0061] Furthermore, in the calibration mode, no signal is injected into the second square-law amplifier 150. For example, the injection of the signal to be measured can be turned off or the signal to be measured can be isolated from the input end of the second square-law amplifier 150, so as to achieve the purpose of no signal to be measured being injected into the second square-law amplifier 150 in the calibration mode, and only the calibration signal is injected into the first square-law amplifier 140. In order to improve the anti-interference ability of the signal, etc., the calibration analog output signal output by the low-pass filter in the present invention is a differential DC signal. Specifically in the calibration mode, the calibration analog output signal output by the first square-law amplifier 140 is converted into a differential DC level after filtering the high-frequency component through the low-pass filter 180. Among them, the output common-mode level is the reference level, and the differential mode vout = g_cal·vcal 2 , g_cal is the detection circuit gain, and vcal is the current target amplitude.
[0062] Furthermore, in the detection mode, the calibration signal injection module 120 receives the injection stop command sent by the digital control module 110, and the calibration signal injection module 120 no longer produces and injects the calibration signal in the detection mode, so that the first square-law amplifier 140 has no signal injection in the detection mode. The second square-law amplifier 150 injects the signal to be tested. In order to improve the anti-interference ability of the signal, etc., the detection analog output signal output by the low-pass filter in the present invention is a differential DC signal. Specifically in the detection mode, the detection analog output signal output by the second square-law amplifier 150 is converted into a differential DC level after filtering the high-frequency component through the low-pass filter 180.
[0063] In an optional embodiment, the digital control module 110 is used to: in the calibration mode, if the calibration digital output signal currently received does not match the target amplitude, a new voltage adjustment instruction is sent to the bias voltage controller; if the calibration digital output signal currently received matches the target amplitude, the bias voltage currently applied to the first square-law amplifier is used as the target bias voltage. Specifically, in the calibration mode, the digital signal representation of the target amplitude is determined; if the difference between the calibration digital output signal currently received and the digital signal representation of the target amplitude is less than a preset threshold, it is determined that the calibration digital output signal currently received matches the target amplitude; if the difference between the calibration digital output signal currently received and the digital signal representation of the target amplitude is greater than or equal to the preset threshold, it is determined that the calibration digital output signal currently received does not match the target amplitude. Among them, the preset threshold can be determined according to the pre-configured calibration accuracy, the higher the calibration accuracy, the smaller the preset threshold; the lower the calibration accuracy, the larger the preset threshold.
[0064] For example, the digital control module 110 may be pre-configured with a plurality of different bias voltage values, and each voltage adjustment instruction corresponds to a bias voltage value. If the digital control module 110 sends a voltage adjustment instruction with a bias voltage value of vb[k], the bias voltage controller 130 applies a bias voltage of vb[k] to the first square-law amplifier 140, and generates a calibration analog output signal vout[k] under the bias voltage, and obtains a calibration digital output signal dout[k] after sampling and processing by the analog-to-digital conversion module 170. At this time, the gain of the detection circuit is g_cal[k], and the digital control module 110 converts dout[k] and the current target amplitude vcal into a digital signal representation d_ target is compared. If the difference between d_target and dout[k] is less than the preset threshold, it is determined that d_target matches the target amplitude vcal, and vb[k] is used as the target bias voltage. If the difference between d_target and dout[k] is greater than or equal to the preset threshold, it is determined that d_target does not match the target amplitude vcal, and the next bias voltage value vb[k+1] is traversed, and a voltage adjustment instruction with a bias voltage value of vb[k+1] is sent for the next round of comparison.
[0065] Further optionally, the digital control module 110 is used to: in the calibration mode, if the currently received calibration digital output signal does not match the target amplitude, and the number of comparisons reaches a preset number, then determine a new target amplitude, and send a calibration signal injection instruction of the new target amplitude to the calibration signal injection module. Specifically, in the actual implementation process, if the number of comparisons between the calibration digital output signal and the target amplitude at the same target amplitude reaches a preset number, it indicates that the preset number of bias voltage adjustments at the target amplitude cannot make the calibration digital output signal match the target amplitude, then a new target amplitude is regenerated, and a calibration signal injection instruction of the new target amplitude is sent to the calibration signal injection module 120, so that the calibration signal injection module 120 can inject the calibration signal of the new target amplitude and find the target bias voltage at the new target amplitude. For example, if k bias voltage values cannot make vcal_1 match each calibration digital output signal under the target amplitude vcal_1, then if k reaches the preset number N, the target amplitude vcal_2 is regenerated, and under the calibration signal of the target amplitude vcal_2, each calibration digital output signal is compared to see whether it matches the target amplitude vcal_2. This process is repeated until the target bias voltage and the target amplitude corresponding to the target bias voltage are determined.
[0066] Further optionally, in the calibration mode, if the digital control module 110 determines that the currently received calibration digital output signal does not match the target amplitude, it is necessary to select the next bias voltage value and generate a new voltage adjustment instruction according to the next bias voltage value. In the process of selecting the next bias voltage value, the bias voltage values can be selected in sequence according to the pre-configured sequence. For example, if dout[k] of the bias voltage vb[k] does not match the target amplitude, the bias voltage after vb[k] is determined to be vb[k+1] by searching the configuration data, and vb[k+1] is used as the next bias voltage value; or, in the calibration mode, if the currently received calibration digital output signal does not match the target amplitude, the voltage adjustment direction is determined according to the magnitude relationship between the calibration digital output signal and the target amplitude, and a new voltage adjustment instruction is determined according to the voltage adjustment direction. For example, if the currently received calibration digital output signal does not match the target amplitude, and the calibration digital output signal is smaller than the target amplitude, it is determined that the voltage adjustment direction is an increase direction, and according to the pre-configured adjustment gradient, one or more adjustment gradients are increased on the basis of the current bias voltage, and the adjusted bias voltage is the next bias voltage value, and a corresponding voltage adjustment instruction is generated; if the currently received calibration digital output signal does not match the target amplitude, and the calibration digital output signal is larger than the target amplitude, it is determined that the voltage adjustment direction is a decrease direction, and according to the pre-configured adjustment gradient, one or more adjustment gradients are decreased on the basis of the current bias voltage, and the adjusted bias voltage is the next bias voltage value, and a corresponding voltage adjustment instruction is generated, so as to facilitate the rapid determination of the target bias voltage.
[0067] In an optional implementation, the digital control module 110 may use a traditional peak extraction method to obtain the peak detection result in the process of generating the peak detection result according to the detected digital output signal, or may use the following extraction method to improve the peak detection efficiency:
[0068] The target amplitude, frequency, waveform, and polarity of the calibration signal are determined in advance based on the amplitude, frequency, waveform, and polarity of the signal to be measured, so that the gain g_det of the detection circuit in the detection mode and the gain g_cal[opt] of the detection circuit under the target bias voltage in the calibration mode have a proportional relationship ratio that is negligibly affected by process parameters, power supply voltage parameters, and temperature. The specific frequency and waveform of the calibration signal can be obtained by a control variable algorithm or the like. After injecting the specific calibration signal, if the target bias voltage is determined, the following formula 1 is satisfied after the calibration is completed:
[0069] d target =g cal[opt] *vcal 2 (Formula 1)
[0070] Among them, d target is the digital signal representation of the target amplitude, vcal is the target amplitude, g cal[opt] is the gain of the detection circuit at the target bias voltage in calibration mode.
[0071] In the detection mode, the digital output signal is detected to satisfy the following formula 2:
[0072] d det =g det *v det 2 (Formula 2)
[0073] Among them, d det To detect the digital output signal, v det is the amplitude of the signal to be measured, g det is the current detection circuit gain in detection mode.
[0074] Also because of g cal[opt] and g det Satisfies the following formula 3:
[0075] g det =g cal[opt] *ratio (Formula 3)
[0076] Combining Formula 2 and Formula 3, we can get the following Formula 4:
[0077] d det =g cal[opt] *ratio*v det 2 (Formula 4)
[0078] Further combining Formula 4 and Formula 1, we can get the following Formula 5:
[0079] d det =d target *ratio*v det 2 / v cal 2 (Formula 5)
[0080] The amplitude of the signal to be measured can be quickly obtained by formula 5.
[0081] In an optional implementation, before the present invention enters the calibration mode, the entire peak detection circuit may be mismatch calibrated first. The specific mismatch calibration method may adopt the relevant mismatch calibration method in the prior art, which is not limited in the present invention.
[0082] It can be seen that in the peak detection circuit provided by the embodiment of the present invention, Figure 1A low-pass filter is also provided on the basis of the peak detection circuit shown, and the low-pass filter is used to filter the calibration analog output signal and / or detect the high-frequency components in the analog output signal, thereby reducing the noise interference of subsequent signal processing and improving the calibration and detection accuracy.
[0083] Figure 3 FIG. 1 is a flow chart of a peak detection method provided by Embodiment 3 of the present invention. The peak detection method provided by this embodiment is applied to the above peak detection circuit. Specifically, Figure 3 As shown, the method comprises the following steps:
[0084] Step S301, the digital control module sends a calibration signal injection instruction of a target amplitude to the calibration signal injection module, sends a voltage adjustment instruction to the bias voltage controller, and sends a calibration mode selection instruction to the selection switch in the calibration mode; the calibration signal injection module generates a calibration signal of a target amplitude according to the calibration signal injection instruction, and the selection switch selects the connection with the first square-law amplifier according to the calibration mode selection instruction.
[0085] Step S302: The bias voltage controller applies a bias voltage matching the voltage regulation instruction to the first square-law amplifier.
[0086] Step S303: the first square-law amplifier receives the calibration signal and outputs a calibration analog output signal.
[0087] In step S304 , the analog-to-digital conversion module converts the calibrated analog output signal into a calibrated digital output signal, and transmits the calibrated digital output signal to the digital control module.
[0088] In step S305 , the digital control module determines whether the target bias voltage can be determined; if so, step S306 is executed; if not, step S310 is executed.
[0089] The target bias voltage is determined according to a comparison result between the target amplitude and the calibration digital output signal.
[0090] Step S306, the digital control module switches to the detection mode, and in the detection mode, sends a voltage adjustment instruction corresponding to the target bias voltage to the bias voltage controller and sends a detection mode selection instruction to the selection switch; the bias voltage controller applies the target bias voltage to the second square-law amplifier, and the selection switch selects the connection with the second square amplifier according to the detection mode selection instruction.
[0091] Step S307: the second square-law amplifier receives the signal to be tested in the detection mode and outputs a detection analog output signal.
[0092] Step S308: the analog-to-digital conversion module converts the detection analog output signal into a detection digital output signal and inputs the signal into the digital control module.
[0093] Step S309: the digital control module generates a peak detection result according to the detected digital output signal.
[0094] Step S310: the digital control module sends a new voltage adjustment instruction to the bias voltage controller.
[0095] In an optional embodiment, the digital control module determines whether the target bias voltage can be determined, including: in the calibration mode, if the currently received calibration digital output signal and the target amplitude do not match, a new voltage adjustment instruction is sent to the bias voltage controller; if the currently received calibration digital output signal and the target amplitude match, the bias voltage currently applied to the first square-law amplifier is used as the target bias voltage.
[0096] In an optional embodiment, the digital control module determines whether the target bias voltage can be determined, including: in the calibration mode, if the currently received calibration digital output signal and the target amplitude do not match, determining the voltage adjustment direction according to the size relationship between the calibration digital output signal and the target amplitude, and determining a new voltage adjustment instruction according to the voltage adjustment direction.
[0097] In an optional embodiment, the digital control module determines whether the target bias voltage can be determined, including: in a calibration mode, determining a digital signal representation of a target amplitude; if a difference between a currently received calibration digital output signal and a digital signal representation of a target amplitude is less than a preset threshold, determining that the currently received calibration digital output signal matches the target amplitude; if a difference between a currently received calibration digital output signal and a digital signal representation of a target amplitude is greater than or equal to a preset threshold, determining that the currently received calibration digital output signal does not match the target amplitude.
[0098] In an optional implementation, the digital control module determines whether the target bias voltage can be determined, including: in the calibration mode, if the currently received calibration digital output signal does not match the target amplitude, and the number of comparisons reaches a preset number, determining a new target amplitude;
[0099] The method further includes: sending a calibration signal injection instruction with a new target amplitude to the calibration signal injection module.
[0100] It can be seen that in the peak detection method provided by the embodiment of the present invention, the peak detection circuit is self-calibrated before the formal peak detection to improve the peak detection accuracy of the peak detection circuit. During the self-calibration process, the gain of the peak detection circuit and the level of the calibration digital output signal are adjusted by adjusting the bias voltage applied to the first square-law amplifier, and the target bias voltage corresponding to the calibration digital output signal closest to the target amplitude is determined by comparing the calibration digital output signal and the target amplitude. Therefore, in the subsequent detection mode, the target bias voltage is applied to the second square-law amplifier to perform formal peak detection to ensure the calibration accuracy.
[0101] It should be noted that, in the present invention, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not represent any actual relationship or order between the entities or operations.
[0102] The illustrations provided by the present invention are only used to schematically illustrate the basic concept of the present invention. The illustrations only show the components related to the present invention rather than being drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0103] The "connection" in the present invention includes both direct connection and indirect connection, such as connection through some active devices, passive devices or electrically conductive media; it may also include connection through other active devices or passive devices on the basis of achieving the same or similar functional purposes as is well known to those skilled in the art, such as connection through circuits or components such as switches and follower circuits.
[0104] The description and application of the present invention here are illustrative, and it is not intended to limit the scope of the present invention to the above-mentioned embodiments. The effects or advantages involved in the embodiments may not be embodied in the embodiments due to interference from various factors, and the description of the effects or advantages is not used to limit the embodiments. The deformation and change of the embodiments disclosed here are possible, and the replacement of the embodiments and the various equivalent parts are well known to those of ordinary skill in the art. It should be clear to those skilled in the art that the present invention can be implemented in other forms, structures, arrangements, proportions, and with other components, materials and parts without departing from the spirit or essential features of the present invention. Other deformations and changes can be made to the embodiments disclosed here without departing from the scope and spirit of the present invention.
Claims
1. A peak detection circuit, characterized in that: include: A digital control module, a calibration signal injection module, a bias voltage controller, a first square-law amplifier, a second square-law amplifier, a gating switch, and an analog-to-digital conversion module; wherein the calibration signal injection module is connected to the digital control module and the first square-law amplifier; the bias voltage controller is connected to the first square-law amplifier, the second square-law amplifier, and the digital control module; the gating switch is connected to the analog-to-digital conversion module and the digital control module; and the analog-to-digital conversion module is connected to the digital control module; The digital control module is used to send a calibration signal injection instruction of a target amplitude to the calibration signal injection module, send a voltage adjustment instruction to the bias voltage controller, send a calibration mode selection instruction to the selection switch, and determine the target bias voltage or send a new voltage adjustment instruction to the bias voltage controller according to the comparison result between the target amplitude and the calibration digital output signal; the digital control module is also used to switch to the detection mode after determining the target bias voltage, send a voltage adjustment instruction corresponding to the target bias voltage to the bias voltage controller, send a detection mode selection instruction to the selection switch, and generate a peak detection result according to the detection digital output signal in the detection mode; The calibration signal injection module is used to generate a calibration signal of a target amplitude according to the calibration signal injection instruction, and input the calibration signal into the first square-law amplifier; The bias voltage controller is used to apply a bias voltage matching the voltage regulation instruction to the first square-law amplifier and the second square-law amplifier; The first square-law amplifier is used to receive a calibration signal and output a calibration analog output signal in a calibration mode; The second square-law amplifier is used for receiving the signal to be tested and outputting a detection analog output signal in the detection mode; The gating switch is used to enable connection with the first square-law amplifier according to the calibration mode gating instruction; and to enable connection with the second square-law amplifier according to the detection mode gating instruction; The analog-to-digital conversion module is used to convert the calibration analog output signal into a calibration digital output signal and to convert the detection analog output signal into a detection digital output signal, and to transmit the calibration digital output signal and the detection digital output signal to the digital control module.
2. The peak detection circuit according to claim 1, characterized in that: The digital control module is used to: in the calibration mode, if the currently received calibration digital output signal does not match the target amplitude, send a new voltage adjustment instruction to the bias voltage controller; if the currently received calibration digital output signal matches the target amplitude, use the bias voltage currently applied to the first square-law amplifier as the target bias voltage.
3. The peak detection circuit according to claim 2, characterized in that: The digital control module is used to: in the calibration mode, if the currently received calibration digital output signal does not match the target amplitude, determine the voltage adjustment direction according to the size relationship between the calibration digital output signal and the target amplitude, and determine a new voltage adjustment instruction according to the voltage adjustment direction.
4. The peak detection circuit according to claim 2, characterized in that: The digital control module is used to: determine the digital signal representation of the target amplitude in the calibration mode; if the difference between the currently received calibration digital output signal and the digital signal representation of the target amplitude is less than a preset threshold, determine that the currently received calibration digital output signal matches the target amplitude; If the difference between the currently received calibration digital output signal and the digital signal representation of the target amplitude is greater than or equal to a preset threshold, it is determined that the currently received calibration digital output signal does not match the target amplitude.
5. The peak detection circuit according to claim 2, characterized in that: The digital control module is used to: in the calibration mode, if the currently received calibration digital output signal does not match the target amplitude and the number of comparisons reaches a preset number, determine a new target amplitude and send a calibration signal injection instruction of the new target amplitude to the calibration signal injection module.
6. The peak detection circuit according to claim 1, characterized in that: The design parameters of the first square-law amplifier and the second square-law amplifier are consistent.
7. The peak detection circuit according to any one of claims 1 to 6, characterized in that: In the calibration mode, no signal is injected into the second square-law amplifier; In the detection mode, no signal is injected into the first square-law amplifier.
8. The peak detection circuit according to any one of claims 1 to 6, characterized in that: The peak detection circuit also includes a low-pass filter; The low-pass filter is connected to the first square-law amplifier and the second square-law amplifier respectively, and the low-pass filter is used to filter the high-frequency components of the calibration analog output signal and / or the detection analog output signal.
9. The peak detection circuit according to claim 8, characterized in that: The calibration analog output signal and / or the detection analog output signal output by the low-pass filter is a differential DC signal.
10. A peak detection method, characterized in that: The peak detection method is applied to the peak detection circuit according to any one of claims 1 to 9, and the peak detection method includes: The digital control module sends a calibration signal injection instruction of a target amplitude to the calibration signal injection module, sends a voltage adjustment instruction to the bias voltage controller, and sends a calibration mode selection instruction to the selection switch in the calibration mode; the calibration signal injection module generates a calibration signal of a target amplitude according to the calibration signal injection instruction, and the selection switch selects the connection with the first square-law amplifier according to the calibration mode selection instruction; The bias voltage controller applies a bias voltage matching the voltage regulation instruction to the first square-law amplifier; The first square-law amplifier receives the calibration signal and outputs a calibration analog output signal; The analog-to-digital conversion module converts the calibrated analog output signal into a calibrated digital output signal and transmits it to the digital control module; The digital control module determines whether a target bias voltage can be determined; wherein the target bias voltage is determined based on a comparison result between a target amplitude and a calibration digital output signal; If so, the digital control module switches to the detection mode, and in the detection mode, sends a voltage adjustment instruction corresponding to the target bias voltage to the bias voltage controller and sends a detection mode selection instruction to the selection switch; the bias voltage controller applies the target bias voltage to the second square-law amplifier, and the selection switch selects the connection with the second square amplifier according to the detection mode selection instruction. The second square-law amplifier receives the signal to be tested in the detection mode and outputs a detection analog output signal, and the analog-to-digital conversion module converts the detection analog output signal into a detection digital output signal and inputs it into the digital control module; the digital control module generates a peak detection result according to the detection digital output signal; If not, a new voltage adjustment instruction is sent to the bias voltage controller.
Citation Information
Cited By
High-speed signal peak detection circuit
CN122330493A
