Wireless communicatoin method and apparatus for reducing reception error by performing automatic gain control (AGC) based on a comparison between the received signal and a reference value

A receiving apparatus includes a variable gain unit to change between a first gain and a smaller second gain, and to amplify a received signal to obtain an amplified signal; a comparator to compare a power of the amplified signal with a reference value; and a controller to set a gain to the first gain while in a standby state, to reset a gain to a third gain between the first and second gains if in a standby state the power of the received signal is larger than the reference value, and then to set a gain to the first gain and return to the standby state if the power is equal to or lower than the reference value, or if not, to a fourth gain between the first and third gains.

FIELD

Embodiments described herein relate to a receiving apparatus receiving a radio signal.

BACKGROUND

Technical developments of receiving apparatuses are in progress, which allow activation of an electronic apparatus such as a TV, an air conditioner, or a laptop PC (personal computer) by a radio signal, and consume low power during standby for a radio signal.

Here, if an interference wave from another apparatus (for example, a terminal of a wireless LAN or an AP (access point)) exists when a radio signal (desired wave) is received, there is a concern that reception accuracy of the desired wave decreases, and the reception error increases. To reduce the influence by this interference wave, it is conceivable to perform AGC (Automatic Gain Control) in the receiving apparatus, so as to prevent reception of the interference wave. In addition, a technique to control a gain using a comparator has been disclosed (see Patent Document 1).

However, when the interference wave exists just before the desired wave is received, it is possible that the AGC is started on the interference wave. As a result, the AGC on the desired wave is not performed, and it is possible that a reception error rate worsens. It is an object of the present invention to provide a receiving apparatus in which the influence of an interference wave is reduced during gain control.

DETAILED DESCRIPTION

In one embodiment, a receiving apparatus includes: a rectifier to rectify a received signal to obtain a direct-current signal; a variable gain unit capable of changing a gain between a first gain and a second gain smaller than the first gain, and to amplify a received signal with a gain to obtain an amplified signal; a comparator to compare a power of the amplified signal with a reference value and to generate a comparison result; and a controller to set a gain to the first gain while being in a standby state, and to reset a gain to a third gain between the first gain and the second gain if the received signal having the power larger than the reference value is received while being in a standby state. After a gain is set to the third gain, the controller sets a gain to the first gain if the power is equal to or lower than the reference value, and after a gain is set to the first gain, the controller turns to the standby state if the power is equal to or lower than the reference value or sets a gain to a fourth gain between the first gain and the third gain and the fourth gain enables reception of the received signal, if the power is larger than the reference value.

Hereinafter, the present embodiments will be described in detail with reference to the drawings.

First Embodiment

FIG. 1schematically illustrates a radio communication system10according to a first embodiment. The radio communication system10includes radio communication apparatuses11,12. The radio communication apparatus11transmits a signal to the radio communication apparatus12. The radio communication apparatus11transmits a radio signal to the radio communication apparatus12in, for example, the 2.4 GHz band using a first communication method.

As the first communication method, a modulation method such as ASK (Amplitude Shift Keying) or PPM (Pulse Position Modulation) can be used. In these modulation methods, the amplitude of a signal is changed over time, and thus the radio signal contains amplitude information. Accordingly, it is possible to activate the radio communication apparatus12by extracting the amplitude information by a rectifier104, which will be described later. Consequently, power consumption of the radio communication apparatus12during standby for a radio signal can be decreased.

Here, the case where a radio communication system20different from the radio communication system10exists is assumed. The second radio communication system transmits/receives a radio signal using a second communication method in the same frequency band (for example, the 2.4 GHz band) as that of the radio communication system10.

As the second communication method, for example, a communication method complying with the IEEE 802.11b/g/n standard is conceivable.

Here, the radio communication system20is a wireless LAN system having a wireless LAN terminal (STA (Station))21and a wireless LAN base station (AP (Access Point))22, and transmitting/receiving a wireless LAN frame signal.

Here, the radio signal transmitted by the radio communication apparatus11can be received by at least the radio communication apparatus12. Further, a radio signal transmitted by the STA21or AP22can be received by at least the radio communication apparatus12and the apparatus of the STA21or AP22.

