Square circuit, control method of square circuit, and control module
By introducing a temperature sensor and current adjustment module into the square circuit, the compensation current is generated based on the temperature search target control signal, which solves the process mismatch problem between the square unit and the mirror square unit, and improves the accuracy and dynamic range of signal detection.
Patent Information
- Application Number
- CN202510450743.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-10
AI Technical Summary
平方单元和镜像平方单元之间的工艺失配导致输出信号不准确,且失配随温度变化,影响动态范围和信号检测精度。
The current temperature is detected by a temperature sensor, combined with the corresponding relationship between the storage module and the target control signal, the current adjustment module generates a compensation current to compensate for the mismatch between the square unit and the mirror square unit, and eliminate signal differences.
Effectively eliminate or partially eliminate the mismatch problem between squared cells and mirrored squared cells, improve the accuracy and dynamic range of signal detection, and reduce calibration time.
Smart Images

Figure CN119990161B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technologies, and in particular, to a square circuit, a control method for the square circuit, and a control module. Background Art
[0002] A detector, which is usually used to measure the amplitude or power of a signal, is widely used in wireless systems. It can be simply divided into two categories: a logarithmic amplifier detector (or envelope detector) and a root mean square (RMS) detector. For an RMS detector, three operations of root, mean, and square need to be performed on the signal. Among them, since the square unit has a DC operating current / voltage itself, this part of the current / voltage needs to be subtracted. Therefore, an additional mirror square unit is used to provide the same bias for precisely subtracting the corresponding DC voltage / current. However, there may be a mismatch problem between the square unit and the mirror square unit, and the mismatch may vary with temperature, resulting in the inability to precisely subtract the corresponding DC voltage / current, and thus the output result is inaccurate. Summary of the Invention
[0003] Embodiments of the present disclosure provide a square circuit, a control method for the square circuit, and a control module.
[0004] In a first aspect, embodiments of the present disclosure provide an adjustable square circuit, including:
[0005] A square unit for squaring a received AC signal. The square unit receives a bias voltage and the AC signal, and an output end of the square unit outputs a first signal;
[0006] A mirror square unit for receiving the bias voltage. The structure of the mirror square unit is the same as that of the square unit, and an output end of the mirror square unit outputs a second signal;
[0007] A temperature sensor for detecting the current temperature;
[0008] A current adjustment module for receiving a target control signal, generating a compensation current. The magnitude of the compensation current is related to the target control signal. An output end of the current adjustment module is connected to the output end of the square unit or the mirror square unit for compensating for the difference between the first signal and the second signal; wherein, the target control signal is obtained by a control module looking up a table in a storage module based on the current temperature;
[0009] The storage module for storing the correspondence between the temperature and the target control signal.
[0010] Second aspect, embodiments of the present disclosure provide a control method for a squaring circuit, which is applied to the squaring circuit as in the first aspect. The method includes:
[0011] Obtain the current temperature;
[0012] Search in the storage module according to the current temperature to obtain a target control signal, and output the target control signal to the current adjustment module.
[0013] Third aspect, embodiments of the present disclosure provide a control module, including a processor and a memory;
[0014] The processor is configured to execute instructions stored in the memory, so that the control module executes the control method as described in the second aspect.
[0015] The beneficial effects of the present disclosure are as follows:
[0016] If there is a process mismatch between the squaring unit and the mirror squaring unit, the first signal and the second signal output by the squaring unit and the mirror squaring unit are different, and the process mismatch changes with temperature. The temperature sensor is used to detect the current temperature of the squaring circuit; the storage module is used to store the correspondence between temperature and the target control signal. The control module can determine the target control signal for compensating the mismatch according to the current temperature; the current adjustment module receives the target control signal and generates a compensation current. The compensation current can compensate for the difference between the first signal and the second signal, eliminating (or at least partially eliminating) the inaccuracy problem caused by the mismatch between the squaring unit and the mirror squaring unit, and can compensate for the change of the mismatch with temperature.
[0017] Since the storage module stores the correspondence between temperature and the target control signal, during calibration, only the corresponding target control signal needs to be searched according to the temperature, without traversing all control signals, saving calibration time. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a schematic diagram of the input and output of signal envelope detection provided by an embodiment of the present disclosure;
[0019] Figure 2 It is a schematic diagram of the architecture of the RMS detector provided by an embodiment of the present disclosure;
[0020] Figure 3 It is a schematic diagram of a circuit structure of a squaring circuit provided by an embodiment of the present disclosure;
[0021] Figure 4 It is an equivalent circuit schematic diagram of a squaring circuit provided by an embodiment of the present disclosure;
[0022] Figure 5Schematic diagram of the composition structure of the self-adjustable square circuit provided by the embodiments of the present disclosure Figure 1 ;
[0023] Figure 6 Schematic diagram of the composition structure of the self-adjustable square circuit provided by the embodiments of the present disclosure Figure 2 ;
[0024] Figure 7 Schematic diagram of the composition structure of the self-adjustable square circuit provided by the embodiments of the present disclosure Figure 3 ;
[0025] Figure 8 Schematic diagram of the composition structure of the self-adjustable square circuit provided by the embodiments of the present disclosure Figure 4 ;
[0026] Figure 9 Schematic diagram of the composition structure of the self-adjustable square circuit provided by the embodiments of the present disclosure Figure 5 ;
[0027] Figure 10 Schematic diagram of the composition structure of the self-adjustable square circuit provided by the embodiments of the present disclosure Figure 6 ;
[0028] Figure 11 Schematic diagram of the composition structure of the current adjustment module provided by the embodiments of the present disclosure Figure 1 ;
[0029] Figure 12 Schematic diagram of the composition structure of the current adjustment module provided by the embodiments of the present disclosure Figure 2 ;
[0030] Figure 13 Schematic diagram of the composition structure of the current adjustment module provided by the embodiments of the present disclosure Figure 3 ;
[0031] Figure 14 Schematic diagram of the composition structure of the self-adjustable square circuit provided by the embodiments of the present disclosure Figure 7 ;
[0032] Figure 15 Schematic diagram of the composition structure of the self-adjustable square circuit provided by the embodiments of the present disclosure Figure 8 ;
[0033] Figure 16 Schematic diagram of the composition structure of the self-adjustable square circuit provided by the embodiments of the present disclosure Figure 9 ;
[0034] Figure 17 Flow chart of obtaining the corresponding relationship and determining the target control signal provided by the embodiments of the present disclosure. Detailed implementation manners
[0035] The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. It can be understood that the specific embodiments described herein are only used to explain the relevant disclosure, rather than limiting the disclosure. Additionally, it should be noted that for the sake of description, only the parts related to the relevant disclosure are shown in the drawings.
[0036] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this disclosure belongs. The terms used herein are only for the purpose of describing the embodiments of this disclosure and are not intended to limit this disclosure.
[0037] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict.
[0038] It should be noted that the terms "first / second / third" involved in the embodiments of this disclosure are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence when permitted, so that the embodiments of this disclosure described here can be implemented in an order other than that illustrated or described here.
[0039] Detectors can be divided into envelope detectors and RMS detectors. Figure 1 The detection results of the envelope detector and the RMS detector for the same radio frequency signal are shown. As Figure 1 shown, the radio frequency signal is a high-frequency sine wave with an amplitude / phase varying with time. The envelope detection outputs the envelope of the input signal, usually its logarithmic value, that is, the output result 1 in the figure; the RMS detector outputs the root mean square value (or power value) of the input signal, that is, the output result 2 in the figure, and its output voltage does not change with the shape or peak-to-average power ratio of the signal. Among them, the peak-to-average power ratio refers to the peak-to-average power ratio (Peak to Average Power Ratio, PAPR). As Figure 1 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 power corresponding to its peak value to the power corresponding to its mean value is the peak-to-average power ratio.
[0040] For the RMS detector, its implementation usually involves performing three operations on the signal, namely Root-Mean-Square, and the output voltage or current is:
[0041] Equation (1)
[0042] Wherein, Y is the output voltage or current, X is the input voltage or current, and s is the slope.
[0043] Since the absolute value of the input signal may be small, usually in dBm units, for Equation (1), the absolute value of its output signal Y is also small. When the power of the input signal changes from -40 dBm to -20 dBm and s = 1, the voltage corresponding to the output signal Y only changes from 2.24 mV to 22.4 mV, and the absolute value and dynamic range are extremely small, which is not conducive to the subsequent stage detection. Therefore, the RMS detector usually processes the result Y into a logarithmic value before output:
[0044] Equation (2)
[0045] Wherein, Z is the actual output current or voltage of the converted detector, k is the logarithmic slope, b is the logarithmic intercept, k` is the logarithmic slope after combining the square root operation, and b` is the logarithmic intercept after combining the linear slope s. The logarithm in the equation can also be of other bases, as long as there is a logarithmic relationship.
[0046] When the function of converting to logarithm is added to the subsequent stage, the square root Root operation in the RMS can be directly moved outside the logarithm and become part of the slope, without the need to be implemented by hardware anymore. The slope s in the previous text will be added to the logarithmic intercept here to form a new logarithmic intercept, which no longer affects the slope of the output signal Z. The subsequent narration is based on this.
[0047] Since the RMS detector will perform an averaging operation on the input signal, no matter how high the frequency of the input signal is, after averaging over a certain time window, the output signal will approach DC and only change slowly with the change of the mean value of the input signal.
[0048] A common RMS detector architecture is as shown in Figure 2 in (a) or (b), including a square unit, a mirror square unit, an arithmetic module, an averaging capacitor, a logarithmic converter, and a driver. The structures of the square unit and the mirror square unit are exactly the same. The square unit receives the bias voltage DC Bias (used to drive the square unit to work) and the radio frequency input signal RF IN to form a mixed signal. The mirror square unit receives the bias voltage DC Bias or the bias voltage DC Bias + feedback voltage (Feedback, FD), and the feedback voltage Feedback can be generated by the arithmetic module or the driver. The output signals of the square unit and the mirror square unit are subtracted by the arithmetic module, then the averaging operation is realized through the averaging capacitor, the logarithmic conversion is realized through the logarithmic converter, and finally the driving is enhanced by the driver, and the detection result signal OUT is finally output, which is equivalent to Figure 1 the output of the root mean square value (or power value) in logarithmic form in. Among them, the position of the averaging capacitor can be as shown in Figure 2shown in (a) in [the text] is placed at the output of the arithmetic module, or as shown in Figure 2 in (b) in [the text], it is placed at the output of the squaring unit.
[0049] That is to say, in the Figure 2 shown RMS detector, the averaging capacitor is used to average the signal. Since the squaring unit itself has a direct current (DC) operating current / voltage, this part of the current / voltage needs to be subtracted. Therefore, an additional squaring unit (i.e., the mirror squaring unit) is used to provide the same bias for precisely subtracting the corresponding DC voltage / current. Its input can also be the feedback voltage for the square root operation. The averaging position can be adjusted as needed.
[0050] In the RMS detector, the squaring and averaging operations are usually implemented together. Figure 3 is an example of a method for implementing a squaring unit. Inside the dashed box are two identical squaring units. The squaring unit 1 includes bipolar junction transistors (BJTs, or triodes) Q11~Q14 for receiving the RF input, and the squaring unit 2 is the mirror squaring unit, including BJTs Q15~Q18 for receiving the reference voltage (or the same bias voltage as the RF branch). Its main function is to subtract the DC output voltage of the squaring unit and sometimes can also implement the square root function.
[0051] The two squaring units require a certain static DC current to operate normally. Ideally, when there is no RF input, if the bias voltages of the two squaring units are the same, their DC bias currents will also be the same, that is, the output current I11 of the squaring unit 1 and the output current I12 of the squaring unit 2 are the same. The same voltage is generated on the same resistors R11 and R12 ( Figure 3 nodes 1 and 2 in [the text]), and the subtraction output of the two is 0. When there is an RF signal input, an additional square current will be generated on the branch where the current I11 is located, averaged by the capacitors C11 and C12, and an additional averaged square voltage is generated on the basis of the DC voltage on the resistor R11. Since the DC currents are exactly the same and are completely subtracted, the differential voltage output by the two squaring units is the precise square voltage.
[0052] However, in actual circuit manufacturing, even if it can be ensured that the biases and design dimensions of the two squaring units are exactly the same, due to the mismatch of BJTs or the load resistors R11 and R12, the DC currents of the two squaring units are not exactly equal, and the DC voltages at the two differential ends cannot be precisely subtracted. If the remaining term is set as the mismatch voltage Vos, then Equation (2) can be written as the following Equation (3):
[0053] Equation (3)
[0054] Vos will enter the logarithm and be added to the mean-square term, and cannot be factored out of the logarithm. When the input power is small, its mean-square term is also small, and may even be smaller than Vos, so the useful signal will be covered by the mismatch voltage Vos and cannot be detected. If the mismatch voltage / current is high, it will significantly affect the lower limit of the input dynamic range, resulting in dynamic range loss.
[0055] The mismatch voltage / current is also at DC, and the mismatch current of the square unit implemented by devices such as BJTs (Bipolar Junction Transistors) / HBTs (Heterojunction Bipolar Transistors) may vary with temperature.
[0056] Due to the principle limitation of the square unit, the dynamic range of its output signal is strongly correlated with the dynamic range of the input signal. If an input signal in the range of 60 dBm needs to be detected, the output voltage / current will also change by 120 dB, that is, 1 million times. If the upper limit of the output dynamic range is set to 1 V, its lower limit will reach 1 μV. If no additional processing is done for the mismatch, it may reach several mV, which is much larger than the lower limit of the output voltage. If the lower limit voltage is designed to be increased above the square unit mismatch, such as increased to 10 mV, the upper limit will increase correspondingly to 10000 V, which is obviously impossible to achieve.
[0057] The mismatch voltage Vos or the mismatch current Ios is at DC, and the useful signal is also at DC or very low frequency. Therefore, the mismatch voltage / current cannot be suppressed by methods such as feedback of traditional DC offset elimination circuits (DCOC) and capacitor DC blocking, because these methods will also suppress the useful signal at the same time.
[0058] Currently, there are the following techniques for dealing with the square unit mismatch problem:
[0059] A pre - RF analog variable gain amplifier (VGA). By feeding back the output of the square unit to the control terminal of the VGA, on the one hand, it converts the logarithm through the VGA, and on the other hand, it compresses the input power range of the square unit, thereby reducing the requirement for the dynamic range of the square unit. This solution does not reduce the mismatch, but only adjusts the input range of the square unit to the linear interval of the square unit. However, due to the need to use an RF VGA, the power consumption is extremely high, and the overall linear range of the system will be limited by the RF VGA.
[0060] A chopper chops the mismatch voltage or current to high frequency through switches before and after the squaring unit. When averaging in the subsequent stage, the mismatch at high frequency is filtered out together, thus achieving automatic mismatch suppression. However, since a chopper usually uses Metal-Oxide-Semiconductor Field-Effect Transistors (MOSFETs, MOS) or BJT switches, on the one hand, the switch parasitic capacitance may cause input RF leakage, affecting the input matching. On the other hand, it may cause the driving clock of the chopper switch to feed through to the RF path, forming a background noise, which instead limits the dynamic range of the squaring unit. Moreover, the driving clock of the chopper also requires additional power consumption.
[0061] For ease of understanding, the squaring circuit is abstracted as Figure 4 , as Figure 4 shown. The input impedance of the device within the bold solid-line box in (a) of Figure 4 is equivalent to the resistor RL1 and the resistor RL2 + capacitor CM shown in (b) of Figure 4 . Among them, the two squaring units have the same bias Bias. Here, the first end of the resistor RL1, the first end of the resistor RL2, and the first end of the capacitor CM are all connected to the power supply; the second end of the resistor RL1 and the second end of the capacitor CM are both connected to the output end of the squaring unit; the second end of the resistor RL2 is connected to the output end of the mirror squaring unit. The squaring unit inputs the RF signal RF IN , and the mirror squaring unit inputs an optional feedback signal FB (for square root operation). Both have the same load, abstracted as the resistors RL1 and RL2. The squaring unit that inputs the RF signal RF IN also has a capacitive load CM for filtering, that is, for taking the average value. Due to the resistors RL1 and RL2, the current outputs of the two squaring units are converted into voltage VOUT outputs. When no RF signal is input, ideally VOUT = 0. However, due to manufacturing errors in reality, VOUT may not be zero, that is, there is a mismatch.
[0062] Based on this, the embodiments of the present disclosure provide an adjustable squaring circuit that uses a temperature sensor, a storage module, and a current adjustment module to compensate for the process mismatch between the squaring unit and the mirror squaring unit. Among them, the temperature sensor is used to detect the current temperature of the squaring circuit; the storage module is used to store the correspondence between the temperature and the target control signal. The control module can determine the target control signal for compensating the mismatch according to the current temperature; the current adjustment module receives the target control signal and generates a compensation current. The compensation current can compensate for the difference between the first signal and the second signal caused by the process mismatch, eliminate (or at least partially eliminate) the inaccuracy problem caused by the mismatch between the squaring unit and the mirror squaring unit, and can compensate for the change of the mismatch with temperature.
[0063] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0064] In one embodiment of the present disclosure, as Figure 5 (or Figure 6 or Figure 7 ) shown, the self - adjustable squaring circuit 10 (hereinafter simply referred to as the squaring circuit 10) includes a squaring unit 101, a mirror squaring unit 102, a current adjustment module 103, a control module 105 (or controller), a storage module 106, and a temperature sensor 107.
[0065] Among them, the squaring unit 101 is used to square the received AC signal. The squaring unit 101 receives a bias voltage and an AC signal, and the output end of the squaring unit 101 outputs a first signal.
[0066] The mirror squaring unit 102 is used to receive a bias voltage. The structure of the mirror squaring unit 102 is the same as that of the squaring unit 101, and the output end of the mirror squaring unit 102 outputs a second signal.
[0067] The temperature sensor 107 is used to detect the current temperature of the squaring circuit 10.
[0068] The storage module 106 is used to store the correspondence between temperature and the target control signal, and the target control signal is used to control the magnitude of the compensation current.
[0069] The control module 105 is connected to the output ends of the temperature sensor 107 and the storage module 106, obtains the current temperature, and performs a look - up table in the storage module 106 based on the current temperature to obtain the target control signal. The target control signal is used to control the degree of current compensation for the output of the squaring unit 101 and / or the mirror squaring unit 102.
[0070] The current adjustment module 103 is used to receive the target control signal, generate a compensation current, the magnitude of the compensation current is related to the target control signal, and the output end of the current adjustment module 103 is connected to the output end of the squaring unit 101 or the mirror squaring unit 102 to compensate for the difference between the first signal and the second signal.
[0071] It should be noted that, as Figure 5As shown, the signal at the output terminal of the squaring unit 101 is denoted as the first signal, and the signal at the output terminal of the mirror-image squaring unit 102 is denoted as the second signal. The squaring unit 101 and the mirror-image squaring unit 102 usually output current signals, and here, they are converted into voltage signals through equivalent input impedance. The output signal is the first signal minus the second signal. In the description of the embodiments of the present disclosure, only the first signal and the second signal are used to represent the output terminal signals of the squaring unit 101 and the mirror-image squaring unit 102. Subsequently, the voltage values and current values corresponding to the first signal and the second signal will be involved.
[0072] The mirror-image squaring unit 102 can also receive a feedback signal ( Figures 5 to 7 not shown in the figure).
[0073] It should also be noted that the squaring unit 101 and the mirror-image squaring unit 102 can have exactly the same circuit structure (which can refer to the foregoing Figure 3 , but is not limited to the foregoing Figure 3 shown structure). In the case of no RF input (i.e., no AC signal input), if there is no mismatch, the voltages corresponding to the first signal and the second signal have exactly the same voltage value (at this time, the voltage value of the output signal is 0). Due to the existence of mismatch, there will be a voltage difference between the voltages corresponding to the first signal and the second signal (i.e., the voltage value of the output signal), and the process mismatch changes with temperature. Specifically, at different temperatures, the voltage difference between the voltages corresponding to the first signal and the second signal is different. The storage module 106 pre-stores the correspondence between temperature and the target control signal, and the temperature sensor 107 is used to detect the current temperature of the squaring circuit 10; the control module 105 can determine the target control signal for compensating the mismatch according to the current temperature; the current adjustment module 103 receives the target control signal and generates a compensation current. The compensation current can compensate for the difference between the first signal and the second signal, eliminating (or at least partially eliminating) the inaccuracy problem caused by the mismatch between the squaring unit 101 and the mirror-image squaring unit 102, and the compensation current can change with the current temperature, thereby compensating for the change of the process mismatch with temperature.
[0074] Since the storage module 106 stores the correspondence between the temperature and the target control signal, during calibration, it is only necessary to obtain the current temperature and look up the corresponding target control signal according to the current temperature (which can be understood as looking up a table), which can save the calibration time. In other examples, the storage module 106 can also be independent outside the squaring circuit 10 or integrated inside the control module 105, and no specific limitation is made thereto. Among them, the storage module 106 can have various implementation manners, such as a one-time programmable memory EFUSE, an on-chip read-only memory (ROM), an off-chip ROM connected through protocols such as a serial peripheral interface (SPI), a display look-up table (LUT), and so on.
[0075] In the embodiment of the present disclosure, the squaring circuit 10 further includes a voltage acquisition module 104 for obtaining the correspondence between the temperature and the target control signal. The voltage acquisition module 104 is respectively connected to the output ends of the squaring unit 101 and the mirror squaring unit 102 for acquiring the output voltage of the output end of the squaring unit 101 and the output voltage of the output end of the mirror squaring unit 102. It is possible to detect the voltage difference between the output ends of the squaring unit 101 and the mirror squaring unit 102 without an AC signal input at multiple different temperatures in advance, and then use multiple initial control signals to respectively control the current adjustment module 103 to compensate for the mismatch, and select the initial control signal that makes the voltage difference the smallest as the target control signal. Save all the preset multiple temperatures and the corresponding target control signals. During current compensation, only look up the table according to the current temperature to obtain the target control signal that can minimize the mismatch and achieve current compensation.
[0076] It should be noted that in the embodiment of the present disclosure, the voltage acquisition module 104 and / or the control module 105 can be a part of the squaring circuit 10 or an off-chip device independent of the squaring circuit 10, and no specific limitation is made thereto. In the drawings, the voltage acquisition module 104 and the control module 105 are included inside the squaring circuit 10 as an example.
[0077] It should also be noted that in the embodiment of the present disclosure, the temperature can refer to the temperature of the circuit or the ambient temperature. The ambient temperature is usually relatively stable. Therefore, generally, it refers to the temperature of the circuit itself.
[0078] It should also be noted that as Figure 5 shown, the output end of the current adjustment module 103 is connected to the output end of the mirror squaring unit 102, that is, only current compensation is performed on the second signal; or, as Figure 6 shown, the output end of the current adjustment module 103 is connected to the output end of the squaring unit 101, that is, only current compensation is performed on the first signal; or, asFigure 7 As shown, the current adjustment module 103 includes two output terminals, which are respectively connected to the output terminals of the square unit 101 and the mirror square unit 102. The corresponding compensation currents include a first compensation current and a second compensation current, and current compensation is performed on the first signal and the second signal simultaneously. Finally, in the case of no AC signal input, the voltage values corresponding to the first signal and the second signal are basically the same (allowing a certain error range).
[0079] Next, each component module and the working process in the square circuit 10 will be described in more detail in combination with specific circuit structures respectively.
[0080] In some embodiments, as Figure 8 shown, the current adjustment module 103 includes:
[0081] A digital-to-analog converter 1031, configured to receive a control signal, perform digital-to-analog conversion on the control signal to obtain a current control signal; wherein, the control signal may be a digital signal, and the current control signal may be an analog signal. For example, the current control signal is a voltage analog signal; there is a corresponding relationship between the control signal and the current control signal, and when the control signal is different, the current control signal is different.
[0082] A first current source I1, configured to receive the current control signal and generate a compensation current based on the current control signal. Among them, there is a corresponding relationship between the compensation current and the current control signal, and when the current control signal is different, the compensation current is different.
[0083] It should be noted that the control signal is the target control signal or the initial control signal used when determining the target control signal. In the relevant descriptions and drawings (including Figures 5 - 7 ) of the embodiments of the present disclosure, it is all described as the control signal.
[0084] It should also be noted that in the embodiments of the present disclosure, sometimes the digital-to-analog converter is also written as DAC (Digital to Analog Converter). As Figure 8 shown, taking the current compensation for the output of the mirror square unit 102 as an example, the output terminal of the first current source I1 is connected to the output terminal of the mirror square unit 102 to provide the compensation current to the output terminal of the mirror square unit 102, so as to realize the current compensation for the second signal; or, if the current compensation is performed on the output of the square unit 101, the output terminal of the first current source I1 is connected to the output terminal of the square unit 101 to provide the compensation current to the output terminal of the square unit 101, so as to realize the current compensation for the first signal.
[0085] Furthermore, as Figure 9As shown, in some embodiments, the square circuit 10 may further include a third current source I3; the output terminal of the current adjustment module 103 is connected to the output terminal of the mirror square unit 102, and the output terminal of the third current source I3 is connected to the output terminal of the square unit 101;
[0086] The third current source I3 is configured to provide a fixed current to supply a fixed current to the output terminal of the square unit 101.
[0087] It should be noted that in other examples, it may also be that the first current source I1 is connected to the output terminal of the square unit 101 and the third current source I3 is connected to the output terminal of the mirror square unit 102.
[0088] It should also be noted that the third current source I3 is an optional fixed current source, and the current it provides is a fixed current (that is, the current value is fixed) and is not controlled by the control signal output by the control module 105. The magnitude of the fixed current can be the current magnitude of the first current source I1 under the default control signal (i.e., the control signal is the uncalibrated default value). That is to say, the fixed current of the third current source I3 provides a reference, enabling the compensation current to be increased or decreased based on it, thereby achieving the ability of "two-way" adjustment. For example, when there is no deviation between the currents output by the square unit 101 and the mirror square unit 102, the first current source I1 is under the default control signal, and at this time, the currents output by the first current source I1 and the third current source I3 are equal; when the current output by the square unit 101 is greater than the current output by the mirror square unit 102, the compensation current output by the first current source I1 can be increased through the control signal; when the current output by the square unit 101 is less than the current output by the mirror square unit 102, the compensation current output by the first current source I1 can be decreased through the control signal; therefore, compared with the compensation current under the default control signal, the control signal can control the increase or decrease of the compensation current magnitude to achieve two-way compensation.
[0089] In some embodiments, such as Figure 10As shown, taking the square circuit 10 including two current adjustment modules 103 as an example, the two current adjustment modules 103 are respectively a current adjustment module 103-1 connected to the output end of the square unit 101 and a current adjustment module 103-2 connected to the output end of the mirror square unit 102. Correspondingly, the correspondence relationships stored in the storage module 106 include two: the correspondence relationship between temperature and the first control signal, and the correspondence relationship between temperature and the second control signal. The control signals output by the control module 105 based on the current temperature include the first control signal and the second control signal. The current adjustment module 103-1 receives the first control signal and, under the control of the first control signal, generates a first compensation current to perform current compensation on the output of the square unit 101. The current adjustment module 103-2 receives the second control signal and, under the control of the second control signal, generates a second compensation current to perform current compensation on the output of the mirror square unit 102.
[0090] Here, both the current adjustment module 103-1 and the current adjustment module 103-2 may include a digital-to-analog converter 1031 and a first current source I1. If there is a mismatch, the magnitudes of the compensation currents generated by the two current sources are different, that is, the degrees of compensation for the two are different, thereby improving the mismatch.
[0091] It should also be noted that when the connection positions of the first current source I1 are different, the objects of action and the compensation directions of the compensation currents are different. For example, Figure 10 the mismatch in the circuit is: in the case of no AC signal input, the voltage value corresponding to the first signal is greater than the voltage value corresponding to the second signal. Then, the voltage division of the resistor RL1 is less than the voltage division of the resistor RL2, and the current flowing through the resistor RL1 is less than the current flowing through the resistor RL2. Therefore, the compensation method can be: adjusting the first current source I1 connected to the mirror square unit 102 to reduce the magnitude of the second compensation current, so as to reduce the voltage division of the resistor RL2, thereby increasing the voltage value of the second signal; or, adjusting the first current source I1 connected to the square unit 101 to increase the magnitude of the first compensation current, so as to increase the voltage division of the resistor RL1, thereby reducing the voltage value of the first signal; the ultimate goal is to make the voltage value corresponding to the first signal tend to be consistent with the voltage value corresponding to the second signal, thereby achieving compensation.
[0092] In some embodiments, such as Figure 11As shown, the first current source I1 includes an operational amplifier P1, a transistor Q1, and a resistor R1. Among them, the non-inverting input terminal (+) of the operational amplifier P1 is connected to the output terminal of the digital-to-analog converter 1031 for receiving a current control signal. The output terminal of the operational amplifier P1 is connected to the base of the transistor Q1. The emitter of the transistor Q1, the inverting input terminal (-) of the operational amplifier P1, and the first end of the resistor R1 are connected together. The second end of the resistor R1 is grounded, and the collector of the transistor Q1 outputs a control current. Here, the transistor Q1 can specifically be a BJT or an NMOS transistor, and no specific limitation is made thereto.
[0093] It should be noted that the control signal can be a multi-bit digital signal. Through the Figure 11 structure shown, the analog voltage output by the digital-to-analog converter 1031 (i.e., the current control signal) can be converted into a compensation current, and the current value of the compensation current is the ratio of the voltage value of the current control signal to the resistance value of the resistor R1.
[0094] In some embodiments, as Figure 12 shown, the current adjustment module 103 includes:
[0095] A voltage providing unit 1032 for providing a first voltage V1, and the voltage value of the first voltage V1 can be a fixed value;
[0096] A resistor adjusting unit 1033 is connected to the first voltage V1 and receives a control signal. Based on the control signal, the resistance value is changed to output a compensation current, and the compensation current changes with the control signal.
[0097] It should be noted that, as Figure 12 shown, the voltage providing unit 1032 can include an operational amplifier P2 and a transistor Q2. The resistor adjusting unit 1033 includes a plurality of resistors connected in series, and the plurality of resistors form a resistor string. In addition, a switching transistor M1 is connected in parallel at both ends of the resistors other than the resistor R1. The plurality of switching transistors M1 are connected in series, the control signal is a multi-bit digital signal, and the control terminal of each switching transistor M1 receives a one-bit control signal. Among them, the transistor Q2 can be a BJT, and the switching transistor M1 can be a MOS transistor. The non-inverting input terminal (+) of the operational amplifier P2 receives a fixed voltage VB, and the fixed voltage VB does not change with temperature and power supply. The output terminal of the operational amplifier P2 is connected to the base of the transistor Q2. The emitter of the transistor Q2 is connected to the first end of the resistor string and is connected to the inverting input terminal (-) of the operational amplifier P2, and the voltage at the connection node is the first voltage V1. The second end of the resistor string is grounded.
[0098] In Figure 12In the example where switches M1<1> to M1<4> are respectively connected in parallel across both ends of resistors R2<1> to R2<4>, when the connected switch transistor M1 is turned on, the corresponding resistor R2 is not connected to the resistor string for voltage division. Thus, by controlling the conduction of each switch transistor M1 based on a control signal, the resistance value of the resistor string can be changed to adjust the voltage division, and ultimately the magnitude of the compensation current at the collector output terminal of transistor Q2 can be adjusted. It can be understood that compared with Figure 11 , in Figure 12 , the digital-to-analog converter is combined with the circuit that generates the compensation current, and there is no longer an independent digital-to-analog converter. Among them, the compensation current = VB / (R1 + the resistor not short-circuited by the switch transistor). The BJT here can also be replaced with an NMOS transistor, and each switch transistor can be an NMOS transistor as shown in Figure 12 , or it can be a CMOS transmission gate, etc., and the control signal is correspondingly set.
[0099] For the third current source I3 (constant current source), the digital-to-analog converter 1031 in Figure 11 can be removed, and a fixed control signal can be directly input. The value of this control signal is fixed to make its output a fixed current; or the switch transistor M1 in Figure 12 can be removed, and a fixed resistor R1 can be directly designed to achieve a fixed current.
[0100] It should also be noted that the resistance adjustment unit 1033 can also be multiple resistors connected in parallel, and some or all of the resistors are connected in series with switch transistors between the first voltage V1 to achieve controllable resistance values. Or the resistance adjustment unit can also be a voltage-controlled MOS, and the resistance value is controlled based on the voltage. No specific limitation is made on this.
[0101] Here, Figure 11 and Figure 12 The circuits shown can both achieve current extraction. That is, the direction of the compensation current is from the collector of transistor Q1 / Q2 to the ground, and the collector of transistor Q1 / Q2 is connected to the output terminal of the mirror square unit 102. Therefore, it is equivalent to current extraction. In the embodiments of the present disclosure, the input terminal of a PMOS current mirror can also be connected to the collector of transistor Q1 / Q2, and the output terminal of the PMOS current mirror is connected to the output terminal of the mirror square unit 102. After the current mirroring of the PMOS current mirror, the output current flows out from the PMOS current mirror, which is equivalent to current injection. For current injection, as shown in Figure 13 , in some embodiments, the current adjustment module 103 includes:
[0102] A second current source I2, which receives a second voltage and generates a first current. Among them, the second voltage can be a fixed voltage, and the first current can be a fixed current;
[0103] The current control circuit 1034 receives a first current and outputs a compensation current; the current control circuit 1034 adjusts the magnitude of the compensation current based on a control signal.
[0104] It should be noted that, as Figure 13 shown, the second current source I2 may include an operational amplifier P3 and a transistor Q3, and may also include a resistor R3; the current control circuit 1034 includes a current mirror structure and multiple transistors. The current mirror structure includes an input transistor M21 and an output transistor M22. The input transistor M21 receives the first current, and the output transistor M22 is used to proportionally copy the first current to output a compensation current; multiple transistors M23 to M2n, the control terminals of the transistors M23 to M2n are respectively connected to a switch, and the control terminal of the switch is used to receive a control signal. The control signal can control the control terminals of the transistors M23 to M2n to be connected to the power supply VDD or the control terminal of the transistor M22, so as to turn on or off the transistors M23 to M2n, adjust the equivalent size of the output transistor M22, and adjust the magnitude of the compensation current, where n is a positive integer greater than 2.
[0105] The non-inverting input terminal (+) of the operational amplifier P3 receives a second voltage. The output terminal of the operational amplifier P3 is connected to the base of the transistor Q3. The emitter of the transistor Q3 is connected to the inverting input terminal (-) of the operational amplifier P3; the emitter of the transistor Q3 is grounded through the resistor R3; the collector of the transistor Q3 is connected to the first terminal (e.g., drain) and the control terminal (gate) of the transistor M21, and is connected to the control terminal of the transistor M22, and outputs a first current; the second terminals (e.g., sources) of the transistors M21 to M2n are all connected to the power supply VDD; the first terminals of the transistors M22 to M2n are all connected together for outputting a compensation current.
[0106] The control signal is a multi-bit signal, each bit corresponding to one of the transistors M23 to M2n respectively, and is used to control the control terminal of the corresponding transistor to selectively connect to the power supply VDD or the control terminal of the transistor M21 ( Figure 13 the control signal is not shown in the figure). For example, when the control signal of the corresponding bit is the high-level logic 1, it is connected to the power supply VDD. When the control signal of the corresponding bit is the low-level logic 0, it is connected to the control terminal of the transistor M21; or vice versa, which is not specifically limited. Among them, the transistors M21 to M2n may all be PMOS transistors, whose control terminals are gates, and one of the first terminal and the second terminal is a source and the other is a drain; the transistor Q3 may be a BJT.
[0107] In this way, by controlling the connection position of the control terminals of the transistors M23 to M2n through the control signal, the magnitude of the output compensation current is controlled, thereby improving the mismatch of the square circuit 10.
[0108] For the voltage acquisition module 104:
[0109] In some embodiments, as Figure 14 shown, the voltage acquisition module 104 includes a first analog-to-digital converter 1041 and a switch unit SW;
[0110] One end of the switch unit SW is connected to the first analog-to-digital converter 1041, and the other end is selectively connected to the output end of the square unit 101 or the output end of the mirror square unit 102;
[0111] The first analog-to-digital converter 1041 is configured to perform analog-to-digital conversion on the voltage at the output end of the square unit 101 or the mirror square unit 102, and then output the converted digital signal to the control module 105.
[0112] It should be noted that, as Figure 14 shown, the voltage acquisition module 104 can collect the voltage values corresponding to the first signal and the second signal through an analog-to-digital converter (ADC), that is, the first analog-to-digital converter 1041, also denoted as ADC1. Specifically, the switch unit SW can be a single-pole double-throw switch, which includes three ports: A, B, and C. Among them, port A is connected to the output end of the square unit 101, port B is connected to the output end of the mirror square unit 102, and port C is connected to the input end of the first analog-to-digital converter 1041.
[0113] The control module 105 can also control the connection state of the switch unit SW. When there is no need to collect the voltage difference, port C is not connected to either port A or port B; when it is necessary to collect the voltage difference, the control module 105 controls port C to be connected to one of port A and port B respectively; for example, when obtaining the correspondence between the temperature and the target control signal, the control module 105 first controls port C to be connected to port A, so that the first analog-to-digital converter 1041 collects the analog voltage of the first signal, converts it into a digital signal and sends it to the control module 105, and then the control module 105 controls port C to be connected to port B, so that the first analog-to-digital converter 1041 collects the analog voltage of the second signal, converts it into a digital signal and sends it to the control module 105, and the control module 105 calculates the difference between the two received voltage values to obtain the voltage difference. The voltage difference is used to determine whether there is a difference between the first signal and the second signal.
[0114] In some embodiments, as Figure 15 shown, the voltage acquisition module 104 includes a second analog-to-digital converter 1042 and a third analog-to-digital converter 1043;
[0115] The second analog-to-digital converter 1042 is connected to the output end of the square unit 101. After performing analog-to-digital conversion on the voltage at the output end of the square unit 101, it outputs to the control module 105;
[0116] The third analog-to-digital converter 1043 is connected to the output end of the mirror square unit 102. After performing analog-to-digital conversion on the voltage at the output end of the mirror square unit 102, it outputs to the control module 105.
[0117] It should be noted that in the embodiments of the present disclosure, the switch unit SW may not be provided, but two analog-to-digital converters are used to respectively collect the voltage values corresponding to the first signal and the second signal. For example, when obtaining the correspondence between the temperature and the target control signal, as Figure 15 shown, the second analog-to-digital converter 1042 (which can also be denoted as ADC2) collects the voltage value of the first signal and sends it to the control module 105, and the third analog-to-digital converter 1043 (which can also be denoted as ADC3) collects the voltage value of the second signal and sends it to the control module 105. The control module 105 calculates the difference between the two received voltage values to obtain the voltage difference.
[0118] Combined with the foregoing drawings and related descriptions, it can be seen that in the embodiments provided by the present disclosure, when obtaining the correspondence between the temperature and the target control signal, the control module 105 is used to output an initial control signal to the current adjustment module 103, and the current adjustment module 103 performs current compensation on the first signal and / or the second signal based on the initial control signal. The voltage acquisition module 104 is used to collect the voltage values corresponding to the first signal and the second signal and send them to the control module 105. The control module 105 judges the voltage difference between the first signal and the second signal to judge whether appropriate compensation can be performed on the first signal and / or the second signal under the initial control signal. If the voltage difference between the first signal and the second signal is the smallest, zero, or basically zero, it indicates that appropriate compensation can be performed on the first signal and / or the second signal under the initial control signal, and the initial control signal is confirmed as the target control signal; if the voltage difference between the first signal and the second signal is not the smallest, zero, or basically zero, it indicates that appropriate compensation cannot be performed on the first signal and / or the second signal under the initial control signal.
[0119] In the embodiments of the present disclosure, when the current adjustment module 103 outputs a compensation current based on the target control signal, the difference between the first signal and the second signal is the smallest, zero, or basically zero.
[0120] It should be noted that the difference between the first signal and the second signal here represents the corresponding current or voltage difference. As described above, in an ideal situation, when there is no AC signal input, the first signal and the second signal are exactly the same without any difference. Here, when there is no AC signal input, the current adjustment module 103 performs circuit compensation on the first signal and / or the second signal based on the target control signal input and the compensation current, so that the difference between the first signal and the second signal is minimized (i.e., reaches the lowest difference that can be achieved), zero (ideal situation, completely eliminating the difference), or basically zero (it is difficult to completely eliminate the difference in practice, and basically zero can be considered to meet a certain error range. For example, the voltage difference between the first signal and the second signal is less than a threshold, for example, less than 1% - 5% of the swing of the AC signal, or the absolute value of the voltage difference between the first signal and the second signal is less than 1 mV - 10 mV. Meeting this requirement can ignore the voltage difference / current difference).
[0121] In some embodiments, as Figure 14 or Figure 15 shown, the squaring circuit 10 may further include:
[0122] A trigger module 108, configured to receive a reset signal and / or an external sampling signal, and output a trigger signal and send it to the control module 105 when any one of the reset signal and the external sampling signal is in an enabled state; the trigger signal is used to trigger the control module 105 to perform an operation of determining the target control signal, and the current adjustment module 103 automatically generates a compensation current based on the target control signal. The operation of the trigger signal triggering the automatic compensation can be understood as a self-adjustment operation to automatically compensate for the offset.
[0123] It should be noted that in the embodiments of the present disclosure, the self-adjustment operation can be triggered by a trigger signal. For example, the trigger signal can be a reset signal or an external sampling signal. As Figure 14 or Figure 15 shown, the reset signal can be provided by a power-on reset circuit 109 (Power on Reset, POR), that is, when powering on, the power-on reset circuit 109 will generate a single-pulse signal to reset the control module 105 and trigger the control module 105 to perform a calibration; alternatively, an external sampling signal can be provided by the user to actively initiate a self-adjustment operation. In this way, after each power-on, a calibration is performed to ensure that the squaring circuit 10 can work in the minimum mismatch state after each power-on. As Figure 14 or Figure 15 shown, the trigger module 108 can be implemented by an OR gate 1081, and the OR gate 1081 is used to combine two high-level pulses. If other types of reset signals are used, the combinational logic here can also be modified as needed. This process can be implemented by hardware or by software. For software implementation, additional execution units and memories are required to execute and store the code.
[0124] It should also be noted that since the mismatch is temperature-related, as the square circuit 10 operates, the temperature may change. In the embodiments of the present disclosure, the control module 105 can obtain the current temperature from the temperature sensor 107 periodically or in real time, so as to find the corresponding target control signal in the storage module 106 to determine the compensation current, without a trigger signal to trigger the self-regulation operation. At this time, the trigger module 108 may not be required in the square circuit 10. Alternatively, it can also be combined with the trigger module 108 to trigger calibration when the chip is powered on or manually. There is no specific limitation on this.
[0125] In some embodiments, when the chip temperature changes significantly after power-on, a calibration is triggered. For this purpose, as Figure 16 shown, in some embodiments, the trigger module 108 is also connected to the temperature sensor 107, and is used to generate a trigger signal when the difference between the current temperature and the previously detected temperature is greater than a preset temperature threshold.
[0126] It should be noted that if the self-regulation operation is triggered only once when the device is powered on, then as the working time extends, the device generates heat seriously, resulting in an increase in temperature, and the ambient temperature outside the chip will also change. And at different temperatures, the mismatch of the circuit may also change. Therefore, the embodiments of the present disclosure can also perform a self-regulation operation only when the temperature changes significantly, and re-determine the most suitable target control signal according to the current temperature, so as to ensure that when the mismatch changes, effective current compensation is performed in a timely manner.
[0127] Exemplarily, as Figure 16 shown, the trigger module 108 may further include a trigger signal generation module 1082, which is respectively connected to the temperature sensor 107 and the OR gate 1081. The temperature sensor 107 collects the current temperature in real time or periodically and sends it to the trigger signal generation module 1082. The trigger signal generation module 1082 compares the current temperature value with the previous temperature value. If the difference (taking the absolute value) between the two is greater than the preset temperature threshold, it means that the two temperatures differ greatly and self-regulation needs to be performed again, and then a trigger signal is output to trigger the control module 105 to perform a self-regulation operation to determine a new target control signal, so as to ensure that the target control signal meets the current temperature requirements. At the same time, the trigger signal generation module 1082 can also receive the signal output by the OR gate 1081 and perform a trigger operation when either the reset signal or the external sampling signal is enabled.
[0128] It should also be noted that the temperature sensor 107 can supply the temperature to the control module 105 and the trigger signal generation module 1082 through the same port, or as Figure 16As shown, it can also be connected to the control module 105 and the trigger signal generation module 1082 through two ports respectively, and no specific limitation is made thereto.
[0129] In some embodiments, the trigger module 108 is not limited to Figure 16 the structure shown. For example, the OR gate 1081 may include three input terminals, which respectively receive a reset signal, an external sampling signal, and a temperature reset signal sent by the trigger signal generation module 1082. The temperature reset signal is used to indicate that the difference between the current temperature and the temperature detected last time is greater than a preset temperature threshold.
[0130] In short, the trigger signal (or denoted as the RST signal) of the control module 105 is generated in two cases:
[0131] 1. External input, that is, it is generated by the power-on reset circuit 109 when powering on, or manually generated externally. When the trigger signal generation module 1082 receives such a signal, it will immediately output a trigger signal to the control module 105 to perform a self-regulation operation process. That is, this trigger method is to automatically generate a reset signal by the power-on reset circuit 109 to trigger the execution of a self-regulation when powering on, or the external sampling signal requests to execute a self-regulation.
[0132] 2. Generated inside the trigger signal generation module 1082: The trigger signal generation module 1082 will periodically check the current temperature output by the temperature sensor 107. When there is a large difference between the current temperature and the temperature recorded last time, that is, when the temperature has changed greatly, the trigger signal generation module 1082 will generate a trigger signal to the control module 105 to make it perform a self-regulation again. At the same time, the trigger signal generation module 1082 records the current temperature.
[0133] The foregoing ways of triggering self-regulation operations by temperature trigger, reset signal trigger, and external sampling signal trigger can adopt only one of them, or two of them, or all three of them; and / or, the embodiments of the present disclosure can also periodically perform self-regulation operations spontaneously to compensate for the mismatch of the square circuit 10, and no specific limitation is made thereto.
[0134] In some embodiments, such as Figure 16As shown, a first switch S1 may be connected between the input end of the square unit 101 and the input end of the AC signal, and a second switch S2 may be connected between the input end of the mirror square unit 102 and the input end of the feedback signal. During the operation of obtaining the corresponding relationship, the control module 105 generates an input control signal in a non-enabled state, disconnects both the first switch S1 and the second switch S2. At this time, the AC signal (RF signal) will not be sent to the square unit 101, which can avoid affecting the operation result; after the operation is completed, the control module 105 outputs an input control signal in an enabled state to re-conduct the first switch S1 and the second switch S2, so as to perform square calculation on the AC signal (RF signal).
[0135] In some embodiments, as Figure 16 shown, the control module 105 is further configured to generate and output an invalid indication signal during the operation of obtaining the corresponding relationship, and the invalid indication signal is used to indicate that the output of the square circuit 10 is invalid.
[0136] Exemplarily, the target control signal corresponding to each temperature can be determined by a test operation. Therefore, the indication signal for obtaining the corresponding relationship can be a test status indication signal, and the operation of obtaining the corresponding relationship can be a test operation. When the control module 105 receives the test status indication signal, it performs the test operation.
[0137] The test operation is usually performed in advance. At this time, the test operation can be triggered by the test status indication signal. In this case, after the test operation, the target control signal corresponding to the temperature is stored in the storage module 106. When the temperature changes, the corresponding target control signal is searched in the storage module 106 (i.e., the self-regulation operation) to determine the compensation current, and there is no need for a trigger signal to trigger the self-regulation operation, that is, there is no need for the trigger module 108. Or, it can also be combined with the trigger module 108 to trigger self-regulation when the chip is powered on or manually, to avoid the mismatch changing after working for a certain time limit and the stored target control signal having poor effect.
[0138] In this solution, a control method for the square circuit 10 is further provided, including:
[0139] Obtain the current temperature;
[0140] Search in the storage module 106 according to the current temperature to obtain the target control signal, and output the target control signal to the current adjustment module 103 to compensate for the difference between the first signal and the second signal, eliminating (or at least partially eliminating) the inaccurate problem caused by the mismatch between the square unit 101 and the mirror square unit 102.
[0141] This control method can be executed by the control module 105, which can be implemented by software or hardware. In some embodiments, the control module 105 includes a processor and a memory; the processor is configured to execute instructions stored in the memory, so that the control module 105 executes the foregoing control method. It should be noted that the control module 105 can be a digital circuit or can be composed of logic circuits, and no specific limitation is made thereto.
[0142] It should also be noted that the self-adjustment method of this solution further includes the step of establishing the correspondence between temperature and the target control signal, specifically:
[0143] When there is no AC signal input, at each temperature:
[0144] Output an initial control signal to the current adjustment module 103, and the initial control signal is used to control the magnitude of the compensation current;
[0145] Under the initial control signal, obtain the voltage difference between the output terminals of the square unit 101 and the mirror square unit 102;
[0146] By traversing different initial control signals, determine that the initial control signal corresponding to the minimum voltage difference is the target control signal;
[0147] Traverse all temperatures, obtain the correspondence between all temperatures and the target control signal, and store it in the storage module 106.
[0148] In the embodiments of the present disclosure, the self-adjustment operation is implemented based on the correspondence between the temperature stored in the storage module 106 and the target control signal, without interrupting the normal operation of the square circuit 10. Specifically, the control module 105 is configured to perform the operation of determining the target control signal, including:
[0149] The control module 105 obtains the current temperature; for example, the control module 105 can obtain the current temperature from the temperature sensor 107;
[0150] The control module 105 searches in the storage module 106 according to the current temperature, obtains the target control signal, and outputs the target control signal corresponding to the current temperature to the current adjustment module 103, and the target control signal is used to control the current adjustment module 103 to output an appropriate magnitude of compensation current.
[0151] It should be noted that the control signals stored in the storage module 106 are denoted as target control signals, and each temperature value or range corresponds to a target control signal. For example, 256 different temperatures and the corresponding target control signals are preset, and these 256 temperatures and the corresponding target control signals are stored in the storage module 106. Then, when performing the self-adjustment operation, first determine the current temperature, and then compare the current temperature with the 256 temperatures stored in the storage module 106 to determine which temperature the current temperature matches, that is, which temperature the current temperature is closest to (equal, or the difference between the two is less than a certain temperature error threshold). Then, output the target control signal corresponding to the matching temperature to the current adjustment module 103, and the current adjustment module 103 outputs a compensation current accordingly. Among them, the current temperature can be detected by the temperature sensor 107. If it is the range of temperature and the target control signal corresponding, it is only necessary to determine which range the value of the current temperature is located in and output the corresponding target control signal. When the temperature is the current temperature, calibration can be achieved without interrupting the normal operation of the square circuit 10.
[0152] Take Figure 16 the calibration of the circuit shown as an example. As Figure 17 shown, this process may include:
[0153] S401: The control module 105 determines whether it is in the test state according to the test state indication signal.
[0154] If the judgment result is yes, execute steps S402 - S4012 (i.e., the test operation); otherwise, execute steps S4013 - S4016 (i.e., the self-adjustment operation).
[0155] Before step S402, the square circuit 10 can be first placed at the first preset temperature to find the target control signal corresponding to the first preset temperature.
[0156] S402: The control module 105 resets the initial control signal and the optimal voltage difference. The initial control signal is output to the current adjustment module 103 for testing the target control signals corresponding to different temperatures.
[0157] It should be noted that the control signal can be a multi-bit signal. At the start of the test, it is necessary to reset the initial control signal and the optimal voltage difference, which is equivalent to initialization. The reset initial control signal and optimal voltage difference can both be default initial values as the basis for comparison in step S407.
[0158] Alternatively, the initial control signal for resetting is the first initial control signal traversed. For example, assuming that the control module 105 can output 100 initial control signals, C1, C2, C3, ……, C100, during the testing process, these 100 initial control signals need to be traversed, and the initial control signal that minimizes the voltage difference between the output terminals of the square unit 101 and the mirror square unit 102 when there is no AC signal input is determined as the initial control signal. Any one of these 100 initial control signals can be determined as the initial control signal for resetting. For example, the traversal can be carried out in the order of C1 to C100, and C1 can be first determined as the initial control signal for resetting in this step, or in other orders, which is not limited here.
[0159] Among them, the optimal voltage difference represents the minimum voltage difference between the output terminals of the square unit 101 and the mirror square unit 102 when there is no AC signal input among the initial control signals that have been traversed. Before entering the test state and before starting to adjust based on the initial control signal, the reset optimal voltage difference can be a default value or the voltage difference detected before the adjustment.
[0160] S403: The control module 105 waits for a trigger signal. If a trigger signal is received, go to step S404. The trigger signal at this time can be triggered by an externally sampled signal controlled manually.
[0161] S404: The control module 105 controls ADC2 to sample, and the read result is recorded as VA.
[0162] S405: The control module 105 controls ADC3 to sample, and the read result is recorded as VB.
[0163] It should be noted that after being triggered, the control module 105 sends the reset initial control signal to the current adjustment module 103. The current adjustment module 103 performs current compensation based on the received control signal, controls the second analog-to-digital converter 1042 (ADC2) to collect the voltage value of the first signal and records it as VA; and controls the third analog-to-digital converter 1043 (ADC3) to collect the voltage value of the second signal and records it as VB.
[0164] S406: The control module 105 calculates the voltage difference |VA - VB|.
[0165] It should be noted that the absolute value of VA and VB is taken for the voltage difference here.
[0166] S407: The control module 105 determines whether the voltage difference is less than the optimal voltage difference.
[0167] If the judgment result is yes, it indicates that the compensation effect of the current initial control signal is better than that of the previously tested initial control signals, and step S408 is executed; otherwise, it indicates that the compensation effect of the current initial control signal is not as good as that of the previously tested initial control signals, and step S409 is executed.
[0168] S408: The control module 105 records the current initial control signal and the voltage difference as the target control signal and the optimal voltage difference respectively.
[0169] S409: The control module 105 steps the initial control signal output to the DAC.
[0170] It should be noted that if the initial control signals are output one by one in ascending order, the next initial control signal is output with a step increase according to the corresponding step value; if the initial control signals are output one by one in descending order, the next initial control signal is output with a step decrease according to the corresponding step value; or, the initial control signals can also be output in other preset orders or any order, and no specific limitation is made here. Here, taking the step increase as an example, for the 100 initial control signals C1 to C100 that increase in sequence as described above, the difference between two adjacent initial control signals is the step value. Then, after traversing C1, the next one to traverse is C2.
[0171] S4010: The control module 105 determines whether the initial control signal exceeds the maximum value.
[0172] If the judgment result is yes, step S4011 is executed, indicating that the target control signal corresponding to the first preset temperature is found; otherwise, return to execute step S404.
[0173] For example, for the 100 initial control signals C1 to C100 that increase in sequence as described above, the maximum value of the initial control signal is C100. If the issued initial control signal is C101, it exceeds the maximum value.
[0174] S4011: The control module 105 obtains the current temperature from the temperature sensor 107.
[0175] S4012: The control module 105 writes the current temperature and the target control signal into the storage module 106.
[0176] After that, the square circuit 10 can be placed at the second preset temperature so that there is a second initial voltage difference between the first signal and the second signal; then steps S402 to S4012 are executed to find the target control signal corresponding to the second initial voltage difference. By analogy, the square circuit 10 is placed at all preset temperatures to find the target control signals corresponding to all temperatures, and the corresponding relationship between the temperature and the target control signal is obtained.
[0177] It should be noted that the current temperature can be stored in the form of a temperature code.
[0178] S4013: The control module 105 reads all the temperatures and target control signals in the storage module 106.
[0179] S4014: The control module 105 obtains the current temperature from the temperature sensor 107.
[0180] S4015: The control module 105 calculates the target control signal corresponding to the current temperature.
[0181] S4016: The control module 105 latches and outputs the calculated target control signal to the DAC (digital-to-analog converter 1031), so as to obtain the target control signal corresponding to the current temperature, and send it to the current adjustment module 103 to control the current adjustment module 103 to output a compensation current to compensate for the mismatch between the square unit 101 and the mirror square unit 102.
[0182] In short, during the pre-shipment test of the chip, the test status indication signal is pulled high to enter the test state. At this time, the external sampling signal is no longer the reset function, but can still be a pulse. With the cooperation of the upper computer of the test system, every time the test environment temperature changes, an external sampling signal is sent to the chip. When the chip receives the sampling signal, it will execute a self-regulation operation process, obtain the current temperature from the temperature sensor 107, and record both in the storage module 106.
[0183] The upper computer can send an external sampling signal for self-regulation at a certain temperature step, such as every time the chip temperature changes by 10°C. After calibration is completed, when the chip is in normal use, the test status indication signal is pulled low to exit the test state and enter the normal working state. The control module 105 will read all the temperatures and target control signals in the storage module 106. Then, it will cyclically read the current temperature from the temperature sensor 107 at a certain frequency, and confirm the compensation circuit control code required for the current temperature point through interpolation according to the previously recorded discrete multi-temperature point data, and latch and output it to the DAC. Thus, mismatch compensation with temperature change is achieved.
[0184] Figure 17 The method shown is a specific embodiment of this solution. In other embodiments, the specific implementation process of the control method is not limited to Figure 17 shown steps. For example, when calibrating the Figure 14 shown circuit, Figure 17 Steps S404 - S405 in
[0185] The control module 105 controls the switch unit SW to connect to port A.
[0186] It should be noted that, prior to this, there is also a step of outputting an initial control signal to the current adjustment module 103.
[0187] The control module 105 controls the ADC1 to sample, reads the sampling result, and records it as VA.
[0188] The control module 105 controls the switch unit SW to connect to port B.
[0189] The control module 105 controls the ADC1 to sample, reads the sampling result, and records it as VB.
[0190] As described above, it is only a preferred embodiment of the present disclosure and is not used to limit the protection scope of the present disclosure.
[0191] It should be noted that in the present disclosure, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or device including that element.
[0192] The serial numbers of the above-described embodiments of the present disclosure are only for description and do not represent the superiority or inferiority of the embodiments.
[0193] The methods disclosed in several method embodiments provided by the present disclosure can be arbitrarily combined without conflict to obtain new method embodiments.
[0194] The features disclosed in several product embodiments provided by the present disclosure can be arbitrarily combined without conflict to obtain new product embodiments.
[0195] The features disclosed in several method or device embodiments provided by the present disclosure can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0196] As described above, it is only the specific implementation manner of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present disclosure can easily think of changes or substitutions, which should all be covered within the protection scope of the present disclosure.
Claims
1. An adjustable squaring circuit, characterized in that, Comprising: A squaring unit for squaring the received AC signal. The squaring unit receives a bias voltage and the AC signal, and the output terminal of the squaring unit outputs a first signal; A mirror squaring unit for receiving the bias voltage. The structure of the mirror squaring unit is the same as that of the squaring unit, and the output terminal of the mirror squaring unit outputs a second signal; A temperature sensor for detecting the current temperature; A current adjustment module for receiving a target control signal and generating a compensation current. The magnitude of the compensation current is related to the target control signal. The output terminal of the current adjustment module is connected to the output terminal of the squaring unit and / or the output terminal of the mirror squaring unit for compensating the current at the output terminal of the squaring unit and / or compensating the current at the output terminal of the mirror squaring unit to compensate for the difference between the first signal and the second signal; wherein, the target control signal is obtained by the control module by looking up a table in the storage module based on the current temperature; The storage module for storing the correspondence between the temperature and the target control signal.
2. The square circuit according to claim 1, wherein When the current adjustment module outputs the compensation current based on the target control signal, the difference between the first signal and the second signal is minimized, zero, or substantially zero.
3. The square circuit according to claim 1, characterized in that, The squaring circuit further includes a voltage acquisition module respectively connected to the output terminals of the squaring unit and the mirror squaring unit; The control module is further configured to: When there is no AC signal input, at each temperature: Output an initial control signal to the current adjustment module, and the initial control signal is used to control the magnitude of the compensation current; Under the initial control signal, obtain the voltage difference between the output terminals of the squaring unit and the mirror squaring unit; By traversing different initial control signals, determine the initial control signal corresponding to the minimum voltage difference as the target control signal; Traverse all the temperatures, obtain the correspondence between all the temperatures and the target control signal, and store it in the storage module.
4. The squaring circuit according to claim 3, characterized in that, The squaring circuit further includes a first switch and a second switch. The first switch is located between the input terminal of the squaring unit and the input terminal of the AC signal, and the second switch is located between the input terminal of the mirror squaring unit and the feedback signal input terminal; The control module is further used to disconnect the first switch and the second switch during the operation of obtaining the correspondence; 5. The squaring circuit according to claim 3, characterized in that, The control module is further used to generate and output an invalid indication signal during the operation of obtaining the correspondence, and the invalid indication signal is used to indicate that the output of the squaring circuit is invalid.
6. The square circuit according to any one of claims 1 to 5, characterized in that The squaring circuit further includes: A trigger module for receiving a reset signal and / or an external sampling signal, and outputting a trigger signal to the control module when any one of the reset signal and the external sampling signal is in an enabled state; the trigger signal is used to trigger the operation of determining the target control signal.
7. The square circuit according to claim 6, wherein The trigger module is further used to generate the trigger signal when the difference between the current temperature and the last detected temperature is greater than a temperature threshold.
8. The squaring circuit according to claim 1, wherein The current adjustment module includes: A digital-to-analog converter, configured to receive the target control signal, perform digital-to-analog conversion on the target control signal, and obtain a current control signal; A first current source, configured to receive the current control signal, generate the compensation current based on the current control signal, and an output end of the first current source is connected to an output end of the square unit or the mirror square unit.
9. The square circuit according to claim 1, wherein The current adjustment module includes: A voltage providing unit, configured to provide a first voltage; A resistance adjusting unit, connected to the first voltage, receiving the target control signal, changing a resistance value based on the target control signal, and outputting the compensation current.
10. The square circuit according to claim 1, characterized in that, The current adjustment module includes: A second current source, receiving a second voltage and generating a first current; A current control circuit, receiving the first current and outputting the compensation current; the current control circuit adjusts a magnitude of the compensation current based on the target control signal.
11. The squaring circuit according to any one of claims 1-5, 8-10, characterized in that, The square circuit further includes a third current source; an output end of the current adjustment module is connected to an output end of one of the square unit and the mirror square unit, and an output end of the third current source is connected to an output end of the other of the square unit and the mirror square unit; The third current source is configured to provide a fixed current.
12. The squaring circuit according to any one of claims 1-5, 8-10, characterized in that The square circuit includes at least two of the current adjustment modules, configured to generate at least two of the compensation currents; the control module obtains at least two of the control signals based on the current temperature; an output end of one of the current adjustment modules is connected to an output end of one of the square unit and the mirror square unit, and an output end of the other of the current adjustment modules is connected to an output end of the other of the square unit and the mirror square unit.
13. The squaring circuit according to any one of claims 3-5, characterized in that, The voltage acquisition module includes a first analog-to-digital converter and a switch unit; One end of the switch unit is connected to the first analog-to-digital converter, and the other end is selectively connected to an output end of the square unit or an output end of the mirror square unit; The first analog-to-digital converter is configured to perform analog-to-digital conversion on a voltage at the output end of the square unit or the mirror square unit, and output a converted digital signal to the control module.
14. The squaring circuit according to any one of claims 3-5, characterized in that, The voltage acquisition module includes a second analog-to-digital converter and a third analog-to-digital converter; The second analog-to-digital converter is connected to the output end of the square unit, performs analog-to-digital conversion on the voltage at the output end of the square unit, and outputs to the control module; The third analog-to-digital converter is connected to the output end of the mirror square unit, performs analog-to-digital conversion on the voltage at the output end of the mirror square unit, and outputs to the control module.
15. A control method for a squaring circuit, characterized in that, Applied to the square circuit according to any one of claims 1 to 14, the method includes: Obtaining a current temperature; Searching in a storage module according to the current temperature to obtain a target control signal, and outputting the target control signal to the current adjustment module; wherein, a corresponding relationship between the temperature and the target control signal is stored in the storage module.
16. The method according to claim 15, wherein The method further includes: At each temperature when there is no input of the AC signal: Output an initial control signal to the current adjustment module, where the initial control signal is used to control the magnitude of the compensation current; Under the initial control signal, obtain the voltage difference between the output terminals of the square unit and the mirror square unit; By traversing different initial control signals, determine the initial control signal corresponding to the minimum voltage difference as the target control signal; Traverse all the temperatures, obtain the correspondence between all the temperatures and the target control signal, and store it in the storage module.
17. A control module, characterized in that, It includes a processor and a memory; The processor is used to execute the instructions stored in the memory, so that the control module executes the control method according to claim 15 or 16.
Citation Information
Patent Citations
Method for performing power detection, and associated apparatus
US20130134961A1