1. Field of the Invention
This application relates to adjusting signal amplification, and more particularly to RSSI estimation.
2. Description of the Prior Art
Received signal strength indication (RSSI), is used very often to access whether a radio frequency (RF) channel is clear or how strong the RF signal or interference is. In conventional RSSI detection or estimation, a section of serially linked limiting amplifiers and rectifiers are used to generate an analog signal, which is typically sampled by an analog to digital converter (ADC).
Please refer to
Use of these components not only occupies a significant portion of an analog circuit in an RF receiver, but also requires a large amount of current.
A circuit for RSSI estimation is proposed. The circuit may include a cascaded chain of variable gain amplifier stages, a threshold detector configured to output a indication signal according to a comparison of output of the cascaded chain of variable gain amplifier stages with a predetermined threshold, and an automatic gain controller configured to adjust gain of at least one variable gain amplifier of the cascaded chain of variable gain amplifier stages according to the indication signal. Each stage may include a variable gain amplifier, a switch module, and a high pass filter. The switch module may be configured to electrically connect or disconnect an input of the variable gain amplifier of the at least one variable gain amplifier stage to/from an output of a previous variable gain amplifier stage according to a switch control signal.
A method for RSSI estimation is further disclosed. The method includes amplifying a received input signal using a cascaded chain of variable gain amplifier stages, comparing output of the cascaded chain of variable gain amplifier stages with a predetermined threshold and outputting results of the comparison as a indication signal, and adjusting gain of at least one variable gain amplifier of the cascaded chain of variable gain amplifier stages according to the indication signal.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
In the prior art, RSSI is typically detected with the method shown in
The question is how to control the VGA gain? For the most efficient implementation, a digitally controlled VGA is used as an example; however the concept can be extended into an analog controlled VGA without departing from the scope of the invention. The step size of the digitally controlled VGA determines the resolution and error of the RSSI detection.
Initially, the VGA is set at the highest gain or a relative high gain so that the desired RF signal will trigger a threshold detector, which compares the received signal to a predetermined constant threshold. This initial gain is set so that the decodable RF signal will trigger the threshold detector but minimize the chance of false triggers due to thermal or circuit noise effects.
When the threshold detector output, which is a digital signal, is sampled by the state machine, the state machine determines if the triggering is caused by signal or noise with multiple samples. If the state machine determines the triggering is due to RF signal or interference, it adjusts the VGA gain in such a way that the final gain and the gain adjustment most nearly preceding the final gain will make the polarity of the threshold detector's output alternate except at the lowest gain.
After the gain adjustment procedure is finish and the final gain value is close to an expected gain which is needed for the receiving signal, an automatic gain controller (AGC) will transfer the gain value information into an RSSI value, then output to other outside application blocks.
In the proposed approach, a digitally controlled variable gain amplifier (VGA), a threshold detector, and an automatic gain controller (AGC) having a state machine which controls VGA gain are utilized so that the received signal at the threshold detector is around the required level. Meanwhile, a gain value to RSSI transformation scheme transfers the final gain value into RSSI value.
Please refer to
During the VGA gain adjustment, many practical factors need to be considered, such as direct current (DC) and alternating current (AC) voltage signal settling of the VGA, or DC removal time. The goal is to make sure that the signal presented at the threshold detector is not distorted by the gain adjustment itself. There are many ways to search for the required gain, but once the final gain is reached, the state machine can indicate to the receiver that the RSSI is ready.
To minimize wrong triggering or lack of triggering due to noise, certain fault tolerance mechanisms can be built into the gain search algorithm. This new RSSI detection particularly fits well with a modulation having a constant envelope, such as frequency or phase modulation and its variants but is not limited to such.
In this new approach, a multi-stage VGA can be controlled by a digital AGC. Between each stage of the VGA, at least one high pass filter may be inserted to couple the AC signal to the next VGA stage. The output signal of final VGA stage high pass filter may be compared with a predetermined threshold voltage level, so that the gain of the VGA stage can be adjusted according to whether the current state is overflow or insufficient. This concept can be extended to a smarter searching algorithm base on the period of detected signal without departing from the scope of the invention. Finally, the state machine selects a gain to make amplitude of the signal around the predetermined level.
A state machine could provide a corresponding RSSI value according to selected gain. However, there are several challenges to this method.
First, since the output voltage of the VGA stages is compared with a DC voltage, the output common mode voltages (Vcm) under different conditions should be identical. The detection result would not be reliable if the compared sources vary due to environmental or manufacturing conditions or even be unknown. Therefore, it is necessary to provide a predictable or constant reference voltage to distinct the signal level.
Furthermore, an amount of instantaneous residual charge after gain adjustment leads to the DC level of VGA stage shifting which is undesirable. Additionally, the DC shift is a time varying value related to the voltage level before gain adjustment, so it is hard to predict or compensate.
From the example of
For this purpose, a switch module may be placed right before the VGA of each VGA stage. The switch modules separate the operation of the VGA stages into two modes, an amplifying mode and a DC removal mode. In the amplifying mode, the entire chain of VGA stages can amplify the input signal. Once the gain needs to be changed, the switch modules cause the chain of VGAs to enter DC removal mode. In this case, each VGA stage is isolated, the AC signal is blocked, and the residual charge can discharge quickly to reset the DC level of each VGA stage. Through the controlling of the state machine, these two modes can be alternately activated to search for the correct gain and provide a corresponding RSSI value after a few detection cycles.
Please refer to
Please refer now to
A threshold detector 550 may receive the output signal from the chain of VGA 580 stages and determine whether the signal exceeds a predefined threshold to generate an indication signal which is sent to an AGC 545. The state machine in the AGC 545 adjusts the gain of the chain of VGA 580 stages according to the indication signal generated by the threshold detector 550. Each stage of the chain of VGA 580 stages may be individually adjusted in some embodiments although any adjustment of at least one stage of the chain of VGA 580 stages according to results of the threshold detector 550 falls within the scope of the invention.
When the AGC 545 receives the indication signal from threshold detector 550 and indicates that adjustment of the chain of VGA 580 stages is needed, it sends a control signal to switch module 578 to activate amplifying mode and DC removal mode alternately for gain searching. Eventually, the AGC 545 will output a corresponding RSSI value according to the selected gain. The conversion equation from VGA gain to RSSI value can be formulated as
In equation (1), N is the preferred bit number of RSSI value, K is a design parameter to determine the output range, C is a constant to determine the maximum output value, and the Gain max and Gain sel are the maximum gain of VGA 580 and the final selected gain by AGC 545 respectively. Different formula may be utilized for mapping of VGA gain and RSSI value without departing from the scope of the invention.
Several gain searching methods may be used, such as inter alia, linear, step-wise, and brute force methods without departing from the scope of the invention. However to reduce whole task latency, a binary-decision approach to search for the exact gain value is preferred. In the disclosed cascaded VGA stage architecture, a maximum gain value may, for example, be assigned to be 48 dB (decibels), the minimum gain value is 0 dB and the step resolution of proposed gain control may be 3 dB. The binary-decision approach can be formulated as
and the decision tree is shown in
Due to an original binary decision algorithm being the ideal case and not flexible for real conditions, this method may be extended with four features: 1) waiting for incoming signal, 2) recheck & lock, 3) extending gain search, 4) time-out self-reset. These four features can enhance the proposed method for the real conditions.
When the circuit powers on and there is not any signal received at the chain of VGA 580 stages, the threshold detector 550 will not output a result. Thus there is no peak detection information passing to the AGC 545. Suppose the state machine of the AGC 545 is running in this situation, the calculated value is holding at 48 dB, but the predefine iteration number (up to 4 in this example) was counted. Therefore a “turn-on and wait” mechanism that holds the initial gain value until the threshold detector 550 starts to output the indication signal as a pulse may be used. This mechanism can avoid unnecessary state machine transitions and keeps the controlled gain value at 48 dB until the threshold detector 550 outputs a result. This feature is represented as the leftmost dashed-line circular arrow 610 in
When the AGC 545 determines the best gain code for the chain of VGA 580 stages, the threshold detector 550 returns a predictable width pulse. Based on this pulse, the AGC 545 may generate the same control code for the chain of VGA 580 stages as a previous code. This flow will spend one extra calculation iteration, and the Gainnext may be shifted to a wrong value. So a counter for counting same period pulses may be used. If the same period pulse is counted two times, it can be assumed that the gain value is stable, then the VGA control code is locked, and the decision tree may be abandoned for this gain estimation. This feature is shown in
Due to there not only being an expected signal but also non-ideal noise received at VGA input, the threshold detector may output variant width pulse. If the variant width pulse produces a wrong binary decision path, the difference between an exact gain result and calculated gain result is 6 dB in this example. To reduce the difference, the binary decision tree can be extended an additional iteration which compensates ±3 dB if needed. After this compensating operation, the proposed design will reduce the difference from 6 dB to 3 dB. This extending operation is shown as dashed-line circular arrows 630 at the rightmost portion of
In multiple node access, packet-based application, the received signal may not always be sent from the same transmitter, so the received signal power may not always be the same. Besides, in packet-based transmission, the signal period is determinable. So the proposed RSSI estimator has to fine-tune itself for each transmission automatically. Therefore, a configurable counter is proposed that can cover all possible transmission latency. When the counter times out, the binary decision state machine of the AGC 545 can be reset automatically and the process of RSSI gain estimating is repeated. This operation can avoid a missed reset signal which should come from higher level control blocks.
Besides a single level threshold detector 545, a multi-level threshold detector can be used for a faster and more accurate gain adjustment. A tunable threshold for received signal level comparison can be applied to determine the desired power level to trigger the AGC. Some embodiments utilize VH and the threshold detector 545 for this purpose.
Although the above disclosure recites examples used for RSSI estimation, it should be readily apparent to one skilled in the art that use of the RSSI estimator 510 of
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.