When complying with the IEEE 802.11 standard, the STA21and the AP22uses CSMA/CA (carrier sense multiple access with collision avoidance network) as an access method. Accordingly, when the STA21and the AP22recognize a radio signal before transmission, they do not perform transmission until this radio signal is no longer recognized. However, it is possible that the STA21and the AP22do not recognize a radio signal and start transmission at a timing just before the radio communication apparatus11starts transmission.

Therefore, when the radio communication apparatus11transmits a radio signal (desired wave) after a radio signal (interference wave) is transmitted from the STA21, the radio communication apparatus12detects an edge by the interference wave (false detection of edge (false detection of desired wave)) and controls a gain (AGC). As a result, it becomes difficult to accurately demodulate the radio communication signal (desired wave) transmitted by the radio communication apparatus11, which is received immediately thereafter.

Accordingly, in this embodiment, as will be described later, when the radio communication apparatus12detects an edge (radio signal), reception sensitivity is increased to confirm the presence of a radio signal in a middle stage of gain control. As a result, the desired wave, which is received just after the interference wave, is demodulated accurately.

The radio communication apparatus12will be described usingFIG. 2. The radio communication apparatus12receives and demodulates a modulated signal of the first communication method. The radio communication apparatus12has: a rectifier rectifying a received signal to obtain a direct-current signal; a variable gain unit capable of changing a gain between a first gain and a second gain smaller than the first gain, and amplifying the received signal with the gain to obtain an amplified signal; a comparator comparing the power of the amplified signal with a reference value and generating a comparison result; and a controller setting the gain.

The controller sets the gain of the variable gain unit to a third gain between the first gain and the second gain when the received signal having the power larger than the reference value is received while being in a standby state. After the gain is set to the third gain, the controller sets the gain to the first gain when the power is equal to or lower than the reference value. After the gain is set to the first gain, the controller turns to the standby state when the power is equal to or lower than the reference value or sets the gain to a fourth gain, which is between the first gain and the third gain and is smallest among gains which enable reception of the received signal, when the power is larger than the reference value.

Specifically, the radio communication apparatus12has an antenna101, a band-pass filter (BPF)102, a matching circuit (MC)203, a rectifier (RECT)104, a variable amplifier (VAMP)105corresponding to the variable gain unit, a comparator (CMP)106, a demodulator (DMD)107corresponding to the controller, and an apparatus main body (MB)108.

The antenna101converts an electromagnetic wave inputted from the outside of the radio communication apparatus12and outputs it to the band-pass filter102.

The band-pass filter102is an RF filter for limiting a band. The band-pass filter102outputs to the matching circuit103at least frequency components in the band (for example, 2.4 GHz band) of the radio communication system10in the received signal inputted from the antenna101, and attenuates other frequency components.

The matching circuit103performs matching of the electrical signal in the 2.4 GHz band inputted from the band-pass filter102and outputs a matched signal to the rectifier104.

The rectifier104rectifies a received signal in the 2.4 GHz band inputted from the matching circuit103and converts it into a BB (baseband) analog signal (direct-current signal), and outputs this signal to the variable amplifier105.

The variable amplifier105amplifies the power of the BB analog signal inputted from the rectifier104to generate an amplified signal, and outputs the amplified signal to the comparator106. The variable amplifier105changes the gain between the first gain and the second gain smaller than the first gain according to a control signal from the demodulator107.

The comparator106receives the BB analog signal from the variable amplifier105and compares the power (more precisely, voltage) of the received BB analog signal with a threshold power (more precisely, a reference voltage Vref) which is set in advance. A result thereof is converted into a binary digital signal (H or L) and outputted to the demodulator107as a power comparison result. When the power of the BB analog signal is larger than the threshold power, a high signal is outputted to the demodulator107. On the other hand, when the power of the BB analog signal is smaller than the threshold power, a low signal is outputted to the demodulator107.

The demodulator107receives a digital signal from the comparator106, demodulates this signal, and controls activation or the like of the apparatus main body108based on a result of the demodulation. The demodulator107outputs a control signal to the variable amplifier105when a condition which will be described later is satisfied, so as to control the gain.

The apparatus main body108is an electronic apparatus such as a TV, an air conditioner, or a laptop PC (personal computer).

(Details of the Rectifier104)

