Analog Circuits for Calculus

Status
Not open for further replies.

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
I have heard that derivatives are easy to do using analog circuits if I'm willing to sacrifice accuracy. For my current application, it would be great if I could get a rough estimate (within 1-5%) of the result of a very complicated differential equation on the fly for feedback purposes. It looks like any sort of digital sampling and calculation I try takes at least 200 microseconds to complete, which is a very long time for this process (feedback control of a voice coil motor).

I was wondering if anyone knows if this is actually possible and how it could be done. Specifically, I need to compute time derivatives of voltage and/or current.
 

esun

Platinum Member
Nov 12, 2001
2,214
0
0
The convenient things about derivatives/integrals is that they're very, very simple in the s-domain. Integration is just division by s, and taking a derivative is just multiplication by s.

Thus, an integrator is just a system with a single DC pole, while a differentiator requires a DC zero. This is generally very easy to implement in analog circuitry. Anyway, if you don't care about the theory and just want to build one, there are schematics on Wikipedia here:

http://en.wikipedia.org/wiki/O...pplications#Integrator
 

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
Integrators and differentiators are easy to build: one op-amp, one cap, and a ~3 resistors.

The tricky parts are providing an appropriate input signal and keeping the output within the supply rails.

There is an upper and lower limit to both your inputs and outputs; the lower limit is the noise floor and op-amp imperfections and the upper limit is the supply rails.

I don't really see how beneficial it would be to build. Matlab would be more appropriate in my opinion.

EDIT: Oh, time is a factor. :) Analog control loops are very common and simple to build and use integrators, gain, and differentiators. They're also very fast!
 

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
Originally posted by: bobsmith1492
Integrators and differentiators are easy to build: one op-amp, one cap, and a ~3 resistors.

The tricky parts are providing an appropriate input signal and keeping the output within the supply rails.

There is an upper and lower limit to both your inputs and outputs; the lower limit is the noise floor and op-amp imperfections and the upper limit is the supply rails.

I don't really see how beneficial it would be to build. Matlab would be more appropriate in my opinion.
I have a very high-speed controller that needs an analog input to use for feedback, so it has to be higher speed than I could get Matlab to do. The equation is very complex such that even as a simple finite difference equation, it took Matlab ~250 us to compute it, whereas the feedback loop time step is only about 190 us.
 

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
Yeah, sorry I missed the speed part the first time through.

If you're doing an analog feedback circuit, you won't want to use ideal integrators and differentiators; particularly on the integrator you'll want a large R across the feedback C to compensate for DC offset at the op-amp inputs. Otherwise your output sum will drift away when it shouldn't.
 

futuristicmonkey

Golden Member
Feb 29, 2004
1,031
0
76
Differentiators are known for being noise amplifiers. My advice would be to talk to someone in your EE dept and have them take a decent look at your equpiment/requirements. Bring a beer with ya!
 

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
Originally posted by: futuristicmonkey
Differentiators are known for being noise amplifiers. My advice would be to talk to someone in your EE dept and have them take a decent look at your equpiment/requirements. Bring a beer with ya!
Yeah, like bobsmith said, I need to incorporate a filter into it, which I've already figured out how to do. I remember the very basics of circuit design, but I never realized until recently that I could use it to do my math for me. :p
 
Status
Not open for further replies.