Advertisement

Article

Analog versus digital solutions: a tale of two automatic gain controls

(Editor’s note : this is part of an on-going series of “dialogues” between the authors; there are links to the previous installments at the end, immediately above the “About the Authors” section. Also below are also two “Desert Island Design” articles, by one of the authors.)

[The setting: Dave and Dr. T: coming back from lunch . . .]

Dr. T: (Tamara Schmitz): Yum! Love those burritos!

Dave (Dave Ritter): Aren’t you trying a low-carb diet? You really should try the taco salad, lots of good stuff and no guilt … I mean, it’s just a salad!

Dr. T: So where were we? I think you were about to wax eloquent about the virtues of ‘true mixed signal processing’.

Dave: Absolutely. You can use digital almost anywhere you can use analog.

Dr. T: But there must be times when one is better. Let’s say I want to build an AGC amplifier. It would need to vary gain, and I can do that with Gilbert cells or variable gm amplifiers …

Dave: Or with a simple DCP: a digitally controlled potentiometer.

Dr. T: Yes, we make DCP’s. One of my favorite workhorse DCPs is the ISL95811 with low tempco, some memory and a small package (DFN or MSOP). People often use them to control DC levels, but they work well for lower frequency signals also…

Dave: Absolutely, but capacitances are lower inside a chip and a DCP can work to high frequency, so it can be a versatile gain control.

Dr. T: Okay, so I could do the gain control lots of ways. But I also need to sense the signal. I usually use a diode or transistor to rectify the signal and a differential integrator to add up the errors.

Dave: Yes, that works, but you could also use a comparator. Apply a DC level to one input and the signal to the other. Every time the comparator goes high (because the signal is higher than the DC reference) we can adjust our DCP downward to lower the signal.

Dr. T: Sounds pretty coarse. My analog approach is smooth. I detect the amplitude as an analog voltage and then feed it back to a gain control cell, and the whole thing can smoothly adjust for the signal. Your digital approach is choppy, right?

Dave: Well, sort of. But we can design the ‘coarseness’ of a digital control system to be whatever we like. The DCP you mentioned has 256 levels, but some have 1024 levels and can control a signal to within a tenth of a percent. That’s more than adequate for most applications.

Dr. T: Okay, so I agree that digital techniques can work, but what is the advantage? Why use a DCP and comparators when I can use a diode, a cap, and a gain cell?

Dave: Very good question. Let’s say the signal varies a lot, but we want to adjust for the long term average.

Dr. T: No problem, I can make my analog solution average for as long as you like: I just use a bigger capacitor.

Dave: Are you going to put that cap on the chip?

Dr. T: Well, that depends on the value. If it’s more than 100 pF it is probably too big for the chip. It would take too much area and make my chip too expensive. But I can always use an external cap.

Dave: But you will need an extra pin and your customer needs to buy a cap, using up expensive PCB area.

Dr. T: How can digital help?

Dave: One of the neat things about digital is how the time constants scale. If we had a time constant of, say, 1 msec using a 10-bit accumulator, we can add another 10 bits and get 1 sec average. If we add another 10 bits we’re averaging for more than 15 minutes. And digital circuits like this are small, probably smaller than your 100 pF cap.

Dr. T: Okay, so digital is good for doing long time constants without using big capacitors and extra pins, right?

Dave: Absolutely. And there’s another cool thing about digital control loops, like AGC’s: you can stop them.

Dr. T: I can stop my analog circuit ….

Dave: Not if you want the gain to remain the same. Analog loops need to run all the time to refresh their capacitors. Leakage currents or amplifier offsets will make them drift off the intended value. Digital loops can stop once a reasonable gain has been established and they just stay frozen. That’s a very useful feature in some applications.

Dr. T: I think we need to draw up two examples. Let’s sketch out my analog AGC using diodes and caps, and your digital AGC using comparators and DCPs.

Dave: Excellent. Here’s the digital version (Figure 1 ):


Figure 1: Digital AGC using window comparator, counter and DCP.
(Click on image to enlarge)

Dave: You can see the basic loop structure: the signal level is controlled by a DCP, the amplitude is detected using a window comparator, and the loop is closed via a digital counter which is acting as an error integrator. (The basic structure is a low pass filter of sorts, and it uses both analog and digital elements.)

Dr. T: And here’s the analog version in Figure 2 :


Figure 2: Analog AGC using transistor rectifier, analog integrator and Gilbert Cell multiplier..
(Click on image to enlarge)

Dr. T: My version controls the signal level using an analog multiplier cell (aka Gilbert Cell), detects the signal level by a two transistor rectifier, and closes the loop with a traditional op amp integrator.

Dave: And here’re a few plots (Figure 3 ) from simulations of both. Since we thought ahead to design for similar loop bandwidths, the responses are quite similar. The bottom plot shows the input signal (a high frequency sine wave) as it steps from a large amplitude signal at startup to a small signal in the center and then steps back up again.


Figure 3: Digital and analog AGC waveforms
(Click on image to enlarge)

Dr. T: Very interesting! I’m surprised by how similar they are. And it’s interesting that both loops react faster to a falling signal level than a rising level. In a normal linear loop I would expect to see the same time constant at each step.

Dave: A very astute observation. The issue is this: an AGC loop isn’t linear. The feedback does not go to a summing element as in a linear loop; it goes to a multiplying element, whether it’s a Gilbert Cell or a DCP.