FIG. 3is a circuit diagram representing an example of the internal structure of the rectifier104. In this diagram, the rectifier104has transistors (FET: Field Effect Transistor) M1, M2, capacitors C1, CA, C3, switches SW11, SW12, and voltage sources VT. The capacitors CA are connected between respective gates and sources of the transistors M1, M2. The voltages VT are connected to the capacitors CA via switches SW11, SW12.

The switches SW11, SW12are controlled by the demodulator107. When a signal is not received, the switches SW11, SW12are closed while a signal is not received, and the voltages VT are applied to the capacitors CA to thereby charge the capacitors CA. When a signal is received, the switches SW11, SW12are opened and the voltages of the capacitors CA are applied between the respective gates and sources of the transistors M1, M2.

The capacitor C1is connected between an RF input terminal INRFand the source of the transistor M2. The RF input terminal INRFis connected to the matching circuit103. The RF signal (received signal) is inputted from the RF input terminal INRFto the transistor M2via the capacitor C1. The capacitor C3accumulates electric charges outputted from the transistor M2.

The transistors M1, M2rectify the received signal (operates as a diode). When magnitudes of thresholds of the transistors M1, M2become large, a loss during rectification by the transistors M1, M2becomes large. By making the thresholds apparently small, the loss can be decreased. When the capacitors CA are charged with electric charges to generate a voltage by the amount of threshold voltages, the threshold voltage is cancelled to thereby reduce the loss (improvement in gain).

Here, by making the voltage of the voltage sources VT variable, it is possible to control the gain of the rectifier104. That is, instead of the variable amplifier105or together with the variable amplifier105, it is possible to change the gain by the rectifier104. In this case, the rectifier104receives a control signal from the demodulator107and changes the gain by changing the voltage of the voltage sources VT according to this control signal.

(Details of the Demodulator107)

A state transition of the demodulator107will be described usingFIG. 4. The demodulator107transits through a standby state, an AGC processing state, a timing synchronization processing state, and a demodulating state, and performs different processing according to each state. When a certain condition is met in each state, the demodulator transits to a different state.

The standby state is a state of waiting for a desired wave to come. When the demodulator107detects an edge (detection of desired wave), the demodulator transits from the standby state to the AGC processing state. For example, when the input of the comparator106is a high signal once or plural times consecutively, it is judged that an edge is detected.

In the AGC processing state, AGC processing is carried out. That is, as will be described later, the gain of the variable amplifier105is adjusted so that a threshold of the comparator106becomes a value between the power of the desired wave and the power of the interference wave. That is, it is adjusted to the smallest gain among gains which enable reception of the desired wave. By making the power of the interference wave smaller than the threshold of the comparator106, the influence of the interference wave can be reduced. However, here it is assumed that the power of the interference wave is small as compared to the power of the desired wave.

When the AGC processing is completed, the demodulator transits to the timing synchronization processing state. However, when false detection of edge is judged in middle of the AGC processing, the demodulator transits from the AGC processing state to the standby state. The false detection of edge will be described later.

In the timing synchronization processing state, a preamble is detected to perform timing synchronization processing. When the timing synchronization processing is finished, the demodulator transits to the demodulating state. However, when no preamble is detected, the demodulator transits from the timing synchronization processing state to the standby state.

In the demodulating state, demodulation processing is performed. Processing is performed according to a demodulation result, and when the demodulation processing is finished, the demodulator transits to the standby state.

(Details of the AGC Processing State)

Details of the AGC processing state will be described below. In the AGC processing state, a desired wave level is controlled to be an appropriate level. That is, the gain of the variable amplifier105(and the rectifier104depending on the situation) is controlled so as to avoid that an interference wave having a sufficiently smaller power than the desired wave does not surpass the threshold of the comparator106. The target gain of the AGC is a gain such that the power of the desired wave surpasses the threshold of the comparator106and the power of the interference wave is lower than the threshold of the comparator106as much as possible.

Operation of the AGC will be described.FIG. 5is a flowchart representing the contents of processing in the standby.

Prior to the AGC processing state (standby state), the gain is set to maximum (0 dB) in a dynamic range (maximum reception sensitivity, that is, receivable signal strength is minimum. First gain). Upon detection of an edge, the demodulator transits to the AGC processing state (step S13).

