Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

AGC circuit adjustment. integration loop does not work.

Status
Not open for further replies.

7rots51

Advanced Member level 4
Joined
May 17, 2002
Messages
1,183
Helped
25
Reputation
50
Reaction score
12
Trophy points
1,318
Activity points
9,636
AGC circuit adjustment

This AGC circuit have -20~+5dbm input and fixed output at -25dbm.(test with 1.6GHZ tone)

The output is modulated and spurious,the loop is unstable,the detector and attenuator works good

but the integration loop does not work properly and may need better adjustment,please help me to solve the problem.
 

Re: AGC circuit adjustment

Generally instabilities in AGC appear at highest gain reduction (or strongest input level) due to the phase shift introduced by the amplifiers.
Also if the attack time is shorter than the delay introduced by the integration loop filter, could appear instabilities.
In your case try to give to C63 a value (let’s say 100nF). Choosing the attack time depends by the type of modulation of the system.
 

Re: AGC circuit adjustment

If you just have a fixed output power, what is the purpose of the log amp?

Any analog control loop has to meet certain criteria to be stable. One is that the open loop has to have phase and gain margin. I do not remember what the S plane transfer function of a log amp is, but I bet it is not zero phase!
 

AGC circuit adjustment

Is C63 really Open ??? It should have not been..
-Try put some small capacitors on supply line to prevent from RF feedbacks over supply connections due to poor ESR of 100nF caps..
-Loop Filter might be poor designed, decrease the cut-off frequency..
 

Re: AGC circuit adjustment

biff44:
If you just have a fixed output power, what is the purpose of the log amp?

what type is better ,why?(I want fixed output power)

==========
I converted integration cap to 100N ,and OPEN cap to 1Uf but there is some spur in output.

I need more info on AGC design.
 

Re: AGC circuit adjustment

A schottky detector, or a 10 dB gain rf amp with a schottky detector would easily replace the log detector, and will keep it a linear system. You have a non-linear system with the log detector in there.

Added after 31 minutes:

As I suspected, there is a 90 degree phase shift in the log amp. So you are giving up 90 degrees of your possible 135 degrees before you run into a control loop with insufficient phase margin.

See attached..
 

Re: AGC circuit adjustment

Just two comments to the AGC circuit and to the former comments:

1.) The function of the log detector can be justified only if one knows the relationship between the attenuator function and the control input.
2.) In many AGC circuits there is a gain control with an antilog-control characteristic.
The reason is as follows: In this case the loop gain of the linearized loop is independent on the incoming signal level.
3.) I cannot see that the log detector causes a systematic phase shift. It has a log function - however not as a function of TIME but of the amplitide !! Its function would be connected with a phase shift only if it incoroprates a frequency dependence, that means: NOT because of the log function.
 

Re: AGC circuit adjustment

I am not going to try to teach a linear systems course here. If you do not understand the function of the laplace transform in control theory, you are just going to have to take that on faith.
 


Re: AGC circuit adjustment

biff44 said:
I am not going to try to teach a linear systems course here. If you do not understand the function of the laplace transform in control theory, you are just going to have to take that on faith.

Thank you very much for your politeness.
I prefer technical arguments:
An amplifier - linear or with a log characteristics - can produce a phase shift only if it has time-dependent transfer characteristics - with other words (in the frequency domain) it incorporates a frequency dependence.
I repeat that I cannot see that the log characteristic of the amplifier under discussion is connected with a TIME dependence (as assumed by BIF44).
To BIF44: Would you please present a short excerpt from your linear system course and explain your arguments a little ? (Not to be forced to take that on faith!).
Thank you.
 

Re: AGC circuit adjustment

Actually, the demodulator (log amplifier) as well as the variable attenuator have a time dependant transfer function. According to the datasheets, the log amplifier is faster (50 ns risetime) than the attenuator (~ 1 us ristime). Generally, both have to be considered to achieve stable operation of the control loop.

I think, the first problem is with the circuit called integrator. Strictly spoken, it's a 1+∫xdt circuit, or a PI controller with fixed KP. In the original dimensioning, the gain (KI) is probably too high. In the modified version, you added a dominant pole (1 uF * 1k) which can cause instable operation as well. I suggest to use a meaningful differential integrator (equal RC at + and - input) dimensioning at first approach. Or use an inverting amplifier in front of an inverting integrator to adjust the characteristics with a single RC.
 

Re: AGC circuit adjustment

FvM said:
Actually, the demodulator (log amplifier) as well as the variable attenuator have a time dependant transfer function. According to the datasheets, the log amplifier is faster (50 ns risetime) than the attenuator (~ 1 us ristime). Generally, both have to be considered to achieve stable operation of the control loop.

