The embodiment relates to a detector circuit.
A detector circuit is a circuit which detects the power of a high-frequency signal (RF signal) or other alternating current (AC) signal, and is for example used as a circuit to detect the output power of a power amplifier provided in a portable communication terminal or similar. A power detector circuit performs envelope detection of a high-frequency signal using for example a diode. Such a circuit applies the high-frequency signal to the diode, rectifies the voltage exceeding the diode threshold voltage and converts this into a current, and converts the rectified AC current signal into a direct current (DC) voltage signal using a resistor and a capacitor.
However, the threshold voltage of a normal diode varies due to the influence of temperature, so that use of a simple diode alone for power detection would result in fluctuation of the output level of the power detector circuit.
Japanese Patent Application Laid-open No. 2005-142955 discusses a power detector which eliminates the influence of fluctuation of the diode threshold voltage. In this power detector, an input high-frequency signal is distributed to the anodes of two diodes, a bias current from a bias circuit is supplied to each of the diodes, a DC voltage is generated across a load resistor provided in parallel with the diodes, and the voltage which changes according to the high-frequency signal applied to the diodes is input to a differential amplifier via an inductor. The differential amplifier outputs the difference voltage of two voltages which change according to the high-frequency signal applied to each of the diodes.
The detector circuit discussed in Japanese Patent Application Laid-open No. 2005-142955 computes the difference voltage of two voltages resulting from distribution of the high-frequency signal according to a power distribution ratio determined in advance, and so the output voltage of the differential amplifier is detected as the power level of the high-frequency signal, and even if the threshold voltages of the diodes vary due to temperature changes, the variation in the threshold voltages of the diodes are cancelled by the difference, so that the influence of variation of the threshold voltages is compensated.
However, the above-described power detector uses a differential amplifier. A differential amplifier has a voltage offset due to manufacturing variation, and so there is a limit to the precision of detection of a difference voltage. Further, the output common mode and gain which are characteristics of the differential amplifier tend to fluctuate with changes in the power supply voltage, so the precision of the detection tends to lower by power supply fluctuations.
Hence an object of this embodiment is to provide a detector circuit with heightened detection precision.
According to a first aspect of the embodiment, a detector circuit, has a first diode, to an anode of which an AC signal is input and to which a constant voltage is supplied, a second diode, to an anode of which the constant voltage is supplied, and a difference current generation circuit, which generates the difference current between a first current flowing in the first diode and a second current flowing in the second diode.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
For example, by coupling the output of a power amplifier, the power of which is to be detected, to the anode of the diode D1, the output power of the power amplifier can be detected.
However, as explained above, the threshold voltage of the diode D1 fluctuates due to temperature, and hence the output voltage is varied due to this fluctuation of the threshold voltage, and the precision of the detected power is lower.
Further, upon power activation, when the power amplifier PA does not output a high-frequency signal, and at other times appropriate for calibration, the power detection control circuit 18 resets the calibration circuit 14 by driving a reset pulse Reset to H level, and after releasing reset by driving the reset pulse Reset to L level, causes the start of calibration operation by driving a trigger signal Trigger to H level. The clock CLK is a calibration operation synchronization clock.
Next, the power detector circuit in this embodiment is explained.
A DC voltage VB, which is a power supply voltage and constant bias voltage, is applied, via first and second resistors RP and RR, to the anode terminals n1 and n2 of the first and second diodes D1 and D2. The first resistor RP is a resistor to supply the DC voltage VB to the terminal n1 to which the above-described AC component is applied. The second resistor RR is provided in the reference circuit 22 as well, corresponding to the first resistor RP.
A smoothing circuit including the capacitor C1 and third resistor R1 is provided at the cathode of the first diode D1. The third resistor R1 also adjusts the current quantity through the resistance value. Corresponding to this, a fourth resistor R2 and a capacitor C2, equal to the values of the devices R1, C1 coupled to the input circuit 20, are provided at the cathode of the second diode D2 as well. However, an AC component is not applied to the second diode D2, and so the capacitor C2 is not need, but is provided for the sake of balance with the input circuit 20.
The sum current IAC+IDC of a current IAC which is the result of rectifying and smoothing the AC component of the high-frequency signal which is the AC signal, and a current IDC which constantly flows due to the DC voltage VB, flows in the resistor R1 of the input current 20. The current IAC is the DC current obtained by rectification by the diode D1 and smoothing by C1 and R1. On the other hand, a current IDC due to the DC voltage VB constantly flows in the resistor R2 of the reference circuit 22. The resistors RP and RR and the resistors R1 and R2 are designed to have respectively equal values, and thus the currents IDC of the two circuits 20 and 22 are substantially equal.
A decoupling capacitor CC is provided at the node supplying the DC voltage VB, so that the AC component of the high-frequency signal supplied to the input terminal RFIN does not propagate to the supply node and cause the DC voltage to fluctuate.
Further, the power detector circuit has a difference current generation circuit 24 which generates, at the node n3, a current IAC which is the difference between the current IAC+IDC generated by the input current 20, and the current IDC generated by the reference current 22, and an output current 26 which converts the magnitude of the difference current IAC into a voltage of the output terminal OUT. The output circuit 26 has an output resistor RO.
The difference current generation circuit 24 has a first current mirror circuit CM1 which copies the current IAC+IDC of the input circuit 20 to the node n4; a second current mirror circuit CM2 which copies the current IDC of the reference circuit 22 to the node n3; and a third current mirror circuit CM3 which copies the current IAC+IDC of the node n4 to the side of the node n3. The first current mirror circuit CM1 has an N-channel MOS (NMOS) transistor N10, and, NMOS transistors N11, N12, N13, the gates of which are coupled in common to the drain and gate of this NMOS transistor N10, and the drains of which are coupled to the node n4. Current is copied at a current mirror ratio according to the combined transistor channel widths of the transistor N10 and the transistors N11, N12 and N13.
The second current mirror circuit CM2 has an NMOS transistor N20 coupled to the reference circuit 22, and a transistor N21 the gate of which is coupled to the drain and gate of this NMOS transistor N20. In this current mirror circuit CM2 also, current is copied at a current mirror ratio according to the transistor channel widths of the transistors N20 and N21. The third current mirror circuit CM3 comprises P-channel MOS (PMOS) transistors P30 and P31 coupled to the power supply voltage VDD, and copies the current IAC+IDC of the node n4 to the side of the transistor P31 at a current mirror ratio according to the transistor channel widths of the transistors P30 and P31.
Focusing on the node n3, the copied current IAC+IDC is supplied from the PMOS transistor P31, and the copied current IDC flows to the NMOS transistor N21, so that the difference current IAC flows to the output circuit 26. The output circuit 26 converts the difference current IAC into a voltage by means of the output resistor RO, and outputs the converted voltage from the output terminal OUT.
That is, this power detector circuit generates the difference in the detection signals of the rectifying diode D1 and the compensating diode D2 not by means of a differential amplifier, but by means of the difference current generation circuit 24. This difference current generation circuit 24 has current mirror circuits, and does not have a differential amplifier. Hence there is no problem of fluctuation in a differential amplifier offset voltage and output potential.
Further, the power detector circuit has a calibration circuit 14 which performs calibration so that the current IDC copied from the input circuit 20 and the current IDC copied from the reference circuit 22 are equal at the node n3. That is, the calibration circuit 14 calibrates the current mirror ratio of one of the current mirror circuits so that the currents IDC from both sides are equal, in order that the difference current generated at the node n3 is correct and the current IAC remains.
In the power detector circuit of
(1) During Normal Operation (Operation when a High-Frequency Signal, which is an AC Signal, is Input to the Input Terminal RFIN)
First, power detection operation, which is normal operation of the power detector circuit of
To the node n1 which is the anode of the first diode D1 are applied the DC voltage VB via the first resistor RP, and the AC voltage (RFIN) of the high-frequency signal supplied from the input RFIN via the input capacitor CI. That is, the voltage VB+RFIN is applied. When this voltage exceeds the threshold Vth of the diode D1, the diode is turned on, and a rectified current is generated. The rectified current due to the first diode D1 is converted into a DC current by the capacitor C1 and third resistor R1. By this means, the sum current IDC+IAC of the current IDC which constantly flows due to the DC voltage VB, and the current IAC which flows depending on the AC voltage, flows in the diode D1.
On the other hand, the DC voltage VB is applied via the second resistor RR to the node n2 at the anode of the second diode D2, so that the same current IDC which flows in the steady state in the first diode D1 flows in the fourth resistor R2.
The currents IDC+IAC and IDC flowing in the two resistors R1 and R2 are current-mirrored by the first and second current mirror circuits CM1 and CM2 respectively which comprise NMOS transistors within the difference current detector circuit 24, and the current IAC+IDC at the node n4 is current-mirrored to transistor P31 by the third current mirror circuit CM3, comprising PMOS transistors. By coupling the drain of the transistor P31 of the third current mirror circuit CM3 and the drain of the transistor N21 of the second current mirror circuit CM2 at the node n3, the difference current IAC of these is generated at the node n3. This difference current IAC flows to the output resistor RO in the output circuit 26, and an output potential proportional to the difference current IAC is generated at the output terminal OUT.
When the threshold voltages of the first and second diodes D1 and D2 change due to process and temperature fluctuations, the absolute values of the currents flowing therewithin change, and the current flowing in the resistor R1 changes to IAC+IDC+ΔI, while the current flowing in the resistor R2 similarly changes to IDC+ΔI. In this case also, the difference current IAC (=IAC+IDC+ΔI−IDC−ΔI) flows in the output resistor RO due to the current mirror circuits CM1, CM2, CM3 included in the difference current generation circuit 24, so that the current changes ΔI arising from the fluctuations in threshold voltages are cancelled out. Also, the difference current IAC changes depending on the power of the input high-frequency signal, so that the output circuit 26 can generate, at the output terminal OUT, an output potential which rises or falls monotonically with the power of the input AC signal.
(2) During Error Occurrence (Upon Manufacturing Variation Between the Diodes D1 and D2, or when a Current Mirror Error Occurs)
Next, operation is explained in cases in which an error current or an offset current occurs due to relative variation in the diodes D1 and D2 or to current copying error of a current mirror circuit. When such error currents occur, the error current is combined with the difference current IAC flows into the output circuit 26, and the correct output isn't obtained, because an accurate current IAC does not correspond to the power of the input high-frequency signal. Hence there is a calibration circuit to reduce such error currents to zero.
That is, in the above model the relative errors of the diodes and the copying errors of the current mirrors are all combined and represented as the error current ΔI. At this time, an error current ΔI flows in the output resistor RO from the node n3. When ΔI>0, the output potential is OUT=RO·ΔI, and an offset voltage occurs. For example, when RO=10 kΩ and ΔI=1 μA, the offset potential is 10 mV. Further, when ΔI<0, the current flowing in the output resistor RO is zero, so that the output potential OUT=0 V. However, in the calibration circuit 14 illustrated in
(3) Calibration Operation (Operation to Reduce Errors)
As explained above, in order to reduce error currents arising from relative variation in diodes and current mirroring errors, the power detector circuit of this embodiment has a calibration circuit. The calibration circuit of
In the state in which the AC signal input to the input terminal RFIN is zero, the sum current of the error current ΔI from the node n3 to the output resistor RO and the constant current I flows to the positive input terminal of the comparator 28 of the calibration circuit 14, so that the voltage (I+ΔI)·RO is applied. The reference voltage I′·RO′ is applied to the negative input terminal of the comparator 28. Settings are made such that the resistor RO=RO′ and the constant current I=I′, so that in cases where the error current ΔI is not zero, the voltage at the positive input terminal of the comparator shifts from the reference voltage I·RO (=I′·RO′) by the voltage ±ΔI·RO. Hence by monitoring the output of the comparator 28, the sign of an error current ΔI can be detected. That is, when the comparator output=high, ΔI>0, and when the output is low, ΔI<0.
The calibration control circuit 16 performs control to change the current mirror ratio of the current mirror circuit CM1 based on the sign of the comparison result, and to set the optimum mirror ratio to cause the error current ΔI to approach zero. For example, the calibration control circuit 16 executes calibration once at the time of power activation, sets the current mirror ratio for the current mirror circuit CM1, and thereafter the power detector circuit performs normal operation in this setting state, so that the effect of an error current can be suppressed or eliminated during the normal operation. Further, this calibration operation can also be executed utilizing an interval represented by the transition gap in which a communication terminal equipped with the power amplifier of
The mirror current of the current flowing in the resistor R1 of the input circuit 20, that is, the current flowing from the PMOS transistor P31 to the node n3, is here called the rectified current, and the mirror current of the current flowing in the resistor R2 of the reference circuit 22, that is, the current flowing from the node n3 to the NMOS transistor N21, is called the reference current.
For a switch to be on means that the gate of the transistor used for current mirror adjustment is parallel-coupled in common with the transistor N11 of the mirror source; and for a switch to be off means that the gate of the transistor for adjustment is clipped to ground VSS. The number of transistors for adjustment N14, N13 and N12 which are turned on/off is weighted by the two's complement, controlled such that m=22 by switch SW2, m=21 by switch SW1, and m=20 by switch SW0. Hence by a freely selected combination of three control code bits, the total channel width of the transistors for adjustment is varied in the range m=1 to 7.
For example, when the control code S16 is 000, all the switches SW2, SW1, SW0 are turned off, and the total channel width of the NMOS transistors on the side of the node n4 is small, so that the current copied to the node n4 is small. Conversely, when the control code S16 is 111, all the switches SW2, SW1, SW0 are turned on, the total channel width of the NMOS transistors on the side of the node n4 is large, and the current copied to the node n4 is large.
From this comparison result it is determined that ΔI>0, and so based on this, the calibration control circuit 16 changes the setting value of the control code S16 such that the error current ΔI is made smaller. That is, in order to reduce the error current ΔI, either the rectified current on the side of the PMOS transistor P31 is reduced, or the reference current on the side of the NMOS transistor N21 is increased. In the example of
As illustrated in
For the setting code 000 (=0) at the number of settings j=2 after modification, the current mirror adjustment transistors N14, N13, N12 are all turned off, and as illustrated in
For the setting code 010 (=2) at the number of settings j=3 after modification, similar determination by the comparator is performed, and low (determination “−”) is obtained. It is found that as yet ΔI<0, and the rectified current is small, so that the calibration control circuit 16 changes the setting value of the control code S16 to 2+2(3-3)=3, that is, changes the control code to SW2, SW1, SW0=0, 1, 1 (=3) (S3). At this time, the number of settings j is equal to the number of bits n=3 of the control code (S4), and calibration control by the calibration control circuit 16 ends.
As explained above, through calibration operation the setting value for the current mirror ratio is changed from the default 100 (=4) to 011 (=3), the total channel width of the NMOS transistors on the side of the node n4 is made smaller, and the error current ΔI is changed so as to approach zero. As a result, the rectified current on the side of the PMOS transistor P31 can be controlled so as to more closely approach the reference current on the side of the NMOS transistor N21. And as a result, the input/output characteristic of the power detector circuit can be adjusted to a more linear characteristic, with a smaller offset with respect to an ideal characteristic as illustrated in
In
In the calibration method of Modified Example 2, after adjusting the current mirror ratio of the current mirror circuit CM1 on the side of the rectified current, the current mirror ratio of the current mirror circuit CM2 on the side of the reference current may be adjusted, so that the current mirror ratios may be independently adjusted. That is, the calibration circuit 14 initially sets a control code S16-1, and then sets a control code S16-2.
Further, for example the transistor channel widths of the adjustment transistors N12 and N13 on the side of the current mirror circuit CM1 may be made larger than those of the adjustment transistors N22 and N23 on the side of the current mirror circuit CM2, by for example twofold. In this case, coarse adjustment of the error current is performed through the current mirror ratio on the rectified current side, and then fine adjustment of the error current can be performed through the current mirror ratio on the reference current side, so that the precision of the error current reduction can be improved and the range over which error correction can be performed is expanded.
In
In general, the channel widths of the transistors of a current mirror circuit are often set to be larger for PMOS transistors than for NMOS transistors. PMOS transistors enable design of a greater number of transistors per unit transistor channel width, so that the current mirror ratio can easily be set with greater flexibility and more finely, adjustment resolution is increased, and there is the possibility that the error current is reduced with higher precision.
That is, the calibration circuit 14 has a reference current source I, switches SW3, SW4, SW5, a capacitor C3, and an inverter 30. The switch SW3 is synchronized with a system clock CLK of known frequency to perform on/off control, and during on intervals passes the reference current I to the capacitor C3.
V1=I·t/C3 (1)
That is, the voltage V1 is determined as a constant value by the known current I, time (four periods of the clock CLK) t, and capacitance C3. This potential V1 is set in advance to be the same potential as the threshold of the inverter 30.
For example, when the threshold of the inverter 30 is 1.6 V, the parameters are set as follows, I=10 μA, C3=1 pF, the system clock CLK is 25 MHz and the switch SW3 is turned on for the interval of four clock periods, that is, t=160 ns, so that the voltage V1 can be set to V1=1.6 V.
Then, when switch SW3 is turned off and switch SW5 is turned on, a charge corresponding to the current of the error current ΔI charges the capacitor C3, or is discharged from the capacitor C3. Hence the potential V1 which had been set to the threshold of the inverter 30 changes, and the output of the inverter 30 changes to low when ΔI>0 and changes to high when ΔI<0. In this way, the inverter 30 has a comparison function equivalent to that of the comparator 28. That is, even when a reference potential I′·RO′ is not provided in the calibration circuit of
The method of searching for the optimum current mirror ratio setting is the same as for
On the other hand, in this power detector circuit, the calibration circuit 14 monitors the sign of the error current ΔI while adjusting the resistance value of the second resistor RR which supplies a constant voltage VB within the reference circuit 22. Or, in addition to the second resistor RR, a fourth resistor R2 may also be adjusted. Or, in place of the second resistor RR, the fourth resistor R2 may be adjusted. Whatever the adjustments being made, the reference current flowing in the fourth resistor R2 can be variably adjusted. Therefore, by changing the value of the reference current, the error current ΔI can be adjusted.
In the second embodiment, the resistance value of the variable resistor RR is adjusted. In this case, by employing a circuit which uses a switch to select the number of unit resistors, a variable resistor can easily be realized, so that adjustment of the resistance value, that is, fine adjustment of the reference current, can be performed more finely, and the error current can be made to approach zero with high precision.
Further, there is no longer a need for the group of the plurality of adjustment transistors and switches in the current mirror circuit of the first embodiment, so that the circuit area can be reduced.
The method of power detection in the second embodiment is the same as in the first embodiment. In the calibration method also, similarly to the first embodiment, in a state in which input of the high-frequency signal is intercepted, while monitoring the sign of the error current ΔI occurring at the node n3, the optimum resistance value is set for the second resistor RR.
As explained above, by means of a power detector circuit of these embodiments, the difference between the currents generated by two diodes D1 and D2 is generated by a difference current generation circuit 24, and the power value of the input signal is detected from this difference current. Hence there is no problem with output fluctuation caused by the offset voltage or power supply voltage when a differential amplifier is used as in the prior art, and power values is detected with high precision.
Further, by means of a power detector circuit of these embodiments, because there is no direct path from diodes to ground, current consumption is reduced.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2011-60334 | Mar 2011 | JP | national |
This application is a divisional of application Ser. No. 13/405,968, filed Feb. 27, 2012, which is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2011-060334, filed on Mar. 18, 2011, the entire contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | 13405968 | Feb 2012 | US |
Child | 13919107 | US |