The gain is changed stepwise as follows in the AGC processing state (step S13). The dynamic range is divided into, for example, 2nsections (n: integer) ((2n+1) as a number of boundaries), and the gain is controlled by the resolution corresponding to the sections. For example, the dynamic range of 48 dB (0 to −48 dB) is divided into eight, and the gain is controlled by the resolution of 6 dB. When the dynamic range is divided into 2nsections, determination of the gain by a dichotomizing search becomes easy.

The gain is adjusted using a preamble for AGC contained in a signal. The preamble for AGC is formed of a high signal.

Among input signals from the comparator106, for example, an amount of data of five clocks is taken in for adjusting the gain of the variable amplifier105. For example, when there are four or more high signals (detection of high signal), the gain of the variable amplifier105is decreased. On the other hand, when there are less than four high signals (there are two or more low signals) (non-detection of high signal), the gain of the variable amplifier105is increased. Thus, a search is performed for the limit of the gain with which the input signal from the comparator106is considered as a high signal in the range of resolutions (step S14).

Basically, the dynamic range is sequentially divided in two, and it is determined which of them the gain is set to (dichotomizing search). In the dichotomizing search, the gain for the first time (initial value of the gain, third gain) is set to, for example, the center (here, −24 dB) of the dynamic range. Then, for the second time and the third time, the gain is set to respective previous gains ±12 dB and ±6 dB depending on the presence/absence of detection of high signal. Finally, the gain of the variable amplifier105is set to a minimum gain (fifth gain) which enables detection of high signal (step S14). The fifth gain is a value between the first gain and the second gain.

In this embodiment, if the high signal is not detected even when the gain is changed (step S21), the adjustment of the gain is stopped once, and the presence of the desired signal is reconfirmed (steps S22, S23).

First, it is judged whether or not non-detection of high signal occurs sequentially as a result of gain setting for the first to N-th times (step S21). N can be an appropriate number of 1 or larger. When N=1, it means that the high signal is not detected as a result of gain setting for the first time. Thus, the demodulator107also operates as a counting unit counting the number of times the non-detection of high signal occurs. When this judgment is “yes”, the gain is set again to the maximum (first gain), and it is judged whether the high signal is detected or not (steps S22, S23).

(4) Transition to the Standby State (Steps S23, S12)

When the judgment in step S23is “no”, it is assumed as false detection of edge, and the demodulator transits to the standby state (step S12).

When the judgment in step S23is “yes”, the gain is adjusted to continue from gain control of the N-th time, by the dichotomizing search similarly to steps S13, S14. That is, the gain of the variable amplifier105is set to the minimum gain (fourth gain) which enables detection of high signal. The fourth gain is a value between the first gain and the third gain.

FIG. 6is a graph representing an example of a change of the gain over time. As an example, a gain transition until the gain is set to −12 dB by the AGC is illustrated. After an edge is detected at 0 dB which is the minimum reception sensitivity, the AGC processing is started. The presence/absence of detection of high signal is confirmed with the gain of −24 dB, 0 dB, −12 dB, −18 dB, −12 dB. In other words, it is confirmed that the threshold of the comparator106is surpassed, that is, the high signal appears four times or more in the amount of data of five clocks.

Here, since the high signal is not detected by gain control for the first time (−24 dB), the gain is set to the maximum (0 dB) in gain control for the second time. That is, this diagram corresponds to the case where N=1 in the flowchart ofFIG. 4. In this example, the high signal is detected by setting the gain to the maximum (0 dB), and the dichotomizing search is resumed.

The dichotomizing search is resumed to continue from gain control for the first time. That is, the demodulator107sets the gain of the variable amplifier105between the first gain and the third gain. Since the high signal is not detected by gain control for the first time, it is set to (−12 dB) by gain control for the third time. Thereafter, as a result of the dichotomizing search, the gain is controlled to −18 dB, −12 dB. It is confirmed that the high signal is not detected with the gain −18 dB, and the gain is finally controlled to −12 dB. Thereafter, it is confirmed that the high signal is detected with the gain −12 dB (the high signal appears four times or more in the amount of data of five clocks), and the gain is locked and the AGC processing is finished.