Yes, of course each real device (including log amps) has time delays.
However, the point of discussion was and still is, if the log function itself is the cause of a phase shift. And the attempt to take the LAPLACE transform from log(t) seems to me a bit "exotic" to get a transfer function for a non-linear sytem in the s-domain.
Can you agree to this ?
 

AGC circuit adjustment

Absolutely. Of course, only a linearized small-signal model could be analyzed, but the log function as such can't introduce a phase shift.

My answer was rather addressed to the original question.
 

Re: AGC circuit adjustment

FvM said:
My answer was rather addressed to the original question.

We shouldn´t forget that 7rots51 needs some help and, therefore, it´s very good that you came back to the original question.

Another hint for 7rots51: If you are going to find a linearized transfer function resp. the loop gain for your system, have in mind that you have a control loop which reacts only on changes of the input signal in order to suppress them.
Therefore, a linearized model of your loop has input and output signals which are small level variations instead of the real levels.
 

Re: AGC circuit adjustment

Alright, here goes. I googled around and could not find a simple explanation. But, basically, there are control loops all around you. If you have a PLL, a voltage regulator, a heater controller, an elevator, a car, or basically any system where you want it to do something, you observe that something (position, temperature, voltage, etc), and use a circuit to control it, that system is called a control loop. Long ago, people realized that there are certain aspects of designing the control loop that dictate its response to perterbations. Lets say you are driving your car down the road, a dog jumps out, you swerve the wheel, the car jumps to the left but too far, you then turn the wheel to the right--but again too far and you careen the other way....after a few more tries you finally get the car driving straight down the road again. The gain of the steering wheel, you might say, might have been a littlt too high because the system almost lost control and went unstable--ie a finitite input (the dog jumping in front) almost made you crash the car (an infinite response).

In circuits, like PLLs, an almost unstable system would result in similar undesireable effects--high spurious sidebands, a lot of ringing (and therefore settling time) when changing frequency, and high "phase noise bumps".

Control loops are pretty complicated, and you seldom can model all of the characteristics and quirks. But often control engineers make some assumptions to simplifiy the analysis. One assumption often made is that the system is a "linear system". In this case--a log amp--obviously that is non-linear, but you could say that aroun a -25 dBm power level, it acts "piecewise linear" for a small power range. Therefore at -25 dBm you can guess that it has a fixed gain (Pin/Vout slope). That describes its gain magniitude only, but you need to know something about its phase response also. Why? Because:

In a linear simple feedback system there is a forward gain, lets call it G. There is also a feedback path, lets call it H. Control theory will tell you that in the frequency domain, if you call s=jω, the closed loop system resonse is T(s)= output/input =G(s)/(1+GH(s))

So for various types of inputs, you can predict the output (approximately) by using this simple equation.

We will not get into the complexities of various inputs, such as steps, and how to convert from the freqeuncy domain to the time domain. But if you look at the equation, it is obvious by inspection that the system will go unstable when the denominator goes to zero. That is because if you are dividing by zero, the system gain is infinits (ie for any input, the output is infinite).

So, a simplistic way of thinking about this is that you need to keep your closed loop control loop from getting close to having a zero magnitude in the denominator! When you run a PLL program (from analog devices or national semiconductor), and it tells you to use certain capacitors and resistors in the control loop filter, it is figuring our the gain and frequency response of the loop filter needed to keep the denominator of that equation from going to zero. It is that simple.

Added after 17 minutes:

So, back to our problem. IF the agc circuit is unstable, the first thing you want to do is figure out how close to zero the denominator of the closed loop gain equation is getting at various frequencies. If at some frequency, it gets close to zero, there is your unstable circuit cause!

Once again based on all the simplifiying previous assumptions, you are analyzing to see if 1 + GH(s) = zero anywhere in frequency. But GH(s), if you think about it, is the "open loop response". That means the forward gain times the reverse feedback gain. So, you can make a pretty good prediction of closed loop response by simply analyzing the open loop response.

On good way to visualize this is called a Bode plot. This is a two graph plot, that shows open loop gain magnitude vs frequency, AND open lop phase shift vs frequency.

Most control loops have a "lowpass" gain response. That is, as the frequency gets higher and higher, the open loop gain gets less and less. At some frequency, the gain goes through unity (or 0 dB). At that exact frequency, WHAT IS THE OPEN LOOP PHASE DOING? Why do you want to know? Because if the magnitude of GH(s)=1, and its phase is 180 degrees, then the denominator of the closed loop transfer function is 1+ GH(s) = 1 + 1 [angle 180] = 1 -1 =0. So you would be dividing by zero.


Here is a site with some bode plot stuff:
https://www.swarthmore.edu/NatSci/echeeve1/Ref/LPSA/Bode/BodeReviewRules.html

Note that an sort of term 1/S, or K/S (where K is a constant) Has a fixed phase shift of -90 degrees. I won't go into why.

