I'm using some of National Instruments' DAQs for some measurements, but their calibration is slightly off. To work around this I am hoping to factor in any imperfections into the measurements such that they can be removed.

The objective is to find the transfer function of a series of passive networks. Each component in the network has been measured so the model should fit the measurement almost exactly.

The first thing I have tried is to model the output, spec'd at >10 G // 100p. Using a known resistance of 2 Meg I found a more accurate value for the capacitance at 75p.


simulate this circuit – Schematic created using CircuitLab

This reduced the differences I was finding in high frequencies as the load I am using is around 1 Meg.

There is also a phase difference at high frequencies. This I tried to calibrate out by measuring the input/output relationship without any circuit in between, and deconvolving this from the measurements.

Unfortunately there is still a discrepancy at low frequencies, which looks like an additional capacitance in series with the circuit. This can be seen in my results: Model vs measurement

Grey marks the unknown low-frequency effect, orange marks the overcompensation of the phase issue. The frequency axis is 2 Hz- 20 kHz.

What other things must be compensated for in a measurement scenario?

  • \$\begingroup\$ Is their calibration off, or are you working outside the specifications of the DAQ? The DAQs all have an input impedance. The average DAQ will have an impedance MUCH lower than the 10G ohm resistor. Maybe that is the source of your problems. \$\endgroup\$
    – JRE
    Jan 11, 2018 at 15:09
  • \$\begingroup\$ I'm just working from the spec. They use instrumentation amplifiers that have high input impedance. \$\endgroup\$
    – loudnoises
    Jan 11, 2018 at 15:14
  • \$\begingroup\$ The NI ELVIS II is DC coupled with a BW of 1.2MHz. There should be no discrepancy at 2Hz with a source Z=1Mohm. Can you measure attenuation at DC? \$\endgroup\$ Jan 11, 2018 at 15:21
  • \$\begingroup\$ With a series impedance of Z=1Mohm there is a voltage ratio of 0.9999, so quite insignificant. The measurements would indicate something different though, although the network is obviously not just a resistor. \$\endgroup\$
    – loudnoises
    Jan 11, 2018 at 15:37

2 Answers 2


1) Low frequency discrepancy

When producing FFTs in MATLAB it is critical to get the frequency vector correct. In my original example I had been creating a frequency vector using:

f = linspace(1,fs,Ns)

where fs is the sampling frequency and Ns is the number of samples. I thought this was correct as when indexing in MATLAB you always being at 1. However with an FFT the first bin is DC, i.e. 0 Hz. The low frequency discrepancy was caused by a bad frequency vector. For anyone seeing similar issues, I found the best way to create this vector is with:

f = (0:Ns-1)*(fs/Ns)

2) High frequency phase issues

After further investigation I found that the phase issue is sampling frequency related. Illustrating the phase vs. sampling frequency showed that by increasing the sampling frequency, the phase accuracy improves.

Phase vs. Sampling Frequency Fig. 1 Phase vs. Sampling rate of the NI 6251 DAQ with input connected directly to the output

The original problem saw over-compensation, which has now been reduced as there is less of a problem to compensate.

3) Input capacitance

As a side note, I haven't found any reason for a series capacitance anywhere in the DAQ as I first assumed, and presume there is not a compensation capacitor in the input stage (although it seemed like a logical conclusion given the question). For those interested I am including a capture of the transfer function from 1 Hz-20 kHz of a 1 M series resistance between input and output, showing the effects of the parallel input capacitance. I have then modelled this with an RC circuit transfer function, and fit the curve using an optimisation algorithm to select the best capacitance. The resistor was measured with a multimeter with a resolution of 0.001, and an accuracy of +-0.8% + 3 kohm, so that defines the limit of accuracy of the measured capacitance.

enter image description here Fig. 2: Comparison between modelled and measured transfer functions of a 1 Meg series resistance and the unwanted input capacitance. The measurement was made at fs=1 MHz to minimise phase inaccuracy.

There is a pretty good fit, meaning the capacitance can be compensated for in any further measurements.

Thank you to both Tony Stewart and Daniel Turizo for their help in reaching this answer.


You seem to be aware that the DAQ input is not perfect and it behaves like a transfer function in itself. This is due to very small capacitances in the DAQ's circuitry, which become significant at high frecuencies. Compensation is normally used to cancel the effect of the DAQ's capacitance:

enter image description here

(Taken from this Quora answer). The idea is that the extra capacitor cancels the effect of the DAQ's capacitor, giving a constant transfer function.

However, at very low frecuencies some series capacitors may dominate the behavior of the DAQ, ruining the compensation and introducing error.

My recommendation is to use two compensations: one for low frequencies and one for high frecuencies. Even a third compensation for middle frecuencies may be needed. I hope this helps you.

  • \$\begingroup\$ I'm familiar with this circuit from oscilloscope probes, but was not sure that it would also be used in DAQs. I will see if I can find values for these components through some identification. My only other question is whether there are additional factors that need compensating for in the DAQ outputs? As far as I can tell it is a purely ohmic resistance. \$\endgroup\$
    – loudnoises
    Jan 11, 2018 at 15:16
  • \$\begingroup\$ Everything has resistance, inductance and capacitance, EVERYTHING. The compensation without a variable capacitor is difficult because the exact values differ from each device. That is why oscilloscopes have the square wave to test with. \$\endgroup\$ Jan 11, 2018 at 15:29
  • \$\begingroup\$ Also, not everything can be compensated. External factors like electromagnetic interference may affect your readings. From the looks of your graphics it seems like your simulations are accurate enough. Finally, it is more important to understand WHY your simulations are not perfect, rather than trying to get a perfect match. \$\endgroup\$ Jan 11, 2018 at 15:46
  • \$\begingroup\$ Electromagnetic interference is an incredibly broad term, if you have any suggestions as to what may be causing the deviation I would eagerly hear it. If you are referring to gaussian noise there is a definite presence in the low frequency area that is being reduced by 600x averaging. Other than that there should not be any effect that causes such a deviation at low frequencies. \$\endgroup\$
    – loudnoises
    Jan 11, 2018 at 15:53
  • \$\begingroup\$ I did not know you used a 600 sample average, in that case I do not think interference would be a problem. I do not know exactly how are you measuring, but maybe transient response is a problem? With frecuencies as low as 2 Hz and a circuit with such high resistance, it may be possible in my opinion. \$\endgroup\$ Jan 11, 2018 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.