Here, the presence/absence of the AGC preamble is judged by setting the gain to the maximum, 0 dB, in gain control for the second time. That is, when an edge is falsely detected, the false detection of edge can be judged in gain control for the second time. The radio communication apparatus12stops the AGC processing thereafter, and can transits to the standby state while keeping the minimum reception sensitivity. That is, it becomes possible to receive and demodulate a radio signal transmitted by the radio communication apparatus11, which is received just after the false detection.

(A Frame Format Transmitted by the Radio Communication Apparatus11)

FIG. 7illustrates a frame format transmitted by the radio communication apparatus11. The frame format includes a preamble PR1for AGC, a preamble PR2for timing synchronization, an ID bit ID, an instruction bit COD, and a parity bit PRY, and is a signal of an ASK modulation method for example.

The AGC preamble PR1is entirely formed of a high signal. The preamble PR2for timing synchronization is formed of a unique word which does not exist in the field of the ID bit or the instruction bit.

The radio communication apparatus12performs edge detection and AGC processing as described above with the received preamble for AGC.

FIG. 8andFIG. 9are graphs representing changes over time of the power of a signal and the threshold of the comparator106during ordinary AGC processing. UnlikeFIG. 6, these graphs represent the threshold of the comparator106with reference to the power of a previous signal amplified by the variable amplifier105. Consequently, the influence of a change of gain does not appear in the power of the signal in these graphs. On the other hand, the influence of a change of gain appears apparently in the threshold of the comparator106. Here, it is assumed that relative power −48 dB to 0 dB corresponds to the gain 0 dB to −48 dB inFIG. 4. That is, the relative power −48 dB in these graphs corresponds to the maximum gain 0 dB inFIG. 6.

InFIG. 8, just before start of transmission of a desired wave DW from the radio communication apparatus11, an interference wave IW is not transmitted from the radio communication system20. Accordingly, the AGC processing succeeds, and the gain can be controlled to the desired gain with the preamble PR1for AGC. That is, even when the interference wave IW sufficiently smaller than the desired wave DW exists in the preamble PR2for timing synchronization, the ID bit ID, the instruction bit COD, and the parity bit PRY, there is no influence of the interference wave, and demodulation is possible.

InFIG. 9, just before start of transmission of the desired wave DW from the radio communication apparatus11, an interference wave IW1is transmitted from the radio communication system20. Accordingly, the AGC processing fails. The transmission signal (interference wave) from the radio communication system20causes false judgment of edge detection, and the AGC processing is started. Thereafter, when the radio signal transmitted by the radio communication apparatus11is received in middle of the AGC processing, an error occurs in gain setting by the dichotomizing search. In this example, as a result of the AGC processing, the gain is set to 0 dB (relative power −48 dB). As a consequence, the interference wave IW2influences the output from the comparator106, and it becomes difficult to accurately demodulate the desired wave from the radio communication apparatus11.

The AGC processing in this embodiment will be described next. It is assumed that, as illustrated inFIG. 8, the interference wave IW is transmitted from the radio communication system20after start of transmission of the desired wave DW from the radio communication apparatus11. In this case, the judgment in step S21ofFIG. 5is “no”, and a variation status of the gain is similar to that in the ordinary AGC. The AGC processing succeeds and the gain can be controlled to the desired gain with the preamble PR1for AGC.

FIG. 10is a graph representing changes over time of the power of a signal and the threshold of the comparator106during AGC processing of this embodiment corresponding toFIG. 9.

InFIG. 10, just before start of transmission of the desired wave DW from the radio communication apparatus11, the interference wave IW1is transmitted from the radio communication system20. UnlikeFIG. 9, the AGC processing succeeds. Similarly toFIG. 9, the transmission signal (interference wave) from the radio communication system20causes false judgment of edge detection, and the AGC processing is started.

However, the judgment in step S21ofFIG. 5is “yes”, and the gain is set to the maximum in middle of the AGC processing. In this example, the high signal is not detected for two times of gains −24 dB, −12 dB (−24 dB, −36 dB by the threshold in relative power), and this causes the gain to be set to the maximum, 0 dB. The non-detection of high signal causes a transition to the standby state. That is, this example corresponds to the case where N=2 in step21ofFIG. 5.

