Logarithmic detector based on frequency dynamic compensation of input signal

By introducing a frequency discriminator and a control module into the logarithmic detector, the frequency and temperature of the radio frequency signal are automatically detected, and a control signal is generated to adjust the compensation current, which solves the detection accuracy problem of the logarithmic detector at different temperatures and frequencies. Automated compensation and wideband support are implemented.

CN119355358APending Publication Date: 2025-01-24SHANGHAI ARCHIWAVE MICROELECTRONICS CO LTD

Patent Information

Application Number
CN202411930221.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The logarithmic detector has a difference in the output logarithmic curve intercept at different temperatures and RF signal frequencies, resulting in a decrease in detection accuracy. The existing manual compensation method increases the circuit complexity and can only compensate for a single frequency.

Method used

Design a pair -detector based on the input frequency dynamic compensation, automatically detect the frequency of the radio frequency signal by automatic detection of the radio frequency signal by the frequency inspection device, and obtain the real -time temperature of the temperature sensor. The control module generates the control signal Flexible adjustment.

Benefits of technology

It realizes automatic compensation under different temperatures and RF signal frequencies, improves detection accuracy, reduces circuit complexity, and supports wide-band optimal temperature and intercept compensation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119355358A_ABST
    Figure CN119355358A_ABST
Patent Text Reader

Abstract

A logarithmic detector based on frequency dynamic compensation of an input signal comprises a logarithmic amplifier for receiving a radio frequency signal, performing logarithmic conversion on the radio frequency signal and outputting a first current; the frequency discriminator determines first frequency information according to the radio frequency signal, and the first frequency information indicates a first frequency of the radio frequency signal; the temperature sensor is used for acquiring the real-time temperature of the environment where the logarithmic amplifier is located; the control module is used for generating a control signal based on the first frequency and the real-time temperature determined according to the first frequency information, the control signal is used for controlling the magnitude of second current, and the second current is used for compensating the first current at different first frequencies and different real-time temperatures; and the current compensation circuit receives the control signal and outputs a corresponding second current based on the control signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a logarithmic detector based on frequency dynamic compensation of an input signal. Background Art

[0002] Detectors are usually used to measure the amplitude or power of a signal and are widely used in wireless systems. They can be simply divided into two categories: logarithmic detectors (or envelope detectors) and root mean square (RMS) detectors. See Figure 1 , which shows the detection results of the logarithmic detector and the RMS detector for the same RF signal. Figure 1 As shown in the figure, the RF signal is a high-frequency sine wave whose amplitude / phase varies with time. The logarithmic detector will detect the envelope output of the input signal, usually its logarithmic value, which is the output result 1 in the figure; the RMS detector will detect the root mean square value (or power value) of the input signal and output it, which is the output result 2 in the figure. Its output voltage does not change with the shape of the signal or the peak-to-average ratio. The peak-to-average ratio refers to the peak-to-average power ratio (PAPR), such as Figure 1 As shown, for the signal value of the RF input signal, the amplitude of the high-frequency sinusoidal wave oscillation is not fixed, and the ratio of the power corresponding to the peak value to the power corresponding to the average value is the peak-to-average ratio.

[0003] Whether the logarithmic detector circuit is designed using a bipolar transistor (BJT) or a metal-oxide semiconductor field-effect transistor (MOSFET), the device will have certain temperature characteristics. For the same circuit design, when the chip operating temperature is different, the circuit gain and other parameters may be different, resulting in different intercepts of the final output logarithmic curve at different temperatures, so the circuit needs to be temperature compensated.

[0004] Logarithmic detectors have broadband applications. When the input signal frequency is different, the temperature characteristics of the entire logarithmic detector may be slightly different. In other words, the intercept of the logarithmic curve will also be slightly different when the frequency is different. Therefore, the circuit needs to be compensated according to the frequency of the input signal.

[0005] Some designs provide a manual temperature compensation control port outside the chip, which can be used to manually adjust the temperature compensation information according to the usage scenario. However, this method increases the complexity of the circuit on the one hand, and can only perform temperature compensation on a certain frequency at a time on the other hand, which limits the broadband application of the logarithmic detector. Summary of the invention

[0006] In order to solve the influence of temperature and frequency of RF signal on logarithmic detector, the present application proposes a logarithmic detector based on dynamic compensation of input frequency, which can automatically compensate according to temperature and frequency of RF signal to improve detection accuracy.

[0007] In some embodiments, a logarithmic detector based on dynamic compensation of input frequency includes: a logarithmic amplifier, which receives a radio frequency signal, performs logarithmic conversion on the radio frequency signal, and outputs a first current; a frequency detector, which determines first frequency information based on the radio frequency signal, wherein the first frequency information indicates a first frequency of the radio frequency signal; a temperature sensor, which is used to obtain the real-time temperature of the environment in which the logarithmic amplifier is located; a control module, which generates a control signal based on the first frequency and the real-time temperature determined based on the first frequency information, wherein the control signal is used to control the magnitude of a second current, wherein the second current is used to compensate for the first current at different first frequencies and different real-time temperatures; and a current compensation circuit, which receives the control signal and outputs a corresponding second current based on the control signal to compensate for the first current.

[0008] By applying the above circuit, the first frequency information of the radio frequency signal is automatically detected by the frequency discriminator, the temperature sensor automatically obtains the real-time temperature, and the control module automatically determines the control signal based on the first frequency information and the real-time temperature. The control signal can automatically control the current size (second current) compensated at different first frequencies and different temperatures. The control signal reflects the compensation for the intercept change caused by the change of the logarithmic curve with the frequency and the compensation for the temperature coefficient change caused by the change of the second current with the frequency, so as to compensate for the intercept change of the logarithmic curve caused by the change of temperature and frequency, thereby realizing flexible adjustment of the intercept of the logarithmic curve.

[0009] The entire process does not require manual adjustment, achieving broadband optimal temperature compensation and intercept compensation with low circuit complexity. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 It is a schematic diagram of the detection results of the logarithmic detector and the RMS detector for the same RF signal.

[0011] Figure 2 It is a structural diagram of a logarithmic detector.