Dr. T: Of course! The input signal is actually changing the loop gain, making it faster at high inputs and slower at low inputs. That must affect stability as well.

Dave: Yes. Fortunately we don’t have any delays in our loop. A significant delay between the gain control and the signal sensing would reduce phase margin, creating ringing and instability. The loop characteristics definitely change with signal level, so we have to design carefully for all anticipated signal ranges.

Dr. T: There’s always more to it than meets the eye. What about this ‘stopping the loop’ business: Why would I want to stop my loop?

Dave: I actually had a real example in my last project. We were equalizing a long length of cable and things could get very noisy. We never knew where the customer would route the cable. In an industrial setting there could be big motor starters or furnaces: large equipment that can generate large spikes. We used a digital loop to control our analog equalizer so that once it figured out how long the cable was (and how much to equalize) it simply stopped itself. That way, if a noise spike came along, the loop would ignore it.
Here’s a sim of our loops first settling and then in ‘frozen’ state where we don’t let the loop update anymore, Figure 4 :


Figure 4: Response of ‘frozen loops’: digital is stable, analog drifts
(Click on image to enlarge)

Dr. T: Well I have to say that this is really cool, and I’m really impressed that you came up with these colorful graphics so quickly.

Dave: Well actually, I figured you would ask about stopping the loop, so I ran the simulation last night.

Dr. T: You have opened my eyes. I can see that digital logic should have a place in my analog designs. Analog feedback solutions need large passive devices that might not fit inside a single chip. More importantly, they can’t be turned off.

Dave: Don’t give up on pure analog just yet. Remember that with analog you get an infinitely variable solutions and no switching noise from digital steps.

Dr. T: Once again, it’s all about trade-offs.

Previous “dialogues” in this series:

Other related articles by Dave Ritter:

About the authors
Dave Ritter grew up outside of Philadelphia in a house that was constantly being embellished with various antennas and random wiring. By the age of 12, his parents refused to enter the basement anymore, for fear of lethal electric shock. He attended Drexel University back when programming required intimate knowledge of keypunch machines. His checkered career wandered through NASA where he developed video-effects machines and real-time disk drives. Finally seeing the light, he entered the semiconductor industry in the early 90's. Dave has about 20 patents, some of which are actually useful. He has found a home at Intersil Corporation as a principal applications engineer. Eternally youthful and bright of spirit, Dave feels privileged to commit his ideas to paper for the entertainment and education of his soon to be massive readership.

Tamara Schmitz grew up in the Midwest, finding her way west with an acceptance letter to Stanford University. After collecting three EE degrees (BS, MS, and PhD), she taught analog circuits and test-development engineering as an assistant professor at San Jose State University. With 8 years of part-time experience in applications engineering, she joined industry full-time at Intersil Corporation as a principal applications engineer. In twenty years, she hopes to be as eternally youthful as Dave. .

1 comment on “Analog versus digital solutions: a tale of two automatic gain controls

  1. ljsdofjafeo
    August 14, 2015

    Are you a real estate agent looking for marketing ideas in 2015?

    My primary piece of advice is that you need to put your customers' needs first. While all forms of marketing should encourage your audience to eventually do business with you, your approach needs to be subtle and less self-serving. In 2015, your marketing strategy should focus on humanizing your business and automating things when you can.

    I recently put together an infographic that outlines how agents spend their marketing dollars and compared it to where they're getting their leads from. As I researched this topic, two things became very apparent:

    75 percent of a real estate agent's business comes referrals and word of mouth.
    But agents are still spending way too much money on new lead sources, rather than investing in their existing clients.
    Simply put, if most of your business is coming from your past clients and it costs you six to seven times more to acquire a new customer than it does to retain an existing one, then you should focus your efforts on marketing to your past clients.

    The post I wrote last year titled “7 Marketing Ideas for Real Estate Agents in 2014” quickly became the most viewed post on our site (over 20,000 unique viewers). So for 2015, I came up with 10 marketing ideas that agents can use to really help grow their businesses.

    1) Be Mobile and Responsive
    In 2014, I stressed that going mobile was important in terms of you posting to your social networks while on the go. This is still true today, but this year, I want to stress the importance of being mobile accessible.

    You cannot avoid it anymore. Your website and emails need to be designed for all devices and screen sizes and be responsive. Sixty-six percent of emails are opened on a phone or tablet. Facebook has more than 650 million daily active users on mobile devices. And mobile traffic to websites now accounts for almost 30 percent of visits. In short, there are plenty of reasons why you need to be sure that your business is mobile ready.

    How It Helps: Being mobile-friendly ensures whoever reads your emails or visits your website has a good experience and that this experience creates a positive perception of your business.

    2) Use GIFs in Email
    You've all seen GIFs before; they're those soundless graphics that automatically play on a loop. They're great for getting a quick laugh, but these days, they're more often used to caption a situation and convey human emotion without using words. For example…if it's Monday morning, and I'm having a tough time getting motivated, I might text or email this GIF to my friends:

    Marketing ideas – GIF use in email

    Did you know that you can use GIFs in email too? Our friends at Litmus have put together an awesome guide to using GIFs in emails. While you shouldn't use them in everything you send, they do add a comical element you just can't get from static images.

    Even though GIFs have been around since the late '80s, they've had a resurgence in popularity. GIFs are a fun way to help show off the human side of your business.

     

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.