Calibration algorithm help needed

Hello- I'm fairly new to electronics and not exactly a math wiz either. I've been starting at 5 pages of notes and half completed formulas and realized I'm not making any progress and I need to ask for help - so I here I am.

We're developing a testing system that will take 324 measurements from

16 different sources. At any given time there is only one measurement pin and one source pin "active" (switched on). We have built a large multiplexing switch to multiplex these 324 measurements down to a single analog signal that is connected to our data acquisition hardware. Likewise we have a single signal source that is multiplexed to 26 different pins.

The subject under test is exposed to these 26 sources and 324 measurement points and the system takes sequential measurement like so: Source1 => Measurement1 Source1 => Measurement2 Source1 => .... Source1 => Measurement324 Source2 => Measurement1 Source2 => Measurement2

8424 unique measurement combinations.

Our system is designed that it receives a specially design PCB with the test subject installed on it. The "fixture PCB" is attached to the system and the system takes it's measurements as described above. Fine, great.

I'm the software guy primarily and I'm designing our calibration procedure and process. I need to know what the offset (would that be called gain) for each measurement/source combination is. To accomplish this I had planned on creating two special "fixture boards", one would have ALL measurement pins connected to source-1 and the other would have ALL source pins connected to measurement-1. The idea being that I will determine the voltage drop for each of the measurement paths for a single source and likewise for each source to a single measurement pin.

The reason for this approach is that it would be too complicated to try to connect each measurement/source combination for the purposes of calibrating. I was thinking I could use the data from the two calibration protocols mentioned above to calculate the composite offset for a measurement/source combination.

But I'm stuck, in fact I haven't made it very far at all. My lack of math skills is really making this an elusive problem to solve, IF it's even solvable - the theory could be flat out wrong.

So I'm asking here because although it's a math problem I figured I would be far more effective explaining an electronics-based problem to electronics-minded people and hopefully come to a solution quicker.

Have I explained it clearly enough? Do you understand what I'm trying to accomplish?

Thanks for reading, Steve

Reply to
steveklett
Loading thread data ...

You're looking for both offset and gain. You want to find the straight- line approximation for each channel:

y = a*x + b

(and hope that a straight-line approximation is good enough). In this relationship, a is the gain, and b is the offset.

If the electronics are well designed, the offset should be zero and the gain should be one for all channels, or at least they should be well defined.

You don't have enough data to get the calibration parameters for all of your switches -- you're going to be left with some ambiguity about either source1 or measurement1. The easiest way to deal with this is to arbitrarily assign gain = 1 and offset = 1 to one of these channels. Having done that, you should then measure each combination with _two_ voltages then fit the resulting x1, y1 and x2, y2 pairs to find a and b for that channel.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
Reply to
Tim

Being paranoid I would have insisted that the test fixture had another pair of channels available to switch to any measurement input. These being reference ground and a very stable voltage reference. That is how it is done for precision mass spectrometry.

You don't say what precision you are working to - which makes a big difference to how careful the analysis needs to be. Do you need to test the source DACs for monotonicity/systematic error for instance?

I can't see the voltage sources enjoying having all their outputs shorted together.

Source1 to Measurement1, Source2 to Measurement2 etc is OK. Being paranoid and stuck with the hardware you have I would probably do

1-ALL 2-ALL 1-1, 2-2, 3-3 ... 16-16 1-2, 2-1, 3-4, ... 16-15 1 being closest you have to system ground, 2 being closest you have to maximum voltage (and a couple of points inbetween).

Without knowing the structure of your multiplexer(s) it isn't possible to suggest which if any additional test fixtures are needed to isolate possible systematic errors in them.

That ought to work provided that there are no other sources of voltage errors in the multiplexers. It all depends how accurate it has to be.

Regards, Martin Brown

Reply to
Martin Brown

Is this a joke?

Are the sources DC, RF or optical? You never state what the measurements are.

How the hell do you expect anybody to be helpful?

I haven=92t a clue as to what Tim=92s talking about. Did you feed him some secret info?

Based on your description I don=92t think you have a clear enough understanding of what you=92re suppose to do to even ask for help. You should be talking to the guys that gave you the assignment.

Reply to
meg

... and maybe some independent measurement of the voltage being generated, too.

The whole implied attitude of "Calibration? What calibration?" does give one a feel for how the product is to work on.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
Reply to
Tim