[0012] Figure 3 It is a logarithmic curve of the input power and detection voltage output of the logarithmic detector at the same frequency and different temperatures.

[0013] Figure 4 It is a logarithmic curve after temperature compensation.

[0014] Figure 5It is a logarithmic curve of the input power and detection voltage output of the logarithmic detector at the same temperature and different frequencies.

[0015] Figure 6 is a schematic diagram of a logarithmic detector according to an embodiment of the present application.

[0016] Figure 7 is a schematic diagram of a frequency discriminator in a logarithmic detector according to an embodiment of the present application.

[0017] Figure 8 It is a working flow chart of the control module in the logarithmic detector according to the embodiment of the present application.

[0018] Fig. 9 is a schematic diagram of a current compensation circuit in a logarithmic detector according to an embodiment of the present application.

[0019] Fig.10 is a schematic diagram of another current compensation circuit in a logarithmic detector according to an embodiment of the present application.

[0020] Fig.11 is a schematic diagram of another current compensation circuit in a logarithmic detector according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. It is understood that the specific embodiments described herein are only used to explain the relevant disclosure, rather than to limit the disclosure. It should also be noted that, for the convenience of description, only the parts related to the relevant disclosure are shown in the drawings.

[0022] First, the terms involved in this application are explained: Logarithmic curve: A curve showing the change of the output DC detection voltage signal of the logarithmic detector as the input signal changes. The horizontal axis of the logarithmic curve is the signal power of the input RF signal. For example, the unit of the RF signal power can be decibel milliwatt (dBm). The vertical axis of the logarithmic curve is the DC detection voltage of the output signal, which can be in volts (V) or millivolts (mV).

[0023] The intercept of the logarithmic curve is the input power corresponding to the intersection of the logarithmic curve and the horizontal axis. The intercept of the logarithmic curve can also be understood as the output offset of the logarithmic detector.

[0024] refer to Figure 2, which shows a schematic diagram of the structure of a logarithmic detector. The logarithmic detector mainly includes a logarithmic amplifier 200, which is used to logarithmically amplify the input signal. The logarithmic amplifier 200 includes a plurality of cascaded limiting amplifiers (such as amplifiers 201-205) and a plurality of rectifiers (such as rectifiers 210-260), wherein the limiting amplifier is used to amplify the AC signals of each level, and the rectifier is used to rectify the AC signal into a DC signal, and the DC signal has a logarithmic relationship with the input signal. The input end of the first-stage limiting amplifier 201 receives the AC radio frequency signal RFin input to the logarithmic detector, and is connected to the input end of the first-stage rectifier 210. In addition, the output end of each amplifier circuit is connected to the input end of a rectifier, and the output ends of all rectifiers are connected together to form the output end of the logarithmic amplifier, which is used to output a DC output signal Iout, and the DC output signal Iout can be converted into a voltage to form a DC detection voltage signal; and the output end of the last-stage limiting amplifier 205 outputs a radio frequency voltage signal RFout. Since the limiting amplifier gain changes with temperature, a compensation current can be added to the output current of the logarithmic amplifier to compensate for the current change caused by temperature. Figure 2 The compensation current 21 is connected at Iout in.

[0025] Figure 3 The logarithmic curves of the input power and the detection voltage output of the logarithmic detector at the same frequency and different temperatures are shown in Figure 301, where curve 301 is a low temperature logarithmic curve, curve 302 is a normal temperature logarithmic curve, and curve 303 is a high temperature logarithmic curve. The limiting amplifier includes a bipolar transistor (BJT), and the transconductance of the BJT can be obtained by the following formula: g m =I C / V T , where g m is the transconductance, I C is the input current, V T is the thermal voltage, V T Related to temperature. Generally speaking, the higher the temperature, the higher the V T The higher the limiter, the gain of the limiting amplifier can be obtained by the following formula: V =g m ×R L , where A V is the gain, R L is the load resistance. When the temperature of the BJT increases, its thermal voltage V T It increases with the increase of temperature, so the transconductance g m will decrease as the temperature increases, and the gain A of the limiting amplifier VIt will also decrease with increasing temperature, and the detector requires the input signal strength to reach a certain value before it can respond. Therefore, the higher the temperature, the smaller the gain of the logarithmic amplifier, causing the starting point of the detected voltage to shift to the right. That is, the higher the temperature, the greater the input signal power required to generate the same detection voltage (that is, the RF voltage signal RFout).

[0026] Therefore, in order to obtain the same logarithmic curve at different temperatures, that is, to make the zero point of the logarithmic curve the same at different temperatures, a temperature compensation circuit can be introduced at the DC output terminal Iout of the logarithmic amplifier to generate a temperature compensation current. The temperature compensation current causes the logarithmic curve to shift upward or downward accordingly, and finally makes the logarithmic curves overlap at different temperatures. For example, Figure 3 The curve 301 and the curve 303 shown in FIG. 3 are both overlapped with the curve 302 by translation. Figure 4 The curve in is the curve after the three curves overlap. It can be understood that there are other temperature effects in the logarithmic detector, and the above description is only a simplified example for the convenience of explanation.

[0027] The relationship between the temperature compensation current output in the temperature compensation and the temperature can be simplified to a functional relationship Y=kX+b, where Y is the temperature compensation current, X is the temperature, k is the temperature coefficient of the temperature compensation circuit, and b is the intercept. It can be seen from the above functional relationship Y=kX+b that in addition to the temperature X, there are two factors that affect the temperature compensation current Y: 1) intercept b; 2) temperature coefficient k.

[0028] In view of the influence of intercept b, it is often necessary to introduce an intercept compensation circuit with a zero temperature coefficient to generate an intercept compensation current to perform intercept compensation.

[0029] The temperature coefficient k varies with the frequency of the input AC RF signal. If the temperature coefficient k cannot vary with the frequency, only a good temperature compensation can be achieved for one input signal frequency point.