By receiving the radio signal transmitted by the radio communication apparatus11in the standby state, the AGC processing is performed at the timing of the AGC preamble PR1. As a result, even when the interference wave is transmitted just before start of transmission of the desired wave DW, it is not influenced by the interference wave, and the desired wave can be demodulated accurately.

In the foregoing, an edge is detected using the AGO preamble PR1. In this point, it is possible to use a preamble PR0for edge detection besides the AGC preamble PR1.

FIG. 11is a graph representing an example of a frame format including the preamble PR0for edge detection. The preamble PR0for edge detection is disposed prior to the AGC preamble PR1. The preamble PR0for edge detection in this example is formed of “HLH”, that is, a combination of two high signals and one low signal. The preamble PR0for edge detection may employ one of various patterns, such as “HLHLH” and “HHLH” other than the “HLH”.

Thus, by using the preamble PR0for edge detection, and by the radio communication apparatus12confirming the pattern of the preamble PR0for edge detection, it is possible to prevent false detection of edge.

As described above, in the radio communication system10, the step of setting the gain to maximum in the AGC processing of the radio communication apparatus12is incorporated. Consequently, even when the interference wave (wireless LAN frame signal transmitted by the radio system20) is transmitted just before transmission of the desired wave (just before the radio communication apparatus11transmits the radio signal), it becomes possible for the radio communication apparatus12to receive and normally demodulate the desired wave.

Second Embodiment

Discriminating a desired wave and an interference wave in the period of performing AGC processing reduces the probability of failure of the AGC processing in the case where the desired wave occurs after a predetermined time from occurrence of the interference wave.

Here, to reduce the probability of failure of the AGC processing, an AGC processing time may be shortened. By using this technique in combination, it is possible to further reduce the probability of failure of the AGC processing. The description below will be given focusing on an approach for reducing the AGC processing time.

FIG. 12represents the internal structure of a radio communication apparatus32of a radio communication system30according to a second embodiment. The overall structure of the radio communication system30is substantially similar to the radio communication system10ofFIG. 1, and thus the description thereof is omitted.

The radio communication apparatus32has an antenna101, a band-pass filter (BPF)102, a matching circuit (MC)103, a variable attenuator (VATT)109, a rectifier (RECT)104, a variable amplifier (VAMP)105, a comparator (CMP)106, a demodulator (DMD)107, and an apparatus main body (MB)108.

In the radio communication apparatus32, the variable attenuator109is added to the radio communication apparatus12. That is, a signal which passed the band-pass filter102is inputted to the rectifier104via the matching circuit103and via the variable attenuator109operating at a high frequency.

Here, the variable attenuator109and the variable amplifier105are used to adjust the gain of the radio communication apparatus32. As already described, the rectifier104can also be used for changing the gain.

Further, the variable attenuator109and the variable amplifier105do not change the gain sequentially but switch the gain digitally. In the variable attenuator109and the variable amplifier105, the gain is controlled by control signals VCNT1, VCNT2, respectively, having a predetermined bit row with a step width of S [dB] from the demodulator107.

Further, the gain (first to fourth gain) described in the first embodiment is of an amount of adding an attenuation amount of the variable attenuator109and an amplification amount of the variable amplifier105. That is, since the gain of the variable amplifier105described in the first embodiment is determined by an amplified signal with respect to a received signal, the gain of the first embodiment corresponds to one in which both the attenuation amount of the variable attenuator109and the amplification amount of the variable amplifier105are added in this embodiment. By adjusting both the attenuation amount of the variable attenuator109and the amplification amount of the variable amplifier105, the demodulator107sets the gain (first to fourth gain) similarly to the first embodiment.

To achieve the desired gain (first to fourth gain), the demodulator107may adjust only one of the attenuation amount of the variable attenuator109and the amplification amount of the variable amplifier105. The demodulator107may adjust the attenuation amount of the variable attenuator109first, and then adjust the amplification amount of the variable amplifier105. Further, by preparing a table or a function indicating the relation of the gain with the attenuation amount of the variable attenuator109and the amplification amount of the variable amplifier105in advance, the demodulator107may adjust the attenuation amount of the variable attenuator109and the amplification amount of the variable amplifier105according to these table and function.