This is unclear to me. What is being calibrated? Calibration means apply external stimulus to the system in order to make the system perform to an ideal specification. Can you mathematically represent the ideal specification?

Perhaps you are trying to linearized a set of readings from sensors or a system that has non-linear behavior?

-John

A bit more detail would be helpful

Reply to
three_jeeps

e
t
d

I forgot to ask, what variable are you reading, what variable are you setting, and what are the units?

-J

Reply to
three_jeeps

've

I
m

ent

ge

xed

be

d

he

f

of

s
o
s

Hi all-

I apologize for not supply enough or unclear information, I'm far outside my element on this project.

Let me try to clarify a few of the (many) confusing aspects:

This is not an extremely high precision application (thank god right, or else my questions would be even more troubling) It's difficult for me to describe "how" accurate the system needs to be. I can only say we are attempting to obtain the highest quality data that is reasonably possible given our small budget, time-frame and relative inexperience to testing in general. We're a small family business (so this is why I can't "talk to the guys that gave me the assignment" - it's me) and we've taken on an ambitious project to develop this system. The most complicated parts are done and working well.

In the most simple terms our system can be described as: Applying a known and calibrated source signal to a subject and measuring the sources signal at various locations on the subject. The voltage measurements are read by a DAQ system that is connected to a PC running the test system. So voltage applied and some voltage less than the source is measured - this happens several thousand times across several hundred test points.

- The source is AC square wave, +-10v @ 1KHz

- This is not a joke

- We are calibrating the offset from the source and the measured value. We take a reference reading from the source (very close to the source) and want to determine how much offset there is from that ref. and the value measured at each of the individual measurement points. - basically, how much signal are we losing from impedance and general loss.

- We can't change the switch circuit to support testing each individual measurement/source combination. We can't even afford the hardware required to do that.

- "I forgot to ask, what variable are you reading, what variable are you setting, and what are the units? " a voltage supplied by the DAQ hardware. We can also read a ADC value if we like. The variable will be a large table of offset values (assuming there IS some offset) and will be applied to the applicable measurement points at runtime.

I realize that my question is probably annoying to some although I don't understand volatile responses. I do appreciate the thoughtful questions most of you have presented and will be reviewing the various suggestions and information you've provided. I will admit that some of it is over my head but I will read and re-read and work it out.

Thanks again, Steve

Reply to
steveklett

Independant? Not really, but we do grab a reference reading before each reading from the subject. Our DAQ hardware is multiplexed so I can't take simultaneous readings.

ve

I'm trying to determine the following:

Let's say our signal source is putting out a independently calibrated 10v During a separate "system" calibration process we determine that source1 -> measurement285 (source and measurement shunted/connected) resulted in a reading of 9.974v (offset of 0.026v) Later, during some demo or production process we measure a subject using source1 and measurement285 and obtain a reading of 7.658v I would add the offset from the calibration process to that measurement, so: 7.658 + .026 =3D corrected measurement

I hope that makes sense...

Reply to
steveklett

OK, a couple things you need to know. I assume there are MOS switches that select the desired channel to the ADC. These have resistance that varies with the applied voltage. If the measurement range is small compared to DC supply pins of the MOS switches, this can be negligible. However, if the measured voltages approach the +/- 10 V value, and assuming the MOS multiplexer is running from +/- 15 V rails, then the variation of the switch resistance won't be so small. The only way to find out is to measure a series of points from -10 V to +10 V at, say,

1 V steps. If they all come out +/- a few mV from the supplied voltage, then you are probably OK. Assuming the ADC input resistance is small, the variation in Mux resistance won't have a significant effect. But, you can't know until you test it. It should be a simple test to perform.

Once this issue of Mux contribution to error is known, the rest of the project looks pretty straightforward. Chances are that calibration for one channel is likely to apply to all channels, unless the DAQ system has an individual amplifier per input, which is unlikely on a

324-channel system due to cost.

Jon

Reply to
Jon Elson

Right. And either your corrected measurement is correct because the circuit adds a 26mV offset, or it's wrong because it has a gain error of

0.26%, or it's wrong because it has some combination of gain and offset that equals 26mV when you put in 10V, but doesn't equal 26mV anywhere else, or the thing is just plain nonlinear and you need more terms in your correction.
--
www.wescottdesign.com
Reply to
Tim Wescott

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.