[0030] In addition, since the frequency of the input AC RF signal will also have a certain impact on the gain of the limiting amplifier, when the frequency is different, the gain of the limiting amplifier is different, which makes the corresponding RFIN different when the last stage rectifier enters the normal working input power range, so that the intercept size of the logarithmic curve is also different after the same intercept compensation, such as Figure 5 As shown, curves 501, 502, and 503 are obtained at the same temperature and different frequencies. Figure 3The generated compensation current shown (including the generated traditional temperature compensation current and intercept compensation current) cannot be adaptively adjusted as the frequency changes. For example, when the current is compensated, the three curves will be translated simultaneously and equally spaced along the y-axis direction, and the three curves will not overlap, so the influence of frequency on the output current cannot be improved.

[0031] In order to solve the problem that the temperature coefficient k and the intercept b cannot automatically change with the frequency, it is necessary to provide the compensation circuit with the frequency information of the input signal and automatically adjust the compensation current according to the information. The present application adopts a solution of adding a frequency discriminator and a control module, wherein the frequency discriminator is used to determine the frequency of the input RF signal, and the control module is used to generate a corresponding control signal to control the magnitude of the compensation current.

[0032] Figure 6 This is an embodiment of the logarithmic detector based on input frequency dynamic compensation proposed in the present application. The logarithmic detector includes a logarithmic amplifier 601, a frequency detector 602, a temperature sensor 603, a control module 604, and a current compensation circuit 605. The structure of the logarithmic amplifier 601 can refer to Figure 2 The structure of the logarithmic amplifier 200 is not described in detail here.

[0033] The logarithmic amplifier 601 is used to receive the input of the radio frequency signal RFin, and after logarithmic conversion of the radio frequency signal RFin, its output terminal outputs a first current. Figure 6 The first current in the frequency detector 602 is the current Iout. The input end of the frequency detector 602 can be connected to the input end of the logarithmic amplifier 601, or can be connected to the input end or output end of any level limiting amplifier in the logarithmic amplifier 601. The frequencies of these positions are the same as the frequency of the radio frequency signal RFin, so as to reflect the frequency of the radio frequency signal RFin. The frequency detector 602 collects the frequencies of these positions to determine the first frequency information according to the radio frequency signal RFin. The first frequency information is used to indicate the first frequency of the radio frequency signal RFin. f 1 , wherein the first frequency information may include the first frequency f 1 , or for calculating the first frequency f 1 The frequency detector 602 is used to detect the frequency of the RF signal RFin. Specifically, after the RF signal in the form of power is input to the logarithmic detector, it is converted into an RF voltage signal through the logarithmic amplifier and finally outputs the RF voltage RFout. The frequency detector 602 can determine the first frequency of the input RF signal RFin according to the RF signal input or output at any stage of the logarithmic amplifier. f 1It is understandable that since the logarithmic detector converts the power or amplitude change of the RF signal RFin into the change of the output voltage or current, it will not affect the frequency of the RF signal RFin. Therefore, the first frequency of the RF signal RFin at the input end of the logarithmic detector is f 1 The frequency of the output voltage RFout and the output current Iout at the output end is equal, and the first frequency of the input RF signal RFin can be determined according to the RF signal input or output at any stage of the logarithmic amplifier. f 1 .

[0034] The temperature sensor 603 is used to obtain the real-time temperature of the surrounding environment when the logarithmic detector is working, that is, to monitor the temperature in real time so as to dynamically obtain the corresponding temperature value during the compensation process. The temperature sensor 603 can be located on the same chip as the logarithmic detector to better detect the real-time temperature of the environment where the logarithmic detector is located.

[0035] The control module 604 receives the first frequency information output by the frequency detector 602, and receives the real-time temperature output by the temperature sensor 603. The control module 604 generates a control signal based on the first frequency information and the real-time temperature. The first frequency information, the real-time temperature and the control signal have a corresponding relationship. When the first frequency information is different, the control signal is different. When the real-time temperature is different, the control signal is different, so as to compensate the frequency of the radio frequency signal RFin according to the first frequency information and the real-time temperature. Among them, the control signal reflects the compensation for the intercept change caused by the change of the logarithmic curve with the frequency, and the compensation for the temperature coefficient change caused by the change of the second current with the frequency. In some embodiments, the control signal can also reflect the compensation for the intercept change caused by the change of the logarithmic curve with the temperature. The control signal can be a multi-bit digital signal control code in binary form, which can be easily compensated. Specifically, the first frequency information may include parameters for determining the first frequency, or directly include the first frequency f 1 When the first frequency information determined by the frequency discriminator includes only parameters for determining the first frequency, the parameters may be processed in the control module 604 to obtain the first frequency. f 1 ; When the first frequency information includes the first frequency f 1 When the control module 604 can directly obtain the first frequency f 1 .

[0036] The current compensation circuit 605 is used to receive the control signal and output a corresponding second current based on the control signal. The output end of the current compensation circuit 605 is connected to the output end of the logarithmic amplifier 601. The second current is used to compensate for the first current Iout at different first frequencies and different real-time temperatures. The control signal and the magnitude of the second current have a corresponding relationship. When the control signal is different, the magnitude of the second current is different.

[0037] It can be understood that since the real-time temperature and the first frequency change in real time, the compensation process is carried out in real time, so the acquisition of the first frequency and the real-time temperature and the generation of the control signal are also carried out in real time. By applying the above circuit, the discriminator can automatically detect the first frequency information of the radio frequency signal at a certain frequency, and the control module automatically determines the control signal based on the first frequency information and the real-time temperature. The control signal can automatically control the magnitude of the compensation current at different real-time temperatures and different first frequencies, thereby compensating the first current. Since the control signal reflects the compensation for the intercept change caused by the change of the logarithmic curve with the frequency, and the compensation for the change of the temperature coefficient caused by the change of the second current with the frequency, the intercept change caused by the change of the logarithmic curve with the temperature change and the frequency change is compensated, thereby realizing the flexible adjustment of the intercept of the logarithmic curve.

[0038] The entire process can automatically obtain frequency and temperature compensation effects at a certain operating frequency without manual adjustment, achieving broadband optimal temperature compensation and intercept compensation, and the circuit complexity is low.

[0039] The above is the basic structure of the logarithmic detector proposed in this application. Figure 7-Figure 11 Let's explain the other parts of the logarithmic detector in detail.

