DSPRelated.com
Forums

Causality

Started by Unknown October 8, 2013
On Thu, 10 Oct 2013 11:43:00 -0700, gyansorova wrote:

> On Friday, October 11, 2013 6:09:40 AM UTC+13, robert bristow-johnson > wrote: >> On 10/9/13 9:31 PM, gyansorova@gmail.com wrote: >> >> > On Thursday, October 10, 2013 8:27:16 AM UTC+13, robert >> > bristow-johnson wrote: >> >> >> On 10/9/13 1:43 AM, gyansorova@gmail.com wrote: >> >> >> >> >> >>>> It's like Physics gangs up and prevents you building a pure >> >>>> [differentiator] anyway and you end up with a pole and a zero >> >>>> which is causal. >> >> >> >>>> >> >>>> It is mathematical masturbation. >> >> >> >> >> >> unless you are modeling the resistance in wires, i don't think >> >> Physics >> >> >> prevents one from building a pure differentiator nor a pure >> >> integrator. >> >> >> >> >> >> ideally, with the lumped element model, there are straight-forward >> >> >> op-amp circuits with a capacitor that have s or 1/s as the transfer >> >> function. >> >> >> >> >> > an op-amp will oscillate if you try and implement a pure >> > differentiator. >> >> >> >> >> >> i'm a little dubious about that, because in the feedback path, it's the >> >> same resistor as you would have for a typical inverting amplifier. >> >> >> >> >> >> (ASCII art, mono font required) >> >> >> >> >> >> .------- Rf -------. >> >> | | >> >> | |\ | >> >> | | \ | >> >> Vin ---- R1 ----'---|- \ | >> >> | \ | >> >> | >---------'------ Vout >> >> | / >> >> .------|+ / >> >> | | / >> >> | |/ >> >> | >> >> GND >> >> >> >> >> >> >> >> so, how does that oscillate when R1 is replaced by a C ? same Rf in >> >> the loop. >> >> >> >> >> >> gy, i haven't breadboarded anything for the past 3 decades, but i would >> >> think that every EE student has implemented a simple differentiator in >> >> the form of a non-inverting op-amp circuit in the lab. i certainly did >> >> on some day in the 1970s. >> >> >> >> -- >> >> >> >> r b-j rbj@audioimagination.com >> >> >> >> "Imagination is more important than knowledge." > > Actually I found a better explanation and simulation > > > http://stabilityissues.net/2012/12/26/differentiator-stability/ > > http://stabilityissues.net/2012/12/29/differentiator-stability-2/
Those give the "why" in very mathematical terms. In more prosaic control-loop terms, R1 and Rf form a voltage divider from the op-amp output to the input. If you replace R1 with a capacitor, then it forms a low-pass filter. Op-amps have tons of gain, and they have phase shift, to boot. With RBJ's circuit, the feedback network phase shift gangs up with the op-amp phase shift to reduce or destroy stability. With some op-amps and combination of R and C values, RBJ's circuit will just flat oscillate. Even if it didn't, it still wouldn't be a "pure" differentiator because of bandwidth limitations from the op-amp. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On 10/10/13 12:27 PM, Tim Wescott wrote:
> > ... R1 and Rf form a voltage divider from > the op-amp output to the input. If you replace R1 with a capacitor, then > it forms a low-pass filter. Op-amps have tons of gain, and they have > phase shift, to boot. With RBJ's circuit, the feedback network phase > shift gangs up with the op-amp phase shift to reduce or destroy stability. > > With some op-amps and combination of R and C values, RBJ's circuit will > just flat oscillate. Even if it didn't, it still wouldn't be a "pure" > differentiator because of bandwidth limitations from the op-amp. >
well, thinking of it from the POV of the Barkhausen criterion, i can see 180 degrees from the inverting op-amp, another 90 from the dominant pole in the op-amp, and less than 90 from the RC LFP. then the loop is closed. so it would need to hit another pole in the op-amp in order for it to get more than 270 outa the op-amp, because it will get less than 90 from the RC. and at that frequency (where the loop phase shift is 360 degrees), it has to have a loop gain exceeding 0 dB. that means the op-amp has to have two poles, the dominant pole and the nearly-dominant pole both at low enough frequencies that the open-loop gain exceeds 1. but usually that second pole is much higher in frequency (at such that the open-loop gain is less than 1) so that the gain-bandwidth product is constant over frequencies of interest. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
If you have access to the op-amps compensation capacitor, you can put a resistor in series with the miller cap to form a zero that matches the pole of the external RC feedback. Then you get back to a pure 1st-order system with 90 degrees phase margin (that's the theory anyway!). Or you could cascade a bunch of wide- bandwidth low- gain stages to get a net high- gain amplifier where the dominant pole is beyond the crossover point that is caused by the external RC. 


Bob
On Friday, October 11, 2013 11:16:00 AM UTC+13, robert bristow-johnson wrote:
> On 10/10/13 12:27 PM, Tim Wescott wrote: > > > > > > ... R1 and Rf form a voltage divider from > > > the op-amp output to the input. If you replace R1 with a capacitor, then > > > it forms a low-pass filter. Op-amps have tons of gain, and they have > > > phase shift, to boot. With RBJ's circuit, the feedback network phase > > > shift gangs up with the op-amp phase shift to reduce or destroy stability. > > > > > > With some op-amps and combination of R and C values, RBJ's circuit will > > > just flat oscillate. Even if it didn't, it still wouldn't be a "pure" > > > differentiator because of bandwidth limitations from the op-amp. > > > > > > > > > well, thinking of it from the POV of the Barkhausen criterion, i can see > > 180 degrees from the inverting op-amp, another 90 from the dominant pole > > in the op-amp, and less than 90 from the RC LFP. then the loop is closed. > > > > so it would need to hit another pole in the op-amp in order for it to > > get more than 270 outa the op-amp, because it will get less than 90 from > > the RC. and at that frequency (where the loop phase shift is 360 > > degrees), it has to have a loop gain exceeding 0 dB. that means the > > op-amp has to have two poles, the dominant pole and the nearly-dominant > > pole both at low enough frequencies that the open-loop gain exceeds 1. > > but usually that second pole is much higher in frequency (at such that > > the open-loop gain is less than 1) so that the gain-bandwidth product is > > constant over frequencies of interest. > > > > > > -- > > > > r b-j rbj@audioimagination.com > > > > "Imagination is more important than knowledge."
The system isn't unstable in the text-book sense (some text-books call a system with poles on the jw axis as marginally stable!!!) but with a very small phase-margin you get the ringing. I expect you could improve this by reducing bandwith but that's no way to go in any control system. Introducing compensation (ie a series resistance) does fix it but it in turn makes the differentiation band-limited. That's why I was saying that Physics gangs up on you to stop it happening. Anyway, I have a better one - take an integrator K/s and put a pure time-delay in the feedback path exp(-sT). At low frequencies( ie high gain) the loop gives you 1/H(s) ie the reciprocal of the feedback transfer function which is a pure time-advance!! (+exp(sT) ) Practically though you need to fight for any decent phase-margin since time-delays have a nasty phase shift increasing with frequency (and the integrator has -90 degrees). So you do get an output before an input but...it oscillates again! So no useful information about the future!
Another approach is to use a trans impedance amp, which has a low-impedance current input, and then use an input capacitor and a feedback resistor. The low impedance input pushes the feedback pole much farther out in frequency. 

Bob
On 10/10/13 8:51 PM, radams2000@gmail.com wrote:
> Another approach is to use a trans impedance amp, which has a low-impedance current input, and then use an input capacitor and a feedback resistor. The low impedance input pushes the feedback pole much farther out in frequency. >
hey Bob, i hope to see you next week in NYC. L8r, -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Yup, I'll be there Thurs-Friday

Bob
robert bristow-johnson <rbj@audioimagination.com> writes:

> On 10/9/13 9:31 PM, gyansorova@gmail.com wrote: >> On Thursday, October 10, 2013 8:27:16 AM UTC+13, robert bristow-johnson wrote: >>> On 10/9/13 1:43 AM, gyansorova@gmail.com wrote: >>> >>>>> It's like Physics gangs up and prevents you building a pure [differentiator] anyway and you end up with a pole and a zero which is causal. >>>>> >>>>> It is mathematical masturbation. >>> >>> unless you are modeling the resistance in wires, i don't think Physics >>> prevents one from building a pure differentiator nor a pure integrator. >>> >>> ideally, with the lumped element model, there are straight-forward >>> op-amp circuits with a capacitor that have s or 1/s as the transfer function. >>> >> an op-amp will oscillate if you try and implement a pure differentiator. > > > i'm a little dubious about that, because in the feedback path, it's > the same resistor as you would have for a typical inverting amplifier. > > > (ASCII art, mono font required) > > > .------- Rf -------. > | | > | |\ | > | | \ | > Vin ---- R1 ----'---|- \ | > | \ | > | >---------'------ Vout > | / > .------|+ / > | | / > | |/ > | > GND >
Damn, that looks good, Robert! Do you use some sort of program?
> so, how does that oscillate when R1 is replaced by a C ? same Rf in > the loop.
I think I get you - how does adding one capacitor, 90 degrees, get you to 180 degrees phase shift? Yeah, I guess others have pointed out how, i.e., internal poles when you get high enough in frequency.
> gy, i haven't breadboarded anything for the past 3 decades, but i > would think that every EE student has implemented a simple > differentiator in the form of a non-inverting op-amp circuit in the > lab. i certainly did on some day in the 1970s.
Me too - remember the 741? -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Randy Yates <yates@digitalsignallabs.com> writes:

> robert bristow-johnson <rbj@audioimagination.com> writes: > >> On 10/9/13 9:31 PM, gyansorova@gmail.com wrote: >>> On Thursday, October 10, 2013 8:27:16 AM UTC+13, robert bristow-johnson wrote: >>>> On 10/9/13 1:43 AM, gyansorova@gmail.com wrote: >>>> >>>>>> It's like Physics gangs up and prevents you building a pure [differentiator] anyway and you end up with a pole and a zero which is causal. >>>>>> >>>>>> It is mathematical masturbation. >>>> >>>> unless you are modeling the resistance in wires, i don't think Physics >>>> prevents one from building a pure differentiator nor a pure integrator. >>>> >>>> ideally, with the lumped element model, there are straight-forward >>>> op-amp circuits with a capacitor that have s or 1/s as the transfer function. >>>> >>> an op-amp will oscillate if you try and implement a pure differentiator. >> >> >> i'm a little dubious about that, because in the feedback path, it's >> the same resistor as you would have for a typical inverting amplifier. >> >> >> (ASCII art, mono font required) >> >> >> .------- Rf -------. >> | | >> | |\ | >> | | \ | >> Vin ---- R1 ----'---|- \ | >> | \ | >> | >---------'------ Vout >> | / >> .------|+ / >> | | / >> | |/ >> | >> GND >> > > Damn, that looks good, Robert! Do you use some sort of program? > >> so, how does that oscillate when R1 is replaced by a C ? same Rf in >> the loop. > > I think I get you - how does adding one capacitor, 90 degrees, get you > to 180 degrees phase shift? Yeah, I guess others have pointed out how, > i.e., internal poles when you get high enough in frequency. > >> gy, i haven't breadboarded anything for the past 3 decades, but i >> would think that every EE student has implemented a simple >> differentiator in the form of a non-inverting op-amp circuit in the >> lab. i certainly did on some day in the 1970s. > > Me too - remember the 741?
Oh, I have to share this fond electronics memory! As a young student at DeVry (DeVry/Atlanta, 1976-1978, in the old office building across from the Biltmore on W. Peachtree St.), one of the most impressive labs we ever did was building up and testing some opamp filter circuits. I can remember being required to plot the theoretical Bode plot of the circuit and then the measured response on the same piece of paper. I was amazed how closely they matched! -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
gyansorova@gmail.com writes:

> Somebody told me that a differentiator is classified as an uncausal > system because it has more zeros than poles. This would mean that it > needs information from the future to effect the present which is > nonsense. Whilst I agree you cannot implement a pure differentiator, > you can implement an approximation over a limited frequency range and > they have to be causal.
Hi, I don't see a question here, but you seem to be implying the question, "Is the theoretical differentiator causal?" Tim answered this question (sorta). I'd also like to think I'm answering it here but at the end of my day, I don't know. Since the impulse response of a system is the output of the system when a dirac delta function \delta(t) (note 1) is applied, the impulse response of a differentiator "system" is the derivative of \delta(t), or \delta'(t). This is confirmed by Bracewell's statement [bracewell], p. 82, that \delta' \convolve f = f'(x). An impulse response h(t) is causal iff h(t) = 0, t < 0. So is \delta'(t) = 0 when t < 0? Hmmm. I think this falls into the same camp as asking "What is \delta(0)?" This \delta'(t) thingie isn't a function (it's a "generalized function," which I've not studied in math), so I don't believe you can really ask if \delta'(t)^- = 0 either. Here's a whole other take on it without using DSP or linear system theory. Consider the class of functions f(x) that are rational functions (I use such a constraint just to get around the arguments over whether f(x) even HAS a derivative). In order to compute the derivative at x0, you must have knowledge of the function f(x) on both sides of x0. So from this POV, the derivative "system" is NOT causal. --Randy Notes ----- 1. I'm using LaTeX-ish strings in this post. http://www.tug.org @BOOK{bracewell, title = "{The Fourier Transform and Its Applications}", author = "{Ronald~N.~Bracewell}", publisher = "McGraw-Hill", edition = "second", year = "1986"} -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com