Logarithmic detector based on dynamic input frequency compensation
By introducing a frequency discriminator and a control module into the logarithmic detector, combined with a temperature compensation circuit and an intercept compensation circuit, the current is automatically adjusted to compensate for temperature and frequency changes, thus solving the output deviation problem of the logarithmic detector at different temperatures and frequencies and achieving high-accuracy wideband detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2026-04-03
AI Technical Summary
Existing logarithmic detectors exhibit output deviations at different temperatures and frequencies, leading to decreased detection accuracy. Current manual compensation methods are complex and cannot be implemented in broadband applications.
By adopting a logarithmic curve design based on frequency compensation, the current is automatically adjusted to compensate for the output deviation caused by temperature and frequency through a frequency discriminator, control module, temperature compensation circuit and intercept compensation circuit, so as to achieve wideband compensation without manual adjustment.
Automatic compensation of logarithmic curves at different temperatures and frequencies was achieved, improving detection accuracy and reducing circuit complexity.
Smart Images

Figure CN119341485B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a logarithmic detector based on dynamic compensation of output current at input frequency. Background Technology
[0002] Detectors, commonly used to measure the amplitude or power of signals, are widely used in wireless systems. They can be broadly classified into two categories: logarithmic detectors (or envelope detectors) and root mean square (RMS) detectors. See also... Figure 1 This illustrates the detection results of a logarithmic detector and an RMS detector for the same radio frequency signal. For example... Figure 1 As shown, the radio frequency signal is a high-frequency sine wave whose amplitude / phase varies with time. The logarithmic detector detects the envelope of the input signal and outputs its logarithmic value, i.e., output result 1 in the figure; the RMS detector detects the root mean square value (or power value) of the input signal and outputs its value, i.e., output result 2 in the figure. Its output voltage does not change with the shape of the signal or the peak-to-average power ratio (PAPR). PAPR refers to the peak-to-average power ratio, such as... Figure 1 As shown, for the signal value of the radio frequency input signal, the amplitude of the high-frequency sine wave oscillation is not fixed, and the ratio of the peak power to the mean power is the peak-to-average power ratio.
[0003] Regardless of whether a logarithmic detector circuit uses a bipolar junction transistor (BJT) or a metal-oxide-semiconductor field-effect transistor (MOSFET), the device will exhibit certain temperature characteristics. For the same circuit design, parameters such as gain may differ at different chip operating temperatures, resulting in variations in the intercept of the final logarithmic curve at different temperatures. Therefore, temperature compensation is necessary.
[0004] Logarithmic detectors have wideband 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, allowing users to manually adjust the temperature compensation information according to the application scenario. However, this method increases circuit complexity and can only perform temperature compensation at a specific frequency at a time, limiting the broadband application of logarithmic detectors. Summary of the Invention
[0006] To address the impact of temperature and radio frequency signal frequency on logarithmic detectors, this application proposes a logarithmic detector based on a frequency-compensated logarithmic curve, which can automatically compensate for temperature and radio frequency signal frequency, thereby improving detection accuracy.
[0007] In some embodiments, the logarithmic detector based on the frequency-compensated logarithmic curve includes:
[0008] A logarithmic amplifier for receiving radio frequency signals, wherein the output terminal of the logarithmic amplifier outputs a first current;
[0009] A frequency discriminator is used to determine first frequency information based on the radio frequency signal, wherein the first frequency information indicates a first frequency of the radio frequency signal;
[0010] The control module generates a first control signal and / or a second control signal based on the first frequency information; wherein the first control signal is used to control the temperature coefficient of the second current at different first frequencies, and the second current is used to compensate for the first current at different temperatures; the second control signal is used to control the magnitude of a third current, and the third current is used to compensate for the first current at different first frequencies.
[0011] A temperature compensation circuit is used to generate a second current that varies with temperature to compensate for the change in the first current caused by temperature, thereby compensating for the change in the intercept of the logarithmic curve caused by temperature variations. The temperature compensation circuit also receives the first control signal and, based on the first control signal, changes the temperature coefficient of the second current to compensate for the influence of different frequencies on the temperature coefficient of the second current. Through the dual compensation of the temperature compensation circuit, the change in the intercept of the logarithmic curve caused by temperature and frequency variations can be compensated; and / or,
[0012] The intercept compensation circuit outputs the corresponding third current based on the second control signal to compensate for the magnitude of the first current at different first frequencies, thereby compensating for the intercept change of the logarithmic curve caused by the frequency change.
[0013] The entire process requires no manual adjustment. Temperature and / or intercept compensation can be achieved through the frequency discriminator, control module output, temperature compensation circuit and / or intercept compensation circuit, realizing optimal temperature compensation and / or intercept compensation over a wide bandwidth, and the circuit complexity is low.
[0014] In some embodiments, the logarithmic detector includes both a temperature compensation circuit and an intercept compensation circuit to achieve two-stage current regulation: the temperature compensation circuit can adjust the intercept of the logarithmic curve based on the first frequency of the input AC radio frequency signal; the intercept compensation circuit can adjust the intercept of the logarithmic curve based on the first frequency of the input AC radio frequency signal, thereby achieving automatic and flexible adjustment of the intercept of the logarithmic curve. Attached Figure Description
[0015] Figure 1 This is a schematic diagram showing the detection results of a logarithmic detector and an RMS detector for the same radio frequency signal.
[0016] Figure 2 This is a schematic diagram of a logarithmic detector.
[0017] Figure 3 This is a logarithmic curve of the input power versus the output detection voltage of a logarithmic detector at the same frequency and different temperatures.
[0018] Figure 4 It is a logarithmic curve after temperature compensation.
[0019] Figure 5 This is a logarithmic curve of the input power versus the output detection voltage of a logarithmic detector at the same temperature but different frequencies.
[0020] Figure 6 This is a schematic diagram of a logarithmic detector according to an embodiment of this application.
[0021] Figure 7 This is a schematic diagram of a frequency discriminator in a logarithmic detector according to an embodiment of this application.
[0022] Figure 8 This is a flowchart of the control module in a logarithmic detector according to an embodiment of this application.
[0023] Figure 9 This is a schematic diagram of the temperature compensation circuit in a logarithmic detector according to an embodiment of this application.
[0024] Figure 10 This is a schematic diagram of another temperature compensation circuit in a logarithmic detector according to an embodiment of this application.
[0025] Figure 11 This is a schematic diagram of the intercept compensation circuit in a logarithmic detector according to an embodiment of this application.
[0026] Figure 12 This is a schematic diagram of another intercept compensation circuit in a logarithmic detector according to an embodiment of this application. Detailed Implementation
[0027] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the disclosure. Furthermore, it should be noted that, for ease of description, only the parts relevant to the disclosure are shown in the accompanying drawings.
[0028] First, let me explain the terms used in this application:
[0029] Logarithmic curve: A curve showing the change in the output DC detector voltage signal of a logarithmic detector as the input signal changes. The horizontal axis of the logarithmic curve represents the signal power of the input RF signal; for example, the unit of RF signal power can be decibels in milliwatts (dBm). The vertical axis of the logarithmic curve represents the DC detector voltage of the output signal, and the unit can be volts (V) or millivolts (mV).
[0030] Logarithmic intercept: The input power corresponding to the intersection of the logarithmic curve and the x-axis. The logarithmic intercept can also be understood as the output offset of a logarithmic detector.
[0031] refer to Figure 2 The diagram illustrates the structure of a logarithmic detector. The logarithmic detector includes a logarithmic amplifier 200, which amplifies the input signal logarithmically. The logarithmic amplifier 200 includes multiple cascaded limiting amplifiers (e.g., amplifiers 201-205) and multiple rectifiers (e.g., rectifiers 210-260). The limiting amplifiers amplify AC signals at each stage, and the rectifiers rectify the AC signals into DC signals that have a logarithmic relationship with the input signal. The input of the first-stage limiting amplifier 201 receives the AC RF signal RFin input to the logarithmic detector and is connected to the input of the first-stage rectifier 210. Furthermore, the output of each amplifier circuit is connected to the input of a rectifier, and the outputs of all rectifiers are connected together to form the output of the logarithmic amplifier, which outputs a DC output signal Iout. The DC output signal Iout can be voltage-converted to form a DC detector voltage signal; and the output of the final stage limiting amplifier 205 outputs the RF voltage signal RFout. Since the gain of the limiting amplifier changes with temperature, an additional compensation current can be connected at the output current of the logarithmic amplifier to compensate for the temperature-induced current variation. For example, in... Figure 2 The compensation current 21 is connected at Iout.
[0032] Figure 3 This is a logarithmic graph showing the input power versus output detector voltage of a logarithmic detector at the same frequency but different temperatures. Curve 301 is the logarithmic curve at low temperature, curve 302 is the logarithmic curve at room temperature, and curve 303 is the logarithmic curve at high temperature. The limiting amplifier includes a bipolar junction transistor (BJT), and the transconductance of the BJT can be obtained from the following formula: g m =I C / V T , where g m For transconductance, I C For the input current, V T For thermal voltage, V T Temperature-dependent; generally, the higher the temperature, the higher the V. TThe higher the gain, the greater the gain of the limiting amplifier, which can be obtained from the following formula: A V =g m ×R L A V For gain, R L This is the load resistance. As the temperature of the BJT rises, its thermal voltage V... T It increases with increasing temperature, therefore the transconductance g m The gain A of the limiting amplifier will decrease as the temperature increases. V The gain of the logarithmic amplifier decreases as the temperature rises. Since the detector requires a certain input signal strength to generate a response, the higher the temperature, the lower the gain of the logarithmic amplifier, which causes the starting point of the detected voltage to shift to the right. In other words, the higher the temperature, the greater the input signal power required to generate the same detected voltage (i.e., the RF voltage signal RFout).
[0033] Therefore, in order to obtain the same logarithmic curve at different temperatures, that is, to ensure that the zero point of the logarithmic curve is the same at different temperatures, a temperature compensation circuit can be introduced into the DC output Iout of the logarithmic amplifier to generate a temperature compensation current. The temperature compensation current shifts the logarithmic curve upward or downward accordingly, ultimately causing the logarithmic curves to coincide at different temperatures. For example, Figure 3 Curves 301 and 303 shown in the diagram are both translated to coincide with curve 302. Figure 4 The curve shown is the result of the three curves overlapping. It is understandable that other temperature effects exist in logarithmic detectors; the above explanation is merely a simplified example for illustrative purposes.
[0034] The relationship between the output temperature compensation current and temperature in temperature compensation 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. From the above functional relationship Y = kX + b, it can be seen that, in addition to the temperature X, the factors affecting the temperature compensation current Y include two: 1) the intercept b; and 2) the temperature coefficient k.
[0035] To address the influence of the intercept b, it is often necessary to introduce an intercept compensation circuit with zero temperature coefficient to generate an intercept compensation current for intercept compensation.
[0036] The temperature coefficient k varies with the frequency of the input AC RF signal. If the temperature coefficient k cannot vary with frequency, then good temperature compensation can only be achieved for a single input signal frequency.
[0037] Furthermore, since the frequency of the input AC RF signal also affects the gain of the limiting amplifier, different frequencies result in different gains. This leads to different RFIN values at which the final rectifier enters its normal operating input power range, resulting in different intercept values for the logarithmic curve after the same intercept compensation. Figure 5 As shown, curves 501, 502, and 503 were obtained at the same temperature but different frequencies. Figure 3 The generated compensation current (including the generated traditional temperature compensation current and intercept compensation current) cannot be adaptively adjusted with the change of frequency. For example, when compensating for the current, the three curves will shift simultaneously and at equal intervals along the y-axis, and the three curves will not overlap. Therefore, the influence of frequency on the output current cannot be improved.
[0038] To address the issue that the temperature coefficient k and intercept b cannot automatically change with frequency, it is necessary to provide the compensation circuit with the frequency information of the input signal and automatically adjust the compensation current based on this information. This application employs a scheme that adds a frequency discriminator and a control module. The frequency discriminator is used to determine the frequency of the input RF signal, and the control module is used to generate corresponding control signals to control the magnitude of the compensation current.
[0039] Figure 6 This application presents an embodiment of a logarithmic detector based on a frequency-compensated logarithmic curve. The logarithmic detector includes a logarithmic amplifier 601, a frequency discriminator 602, a control module 603, a temperature compensation circuit 604, and an intercept compensation circuit 605. The structure of the logarithmic amplifier 601 can be referenced from... Figure 2 The structure of the logarithmic amplifier 200 shown will not be described in detail here.
[0040] The logarithmic amplifier 601 receives the input of the radio frequency signal RFin, performs a logarithmic transformation on RFin, and outputs a first current at its output terminal. Figure 6 The first current is Iout. The input of frequency discriminator 602 can be connected to the input of logarithmic amplifier 601, or to the input or output of any limiting amplifier stage in logarithmic amplifier 601. The frequencies at these locations are the same as the frequency of the radio frequency signal RFin, thus reflecting the frequency of the radio frequency signal RFin. Frequency discriminator 602 collects the frequencies at these locations to determine the first frequency information based on the radio frequency signal RFin. The first frequency information indicates the first frequency of the radio frequency signal RFin. f 1, wherein the first frequency information may include the first frequency. f 1, or used to calculate the first frequency. fThe parameters are as follows: Frequency discriminator 602 is used to detect the frequency of the radio frequency (RF) signal RFin. Specifically, the RF signal in power form is input to a logarithmic detector, then converted into an RF voltage signal by a logarithmic amplifier, and finally output as an RF voltage RFout. Frequency discriminator 602 can determine the first frequency of the input RF signal RFin based on the RF signal input or output of any stage in the logarithmic amplifier. f 1. It is understandable that, since the logarithmic detector converts changes in the power or amplitude of the RF signal RFin into changes in the output voltage or current, it does not affect the frequency of the RF signal RFin. Therefore, the first frequency of the RF signal RFin at the input of the logarithmic detector is... f The frequencies of the output voltage RFout and output current Iout at the output terminals are equal. The first frequency of the input RF signal RFI can be determined based on the RF signal at the input or output of any stage in the logarithmic amplifier. f 1.
[0041] The control module 603 generates a first control signal and a second control signal based on the first frequency information. The first frequency information corresponds to the first and second control signals; different first frequency information results in different first and second control signals. The first and second control signals change with the first frequency information to compensate for the impact of the first frequency information on the frequency variation of the radio frequency signal RFin. Specifically, the first control signal compensates for the temperature coefficient change caused by the second current changing with frequency, and the second control signal compensates for the intercept change caused by the logarithmic curve changing with frequency. The first and second control signals can be multi-bit digital control codes in binary form for convenient compensation. Specifically, when the first frequency information determined by the frequency discriminator only includes parameters used to determine the first frequency, these parameters can be processed in the control module 603 to obtain the first frequency. f 1; When the first frequency information includes the first frequency f At time 1, the control module 603 can directly obtain the first frequency. f 1.
[0042] The temperature compensation circuit 604 is used to output a corresponding second current based on the first control signal. The output terminal of the temperature compensation circuit 604 is connected to the output terminal of the logarithmic amplifier 601. The second current is used to compensate for the first current at different frequencies. The second current can reflect temperature changes and can reflect temperature changes with the first frequency. There is a corresponding relationship between the first control signal and the magnitude of the second current; when the first control signal is different, the magnitude of the second current is different.
[0043] The intercept compensation circuit 605 is used to output the magnitude of a corresponding third current based on the second control signal. The output terminal of the intercept compensation circuit 605 is connected to the output terminal of the logarithmic amplifier 601. The third current is used to compensate for the first current at different frequencies. There is a corresponding relationship between the second control signal and the magnitude of the third current; when the second control signal is different, the magnitude of the third current is different.
[0044] Since the temperature and the first frequency change in real time, the compensation process is also performed in real time. Therefore, the acquisition of the first frequency and the generation of the control signal are also performed in real time according to the frequency of the radio frequency signal. By applying the above circuit, the frequency discriminator can automatically detect the first frequency of the radio frequency signal at a certain frequency. Based on this first frequency, the control module automatically determines the first control signal and the second control signal. The first control signal is used to control the temperature coefficient of the second current at different first frequencies to compensate for the influence of different frequencies on the temperature coefficient of the second current. The temperature compensation circuit is also used to generate a second current that changes with temperature to compensate for the change in the first current caused by temperature, thereby compensating for the change in the intercept of the logarithmic curve caused by temperature. Through the dual compensation of the temperature compensation circuit, the change in the intercept of the logarithmic curve caused by temperature and frequency changes can be compensated. The second control signal is used to control the magnitude of the third current, which is used to compensate for the first current at different first frequencies to compensate for the change in the intercept of the logarithmic curve caused by frequency changes; thereby realizing the automatic and flexible adjustment of the intercept of the logarithmic curve.
[0045] The entire process can automatically achieve frequency and temperature compensation at a certain operating frequency without manual adjustment, realizing optimal temperature compensation and intercept compensation over a wide bandwidth, and with low circuit complexity.
[0046] The above describes the basic structure of the logarithmic detector proposed in this application. The following refers to... Figures 6-11 This section will provide a detailed explanation of each component in the logarithmic detector.
[0047] First refer to Figure 7 One embodiment of the frequency discriminator 602 will be described below. 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, the frequency of which is the reference frequency. f2. As a basis for comparison, that is, the reference signal serves as the reference signal for the radio frequency (RF) signal. By comparing the frequency of the RF signal with that of the reference signal, the frequency of the RF signal can be obtained. The reference signal can be a pulse signal. A first counter 702 is used to count the pulses of the RF signal to obtain a first count C1. The first counter 702 can convert the RF signal into a pulse signal, perform shaping processing, and then count the pulses. A second counter 703 is used to count the pulses of the reference signal to obtain a second count C2. In this embodiment, the calculation unit 704 is used to calculate the frequency based on the ratio of the first count C1 to the second count C2 and the reference frequency. f 2. To calculate the first frequency f 1. Since the frequency is linearly proportional to the number of pulses in a certain time, the ratio of the number of pulses of the radio frequency signal to that of the reference signal in a certain time is equivalent to the ratio of the frequency of the radio frequency signal to that of the reference signal.
[0048] Therefore, within a certain counting time, the ratio of the frequency of the radio frequency signal to the frequency of the reference signal to the count is shown in the following formula (1):
[0049]
[0050] By transforming the above formula, the first frequency can be obtained using formula (2). f 1:
[0051]
[0052] In this scheme, the calculation unit 704 in the frequency discriminator 602 is used to calculate the first frequency. f 1. Therefore, the first frequency information is the first frequency. f 1. The computing unit 704 can calculate the first frequency. f 1. Send to the control module.
[0053] Reference frequency f 2. The first count C1 and the second count C2 are the parameters used to determine the first frequency in the first frequency information. However, in other embodiments, the frequency discriminator 602 may not include the calculation unit 704. The calculation unit 704 may be located within the control module, and the first frequency may be calculated by the control module. f 1. For example, the frequency discriminator 602 can send the first count C1 and the second count C2 to the control module, and the control module can then determine the appropriate count based on a pre-known reference frequency. f 2. Obtain the first count C1 and the second count C2, and obtain the first frequency according to formula (2). f1. At this time, the first frequency information consists of a first count C1 and a second count C2, where the first count C1 and the second count C2 are parameters used to determine the first frequency. In other embodiments, the calculation unit 704 may be a standalone module or integrated with other modules.
[0054] Furthermore, the frequency discriminator 602 may also include a clear signal input terminal 705 connected to the first counter 702 and the second counter 703, used to clear the counts of the first counter 702 and the second counter 703. This clear signal input terminal 705 can be controlled by the control module 603. When the control module 603 outputs a clear signal CLR, the counting data of the first counter 702 and the second counter 703 will be cleared to indicate the counting start point. This eliminates the need to determine the counting start point of the current cycle, and the counter count values are the required first and second counts, saving computational resources.
[0055] It is worth noting that, because the amplitude of the radio frequency signal input to the counter needs to be large enough for the counter to count accurately, therefore, if Figure 6 As shown, the frequency discriminator 602 can be located at the RF voltage output terminal of the logarithmic amplifier 601, where the RF signal output from the RF voltage output terminal of the logarithmic amplifier 601 has a relatively large amplitude. Optionally, a gain amplifier 608 can be inserted between the logarithmic amplifier and the frequency discriminator to amplify the amplitude of the RF signal sufficiently to drive the frequency discriminator 602, thereby preventing the frequency discriminator 602 from malfunctioning.
[0056] In other embodiments, the frequency discriminator may also include an analog-to-digital converter (ADC) and a calculation unit. The ADC converts the input radio frequency (RF) signal from analog to digital, transforming the analog RF signal into a digital signal. The calculation unit can calculate the first frequency of the RF signal in the digital domain using mathematical calculations such as Fourier transform. In another implementation, the frequency discriminator may include an ADC but not a calculation unit; the Fourier transform and other mathematical calculations can be performed by the control module 603. The Fourier transform can be performed using the following formula:
[0057]
[0058] Where F(m) is the first frequency, m is the harmonic index, n is the current operation point, and M represents the number of n.
[0059] It is understood that the frequency discriminator described above is only an example, and other methods can also be used to detect frequencies.
[0060] The control module 603 in this embodiment will now be described.
[0061] In one embodiment, the control module 603 may be a logic circuit including a lookup table 609. The control module 603 determines a first control signal and a second control signal based on the first frequency information received from the frequency discriminator 602. This circuit logic can be implemented using pure digital circuitry, for example, behavioral-level code typically written using the hardware description language Verilog HDL, to be synthesized and built. The lookup table 609 stores frequency correspondences, indicating the first control signal and the second control signal at different first frequencies; that is, different first frequencies can correspond to different first control signals and second control signals. The control module can determine the first control signal and the second control signal based on the first frequency. f 1. The correspondence between frequency and control signal determines the first control signal and the second control signal. When the first frequency... f When the frequency changes, the first control signal and the second control signal change accordingly to compensate for the change in the intercept of the logarithmic curve caused by the frequency change. For example, when the frequency discriminator detects the first frequency... f When the frequency is 350kHz, the first control signal can be V11 (e.g., 11001001), and the second control signal can be V21 (e.g., 1001101); when the first frequency... f When the frequency is 700kHz, the first control signal can be V12 (e.g., 01111001), and the second control signal can be V22 (e.g., 0111100). Furthermore, the frequency correspondence can also be the first frequency... f The correspondence between the frequency range of 1 (the frequency range can be customized according to accuracy requirements during circuit design) and the first and second control signals, for example, when the first frequency... f 1. In the frequency range of 340kHz to 350kHz, the first control signal can be V11 (e.g., 11001001), and the second control signal can be V21 (e.g., 1001101); when the first frequency... f 1. Within the frequency range of 690kHz to 710kHz, the first control signal can be V12 (e.g., 01111001), and the second control signal can be V22 (e.g., 0111100). It is understood that the above examples are only illustrative of the frequency correspondence and do not represent actual values. For example, the number of bits in the control signal is related to the actual structure of the compensation circuit, and the first frequency... f The relationship between the magnitude of 1 and the value of the control signal also needs to be determined based on the actual circuit.
[0062] Before the logarithmic detector leaves the factory, different first control signals are input to the temperature compensation circuit and different second control signals are input to the intercept compensation circuit for a specific first frequency and a specific real-time temperature. The logarithmic curve of the logarithmic amplifier is tested under different first and second control signals. When the input first and second control signals cause the logarithmic curve to be the target logarithmic curve, these first and second control signals are considered the target first and target second control signals for the specific first frequency and real-time temperature. This process is repeated sequentially to find the target first and target second control signals for all first frequencies and all real-time temperatures, thereby obtaining the frequency correspondence and storing it in a lookup table.
[0063] It is understood that the control module 603 generating the corresponding control signal based on a lookup table is only one embodiment. In other embodiments, the frequency correspondence can also be fitted into a frequency function relationship, which is a function that calculates the first control signal and the second control signal based on the first frequency. Thus, when the first frequency is obtained, the control module 603 will substitute the first frequency into the frequency function relationship to calculate the corresponding first control signal and the second control signal.
[0064] The control module 603 is configured to perform the following operation to compensate for the first current:
[0065] Obtain the first frequency information to get the first frequency;
[0066] Based on the first frequency, search for the first control signal and the second control signal in the lookup table;
[0067] The first control signal and the second control signal are transmitted to the temperature compensation circuit and the intercept compensation circuit, respectively.
[0068] refer to Figure 8 Flowchart, and combined Figure 6 , Figure 7 The following describes the workflow of the control module 603. In this embodiment, the control module 603 includes a reference frequency source 701, a first counter 702, and a second counter 703, but does not include a calculation unit 704.
[0069] In step 801, the control module 603 sends a reset signal CLR to the frequency discriminator 602 at a second frequency to begin a new round of compensation control. In other examples, instead of resetting, the count before the new round of control time point may be subtracted during the calculation process.
[0070] In step 802, after the first counter 702 and the second counter 703 have counted for a period of time, the control module 603 receives the first count C1 and the second count C2. An appropriate waiting time is required in this step to simultaneously satisfy both the appropriate response speed and the accuracy of the calculation results.
[0071] In step 803, based on the reference frequency stored in the control module 603 f 2. Information, first count C1 and second count C2, can be used to calculate the first frequency of the currently input radio frequency signal according to the aforementioned formula (2). f 1.
[0072] In this scheme, the first frequency information is obtained at the second frequency through steps 801-803, thus obtaining the first frequency.
[0073] In step 804, the control module 603 finds the first frequency from the lookup table 609. f The first and second control signals (e.g., control codes) corresponding to the frequency range of 1.
[0074] In step 805, the first control signal and the second control signal are output to the temperature compensation circuit 604 and the intercept compensation circuit 605, respectively, to adjust the temperature compensation current and the intercept compensation current. It can be understood that the frequency range is determined based on the required compensation accuracy; the higher the required compensation accuracy, the smaller the defined frequency range.
[0075] It is understood that steps 802 and 803 correspond to the implementation of the first frequency information determined by the frequency discriminator, which includes parameters (first count C1 and second count C2) used to determine the first frequency. Therefore, the control module needs to receive these parameters and calculate the first frequency based on them. f 1. For example, the first frequency information is the first frequency. f In embodiment 1, the control module can directly receive the first frequency from the frequency discriminator. f 1. In other words, steps 802 and 803 can be combined into one step.
[0076] Finally, after starting operation, the control module 603 will cycle through the above operations at a certain frequency until the chip is enabled / disabled or powered off. Furthermore, the actual circuit implementation can also be designed in a pipelined manner.
[0077] The temperature compensation circuit and the intercept compensation circuit will be explained separately next.
[0078] like Figure 6As shown, the temperature compensation circuit 504 includes a current generating circuit 606 and a first current regulating circuit 607. The current generating circuit 606 generates a second current that varies with temperature, and the second current has a temperature coefficient. The first current regulating circuit 607 adjusts the magnitude of the second current based on a first control signal. This temperature compensation circuit 504 can adjust the temperature-varying second current based on a first frequency, thereby causing the temperature coefficient of the second current to change with the first frequency, thus altering the intercept of the logarithmic curve.
[0079] In some embodiments, the current generating circuit 606 includes a first transistor with a temperature coefficient, wherein the first transistor is used to generate a second current that varies with temperature. The first transistor can be any transistor with a temperature coefficient, and a transistor with a corresponding temperature coefficient can be selected based on different temperature compensation requirements. For example, the first transistor can be a BJT transistor or a MOS transistor, or the desired temperature compensation effect can be obtained by changing the direction of current injection. The current regulating circuit 607 is used to regulate the magnitude of the second current based on a first control signal. The second current is used to compensate for the first current at the same frequency but different temperatures. The first control signal and the regulation of the second current magnitude are correlated; when the first control signal is different, the magnitude of the second current is different.
[0080] For details, please refer to Figure 9 The diagram shows a temperature compensation circuit structure. The temperature compensation circuit includes a first transistor Q1 and a first current regulation circuit 901, wherein the first current regulation circuit 901 includes a plurality of first resistors R1. <1> ~R1 <4> and multiple first switches M1 <1> ~M1 <4> In this embodiment, the first transistor can be an NPN bipolar junction transistor (BJT) Q1, which includes a control terminal P1 (i.e., the base of BJT Q1), a first terminal P2 (i.e., the emitter of BJT Q1), and a second terminal P3 (i.e., the collector of BJT Q1). The control terminal P1 receives a first voltage V. B1 Used to drive BJT Q1, the first terminal P2 is connected to the first current regulation circuit 901 via a current limiting resistor R1, and the second terminal P3 is used to output the second current I. O2 (i.e., temperature-compensated current). It is understood that the first transistor can be any suitable transistor with a temperature coefficient, preferably a BJT with stable and predictable temperature characteristics. Furthermore, multiple first switches are implemented through multiple MOSFETs and connected to multiple first resistors R1. <1> ~R1 <4> Each of these components is connected in parallel to control the on / off state of the first switch at the corresponding position via a first control signal, thereby controlling whether the corresponding first resistor is short-circuited. This allows adjustment of the equivalent resistance in the first current adjustment circuit 901 to adjust the resistance value of the branch connected to the second terminal P3 of the first transistor Q1, thus regulating the second current I. O2The size. Alternatively, CMOS transmission gates and other devices can be used to replace MOSFETs to achieve switching functions. The first voltage V at the base (i.e., control terminal P1) of the NPN type BJT. B1 The voltage is constant with zero temperature coefficient, and the voltage difference V between the base and emitter (i.e., the first terminal P2) is... BE Since it is a negative temperature coefficient voltage, the two are subtracted (i.e., V). B1 -V BE The positive temperature coefficient voltage can then be obtained. By controlling whether the corresponding first resistor is short-circuited, the positive temperature coefficient voltage can be converted into a positive temperature coefficient current I of the corresponding magnitude. O2 Upon receiving the multi-bit first control signal transmitted by the control module 603, the corresponding MOSFET M1 is controlled. <1> ~M1 <4> The switching on and off of the MOSFET can be controlled by, for example, when the digital signal bit corresponding to the control signal of the MOSFET is at logic high level 1, the MOSFET is turned on, thus short-circuiting the resistor corresponding to the MOSFET, thereby adjusting the second current I. O2 The magnitude of the second current I. O2 It can be derived from the following formula (3):
[0081]
[0082] Where R1' is the resistance R1 <1> ~R1 <4> The resistor that is not short-circuited by the MOSFET.
[0083] Alternatively, in another embodiment, each first switch and each first resistor can be connected in series to form a group, and then all groups can be connected in parallel, that is, R1 can be connected in parallel to each other. <1> With M1 <1> Connected in series as group 1 and R1 <2> With M1 <2> Connected in series as group 2, R1 <3> With M1 <3> Connected in series as group 3, R1 <4> With M1 <4> After being connected in series to form group 4, groups 1 to 4 are then 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.
[0084] Figure 10 This is a schematic diagram of another embodiment of a temperature compensation circuit. The temperature compensation circuit includes a first transistor Q1 and a first current regulation circuit 1001. The first transistor can be any suitable transistor with a temperature coefficient. The first current regulation circuit 1001 includes a first current mirror structure 10011 and a plurality of second transistors 10012. In this embodiment, a first voltage V is input to the control terminal of the first transistor. B1 The first terminal is grounded via grounding resistor R2, and the fourth current I is output at the second terminal. o4The first current mirror structure 10011 of the current regulation circuit 1001 includes a first input transistor M1 and a first output transistor M2. The first input transistor M1 is connected to either the first or second terminal of the first transistor Q1. The first output transistor M2 is used to regulate the fourth current I. o4 Perform a mirror copy to output a second current; wherein, the fourth current I o4 This represents the current at the second terminal of the first transistor Q1. Figure 10 In the illustrated embodiment, the first input transistor, i.e., MOS transistor M1, is connected to the second terminal of the first transistor to receive the fourth current output by the first transistor; and the first output transistor, i.e., MOS transistor M2, is used to output the second current; the first control signal can control the on or off of multiple second transistors M3~MN to adjust the equivalent size of the first output transistor, thereby adjusting the magnitude of the second current. Figure 10 In the illustrated embodiment, the second transistor is a plurality of MOSFETs M3~MN cascaded on the side of the first output transistor. Each of the MOSFETs M3~MN has a single-pole double-throw (SPD) switch at its gate. One side of the switch is connected to the gate of MOSFET M2, and the other side is connected to the power supply voltage VDD. A first control signal is used to control the on / off position of the SPD switches. For example, in an exemplary control logic, when the corresponding digital signal bit (not shown) of the first control signal is high, the SPD switch of the MOSFET corresponding to that bit is connected to the gate of MOSFET M2, making the MOSFET parallel to MOSFET M2, effectively increasing the width-to-length ratio of M2, thereby increasing the multiple of the copied fourth current, i.e., increasing the output second current. When the digital signal bit is low, the SPD switch of the MOSFET corresponding to that bit is connected to the power supply voltage VDD, the MOSFET is turned off, effectively decreasing the width-to-length ratio of M2, thereby decreasing the multiple of the copied fourth current, i.e., decreasing the output second current. Therefore, by controlling whether M3~MN are connected to the compensation circuit via the control code, the second current I can be controlled. O2 Size.
[0085] Furthermore, based on different accuracy requirements, for Figure 9 The temperature compensation circuit shown can use different numbers of resistors, resistor values, and corresponding control codes. Figure 10 The temperature compensation circuit shown can employ different numbers of cascaded MOSFETs and corresponding bit control codes to control the accuracy of adjusting the compensation current. Furthermore, it is understood that... Figure 9 and Figure 10In the temperature compensation circuit examples shown, the on / off state of electronic devices is controlled by a first control signal in the form of a multi-bit digital signal, thereby controlling the magnitude of the analog current. However, this circuit is only an example and not a limitation. Any circuit that can achieve temperature compensation can be applied.
[0086] The implementation method of the intercept compensation circuit will be described next. Figure 11 This is a schematic diagram of one implementation of the intercept compensation circuit. In this scheme, the intercept compensation circuit includes a first current source circuit 1101 and a second current adjustment circuit 1102, wherein the first current source circuit 1101 is based on a control voltage V. CTRL The control voltage V CTRL Converted into the corresponding third current I O3 And output; the second current regulation circuit 1102 adjusts the control voltage V based on the second control signal (e.g., control code). CTRL The size. In Figure 11 In the illustrated embodiment, the second current regulation circuit 1102 is a digital-to-analog converter (DAC). The DAC receives a second control signal (control code), performs digital-to-analog conversion according to the second control signal, and outputs a control voltage V corresponding to the second control signal. CTRL The current source circuit 1101 receives the control voltage, converts the control voltage into current, and outputs a third current I corresponding to the control voltage. O3 .
[0087] The current source circuit 1101 may include an operational amplifier 1103 and an output transistor Q3. After the control module inputs the second control signal in digital form to the DAC, the DAC converts the second control signal, which consists of a multi-bit digital signal, into a zero-temperature-coefficient control voltage V. CTRL The output voltage V is fed to the non-inverting input of operational amplifier 1103. Output transistor Q3 also includes a control terminal, a first terminal, and a second terminal. The control terminal of output transistor Q3 receives the voltage output from operational amplifier 1103. The first terminal is grounded via grounding resistor R3, and the inverting input of the operational amplifier is connected to the first terminal of the output transistor to utilize the clamping function of the amplifier to control the voltage V. CTRL Simultaneously applied above resistor R3, the third current I output from the second terminal of the output transistor can be obtained by the following formula. O3 :
[0088]
[0089] Furthermore, the NPN BJT in this circuit can be replaced with an NMOS. This circuit has a simple structure, and because the second control signal varies with the input frequency, dynamic adjustment of the intercept compensation current is achieved at different frequencies. In other embodiments, the current source circuit 1101 may also include an output transistor Q3 instead of the operational amplifier 1103, and the control voltage V... CTRL The output is directly connected to the control terminal of the output transistor Q3. The first terminal is grounded through the grounding resistor R3, and the second terminal outputs the third current I. O3 Among them, the third current Io3 has a zero temperature coefficient.
[0090] Figure 12 This is another implementation of the intercept compensation circuit. In this embodiment, the intercept compensation circuit includes a second current source circuit 1201 and a third current adjustment circuit, wherein the third current adjustment circuit includes a second current mirror structure 1202 and a plurality of third transistors 1203. The current source circuit 1201 receives a second voltage V. B2 The second voltage V B2 Converted into current, output and second voltage V B2 The corresponding fifth current Io5. The current source circuit 1201 includes an operational amplifier 1204 and an output transistor Q3. The non-inverting input of the operational amplifier 1204 receives the second voltage V. B2 The inverting input terminal is connected to the first terminal of the output transistor Q3, which is grounded via a grounding resistor R4. The first terminal of the output transistor Q3 outputs a fifth current Io5 to the second current mirror structure. The second current mirror structure 1202 includes a second input transistor N1 and a second output transistor N2. The second input unit N1 of the second current mirror structure 1202 receives the fifth current Io5; the second output transistor N2 is used to mirror the fifth current Io5 to output a third current Io3. Multiple third transistors 1203 are used to adjust the magnitude of the third current Io3. The third current Io3 has a zero temperature coefficient.
[0091] exist Figure 12 In the example shown, the second input transistor of the second current mirror 1202 is a MOSFET N1, which is connected to the second terminal of the output transistor Q3 to receive the fifth current Io5 output by the output transistor Q3; and the second output transistor is a MOSFET N2, which outputs the third current Io3. Multiple third transistors 1203 are turned on or off based on a second control signal to adjust the equivalent size of the second output transistor, thereby adjusting the magnitude of the third current. Figure 12In the example shown, the multiple third transistors are multiple MOSFETs N3~NN cascaded on the side of the second output transistor. Each of the MOSFETs N3~NN has a single-pole double-throw (SPD) switch at its gate. One side of the switch is connected to the gate of MOSFET N2, and the other side is connected to the power supply voltage VDD. A second control signal controls the on / off position of the SPD switches. For example, in an exemplary control logic, when the corresponding digital signal bit (not shown) of the second control signal is high, the SPD switch of the corresponding MOSFET is connected to the gate of N2, making the MOSFET parallel to N2. This effectively increases the width-to-length ratio of N2, thereby increasing the copy factor of the fifth current, i.e., increasing the output current. When the digital signal bit is low, the SPD switch of the corresponding MOSFET is connected to the power supply voltage VDD, the MOSFET is turned off, effectively decreasing the width-to-length ratio of N2, thereby decreasing the copy factor of the fifth current, i.e., decreasing the output current. Therefore, by controlling whether N3~NN are connected to the compensation circuit via the control code, the magnitude of the third current Io3 can be controlled.
[0092] Figure 11 The circuit shown controls the intercept compensation current by directly converting the digital signal corresponding to the control code into an analog signal. Figure 12 The circuit shown controls the on / off state of electronic components via control codes, thereby controlling the magnitude of the generated analog current. This circuit is merely an example and not a limitation; any current source circuit capable of generating a zero-temperature-coefficient current based on a digital signal can be used.
[0093] Those skilled in the art will understand that although the above embodiments include various different implementations, these implementations are all non-limiting. This application creatively introduces frequency consideration into the compensation circuit and employs a frequency discriminator and control module 603 to measure and consider the frequency in real time, thereby generating an appropriate compensation current so that the logarithmic amplifier can still output a stable current when input radio frequency signals of different frequencies. Therefore, the implementation of each circuit and module is not limited to that described in the specification, and the current direction of the compensation current is not a key point of this application; the current direction can be changed, for example, by adding a simple current mirror.
[0094] The specific embodiments described above illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Although the description of this application is presented in conjunction with preferred embodiments, this does not mean that the features of this invention are limited to these embodiments. Furthermore, to avoid confusion or obscuring the focus of this application, some specific details will be omitted in the description. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0095] Furthermore, the various operations will be described as multiple discrete operations in a manner most conducive to understanding the illustrative embodiments; however, the order of description should not be construed as implying that these operations must depend on the order. In particular, these operations do not need to be performed in the order presented.
[0096] Unless the context otherwise specifies, the terms “contains,” “has,” and “includes” are synonyms. The phrase “A / B” means “A or B.” The phrase “A and / or B” means “(A and B) or (A or B).”
[0097] As used herein, the terms “module” or “unit” may refer to, be, or include: application-specific integrated circuits (ASICs), electronic circuits, (shared, dedicated, or group) processors and / or memories that execute one or more software or firmware programs, combinational logic circuits, and / or other suitable components that provide the described functionality.
[0098] In the accompanying drawings, certain structural or methodological 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 necessary. In some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.
[0099] It should be understood that although terms such as "first," "second," etc., may be used herein to describe various units or data, these units or data should not be limited by these terms. These terms are used merely to distinguish one feature from another. For example, without departing from the scope of the exemplary embodiments, a first feature may be referred to as a second feature, and similarly, a second feature may be referred to as a first feature.
[0100] It should be noted that in this specification, similar reference numerals and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0101] Although the invention has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.
Claims
1. A logarithmic detector based on dynamic input frequency compensation, characterized in that, include: A logarithmic amplifier for receiving radio frequency signals, wherein the output terminal of the logarithmic amplifier outputs a first current; A frequency discriminator is used to automatically determine and output first frequency information based on the radio frequency signal, wherein the first frequency information indicates a first frequency of the radio frequency signal; The control module stores the correspondence between the first frequency information and the first control signal and the second control signal, receives the first frequency information, and automatically generates the first control signal and the second control signal of the target based on the first frequency information and the correspondence; wherein, the first control signal is used to control the temperature coefficient of the second current at different first frequencies, and the second current is used to compensate for the first current at different temperatures and the intercept at different first frequencies; the second control signal is used to control the magnitude of the third current, and the third current is used to compensate for the first current at different first frequencies; A temperature compensation circuit includes a current generating circuit and a first current regulating circuit. The current generating circuit has a first transistor with a temperature coefficient, and generates a second current that varies with temperature based on the temperature characteristics of the first transistor. The first current regulating circuit is connected to the first transistor, receives a first control signal, and, based on the first control signal, changes the temperature coefficient of the second current and its intercept at different first frequencies. The output terminal of the temperature compensation circuit is connected to the output terminal of the logarithmic amplifier. A zero-temperature-coefficient intercept compensation circuit receives the second control signal and outputs the corresponding third current based on the second control signal. The output terminal of the intercept compensation circuit is connected to the output terminal of the logarithmic amplifier, and the third current is a zero-temperature-coefficient current.
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 parameters for calculating the first frequency.
3. The logarithmic detector according to claim 1, characterized in that, The frequency discriminator includes: A reference frequency source is used to output a reference signal, the frequency of which is a reference frequency. A first counter is used to count the 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 the 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 also includes a clear input terminal, used to clear the first counter and the second counter based on the clear signal.
6. The logarithmic detector according to claim 1, characterized in that, The frequency discriminator includes: An analog-to-digital converter converts the radio frequency signal into a digital signal. The calculation unit performs a 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 that stores frequency correspondences. The control module determines the first control signal and the second control signal based on the first frequency and the frequency correspondences. The frequency correspondence indicates the first control signal and the second control signal at different first frequencies.
8. The logarithmic detector according to claim 7, characterized in that, The control module is also configured to perform the following operations: Obtain the first frequency information to obtain the first frequency; Based on the first frequency, the first control signal and the second control signal are searched in the lookup table; The first control signal and the second control signal are respectively transmitted to the temperature compensation circuit and the intercept compensation circuit.
9. The logarithmic detector according to claim 8, characterized in that, The frequency at which the control module obtains the first frequency information is the second frequency.
10. The logarithmic detector according to claim 9, characterized in that, The frequency at which the control module sends a reset signal to the frequency discriminator is the second frequency.
11. The logarithmic detector according to claim 1, characterized in that, The temperature compensation circuit includes: The first transistor includes: a control terminal, a first terminal, and a second terminal, wherein the control terminal receives a first voltage, and the second terminal is used to output the second current; The first current regulating circuit is connected to the first terminal of the first transistor. The first current regulating circuit receives the first control signal and adjusts the resistance value connected to the first terminal of the first transistor.
12. The logarithmic detector according to claim 11, characterized in that, The first current regulation circuit includes: multiple first resistors and multiple first switches. The magnitude of the second current is adjusted by adjusting the resistance value of the branch connected to the second terminal of the first transistor, wherein: Multiple first resistors are connected in series between the first terminal of the first transistor and ground. The first switch, based on the first control signal, short-circuits one or more of the first resistors; or... After multiple first resistors are connected in parallel, they are connected in series between the first terminal of the first transistor and ground. The first switch disconnects one or more of the first resistors based on the first control signal.
13. The logarithmic detector according to claim 1, characterized in that, The temperature compensation circuit includes: The first transistor includes: a control terminal, a first terminal, and a second terminal, wherein the control terminal receives a first voltage, and the first terminal is grounded via a grounding resistor; The first current regulating circuit is connected to the second terminal of the first transistor. The first current regulating circuit receives the first control signal and outputs the second current.
14. The logarithmic detector according to claim 13, characterized in that, The first current regulation circuit includes: A first current mirror structure includes a first input transistor and a first output transistor. The first input transistor is connected to a first terminal or a second terminal of the first transistor. The first output transistor is used to mirror a fourth current to output the second current. The fourth current is the current at the second terminal of the first transistor. Multiple second transistors are turned on or off based on the first control signal to adjust the equivalent size of the first output transistor and output the second current.
15. The logarithmic detector according to claim 1, characterized in that, The intercept compensation circuit includes: The first current source circuit, based on the control voltage, converts the control voltage into the corresponding third current and outputs it; The second current regulation circuit adjusts the magnitude of the control voltage based on the second control signal.
16. The logarithmic detector according to claim 15, characterized in that, The second current regulation circuit includes a digital-to-analog converter, receives the second control signal, performs digital-to-analog conversion according to the second control signal, and outputs the control voltage corresponding to the second control signal.
17. The logarithmic detector according to claim 1, characterized in that, The intercept compensation circuit includes: The second current source circuit receives the second voltage, converts the second voltage into current, and outputs a fifth current corresponding to the second voltage. The third current regulation circuit regulates the fifth current and outputs the third current; the third current regulation circuit adjusts the magnitude of the third current based on the second control signal.
18. The logarithmic detector according to claim 17, characterized in that, The third current regulation circuit includes: The second current mirror structure includes a second input transistor and a second output transistor. The second input transistor of the second current mirror structure receives the fifth current; the second output transistor is used to mirror the fifth current to output the third current. Multiple third transistors are turned on or off based on the second control signal to adjust the equivalent size of the second output transistor, thereby adjusting the magnitude of the third current.
19. The logarithmic detector according to claim 1, characterized in that, The input terminal of the frequency discriminator is connected to the radio frequency output terminal of the logarithmic amplifier, and the frequency discriminator determines the frequency based on the radio frequency signal amplified by the logarithmic amplifier.
20. The logarithmic detector according to claim 19, characterized in that, It also includes a gain amplifier connected between the frequency discriminator and the logarithmic amplifier.
Citation Information
Patent Citations
Radio frequency power amplifier circuit
CN106992757A
Logarithmic detector calibration circuit, logarithmic detector calibration method and logarithmic detector
CN115015824A