[0040] First refer to Figure 7 , an implementation of the frequency discriminator 602 is described. The frequency discriminator 602 includes a reference frequency source 701, a first counter 702, a second counter 703 and a calculation unit 704. The reference frequency source 701 is used to output a reference signal, and the frequency of the reference signal is the reference frequency f 2 , as a basis for comparison, that is, the reference signal is used as a reference signal of the RF signal. By comparing the frequency of the reference signal with the frequency of the reference signal, the frequency of the RF signal can be obtained. The reference signal can be a pulse signal. The first counter 702 is used to count the pulses of the RF signal to obtain a first count C 1 The first counter 702 can convert the RF signal into a pulse signal and count the pulses after shaping. The second counter 703 is used to count the pulses of the reference signal to obtain a second count C 2 In this embodiment, the calculation unit 704 is used to calculate the value of the first count C 1and the second count C 2 ratio, and the reference frequency f 2 , to calculate the first frequency f 1 Since the frequency is linearly proportional to the number of pulses within a certain period of time, the ratio of the number of pulses of the RF signal to the reference signal within a certain period of time is equivalent to the ratio of the frequency of the RF signal to the reference signal.

[0041] Therefore, within a certain counting time, the ratio of the frequency of the RF signal to the reference signal to the count is as shown in the following formula (1):

[0042] By transforming the above formula, the first frequency can be obtained through formula (2): f 1 :

[0043] In this solution, the calculation unit 704 in the frequency discriminator 602 is used to calculate the first frequency f 1 , so the first frequency information is the first frequency f 1 , the calculation unit 704 can convert the first frequency f 1 Sent to the control module.

[0044] Reference frequency f 2 , first count C 1 and the second count C 2 That is, the parameter used to determine the first frequency in the first frequency information. However, in other embodiments, the frequency detector 602 may not include the calculation unit 704. The calculation unit 704 may be located in the control module, and the control module calculates the first frequency. f 1 For example, the frequency detector 602 can count the first 1 and the second count C 2 The control module can then use the pre-known reference frequency to f 2 , get the first count C 1 and the second count C 2 , according to formula (2) we can get the first frequency f 1 At this time, the first frequency information is the first count C 1 and the second count C 2 , the first count C 1 and the second count C 2is a parameter used to determine the first frequency. In other embodiments, the calculation unit 704 may also be an independent module, or integrated with other modules.

[0045] In addition, the frequency discriminator 602 may also include a clear signal input terminal 705 connected to the first counter 702 and the second counter 703, for clearing the counts of the first counter 702 and the second counter 703. The clear signal input terminal 705 may be controlled by the control module 604, and when receiving the clear signal CLR output by the control module 604, the count data of the first counter 702 and the second counter 703 will be cleared to indicate the counting starting point, thereby eliminating the process of determining the counting starting point of this cycle, and the count values ​​of the counters are the required first count and second count, which can save computing resources.

[0046] It is worth noting that the amplitude of the RF signal input to the counter needs to be large enough to make the counter count accurately. Therefore, Figure 6 As shown, the discriminator 602 can be arranged at the RF voltage output terminal of the logarithmic amplifier 601, and the amplitude of the RF signal outputted from the RF voltage output terminal of the logarithmic amplifier 601 is relatively large. Optionally, a gain amplifier 607 can be inserted between the logarithmic amplifier and the discriminator to amplify the amplitude of the RF signal to be sufficient to drive the discriminator 602, thereby avoiding the situation where the discriminator 602 cannot work normally.

[0047] In addition, in other embodiments, the frequency discriminator may also include an analog-to-digital converter ADC and a calculation unit, wherein the analog-to-digital converter is used to perform analog-to-digital conversion on the input RF signal, and convert the analog RF signal into a digital signal. The calculation unit may calculate the first frequency of the RF signal according to the digital signal through mathematical calculations such as Fourier transform in the digital domain. In another implementation, the frequency discriminator may include an analog-to-digital converter ADC but not a calculation unit, and mathematical calculations such as Fourier transform may be performed by the control module 604. The Fourier transform may adopt the following formula:

[0048] Wherein, F(m) is the first frequency, m is the harmonic number, n is the current operation point, and M represents the number of n.

[0049] It can be understood that the above frequency discriminator is only an example, and the frequency discriminator can also detect the frequency in other ways.

[0050] The temperature sensor 603 may be any suitable sensor, including but not limited to a thermocouple, a thermistor, a resistance temperature detector (RTD), a semiconductor-based integrated circuit (IC) temperature sensor, an infrared temperature measurement, and a fiber optic temperature sensor.

[0051] Next, the control module 604 in this embodiment is described.

[0052] In one embodiment, the control module 604 may be a logic circuit including a lookup table 606. The control module 604 determines the control signal based on the first frequency information received from the frequency discriminator 602. Since the circuit logic has a certain complexity, it can be implemented using a pure digital circuit. For example, the hardware description language Verilog HDL is usually used to write behavioral level code to generate the circuit through program synthesis, rather than manually setting logic gates to build it. The lookup table 606 stores a first correspondence relationship, and the first correspondence relationship indicates the first frequency f 1 , the correspondence between the real-time temperature and the control signal, that is, different first frequencies and / or different real-time temperatures may correspond to different control signals. The control module may be based on the first frequency f 1 , real-time temperature and the first corresponding relationship, the control signal can be determined. When the first frequency and / or the real-time temperature changes, the control signal changes accordingly to compensate for the change in the intercept of the logarithmic curve. For example, when the frequency detector detects the first frequency f 1 When the first frequency is 350kHz and the temperature sensor detects that the real-time temperature is 25°C, the control signal can be 11001001; f 1 When the frequency is 700kHz and the real-time temperature is 27°C, the control signal may be 01111001. Furthermore, the first corresponding relationship may also be the first frequency f 1 The corresponding relationship between the frequency range (the frequency range can be customized according to the accuracy requirements during circuit design) and the temperature range of the real-time temperature and the control signal. For example, when the first frequency f 1 In the frequency range of 340kHz~350kHz, when the real-time temperature is in the temperature range of 24.5℃~25.5℃, the control signal can be 11001001; when the first frequency f 1 In the frequency range of 690kHz~710kHz, when the real-time temperature is in the temperature range of 26.5℃~27.5℃, the control signal can be 01111001. It can be understood that the above example is only for illustrating the corresponding manner in the first corresponding relationship, and does not represent the actual value. For example, the number of bits of the control signal is related to the actual structure of the compensation circuit, and the first frequency f 1 The relationship between the size of and the value of the control signal also needs to be judged based on the actual circuit.