In my previous post, it looks to me like the log amplifier will have an S plane transfer function with a 1/S term in it. That means the log amp should have a phase shift, as far as the control loop is concerned, of -90 degrees.

This is not that uncommon. In PLL's, the VCO is an integrator of phase, so it also has a transfer function of Kvco/S. That is, the VCO starts off with at least -90 degrees of phase shift in a PLL circuit. IF you add a simple integrator after it to control the phase locked loop, you have designed an unstable system, since the loop filter integrator also has a transfer function of Klf/S, or a -90 degree phase shift too. So your open loop transfer phase would be -180 degrees at all frequencies--the worst place possible to operate! In PLL's , this is simply fixed by adding something called a Zero (often the zero is formed by putting a resistor in series with the capacitor of the loop filter). By selecting the value or R and C carefully, you can get the open loop transfer phase to be something else, say -120 degrees, when the open loop transfer gain goes thru 0 dB--resulting in a stable PLL.

So, IF I am right an the transfer function of the log amp is something like K/S, you are kind of screwed. You already ate up 90 degrees of the total 180 degrees you have to make the control loop stable. If you replace the log amp with a RF amp and diode detector, that had a transfer function of Kdet, then you do not loose the 90 degrees, and you are that much more likely to have a stable AGC circuit.

Of course, you can analyze the control loop filter of the agc circuit, add a zero to it at just the right frequency, and get a stable control loop from the log amp based AGC circuit also.

That is the simple explanation. See what I meant.
 

Re: AGC circuit adjustment

Whooow !
BIF44, now we have learned a lot about control theory and stability, but the question arises:
Is this the explanation for your statement from Febr. 14th, 19:08, that the log. amplifier introduces a systematic phase shift of 90 deg ?
(Please, excuse my polemic question. But I think, many members of this forum are interested to gain something from a technical discussion - and, therefore, are still waiting for justification of your claim).
One final remark: There is one big difference between engineering science and social/economical/political science: In nearly all cases it is possible to proove if a claim or a formula or a sentence is true or false. And in any technical conflict we shouldn´t forget this approach of engineering thinking.
 

Re: AGC circuit adjustment

One way would be to measure the phase shift thru the log amp with an experiment. Take a stable source, add a voltage variable attenuator, vary the RF envelope a little at, say, a 10 KHz rate. Split the power and detect it with a broadband detector diode on one leg, and the log amplifier on the other leg. Put both traces on an oscilloscope, and see if there is a 90 degree phase lag on the log amplifier output.

Let us know what you find out!

Added after 29 minutes:

And make sure that detector diode has no phase lag of its own--ie broad video bandwidth and 50 ohm input to oscilloscope.
 

Re: AGC circuit adjustment

@ original post
- Check if the input level at AD8313 (pin2) vs RF-IN, is between -60dBm and -10dBm. If is not, adjust gains, threshold and levels properly. Can adjust the gain of U17A adding a resistor between pins 1 and 2.
- Second, playing with R30, C63, and C65 values, characterize the transfer characteristic, injecting an equivalent variable signal at RF-IN. Verify the output CTRL level and check for slope response and glitches.
 

Re: AGC circuit adjustment

These concepts are not THAT hard to understand. It is the intuition part you are probably struggling with!

Think of a common op amp set up as an simple inverting integrator--that is input resistor and feedback capacitor. Your intuition tells you that if you increase the input, the output goes down, and vica versa. So your intuition tells you that there is no phase lag.

But then you remember back to Calculus 101, that the integral of a sine wave is a cosine wave. If you take that same op amp set up as an ideal integrator, and put in a sine wave, a cosine wave comes out. 90 degree phase shift proven by experiment. k/S transfer function.
 

Re: AGC circuit adjustment

biff44 said:
One way would be to measure the phase shift thru the log amp with an experiment. Take a stable source, add a voltage variable attenuator, vary the RF envelope a little at, say, a 10 KHz rate. Split the power and detect it with a broadband detector diode on one leg, and the log amplifier on the other leg. Put both traces on an oscilloscope, and see if there is a 90 degree phase lag on the log amplifier output.
Let us know what you find out!

Instead of measuring by myself, I found the result in Analog Dialogue vol 33 (1999)
on page 30 (picture on the left).

https://www.analog.com/library/analogDialogue/cd/vol33n1.pdf#page=32

Regards

Added after 33 minutes:

For all who are interested in the use of log amps in control loops:

1.) Microwaves&RF, March 1990, page 107-113
2.) " " " , September 1991, page 99-106
3.) " " " , October 1991, page 111-121,

Regarding the discussion on phase shift, here is a quotation from the last paragraph of ref 1.):
One advantage that true log amps have is that they preserve both input amplitude and phase information.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top