# Design vs reality and what to do when they differ

I've been trying to focus a bit more on Analog circuits lately and found that my design and actual results often don't match up exactly. An example is a Pierce oscillator I built a while back, the circuit worked mostly as expected but the gain required was much less than I calculated for (meaning I got some distortion). Is it common practice to just change the values to what seems to work right and go on or is it better to make sure the theory matches up as well?

To clarify, I mean that after observing the difference and playing around with some values I change the design to match, the circuit then gives the desired output but my initial design was inaccurate. Should I go back and try to identify why or is it just not worth it? ie, no calibration on production units.

Thanks for all the replies, I'm going back to the drawing board because there's clearly something going on that I don't understand. Ignoring it would possibly create other problems.

-
The question is, are you hand-building a small number of units, or mass producing? If you had to make thousands of these things, could you afford to make gain calibrations on each one? – Kaz May 14 '14 at 8:30
Let's say that altering my design to values that work better is a once of thing, ie, change the design after you observe the difference to get a design that is consistent and doesn't need any calibration. – s3c May 14 '14 at 8:45
If you are changing the the values of parameters for more than 5% of previous values, you must go back to design stage. If it is less than that, the problem you face is quite common. Don't bother about it. To understand more consider this example. I have a resistor of 100ohm. Due to some reasons, if i am changing its value more than 5ohm (95 or 105), my design calculations are wrong. – Damon May 14 '14 at 9:21
Whatever you don't understand will generally come around to bite you in the ***. – Spehro Pefhany May 14 '14 at 12:47
The situation described is probably rare: that is, the built devices are extremely precise and consistent from one to the next, but disagree with the calculation. It could happen if you use high precision components in some circuit that requires a more precise model than what your calculations or simulations are doing. In such a case, it would make sens to substitute the real build for the simulation and use its values. – Kaz May 15 '14 at 3:18

If your prototype performance doesn't match your anticipated performance this can indicate an error in the design process or a build error. You really should sort this out if you are going to be making several units or more because it will only come back and bite you. ISO9000 talks about "Design Verification" - this is basically proving the design/prototype does what it was intended to do. This is important and shouldn't be short-changed - if your pierce oscillator doesn't produce the correct amplitude I'd want to know why.

"Design validation" checks that production units are still meeting expectations.

A really good test that I always do is spray the circuit with a freezer spray and see what happens and I also touch each chip and transistor with the tip of a soldering iron. This is done on the bench and I'm looking for unexpected brief changes in amplitudes (or some other parameter) as an indicator that something is wrong. If all is OK then nothing beats a good full load test at elevated temperatures. This can find a lot of anomalies on a complex circuit.

-

No, the common practice is to assume that some parameters will change depending on the operating environment. The design should be made in such a way that the final output is less dependent on such changes.

For example, the value of resistor comes with a tolerance rating. If your design is sensitive to small change in the value of a particular resistor, then choose a resistor with less tolerance. It doesn't mean that its value will not change. It simply means that its value will change in given limits. So you must make your design in such a way that even if it changes a little bit, the system output suffers a minute change.

And remember, no matter what you do, you can not make a system with 100% accuracy. You have to be reasonable with yourself about the systems accuracy. You decide for yourself, what amount of change in the system output is acceptable. Always try to have this system accuracy before you even start designing any system.

-
What he said - good analogue design includes accounting for tolerances / variation in components. There are two aspects of this: One is being able to operate within spec in the worst case of every component being as far "off" as it could possibly be (and in the worst/least convenient direction), and one is to design circuits such that they self-correct for these variations and are inherently stable. – John U May 14 '14 at 9:12

The main point in Analog Circuit Design is to always know the reasons why things actually happen.

So for your problem there are 2 different cases:

1. The deviations between calculation and realisation are due to component mismatch (e.g. resistor and capacitor tolerances). This is unavoidable and you need to design your circuits so that they work in spite of these inaccuracies. No need to change the calculations.

2. Something in your pracitcal realisation is different than you calculated it. Let's say your pierce oscillator has an output amplitude which is 10% of what you calculated. This tells you something is wrong with the circuit or your calculations and in that case you need to understand the issue and refine your calculation.

-

The most important thing is to know why it doesn't work as expected. Only then can you show in your design the ranges and/or conditions under which it does work as expected.

e.g.

The oscillator frequency is X (+/- 10%) at temperature Y, using 1% precision resistors, etc...

You can never test all the variables, but the more coverage you provide, the fewer people will come to you later saying "I built it just like you said and it doesn't work".

-