[0053] Before the logarithmic detector leaves the factory, different control signals are input to the current compensation circuit for a certain first frequency and a certain real-time temperature, and the logarithmic curve of the logarithmic amplifier is tested; when the input control signal makes the logarithmic curve a target logarithmic curve, the control signal is a target control signal for a certain first frequency and a certain real-time temperature. Polling is performed sequentially to find the target control signals for all first frequencies and all real-time temperatures, thereby obtaining a first corresponding relationship, and the first corresponding relationship is stored in a lookup table.

[0054] In another embodiment, the control module 604 may include a lookup table 606 and a logic calculation module (for clarity, the logic calculation module is not shown in FIG. Figure 6 In this solution, the logic calculation module has the computing capability, so the lookup table 606 does not need to store the first frequency f 1 , the direct correspondence between the real-time temperature and the control signal, wherein the lookup table 606 may store a second correspondence, the second correspondence indicating the correspondence between the first frequency, the real-time temperature and the current compensation intercept and the temperature compensation coefficient. Based on the first frequency, the real-time temperature and the second correspondence, the current compensation intercept and the temperature compensation coefficient may be determined, and the intercept of the logarithmic curve may be compensated. For example, when the first frequency f 1 When the frequency is 350kHz and the temperature sensor detects that the real-time temperature is 25°C, the temperature compensation coefficient is 0.5 and the current compensation intercept is 2 based on the lookup table; when the first frequency f 1 When the first frequency is 700kHz and the real-time temperature is 27°C, the temperature compensation coefficient is 0.6 and the current compensation intercept is 3 based on the lookup table. f 1 When the frequency is 350kHz and the temperature sensor detects that the real-time temperature is 27°C, the temperature compensation coefficient is 0.7 and the current compensation intercept is 4 based on the lookup table. f 1 When the frequency is 700kHz and the real-time temperature is 25°C, the temperature compensation coefficient is 0.8 and the current compensation intercept is 5 based on the lookup table. It can be understood that this example is only for illustrating the second corresponding relationship, not the actual data stored in the lookup table. The control value can then be converted into a control code in the form of a digital signal to facilitate the control and adjustment of the output current of the subsequent current compensation circuit.

[0055] After obtaining the current compensation intercept and the temperature compensation coefficient, the logic calculation module can calculate the control value of the control signal based on the current compensation intercept and the temperature compensation coefficient. The logic calculation module can substitute the obtained current compensation intercept and the temperature compensation coefficient into the calculation formula according to the preset calculation formula to calculate the control value of the control signal. For example, after the lookup table 606 determines the current compensation intercept and the temperature compensation coefficient, the logic calculation module can calculate the control signal according to formula (3): CTV=kt+b, where CTV is the control value, k is the temperature compensation coefficient, t is the temperature signal obtained by the temperature sensor, and its value can be equal to the temperature value or have a certain functional relationship with the temperature value, and b is the current compensation intercept.

[0056] Before the logarithmic detector leaves the factory, for a certain first frequency and a certain real-time temperature, the logic calculation module inputs different k and b at the same time, and tests the logarithmic curve of the logarithmic amplifier; when the input control signal makes the logarithmic curve the target logarithmic curve, the k value and the b value are the target temperature compensation coefficient and the target current compensation intercept for a certain first frequency and a certain real-time temperature. Polling is performed in sequence to find the target temperature compensation coefficient and the target current compensation intercept for all first frequencies and all real-time temperatures, thereby obtaining the second corresponding relationship, and storing the second corresponding relationship in the lookup table.

[0057] In some embodiments, the control module 604 is configured to perform the following operations to compensate the first current: Obtaining first frequency information to obtain a first frequency; Get real-time temperature; Determine a control signal according to the first frequency and the real-time temperature based on a lookup table; The control signal is transmitted to the current compensation circuit.

[0058] The following describes the operation of the control module 604 by taking the embodiment based on the lookup table including the second corresponding relationship as an example. Figure 8 Flowchart, combined with Figure 6 , Figure 7 In this embodiment, the control module 604 includes a reference frequency source 701 , a first counter 702 , and a second counter 703 , but does not include a calculation unit 704 .

[0059] In step 801, the control module 604 sends a clear signal CLR to the frequency discriminator 602 to start a new round of compensation control. In other examples, clearing may not be performed, but the count before the new round of control time point may be subtracted during the calculation process.

[0060] In step 802, after the first counter 702 and the second counter 703 have counted for a period of time, the control module 604 receives the first count C 1and the second count C 2 In this step, it is necessary to wait for an appropriate amount of time in order to satisfy both the appropriate response speed and the accuracy of the calculation results.

[0061] In step 803, based on the reference frequency stored in the control module 604 f 2 Information, first count C 1 and the second count C 2 The first frequency of the currently input RF signal can be calculated according to the above formula (2): f 1 .

[0062] In this solution, through steps 801 to 803, the first frequency information is obtained with the second frequency to obtain the first frequency.

[0063] In step 804 , the control module 604 obtains real-time temperature information from the temperature sensor.

[0064] In step 805, the control module 604 searches the lookup table 606 for a signal corresponding to the first frequency. f 1 The temperature compensation coefficient and current compensation intercept corresponding to the corresponding frequency range.

[0065] In step 806 , the control module 604 calculates a control code according to formula (3), and inputs the control code into the current compensation circuit to generate a second current.

[0066] In other embodiments, such as embodiments in which the lookup table includes the first corresponding relationship, step 806 may be omitted, and the corresponding digital control code is directly found according to the first corresponding relationship in step 805, and the control code is input into the current compensation circuit. It can be understood that the frequency range and the temperature range are determined based on the compensation accuracy requirement, and the higher the compensation accuracy requirement, the smaller the defined frequency range.

[0067] It can be understood that step 802 and step 803 correspond to the first frequency information determined by the frequency discriminator including the parameters used to determine the first frequency (the first count C 1 and the second count C 2 ), so the control module needs to receive the parameter and calculate the first frequency based on the parameter f 1 . However, the first frequency information is the first frequency f 1 In the implementation manner, the control module can directly receive the first frequency from the discriminator f 1 , that is, step 802 and step 803 can be combined into one step.

[0068] Finally, after starting to work, the lookup table logic circuit will execute the above operations cyclically at a certain frequency until the chip is enabled and turned off or powered off.

[0069] Next, the current compensation circuit in this embodiment is described.

[0070] refer to Fig. 9 A schematic diagram of a current compensation circuit is shown in FIG. The current compensation circuit includes a current generating circuit 901 and a current regulating circuit 902. Fig. 9 In the embodiment shown, the current generating circuit 901 receives a first control voltage V CTRL , the first control voltage V CTRL Converted into current, output with the first control voltage V CTRL The corresponding second current I O2 , the second current I O2 The size of the first control voltage V CTRL The current regulating circuit 902 regulates the first control voltage V based on the control signal. CTRL In some embodiments, the current generating circuit 901 includes an operational amplifier 903 and an output transistor Q1. The current regulating circuit 902 is a digital-to-analog converter DAC. The digital-to-analog converter DAC receives a digital control signal, performs digital-to-analog conversion according to the control signal, and outputs a first control voltage V corresponding to the control signal. CTRL After the DAC obtains the control signal in the form of a digital signal, the DAC converts the control signal consisting of a multi-bit digital signal into an analog first control voltage V CTRL , output to the non-inverting input terminal of the operational amplifier 903. The output transistor Q1 includes a control terminal P1, a first terminal P2, and a second terminal P3, wherein the control terminal P1 of the output transistor Q1 receives the voltage output by the operational amplifier 903, the first terminal P2 is grounded via the grounding resistor R1, and the inverting input terminal of the operational amplifier 903 is connected to the first terminal P2 of the output transistor Q1, so as to utilize the clamping function of the amplifier to clamp the control voltage V CTRL At the same time, it is applied to the top of the resistor R1 to obtain driving capability. Because the first terminal P2 of the output transistor Q1 is connected to the inverting input terminal of the operational amplifier 903, the voltage of the first terminal P2 of the output transistor Q1 is equal to the first control voltage V CTRL The same size, so when the first control voltage V CTRL When the magnitude of the second current I O2 The second current I outputted from the second terminal P3 of the output transistor Q1 can be obtained by the following formula (4): O2 :

[0071] In addition, the NPN type BJT in the circuit can also be replaced by NMOS. The circuit structure is simple, and because the control signal changes with the input frequency, dynamic adjustment of the intercept compensation current at different frequencies is achieved.

[0072] Fig. 9 The current compensation circuit shown in the figure may also adopt a current regulating circuit of other structures. For example, the current regulating circuit may be a resistance regulating circuit, which is connected in series between a power supply voltage and a current source circuit. After receiving a control signal, the resistance value of the resistance regulating circuit can be adjusted, and then according to the series voltage division principle, the first control voltage applied to the current source circuit can be adjusted.

[0073] Fig.10 is another embodiment of the current compensation circuit. In this embodiment, the current generating circuit 1101 includes a current generating circuit 1101, a current regulating circuit (including a current mirror structure 1102 and a plurality of transistors 1103), and the current generating circuit 1101 receives a second control voltage V B (the voltage value is a fixed value), and converts the second control voltage into a current, outputting the same current as the second control voltage V B The corresponding third current I O3 The current regulating circuit (including 1102 and 1103) is used to adjust the third current I O3 Proportionally replicated to generate a second current I O2 .

[0074] Continue to refer Fig.10 The current compensation circuit includes a current generating circuit 1101, a current mirror structure 1102 and a plurality of transistors 1103, wherein the current generating circuit 1101 receives a second control voltage V B , converting the second control voltage into a current, and outputting a third current I corresponding to the second control voltage O3 .

[0075] The current generating circuit 1101 and Fig. 9 The current generating circuit 901 shown has the same structure, including an operational amplifier 1104 and an output transistor Q1. In this embodiment, the non-inverting input terminal of the operational amplifier 1104 receives the second control voltage V B (fixed voltage), the inverting input terminal is connected to the first terminal of the output transistor Q1, the first terminal of the output transistor Q1 is grounded via the grounding resistor R2, and the third current I is output at the second terminal O3 to the current mirror structure.

[0076] The current mirror structure 1102 includes an input transistor N1 and an output transistor N2. The input transistor N1 of the current mirror structure 1102 receives the third current I O3Output transistor N2 is used for the third current I O3 Mirror-copy the current in proportion to output the second current I O2 The plurality of transistors 1003 are used to adjust the second current I O2 Size. Fig.11 In the example shown, the input transistor N1 and the output transistor N2 of the current mirror structure 1102 are both MOS transistors, the control end (gate) of the MOS transistor N1 is the control end (gate) of the MOS transistor N2, and the output end (for example, source or drain) of the MOS transistor N2 is used to output the second current I O2 .

[0077] The plurality of transistors N3 to NN are turned on or off based on a control signal (for clarity, the control signal is not shown in the figure. It can be understood that the control signal is input to the gate of the transistors N3 to NN) to adjust the equivalent size of the transistors in the output transistor N2, thereby adjusting the second current I O2 Size. Fig.11 In the example shown, the multiple transistors N3~NN are multiple MOS transistors cascaded on the output transistor side, wherein a single-pole double-throw switch is provided at the gate of each of the MOS transistors N3~NN, one side of the switch is used to connect to the gate of the MOS transistor N2, and the other side is used to connect to the power supply voltage VDD. The control signal is used to control the conduction position of the single-pole double-throw switch. For example, in an exemplary control logic, when the digital signal bit (not shown) corresponding to the control signal is at a high level, the single-pole double-throw switch of the MOS transistor corresponding to the bit is connected to the gate of N2, so that the MOS transistor is connected in parallel with N2, which is equivalent to increasing the width-to-length ratio of N2, thereby increasing the replication ratio of the third current, that is, increasing the second current I O2 When the digital signal bit is at a low level, the single-pole double-throw switch of the corresponding MOS tube is connected to the power supply voltage VDD, and the MOS tube is turned off, which is equivalent to reducing the width-to-length ratio of N2, thereby reducing the copy ratio of the third current, that is, reducing the second current I O2 Therefore, by controlling whether N3~NN is connected to the compensation circuit through the control code, the second current I O2 size.

[0078] Fig.11This is another embodiment of the current compensation circuit. In this embodiment, the temperature compensation circuit includes a first transistor Q1 and a current regulating circuit 901, wherein the current regulating circuit 901 includes: a plurality of first resistors R1 <1> ~R1 <4> and a plurality of first switches M1 <1> ~M1 <4> In this embodiment, the first transistor may be an NPN bipolar junction transistor (BJT) Q1, or an NMOS transistor, which includes a control terminal (i.e., the base of the BJT Q1), a first terminal (i.e., the emitter of the BJT Q1), and a second terminal (i.e., the collector of the BJT Q1), and the control terminal receives the second control voltage V B It is used to drive BJT Q1, the first end is connected to the current regulating circuit 901 via a current limiting resistor R1, and the second end is used to output the second current I O2 In addition, the plurality of first switches are implemented by a plurality of MOS tubes and connected to a plurality of first resistors R1 <1> ~R1 <4> The first control signal is used to control the on and off of the first switch of the corresponding position, thereby controlling whether the corresponding first resistor is short-circuited, so as to adjust the resistance value of the branch where the second end of the first transistor Q1 is connected by adjusting the equivalent resistance in the current regulating circuit 901, thereby adjusting the second current I O2 In addition, CMOS transmission gates and other devices can also be used to replace MOS tubes to realize the switch function. The second control voltage V received by the non-inverting input terminal of the operational amplifier 1104 B is a zero temperature coefficient constant voltage, the inverting input terminal is connected to the first terminal of the output transistor Q1, and the base of the NPN type BJT is connected to the output terminal of the operational amplifier 1104. By controlling whether the corresponding first resistor is short-circuited, the current I is adjusted O2 After receiving the multi-bit control signal transmitted by the control module 604, the corresponding MOS tube M1 is controlled <1> ~M1 <4> For example, when the digital signal bit corresponding to the control signal of the MOS tube is at a logic high level 1, the MOS tube is turned on to short-circuit the resistor corresponding to the MOS tube, so that the second current I O2 The second current I O2 It can be derived from the following formula: I O2 =V B / (R 1 +R 1 ') Among them, R 1 ' is the resistor R1 <1> ~R1 <4> The resistor that is not short-circuited by the MOS tube.

[0079] Alternatively, in another embodiment, each first switch and each first resistor may be connected in series to form a group, and then all the groups may be connected in parallel, that is, R1 <1> With M1 <1> Connect in series as group 1, R1 <2> With M1 <2> Connect in series to group 2, R1 <3> With M1 <3> Connect in series to group 3, R1 <4> With M1 <4> After being connected in series to form group 4, groups 1 to 4 are connected in parallel to control the first switch to disconnect the corresponding first resistor through the first control signal, thereby adjusting the magnitude of the second current, wherein the second current is a zero temperature coefficient current.

[0080] Figure 9~Figure 11 The current source circuit uses the voltage following function of the operational amplifier to provide a voltage that does not change with temperature for compensation. The above circuit is only an example and not a limitation. Any circuit that can generate a voltage that does not change with temperature according to a control signal to generate a second current can be applied.

[0081] It will be understood by those skilled in the art that, although the above-mentioned embodiments include a variety of different implementations, these implementations are non-limiting implementations. The present application creatively introduces considerations of frequency in the compensation circuit, and uses a frequency detector and a lookup table logic circuit to measure and consider the frequency in real time, so as to generate an appropriate compensation current, so that when a radio frequency signal with a different frequency is input, the logarithmic amplifier can still output a stable current. Therefore, the implementation methods of each circuit and module are not limited to those described in the specification, and the current direction of the compensation current is not the key point of the present application, and the current direction can be changed by, for example, adding a simple current mirror.

[0082] The above specific embodiments illustrate the implementation of the present application, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Although the description of the present application will be introduced in conjunction with the preferred embodiment, this does not mean that the features of this invention are limited to the implementation. In addition, in order to avoid confusion or blurring the focus of the present application, some specific details will be omitted in the description. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0083] Furthermore, various operations will be described as multiple discrete operations in a manner that is most helpful for understanding the illustrative embodiments; however, the order of description should not be construed as implying that these operations are necessarily order dependent. In particular, these operations do not need to be performed in the order presented.

[0084] Unless the context dictates otherwise, the terms "comprising," "having," and "including" are synonymous. The phrase "A / B" means "A or B." The phrase "A and / or B" means "(A and B) or (A or B)."

[0085] As used herein, the term "module" or "unit" may refer to, be or include: an application specific integrated circuit (ASIC), an electronic circuit, a (shared, dedicated or group) processor and / or memory that executes one or more software or firmware programs, a combinational logic circuit and / or other suitable components that provide the described functionality.

[0086] In the accompanying drawings, some structural or method features are shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. In some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a specific figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0087] It should be understood that although the terms "first", "second", etc. may be used here to describe various units or data, these units or data should not be limited by these terms. These terms are used only to distinguish one feature from another. For example, without departing from the scope of the exemplary embodiment, a first feature may be referred to as a second feature, and similarly, a second feature may be referred to as a first feature.

