Abstract:
A power delivery circuit comprising power delivery components and a load (Z T ) terminal, detectors for measuring voltages at two or more measuring nodes (V 1 , V 3 ) of the power delivery circuit, and an estimation circuit for using the measurements to estimate current, voltage, or power delivered to a load by the power delivery circuit. The detectors may measure voltages at nodes of transistor switches of the power delivery circuit, particularly at the gates. The power delivery circuit may have a plurality of switches in series, and the detectors measure voltages at nodes of only a subset of the switches. The detectors in one example measure switch voltages and the estimation circuit estimates power delivered to the load according to a switch voltage and impedance between two nodes of the switch. The switch impedance may be provided during calibration using a reference load. The estimation circuit may be a simple analogue circuit such as an amplifier (AMP 1 ) and a multiplexer (MX 1 ). The invention is of particular benefit for measuring power delivered to a load of unknown impedance, such as an antenna of a mobile phone.

Description:
[0001]    This is a national stage of PCT/IE08/000,111 filed Nov. 20, 2008 and published in English, which has a priority of Irish no. 2007/0846 filed Nov. 20, 2007, hereby incorporated by reference. 
     
    
     INTRODUCTION 
       [0002]    1. Field of the Invention 
         [0003]    The invention relates to monitoring of electrical circuits including switches. 
         [0004]    2. Prior Art Discussion 
         [0005]    Switches can be represented functionally by  FIG. 1(   a ) and  FIG. 1(   b ). In  FIG. 1(   a ) the switch is said to be open and an electrical signal cannot flow from node A to node B, whereas in  FIG. 1(   b ) the switch is said to be closed an electrical signal can flow from node A to node B. In the example of transistors being the switches, in  FIG. 2(   a ) the transistor is biased ‘OFF’ by applying a bias voltage V LO  to the gate of the transistor, in such a way that the channel between the drain and source of the transistor is closed and no current flows between the drain and source. In this way  FIG. 2(   a ) is electrically equivalent to  FIG. 1(   a ). Similarly, in  FIG. 2(   b ) the transistor is biased ‘ON’ by applying a bias voltage V HI  to the gate of the transistor, in such a way that the channel between the Drain and Source of the transistor is open and current can flow between the Drain and Source. In this way  FIG. 2(   b ) is electrically equivalent to  FIG. 1(   b ). 
         [0006]    The circuits in  FIG. 2  show the switch being implemented with a single transistor. Equally so, the switch can be implemented using a series of transistors in cascade or ‘stacked’. For example  FIG. 3(   a ) shows three transistors in series with each gate biased through a resistor by a voltage V LO , so that all three transistors are turned off and no current can flow between node A and node B. Thus  FIG. 3(   a ) is electrically equivalent to  FIG. 1(   a ). Similarly  FIG. 3(   b ) shows three transistors in series with each gate biased through a resistor by a voltage V HI , so that all three transistors are turned on and current can flow between node A and node B. Thus  3 ( b ) is electrically equivalent to  FIG. 1(   b ). 
         [0007]    As described above, when a switch is ‘ON’ it allows current to flow from node A to node B. Node B will have a terminating impedance, defined here as Z T , and shown schematically in  FIG. 4 , into which the current will flow. This terminating impedance Z T  may be known or may not be known. 
         [0008]    In some applications it is useful to know the power delivered to the terminating impedance Z T . The power delivered (P D ) is defined as 
         [0000]        P   D =Real Part( V   T   *I   T ),  Equation (1)
 
         [0000]    where V T  is the voltage across the terminating impedance Z T , and I T  is the current through the terminating impedance, and the voltages and currents are rms values. 
         [0009]    To illustrate other types of switch functions  FIG. 5  shows a functional schematic for a Single Pole Double Throw (SPDT) switch, so called because it is used to connect a single node (in this case node B) to one of two nodes (in this case either node A or node C). In  FIG. 5(   a ) the schematic shows the switch being controlled in such a way as to connect node A to node B and leave the connection between node B and node C open. In  FIG. 5(   b ) the schematic shows the same switch being controlled in such a way as to connect node C to node B and leave the connection between node B and node A open. Another example of a switch function is a Single Pole Four Throw (SP 4 T) switch. A schematic of such a switch is shown in  FIG. 6  where the function of the switch is to connect node B to one of either four nodes A, C, D or E. As drawn the switch is controlled to connect node B to node A.  FIG. 7  shows another example of a switch function. It is a Double Pole Double Throw Switch (DPDT) so called because its function is to connect one of either two nodes (here node A or node E) to one of either two nodes (here node C or node D). As is drawn in  FIG. 7  the switch is controlled to connect node A with node D through node B. 
         [0010]    It is known how to calculate the power delivered by a switch to a terminating impedance when the terminating impedance is known. However it is often the case that one wishes to know the power delivered to the terminating impedance when the terminating impedance is not known. This situation arises for example in mobile phones where the impedance of the antenna varies depending on the position of the phone (for example whether the phone is lying on metal, in open space, or close to the head). 
         [0011]    The invention addresses the problem of determining the power delivered to a terminating impedance of a switch when the terminating impedance is not known. 
       SUMMARY OF THE INVENTION 
       [0012]    According to the invention, there is provided a power delivery circuit comprising power delivery components and a load terminal, detectors for measuring voltages at two or more measuring nodes of the power delivery circuit, and an estimation circuit for using the measurements to estimate current, voltage, or power delivered to a load by the power delivery circuit. 
         [0013]    In one embodiment, at least one of the detectors is adapted to measure voltage at a node of a switch of the power delivery circuit. 
         [0014]    In one embodiment, the switch is a transistor, such as FETs. 
         [0015]    In one embodiment, at least one detector is adapted to measure voltage at a node of an attenuator. In one embodiment, the attenuator comprises transistors operating as variable resistors. 
         [0016]    In one embodiment, at least one of the detectors is adapted to measure leakage voltages at a gate of an OFF transistor. 
         [0017]    In one embodiment, the estimation circuit is adapted to means estimate load current I T  by I T =(V S −V T )/Z,
       where
           V S  is voltage at one node,   V T  is voltage at another node,   Z is the impedance between the nodes.   
               
 
         [0022]    In one embodiment, the circuit comprises a plurality of switches in series, and the detectors are adapted to measure voltages at nodes of only a subset of the switches. 
         [0023]    In one embodiment, at least some detectors are adapted to measure switch voltages and the estimation circuit is adapted to estimate power delivered to the load according to a switch voltage and impedance between two nodes of the switch. 
         [0024]    In one embodiment, the power delivery circuit comprises a plurality of attenuators in series, and the detectors are adapted to measure voltages at nodes of a subset of the attenuators. 
         [0025]    In one embodiment, the power delivery circuit includes a single pole double throw (SPDT) switch. 
         [0026]    In one embodiment, the circuit further comprises means for multiplexing node voltages to detectors, allowing a greater number of nodes than detectors. 
         [0027]    In one embodiment, the estimation circuit is a fully analogue circuit. 
         [0028]    In one embodiment, the analogue circuit comprises a differential amplifier connected to receive as inputs two or more sensed voltages at nodes and to provide as output a voltage proportional to current delivered to the load. 
         [0029]    In one embodiment, the analogue circuit further comprises a multiplier for receiving the amplifier output and a load voltage signal to provide an output indicating load power. 
         [0030]    In one embodiment, at least one node is not on a power delivery path of the power delivery circuit. 
         [0031]    In one embodiment, at least one node is connected to a gate of a transistor on the power delivery path to measure leakage voltages. 
         [0032]    In one embodiment, at least one node is connected to a gate of a transistor on the power delivery path via biasing circuits including resistors. 
         [0033]    In one embodiment, at least one detector comprises an electromagnetic coupler, and a measuring node is linked to the power delivery path via said electromagnetic coupler, and the detector is adapted to measure voltage at the measuring node said voltage being representative of current in the power delivery path to the load. 
         [0034]    In one embodiment, another detector is arranged to measure voltage at a power switch gate or at a node connected to the gate through biasing circuits, providing a voltage representative of the voltage at the load. 
         [0035]    In one embodiment, the estimation circuit is adapted to estimate output power by multiplying the voltage representative of current in the power delivery path to the load and the voltage representative of the voltage at the load. 
         [0036]    In another aspect, the invention provides a communication device comprising a power delivery circuit of any embodiment above delivering power to an output. 
         [0037]    In a further aspect, the communication device is a wireless communication device such as a mobile phone or WLAN device. 
     
    
     
       DETAILED DESCRIPTION OF THE INVENTION 
       Brief Description of the Drawings 
         [0038]    The invention will be more clearly understood from the following description of some embodiments thereof, given by way of example only with reference to the accompanying drawings in which:— 
           [0039]      FIGS. 1 to 7  are circuit diagrams referred to above in the Introduction; 
           [0040]      FIGS. 8 to 18  are circuit diagrams for circuits of the invention, and 
           [0041]      FIG. 19  is a plot showing circuit simulations. 
       
    
    
     DESCRIPTION OF THE EMBODIMENTS 
       [0042]    In the present invention voltages are measured at multiple nodes of a power delivery circuit and these values are used to estimate the current, voltage or power delivered to the terminating impedance and the voltage across the terminating impedance. 
         [0043]    In various embodiments, the power delivered to the load is estimated by detecting voltages at two different measuring nodes in switch transistors or at nodes where the voltages are proportional to the voltages at the transistors. Referring to  FIG. 8  a switch comprising three transistors in series connects nodes A and B. The power delivered to the terminating impedance is equal to the Real Part(V T *I T ). 
         [0044]    The current delivered to the load I T , is given by 
         [0000]        I   T =( V   S   −V   T )/ Z   ONSW   Equation (2)
 
         [0000]    where V T  is the voltage at node B, V S  is the voltage at node A, and Z ONSW  is the impedance across the switch between the nodes A and B when the transistors are turned on. 
         [0045]    More generally, the impedance value is the impedance between the two nodes. The voltage is not necessarily measured directly at the relevant nodes, and instead could be via components such as resistors, capacitors, transistors, diodes, or inductors. 
         [0046]    Referring to  FIG. 8  in a power delivery circuit for switching a detector is connected to the gates of the first and third transistors, to measure voltages V 1  and V 3 , and an estimation circuit (not shown) is connected to the two detectors. Each detector comprises a diode and RC circuit, but could comprise any suitable circuit for detecting voltage such as a log detector or an envelope detector, or an RMS detector. The estimation circuit comprises digital logic embedded in a microprocessor of a host device the power delivery circuit. In some of the following drawings the estimation circuit is not shown, for clarity. 
         [0047]    The voltage dropped across the switch is distributed evenly across the transistors. In the case shown in  FIG. 8  the voltages V 1 , V 2  and V 3  can be deduced by 
         [0000]        V   1   =V   S −( V   S   −V   T )/6  Equation (3)
 
         [0000]        V   2   =V   S −( V   S   −V   T )/2  Equation (4)
 
         [0000]        V   3   =V   S −5*( V   S   −V   T )/6  Equation (5)
 
         [0048]    By measuring any two of the voltages V 1 , V 2  and V 3 , then the voltage drop across the switch can be deduced. For example by measuring V 1  and V 3  and using equations (3) and (5) the circuit can deduce that 
         [0000]        V   S   −V   T =3*( V   1   −V   3 )/2  Equation (6)
 
         [0000]        V   T =(5* V   3   −V   1 )/4  Equation (7)
 
         [0049]    Combining equations (6) and (7) with (1) and (2) the circuit can deduce that the power delivered to the load P D  can be given by 
         [0000]        P   D =Real Part((18* V   1   *V   3 −3* V   1   2 −15* V   3   2 )/8 *Z   ONSW )  Equation (8)
 
         [0050]    In this way by measuring V 1  and V 3  and knowing the impedance across the switch Z ONSW , the circuit can deduce the power delivered to the terminating impedance Z T  without knowing the terminating impedance. Z ONSW  can for instance be implicitly determined during calibration because the estimation circuit takes a reference power output and corresponding reference measured voltages and from these deduce a calibration factor to account for Z ONSW  which it stores. In other cases Z ONSW  may be known from knowledge of the process technology and no calibration is required. Then, during use, the estimation circuit uses the calibration factor for Z ONSW , or the known value, to determine the power delivered to the load from the measured voltages. The estimation circuit implements Eqn. 8. In a similar way the power delivered to the terminating impedance Z T  can be deduced by measuring any two of the voltages V 1 , V 2  and V 3  with a new expression similar to equation (8) derived for P D  for whatever two voltages are measured. 
         [0051]    It may not be possible or desirable to measure the voltages V 1 , V 2  and V 3  directly as measuring the voltage at these nodes may degrade the performance of the switch. For example,  FIG. 9  shows another embodiment of the present invention. A switch composed of three transistors in series connects nodes A and B when a bias voltage V HI  is applied so that transistors  1 ,  2  and  3  are ‘ON’. The power delivered to the terminating impedance is, as before, equal to the Real Part(V T *I T ). 
         [0052]    When R 1 , R 2  and R 3  are large compared to the impedance between node A and node B then the power delivered to the load P D  can be approximated by Equation (8) 
         [0000]        P   D =Real Part((18 *V   1   *V   3 −3* V   1   2 −15* V   3   2 )/8* Z   ONSW )
 
         [0053]    In this embodiment when R 4  and R 6  are much greater than Z D , the input impedance looking into the detector, then: 
         [0000]        V   1   =V   11 *( Z   D   +R   1 )/ Z   D   Equation (9)
 
         [0000]        V   3   =V   33 *( Z   D   +R   3 )/ Z   D   Equation (10)
 
         [0054]    Using equation (8) and with R 1  equal to R 3  the power delivered to the load P D  can now be approximated by: 
         [0000]        P   D =Real Part((18* V   11   *V   13 −3* V   11   2 −15* V   13   2 )/8 *Z   ONSW *( Z   D   +R   1 ) 2   /Z   D   2 )  Equation (11)
 
         [0055]    In this way by measuring V 11  and V 13  and knowing the impedance across the switch Z ONSW , an estimation circuit implementing Eqn. (11) can deduce the power delivered to the terminating impedance Z T  without knowing the terminating impedance and without impacting the performance of the switch. This takes account of impact of the bias circuits and the detectors, so that there is no disadvantage arising from the fact that the measuring nodes are not directly at the gates of the switches. 
         [0056]      FIGS. 8 and 9  show the topology of the switch being implemented with three transistors in series. Of course the switch can be implemented with any number of switches in series and equations similar to Equation (8) and Equation (11) can be derived in a similar way to measure the power delivered to the load for the given switch topology. 
         [0057]    The present invention is applicable to any type of switch where the power delivered by the switch to the terminating impedance is measured through detecting voltages at two nodes within the switch, or at nodes connected to the gates of the transistors on the power delivery path via resistors, capacitors, transistors, diodes, and/or inductors or biasing circuits made up of such elements. 
         [0058]    For example,  FIG. 10  ( a ) shows an example of a SPDT switch controlled in such a way that the transistors connecting node A and node B are turned on and the transistors connecting node B and node C are turned off. Here the power delivered to the terminating impedance Z T  is measured using Detector  1  and Detector  2 . 
         [0059]      FIG. 10  ( b ) shows the same SPDT switch controlled in such a way that the transistors connecting node A and node B are turned off and the transistors connecting node B and node C are turned on. Here the power delivered to the terminating impedance Z T  is measured using Detector  3  and Detector  4 . 
         [0060]    Alternatively, it may be desirable to reduce the number of detectors, and this is achieved by switching the appropriate leakage signals to just two detectors.  FIG. 11  shows one possible way to do this for the case of a SPDT switch. In  FIG. 11  the SPDT switch is controlled such that the transistors connecting node A and node B are on and the transistors connecting node B and node C are off. SW 1  and SW 2  are additional switches used to connect the leakage signals to the detectors and are closed when measuring the delivered power to the load with SW 3  and SW 4  open. 
         [0061]    When the switch is controlled such that the transistors connecting node C and node B are on and the transistors connecting node A and node C are off, then SW 1  and SW 2  would be open and SW 3  and SW 4  would be closed, in order to measure the power delivered to the terminating impedance. The above embodiments involve measuring the leakage voltages at the gates of the ‘ON’ transistors (e.g. V 1  and V 3  in  FIG. 8 ) or voltages derived from these voltages (e.g. V 11  and V 13  in  FIG. 9 ). In some cases it may be advantageous to measure one or two of the leakage voltages at the gates of the ‘OFF’ transistors, or voltages derived from the voltages at the gates of the ‘OFF’ transistors. For instance the estimation of V T  as shown below in Equation (13) (transistors OFF) may be less sensitive to errors in the detection circuit compared to estimating V T  using equation 7 when the difference between V 3  and V 1  is small (transistors ON). 
         [0062]      FIG. 12  is a schematic of an SPDT switch simplified for clarity with biasing resistors and bypass capacitors not shown. The switch operates with transistors T 1 , T 2 , T 3  turned ON and transistors T 7 , T 8 , T 9  turned OFF when connecting node A to node B. In this switch there are additional transistors which are used to increase the isolation of the OFF arm of the switch. When node A is connected to node B transistors T 1 , T 2 , T 3  are turned ‘ON’ and transistors T 4 , T 5 , T 6  are turned ‘OFF’ to create a low impedance between node A and node B; while transistors T 7 , T 8 , T 9  are turned ‘OFF’ and transistors T 10 , T 11 , T 12  are turned ‘ON’ to create high isolation between node B and node C. 
         [0063]    When the switch is controlled in this way to connect node A to node B then the voltage at node A, Vs, is distributed evenly across the transistors T 4 ,T 5 ,T 6  and by voltage division the voltage at the gate of transistor T 6  is given by: 
         [0000]        V   1   =V   S /6  Equation (12)
 
         [0064]    Also with transistors T 10 , T 11 , T 12  turned ‘ON’ presenting a low impedance to ground and with transistors T 7 , T 8 , T 9  turned ‘OFF’ and presenting a relatively high impedance the voltage at the gate of transistor T 9  is approximately given by 
         [0000]        V   2   =V   T /6  Equation (13)
 
         [0065]    The current delivered to the terminating impedance can again be given by Equation (2) and combining this with Equation (12) and Equation (13) gives 
         [0000]        I   T =6*( V   1   −V   2 )/ Z   ONSW   Equation (14)
 
         [0066]    Using this with Equation (1) and Equation (13) gives 
         [0000]        P   D =Real Part(36* V   1 *( V   1   −V   2 )/ Z   ONSW   Equation (15)
 
         [0000]    Eqn. (15) is implemented by the estimation circuit. In this way by measuring V 1  and V 2  and knowing the impedance across the switch Z ONSW , the circuit can deduce the power delivered to terminating impedance Z T  without knowing the terminating impedance. Equation (15) can be extended to include the impact of the biasing resistors and the impedance looking into the detectors and an equation similar to Equation (11) can be derived for this circuit. 
         [0067]      FIG. 12  shows an analogue implementation of an estimation circuit. For the case where node A is connected to node B with SW 1 , SW 2 , SW 3 , SW 4  connected as shown then the output of Detector  1  is a voltage proportional to V S  and the output of Detector  2  is a voltage proportional to V T . With these two outputs connected to a differential amplifier (AMP  1 ), as shown, then the output voltage of the differential amplifier, V 3 , is proportional to the current delivered to the terminating impedance. Furthermore if V 3  is connected to a multiplier (MX  1 ) and multiplied by the output of detector  2 , the output of MX  1 , which is V 4 , is a voltage proportional to the power delivered to the terminating impedance. 
         [0068]    In some applications a switch is designed with a capacitor bypassing the gate to source or gate to drain junction, to increase the linearity of the switch.  FIG. 13  shows an example of such a switch with bypassing on the junctions of transistors T 1 , T 3 , T 4 , and T 6 . 
         [0069]    The power delivered to the load can again be measured in a similar manner to that described above except with the addition of the capacitors the voltage dropped across the switch is not now evenly distributed across the transistors. For example with a case where the bypass capacitors are much larger than the junction capacitors of the transistors the voltages at the gates of the transistors can be approximated by: 
         [0000]        V   1   =V   S −( V   S   −V   T )/4  Equation (16)
 
         [0000]        V   2   =V   S −( V   S   −V   T )/2  Equation (17)
 
         [0000]        V   3   =V   S −3*( V   S   −V   T )/4  Equation (18)
 
         [0070]    As above, by measuring any two of the voltages V 1 , V 2  and V 3 , then the voltage drop across the switch can be deduced. For example by measuring V 1  and V 3  and using equations (16) and (18) the circuit can deduce that 
         [0000]        V   S   −V   T =2*( V   1   −V   3 )  Equation (19)
 
         [0000]        V   T =(3* V   3   −V   1 )/2  Equation (20)
 
         [0071]    Combining equations (19) and (20) with (1) and (2) the power delivered to the load P D  is given by: 
         [0000]        P   D =Real Part((4 *V   1   *V   3   −V   1   2 −3* V   3   2 )/ Z   ONSW )  Equation (21)
 
         [0072]    Or instead, by measuring V 11  and V 13  and taking into account the biasing resistors and the impedance of the detector, the estimation circuit can deduce that the power delivered to the load P D  can be given by: 
         [0000]        P   D =Real Part((4 *V   11   *V   13   −V   11   2 −3* V   13   2 )*(( Z   D   +R   1 ) 2   /Z   D   2 )/ Z   ONSW )  Equation (22)
 
         [0073]    In the previous examples the power delivered to the load was estimated when the transistors were operating as switches, i.e. the purpose of the circuit was to direct signal flow in one direction and prevent signal flow in another direction. The same principles apply however when the function of the transistors is to attenuate the level of the signal rather than the flow of the signal. 
         [0074]      FIG. 14  shows a schematic of a simple two-bit digital attenuator with bias control circuits removed. For this example the resistors R 1  and R 2  are large compared to the resistance across the transistor when it is ‘ON’ and small compared to the resistance across the transistor when the transistor is ‘OFF’. The circuit works as follows: when transistors T 1  and T 2  are ‘OFF’ the impedance between node A and node B is R 1 +R 2 ; when T 1  is ‘ON’ and T 2  is ‘OFF’ the resistance is R 2 ; when T 1  is ‘OFF’ and T 2  is ‘On’ the resistance is R 1  and when transistors T 1  and T 2  are ‘ON’ the impedance between node A and node B is as before the ‘ON impedance, Z ON , of the two transistors in series. 
         [0075]    The power delivered to the terminating impedance can be derived in a way similar to how equation 8 was derived to give: 
         [0000]        P   D =Real Part((4 *V   1   *V   2   −V   1   2 −3* V   2   2 )/ Z )  Equation (23)
 
         [0000]    where Z is either R 1 +R 2 ; R 2 ; R 1  or Z ON  depending on which state transistors T 1  and T 2  are in. 
         [0076]    As before, Equation (23) can be adapted to include the effects of bias circuits and the detector impedance. 
         [0077]    The above embodiments ( FIGS. 8 to 13 ) the terminating impedance is unknown and possibly changing and leakage voltages are measured to determine the power delivered to the load. In some cases the power delivered may be estimated on the basis of the load impedance not being known, but it being known that it is not changing. The fact that it is known that the load impedance is not changing means that the delivered power can be estimated even though the impedance across the attenuator switches is not known. Equation 25 can be used to calculate the power delivered to the load in these circumstances. Using Equation (25) below, Zt can be implicitly estimated using calibration mechanisms as described above. 
         [0078]    Referring to  FIG. 15  transistors in a Voltage Variable Attenuator (VVA) are biased with voltages that can take any value between the voltage that turns the transistor fully ‘ON’ and the voltage that turns the transistor fully ‘OFF’. In this way the impedance across the transistor can vary anywhere between its value when it is fully ‘ON’ and its impedance when it is fully ‘OFF’. The control voltage V CTRL  can be adjusted to continuously adjust the impedance between node A and node B. In this way the attenuation between node A and node B can be continuously adjusted. Using analysis similar to previous analysis if leakage voltages V 1  and V 2  are detected then the voltage at the terminating impedance V T  is given by: 
         [0000]        V   T =(3* V   2   −V   1 )/2  Equation (24)
 
         [0000]    and if the terminating impedance is known, then the power delivered to the load is: 
         [0000]        P   D =Real Part((−6 *V   1   *V   2   +V   1   2 +9* V   2   2 )4* Z   T   Equation (25)
 
         [0079]      FIG. 15  shows one way in which estimation of the output power can be used to linearize the control of the VVA. Voltages proportional to V 1  and V 2  are detected at Detector  1  and Detector  2  and applied to the differential amplifier AMP  1 . The gain of the amplifier is set so that the output voltage V 3  is proportional to V T . For this circuit in accordance with Equation (24) the voltage gain for the signal at the positive terminal is three times the voltage gain for the signal at the negative terminal. 
         [0080]    In  FIG. 15  the estimation circuit comprises amplifiers AMP  1  and AMP  2 . The signal at the output AMP  1  is applied to a squarer circuit so that the output V 4  is proportional to the power delivered to the terminating impedance. This signal is compared to a signal V P , which can represent the desired power to the terminating impedance, in a second differential amplifier AMP  2 . AMP  2  will act to keep voltages at both its input terminals equal to each other, thus as the desired power V P  is adjusted, the voltage V 4  and consequently the output power will follow in a linear fashion. 
         [0081]    Referring to  FIG. 16  in one embodiment a detector comprises an electromagnetic coupler coupled to the power delivery line and a voltage tap off the coupler. The other detector detects gate voltage for a transistor either directly or at a node connected to a gate through a bias circuit. In an estimation circuit, the power delivered to the load is estimated by:
   i) receiving a voltage proportional to the terminal voltage V T  at a node in the switch connected to the gate of any transistor,   ii) receiving a voltage across a resistor through which the electromagnetically coupled current flows, which is proportional to the current delivered to the load I T  and   iii) estimating the power delivered to the load by multiplying these two factors knowing that P D =Real Part(V T *I T ).   
 
       Application Examples 
       [0085]    Wireless devices such as handsets all have a component called an RF (Radio Frequency) switch that connects to the antenna. The function of the RF switch is usually to switch between different modes of operation (e.g. ‘3G’ mode, or GSM mode) or else switch between the user transmitting and receiving. 
         [0086]    All wireless devices also have an RF sensor that attempts to sense the power radiated by the wireless device. This sensed power is then used to control the power radiated by the wireless device to make sure there is enough power transmitted so the connection is not lost, but not too much power transmitted so that battery power is needlessly wasted. 
         [0087]    In one embodiment, our invention embeds the RF sensor into the RF switch in a way that is more accurate, takes less space, and consumes less battery power than existing methods. 
         [0088]      FIG. 17  shows one way how the voltages proportional to load current and voltage are combined in an analog way to give a voltage proportional to the power delivered to the load. 
         [0089]      FIG. 18  shows an architecture for power detection in each transmit path of a multimode handset and shows how the power sensing and power detection can be integrated into a switch SP 9 T which drives an antenna load. The detector and estimation circuits are integrated, as shown at the bottom of the SP 9 T block. 
         [0090]      FIG. 19  shows the results of circuit simulations of a switch with various phases of a 10:1 load VSWR. In these simulations the power delivered to the load is compared with the power sensed using methods described here, and the error by this method is plotted. 
         [0091]    The invention is particularly advantageous for any circuit where gain control is achieved through continuously varying resistance across an FET by varying the gate bias of the FET. Typical applications for these circuits are in the transmit chain of a communications device where the power being transmitted has to be controlled, or in the receive chain of a communications device where the power being received is being controlled to ensure the receiver has enough gain to properly detect the signal but not too much gain so that the receiver saturates and distorts the received signal. These circuits are notoriously difficult to control in a linear manner, since the resistance across the transistors doesn&#39;t vary linearly with the bias voltage applied. The present invention provides an effective way to achieve linear gain control for such circuits. 
         [0092]    While the above description often does not take account of all of the circuit parasitics and non-idealities that exist in real circuits, it is understood that these can be accounted for either through circuit techniques or by means of external calibration. 
         [0093]    While the above methods often depend on knowing the impedance across the transistors, Z ONSW , it is understood that there are different ways to do this, and these can be incorporated without affecting the scope of the invention. 
         [0094]    The invention is not limited to the embodiments described but may be varied in construction and detail.