opamp circuit offsets

Apr 15, 2017 102 Replies

Two of the op amps have three times more weight in the offset of the circuit output than the other two, so really it only takes two, not four, but a specific two.

Rick C

he's describing 4 square waves instead of your proposed 4 sine waves. how much more work is that?

This email has not been checked by half-arsed antivirus software

for full coverage you really want non-correlated frequencies, so use unrelated transcendantal numbers, (eg square-roots of prime numbers) but those numbers you've chosen are pretty good, giving a pattern that repeats about 4 times every hour.

This email has not been checked by half-arsed antivirus software

That works, but it takes more typing. LT Spice doesn't make sensible square waves without a fight.

formatting link

I prefer the sinewave version; it suggests probabilities better.

John Larkin Highland Technology, Inc jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

To get probabilities with a uniform distribution of offsets over the full range, use triangle waves. Square and sine both distort pessimistically.

LT Spice doesn't offer a triangle wave, unless you booger a pulse pretty hard.

John Larkin Highland Technology, Inc jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

Maybe you want something involving erf() but that sounds like even more work.

--sp

Best regards, Spehro Pefhany

I can't believe how hard people will work to avoid a little math.

The sine wave sucks for estimating probabilities as someone already pointed out. The crest factor is the exact opposite of the sort of distribution an op amp offset will have.

Is there really no one who can do the math for such a simple circuit?

Vout = (6 V1 - 2 V2 + 6 V3 - 2 V4) / 4

Now how hard is it to figure the distribution of the sum of four distributions of V1 through V4? A first approximation would be to ignore V2 and V4 since they are 3 times smaller than the other two. Combining the two remaining distributions is pretty simple.

Rick C

Fire up LT Spice and see.

John Larkin Highland Technology, Inc jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

Why use sine waves?

If you use square waves and fiddle the phase appropriately you can make it so that you can read the answers back from the waveform more easily.

eg _________ _________ A ________| |________| | ________ ________ B ____| |_________| |_____ ____ ____ ____ C ____| |___| |____| |____ ____ ____ ____ D __| |___| |____| |___|

IOW a simple grey code

Walsh functions might be even better for this sort of thing

If you insist on sine waves then to explore the entire state space select frequencies that are powers of phi = ((sqrt(5)+1)/2

f/phi f f*phi f*phi^2

Regards, Martin Brown

:-) :-) :-) :-) :-) :-) :-) :-) :-) :-)

I guess, what one needs, is a spice that can do automatically do Worst Case and possibly, Monte Carlo...

formatting link

You can do a Google search on worst case and ltspice, there is an amazingly complicated way of doing it, in it...

-- Kevin Aylward

formatting link
- SuperSpice
formatting link

So, a, arbitrary current source into a dummy capacitor-to-ground ("bi" component) will have to convert the sinewave at node 101 thus:

B123 N123 N0 I=if( (V(N101)+1)/4, 1mA, -1mA) C N123 N0 1uF and translate to input series voltage source B223 N012 N112 V=V(N123)

I don't see a squarewave in LT spice, either... unless that's what MODULATE does

I don't know that you can simply add (convolve) the probability distributions of the four to get the distribution of the sum in this situation; while the output-referred offsets of U1 and U5 will be uncorrelated, independent random variables assuming the input offset voltage is an uncorrelated, independent random variable (since they're acting as voltage sources and have no other inputs), it very much looks to me like the output-referred offsets of U4 and U6 will certainly not be independent of what the output-referred offsets of U1 and U5 are.

You have to use the voltage/pulse source, and fiddle the parameters. Doing the most obvious things generally make an ugly waveform.

You could square up a sine wave by various means, but that's more work. TANH or a schmitt or something. The point of the sim was to

*save* effort.

Actually, the sine wave is nice for my offset simulation. It finds the worst-case offset and suggests the statistics. A gaussian or triangle might not find the worst cases in a reasonable amount of simulation time.

John Larkin Highland Technology, Inc jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

Someone mentioned using Gray code, so here it is binary/Gray...

...Jim Thompson

| James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | STV, Queen Creek, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | Thinking outside the box... producing elegant solutions.

Yes, sinewave voltage source was the input that that 'B123' was making its square wave from; the "if" is an ideal comparator.

Squares and triangles aren't problematic in a .TRAN analysis. Think of them as 'finely crafted' instead of boogered, and cute, with freckles, rather than 'ugly'.

Or, just ignore the adjectives altogether. That's what LTSpice does.

TANH is nice. It makes a sort-of comparator.

formatting link

A sine voltage source into a TANH makes a pretty good 50% duty cycle square wave, and it's easy to tweak the frequency.

If the four frequencies are asynchronous, the probability that four triangles will peak simultaneously is very low. The flats on the sine wave mess up the probability histogram, but do find the worst-case offset pretty quick.

I've had a few situations where I wish I could histogram an LT Spice waveform. I mean, easily.

One nice thing about simulation, as opposed to actually doing the math, is that it's easy to make changes, and the sim files can be saved in a project folder as design documentation.

John Larkin Highland Technology, Inc jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

Sure it does, it's called PWL with REPEAT. ...Jim Thompson

| James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | STV, Queen Creek, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | Thinking outside the box... producing elegant solutions.

ically.

Trise=Tfall=Tperiod, Ton=0

That's what I said!

John Larkin Highland Technology, Inc jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required