[0088] It should be noted that in this specification, similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0089] While the present invention has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention.

Claims

1. A logarithmic detector based on frequency dynamic compensation of an input signal, characterized in that: include: A logarithmic amplifier, used for receiving a radio frequency signal, wherein an output terminal of the logarithmic amplifier outputs a first current; a frequency discriminator, configured to determine and output first frequency information according to the radio frequency signal, wherein the first frequency information indicates a first frequency of the radio frequency signal; A temperature sensor, used to obtain the real-time temperature of the environment in which the logarithmic amplifier is located, and output the real-time temperature; a control module, receiving the first frequency information and the real-time temperature, and generating a control signal based on the first frequency information and the real-time temperature, wherein the control signal is used to control the magnitude of a second current, and the second current is used to compensate for the first current at different first frequencies and different real-time temperatures; The current compensation circuit receives the control signal and outputs a corresponding second current based on the control signal. The output end of the current compensation circuit is connected to the output end of the logarithmic amplifier.

2. The logarithmic detector according to claim 1, characterized in that The first frequency information includes the first frequency; or the first frequency information includes a parameter used to calculate the first frequency.

3. The logarithmic detector according to claim 1, characterized in that The frequency discriminator comprises: A reference frequency source, used for outputting a reference signal, wherein the frequency of the reference signal is the reference frequency; A first counter, used to count pulses of the radio frequency signal to obtain a first count; The second counter is used to count the pulses of the reference signal to obtain a second count.