FIG. 13is a diagram illustrating an example of AGC control by the dichotomizing search (binary search). Powers −L (dBm) and −H (dBm) represent the maximum power and the minimum power, respectively, which can be received. That is, the powers −L (dBm) and −H (dBm) correspond to the maximum and minimum gain, respectively. The power −M (dBm) is a central power between a maximum power and a sensitivity power which are denoted by dB, where M=(L+H)/2. A reception dynamic range C=L−H [dB].

The case where the power of an inputted signal is −M (dBm) or higher and −M+S (dBm) or lower is considered. After detection of an edge, a change of the gain and judgment of H/L by the comparator106are repeated. In this example, the power as changed sequentially as −M (dBm), −M+2S (dBm), −M+S (dBm), −M (dBm). That is, in this example, the gain is changed four times since the edge is detected.

In this manner, in the dichotomizing search, when areas to be judged are W=2(w+q)(q=0 or 1, w is integer), (w+1) steps are necessary.

Modification Example 1

Here, to make an error rate of the gain setting small, the number of steps of gain setting is set equal to or lower than the number of steps necessary for the dichotomizing search.FIG. 14illustrates the structure of a radio communication apparatus32aaccording to modification example 1.

Unlike the radio communication apparatus32, the radio communication apparatus32ahas two comparators (CMP1, CMP2)111,112. The comparators111,112detect outputs of the variable amplifier105, the rectifier104, respectively. As compared to a reference voltage Vref1of the comparator111, a reference voltage Vref2of the comparator112is 10(S/20)times the reference voltage Vref of the comparator111. 10(S/20)times mean S [dB] when converted into dB.

When the maximum gain of the variable amplifier105is E [dB], the comparator112judges H/L with reference to a value higher by (E+S) [dB] as compared to the comparator111. Therefore, when the rectifier104and so on operate linearly, if the half C/2 [dB] of a variable range of the gain is equal to E+S [dB], the comparator112has performed the judgment in the first step of the dichotomizing search.

However, the rectifier104has a transmission function of “y=x2”, and thus the dynamic range of the rectifier and the following is 2C [dB]. Consequently, by setting 2C/2=C=(E+S) [dB], discrimination in the first step of the dichotomizing search can be performed by the comparator112. In addition, this setting error needs to be equal to or lower than S [dB] of the minimum range.

It is possible in principle to perform discrimination in the first step of the dichotomizing search by the comparator112as follows. Specifically, the reference Vref2for judgment by the comparator112is set to 10(C/20)times the reference Vref1for judgment by the comparator111, and the comparator112is connected to the same terminal as the comparator111. However, in this case, the output of the variable amplifier105is saturated even by an input of −M (dBm) or lower, and thus the comparator112is not able to judge.

To avoid this, in this embodiment, the output of the rectifier104is inputted to the comparator112.

FIG. 15illustrates how the first one step is reduced. Solid lines represent this embodiment and dashed lines represent the conventional example. At the same time as edge detection by the comparator111, the comparator112judges whether the input signal level is higher or smaller than −M (dBm). Accordingly, the number of steps is decreased by one.

Modification Example 2

Next, another step reduction method will be described.FIG. 16illustrates the structure of a radio communication apparatus32baccording to modification example 2. Unlike the radio communication apparatus32a, in the radio communication apparatus32b, both the comparators111,112are connected to the variable amplifier105. The final step of the dichotomizing search judges H/L in adjacent regions relative to the previous step. Using the structure ofFIG. 16, the adjacent regions can both be detected in one previous step of the final step. Thus, the final step of the dichotomizing search can be eliminated. The comparators111,112detect the outputs of the variable amplifier105, the rectifier104, respectively. As compared to the reference voltage Vref1of the comparator111, the reference voltage Vref2of the comparator112is 10(C/20)times the reference voltage Vref of the comparator111.

FIG. 17illustrates a judgment procedure of this approach. Solid lines and dashed lines correspond to this embodiment and the conventional example, respectively. The comparator112discriminates H/L in adjacent regions together with the comparator111. By performing discrimination simultaneously with the (Modification Example 3)

As described above, by using the comparators111,112, the radio communication apparatuses32a,32beliminate the initial step or the final step of the dichotomizing search. Here, by switching an input destination of the comparator112, the comparator112can be used for both the initial step and the final step.