4. The logarithmic detector according to claim 3, characterized in that The frequency discriminator also includes: The calculation unit calculates the first frequency based on a ratio of the first count to the second count and the reference frequency.

5. The logarithmic detector according to claim 3, characterized in that The frequency discriminator further comprises a clear input terminal for clearing the first counter and the second counter.

6. The logarithmic detector according to claim 1, characterized in that The frequency discriminator comprises: An analog-to-digital converter, collecting the radio frequency signal into a digital signal; A calculation unit performs Fourier transform on the digital signal to calculate the first frequency.

7. The logarithmic detector according to claim 1, characterized in that The control module includes a lookup table, the lookup table stores a first corresponding relationship, and the control module determines the control signal based on the first frequency, the real-time temperature and the first corresponding relationship; The first corresponding relationship indicates: the control signal at different first frequencies and real-time temperatures.

8. The logarithmic detector according to claim 1, characterized in that The control module comprises: A lookup table storing a second corresponding relationship, wherein the control module determines a current compensation intercept and a temperature compensation coefficient based on the first frequency, the real-time temperature and the second corresponding relationship; wherein the second corresponding relationship indicates: the current compensation intercept and the temperature compensation coefficient at different first frequencies and real-time temperatures; A logic module calculates a control value of the control signal based on the current compensation intercept and the temperature compensation coefficient.