FIG. 18illustrates the structure of a radio communication apparatus32caccording to modification example 3. Unlike the radio communication apparatuses32a,32b, in the radio communication apparatus32c, a switch SW for switching a path is provided at the input of the comparator112. The input of the comparator112is connected to one of the output of the rectifier104and the output of the variable amplifier105via the switch SW.

In preparation for judgment in the initial step of gain adjustment, the switch SW normally connects the input of the comparator112to the output of the rectifier. Since incoming of a signal can be discriminated by the comparator111(edge detection), the input of the comparator112is connected to the output of the variable amplifier105by controlling the switch SW1until the final step. Thus, in the final step, the input range is set by both the comparator111and the comparator112. Thus, two steps can be eliminated.

Modification Example 4

FIG. 19illustrates the structure of a radio communication apparatus32daccording to modification example 4. Unlike the radio communication apparatus32c, a comparator (CMP3)113is added to the radio communication apparatus32d. As already described, the comparator112is shared in the modification example 3. In this point, in modification example 4, the comparators112,113detect an output of the rectifier104and an output of the variable amplifier105, respectively. Further, the reference for judgment of the comparator112and the comparator113is 10(C/20)times that of the comparator111.

FIG. 20illustrates a gain setting procedure in the radio communication apparatuses32c,32d. Solid lines and dashed lines correspond to this embodiment and the conventional example, respectively. As compared to the ordinary dichotomizing search, two steps of the initial step and the final step are reduced.

The radio communication apparatus32dhas comparators111,112. When the comparators111,112are operated constantly, the power consumption increases by the amount of power consumption of the comparator112. Here, the power consumption of the comparator112can be reduced as follows. Specifically, the presence/absence of a signal is detected by the comparator111, and when it is judged that the signal is present, the comparator112is operated. Thus, the comparator112does not operate constantly, and operates only when a signal comes. In this manner, the power consumption of the comparator112can be reduced. In addition, this configuration can also be applied to the radio communication apparatus32c.

FIG. 21illustrates a gain setting procedure at this time. Solid lines and dashed lines correspond to this embodiment and the conventional example, respectively. As illustrated in this diagram, operation of the comparator112is after an edge is detected, and thus the judgment is delayed by this. However, it is not necessary to newly set a gain. Accordingly, as compared to the case where the judgment is performed after setting a gain, the time for the comparator112to perform judgment shortens.

Here, it is conceivable to change the reference Vref2for judgment of the comparator112. That is, the reference Vref2for judgment=10 mV*10(n*S/20)is set, and n is changed corresponding to steps.

FIG. 22illustrates a gain setting procedure at this time. Solid lines and dashed lines correspond to this embodiment and the conventional example, respectively. When a desired level to be detected is from −M dBm to (−M+S) (dBm) or lower, detection can be done in two steps. In the initial step, the input of the comparator112is connected to the output of the rectifier104, and n=1. In the second step, the input of the comparator112is connected to the output of the variable amplifier105, and n=3. In this case, L is outputted by judgment of the comparator111, and thus the input range is limited.

As described above, in this embodiment, by detection of the presence/absence of a signal and by reduction of the AGC setting time by adding the comparator, the error probability of AGC setting can be reduced.

In particular, the AGC setting in the case of using the dichotomizing search is described in this embodiment. By performing AGC setting using the above-described dichotomizing search when the fourth gain and the fifth gain of the first embodiment are set, the AGC setting time can be shortened, and the error probability of AGC setting can be reduced.

Here, there may be a case where plural gain changing means with different speeds are used to change the gain. For example, it is conceivable to use the variable attenuator109which is relatively high speed and the variable amplifier105which is relatively low speed in combination. In this case, it is conceivable to accelerate the gain control totally by using high-speed gain changing means as much as possible.

For example, only the high-speed gain changing means are used in the initial and first half stage of gain control, and the gain is controlled by the low-speed gain changing means in the last half stage of gain control. Specifically, inFIG. 5, the high-speed gain changing means are used for changing the gain in the initial stage of step S13(the stage smaller than the number N of times in step S21) and S22. In this manner, only the high-speed gain changing means are used in the case of false detection of edge. In the case where it is not false detection of edge, only the high-speed gain changing means are used initially, and the low-speed gain changing means are used in the middle and thereafter.

Other Embodiments