9. The logarithmic detector according to claim 7 or 8, characterized in that: The control module is further configured to perform the following operations: Obtaining the first frequency information to obtain the first frequency; Obtaining the real-time temperature; Determining the control signal according to the first frequency and the real-time temperature; The control signal is transmitted to the current compensation circuit.

10. The logarithmic detector according to claim 9, characterized in that The frequency at which the control module obtains the first frequency information is a second frequency.

11. The logarithmic detector according to claim 10, characterized in that The frequency at which the control module sends a clearing signal to the frequency discriminator is the second frequency.

12. The logarithmic detector according to claim 1, characterized in that The current compensation circuit comprises: a current generating circuit, receiving a first control voltage, converting the first control voltage into a current, and outputting a second current corresponding to the first control voltage; The current regulating circuit adjusts the magnitude of the first control voltage based on the control signal.

13. The logarithmic detector according to claim 12, characterized in that The current regulating circuit comprises: The digital-to-analog converter receives the control signal, performs digital-to-analog conversion according to the control signal, and outputs the first control voltage corresponding to the control signal.

14. The logarithmic detector according to claim 1, characterized in that The current compensation circuit comprises: a current generating circuit, receiving a second control voltage, converting the second control voltage into a current, and outputting a third current corresponding to the second control voltage; The current regulating circuit replicates the third current in proportion to generate the second current; and the current regulating circuit adjusts the proportion based on the control signal to adjust the magnitude of the second current.

15. The logarithmic detector according to claim 14, characterized in that The current regulating circuit comprises: A current mirror structure, comprising an input transistor and an output transistor, wherein the input transistor of the current mirror structure receives the third current; and the output transistor is used to proportionally replicate the third current to output the second current; A plurality of transistors are turned on or off based on the control signal to adjust the equivalent size of the output transistor and output the magnitude of the second current.

16. The logarithmic detector according to claim 14, characterized in that The current generating circuit comprises a first transistor, the first transistor comprises: a control end, a first end, and a second end, the control end receives the second control voltage, and the first end or the second end is connected to the current regulating circuit; The current regulating circuit includes: a plurality of first resistors and a plurality of first switches, and the magnitude of the second current is adjusted by adjusting the resistance value of the branch where the second end of the first transistor is connected, wherein: After a plurality of the first resistors are connected in series, they are connected in series between the first end of the first transistor and the ground, and the first switch short-circuits one or more of the first resistors based on the control signal; or, After being connected in parallel, the plurality of first resistors are connected in series between the first end of the first transistor and the ground. The first switch disconnects one or more of the first resistors based on the control signal.

17. The logarithmic detector according to claim 1, characterized in that The input end of the frequency discriminator is connected to the radio frequency output end of the logarithmic amplifier, and the frequency discriminator determines the first frequency based on the radio frequency signal amplified by the logarithmic amplifier.

18. The logarithmic detector according to claim 17, characterized in that It also includes a gain amplifier connected between the frequency discriminator and the logarithmic amplifier.

Citation Information

Patent Citations

  • Temperature compensation system and method of sound surface wave frequency device

    CN101714872A

  • High-precision temperature-compensation MEMS (Micro-Electromechanical System) oscillator based on parasitic capacitance adjustment

    CN102594260A

  • Radio frequency power amplifier circuit

    CN106992757A

  • Logarithmic detector calibration circuit, logarithmic detector calibration method and logarithmic detector

    CN115015824A

  • Control device applied to power conversion equipment

    CN118801688A

Cited By

  • Temperature compensation circuit for logarithmic detector and logarithmic detector

    CN120446844A