Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Subsampling voltage signals

  1. Oct 7, 2012 #1
    Hello can somebody tell me if what I am doing is valid.

    Ok I have a DVM measuring a AC noise voltage every 0.08 seconds (12.5 Hz)

    This data is spat out in an excel sheet and looks like this:

    Elapsed seconds noise voltage value
    0 -2.88748E-07
    0.079999998 -2.98099E-07
    0.159999996 -2.22171E-07
    0.239999995 -3.01465E-07
    0.319999993 -2.21423E-07
    0.399999991 -1.62701E-07
    0.479999989 -2.6294E-07
    0.559999987 -2.96602E-07
    0.639999986 -1.57465E-07
    0.719999984 -2.08332E-07
    0.799999982 -2.88E-07
    0.87999998 -1.98608E-07
    0.959999979 -2.00852E-07
    1.039999977 -2.16561E-07
    1.119999975 -2.50971E-07
    1.199999973 -2.71917E-07
    1.279999971 -2.04592E-07
    1.35999997 -2.89122E-07
    1.439999968 -2.16187E-07
    1.519999966 -2.3414E-07
    1.599999964 -2.43865E-07
    1.679999962 -2.85756E-07
    1.759999961 -1.95615E-07
    1.839999959 -3.31387E-07
    1.919999957 -3.00717E-07
    1.999999955 -2.93984E-07
    2.079999954 -3.33257E-07
    2.159999952 -2.88374E-07
    2.23999995 -3.27647E-07
    2.319999948 -3.12312E-07
    2.399999946 -3.76644E-07
    2.479999945 -3.71034E-07
    2.559999943 -3.04457E-07
    2.639999941 -3.03335E-07
    2.719999939 -2.5733E-07
    2.799999937 -2.73039E-07
    2.879999936 -2.95106E-07
    2.959999934 -3.50462E-07
    3.039999932 -4.11428E-07
    3.11999993 -3.94971E-07
    3.199999928 -3.65797E-07
    3.279999927 -3.59813E-07
    3.359999925 -2.96228E-07
    3.439999923 -3.04457E-07
    3.519999921 -3.30639E-07
    3.59999992 -3.34379E-07
    3.679999918 -4.52571E-07
    3.759999916 -4.26015E-07
    3.839999914 -3.38119E-07
    3.919999912 -4.21153E-07
    3.999999911 -4.34244E-07
    4.079999909 -3.83376E-07
    4.159999907 -3.87117E-07
    4.239999905 -4.27886E-07
    4.319999903 -4.18535E-07
    4.399999902 -4.86234E-07
    4.4799999 -4.26389E-07
    4.559999898 -5.13163E-07
    4.639999896 -4.29008E-07
    4.719999894 -4.39854E-07
    4.799999893 -4.78753E-07
    4.879999891 -4.85485E-07
    4.959999889 -4.34244E-07
    5.039999887 -5.59543E-07

    So I want to find the maximum peak-to-peak noise voltage at 10Hz. To do this I subtract the voltage value at time=0 from the voltage value at time=0.1, or in this case 0.1599 seconds (as close to 0.1 seconds as I can get). I do this for each value, so next will be the voltage value at t=0.0799 seconds subtracted from the voltage value 0.2399 seconds and so on...I then search all the values to find the maximum peak-to-peak voltage with the time interval of 0.1599 seconds between them.

    By doing this am I finding the maximum noise voltage at 10Hz?? Is this a valid method?

    I have also done this for 0.5Hz (2 second time intervals) e.g I subtract the voltage value at t=0 second from the voltage value at t=1.999 seconds. However I noticed that when I do it for 0.5Hz the maximum peak-to-peak voltage now with a time interval of 2 seconds is lower than that of when I subsampled at 10Hz. I know why this is, its because of the longer time interval....but I have now started to question what the hell I am doing.

    Please help...

    I thank you all in advance.

  2. jcsd
  3. Oct 7, 2012 #2
    I think I may have solved this....

    before I was only subtracting the first and last voltage values, at the beginning and end of the time intervals, this is assuming that the peak voltage is at the beginning of the time interval and the minimum voltage is at the end of the time interval.

    Instead I have now have ABS(MAX(C1:C3)-MIN(C1:C3)), where as before i had just =ABS(C1-C3) when subsampling at ~0.1Hz
  4. Oct 7, 2012 #3
    However I would still really appreciate someone verifying that this is a valid method of sub sampling.

    Last edited: Oct 7, 2012
  5. Oct 7, 2012 #4


    User Avatar
    Science Advisor

    No, the sampling rate is not related to the noise frequency.

    You would have to filter the noise so you got only the 10 Hz spectrum of the source and then measure the voltage of that.

    Also, there is no point in subtracting previous voltages. The voltage reading you get is the one you need to use.

    Looks like a very nice DVM. Have you tried shorting out the terminals of the meter to see if it has internal noise?
  6. Oct 7, 2012 #5
    Thanks for the reply.

    I know. My post must of been unclear. However the maximum signal frequency that can be measured with the DVM with the NPLC set to 4 is 12.5 Hz frequencies above this are attenuated by the integration process.

    I am not sure what you mean. Why is this the case? Why can't you just sample at the DVM highest sampling frequency in this case it would be 12.5hz, limited by the NPLC setting.

    Can you explain in more detail please?

    This is basically what I am doing. The values in listed above are a "sample" of voltage values taken with the input terminals shorted with copper wire. I am basically trying to find the internal noise floor of the meter. In order to find the theoretical limit of measurement with the DVM set to NPLC 4. Sorry if I wasn't clear. BTW it is a very expensive 8.5 digit meter.

    thanks again.
  7. Oct 7, 2012 #6


    User Avatar
    Science Advisor

    You would just be taking a series of noise voltage readings, so each reading would not affect the next one. So you don't need to subtract them.

    I think you need to see the actual waveform you are measuring.
    I don't suppose you have an oscilloscope that lets you view half a microvolt do you? I don't, but if you have a multimeter like that, maybe you do.
    Maybe it is just random noise or maybe it is hum pickup from nearby power sources.

    It seems very variable which suggests it might be samples of different parts of a hum waveform.
  8. Oct 8, 2012 #7
    I don't understand?


    A osscilloscope is not sensitive enough to measure microvolts.

    I just want to measure the noise that the DVM measures when its input terminals are shorted (with copper wire). I am not really bothered about where the noise is coming from at the moment I am just assuming that all the noise I am seeing is due to the noise floor of the meter. Afterall the input terminals are shorted and meter is inside a Faraday cage, and there is a good filter on the power supply.

    All I want to know is how to measure the peak-to-peak voltage noise at 10Hz and 0.5Hz. At the moment to do this for 10Hz I use excel to search for the maxium amplitude signal in a 0.1sec time interval, I then search for the minium amplitude signal and subtract them from each other. I move to the next 0.1sec time interval in the data and do the same thing, I then move to the next time interval and repeat over all the voltage data values. Doing this is giving me my peak-to-peak voltages at 10Hz or 0.1 second . I do the same for 0.5Hz but in this instance the time interval is 2 seconds.

    The figure below shows what a typical plot of DVM sampled data looks like:


    I would of thought that a rough estimate of the 10Hz noise would be the equivalent "thickness of the line" on the top graph????
  9. Oct 8, 2012 #8
    I guess my main question is why I can't sub-sample as I am doing? Why is it not a valid method. I need this explained to me in laymans terms.
  10. Oct 8, 2012 #9


    User Avatar
    Science Advisor

    The problem is that you can't tell if you are sampling a waveform at the same place on the waveform each time you sample.

    If you sample at a low point each time, you could get an abnormally low reading, for example.

    What are you going to measure eventually?
    What would the signal level be?
  11. Oct 8, 2012 #10
    No I won’t be sampling the waveform at the same place each time I sample, but my purpose is to find the peak-to-peak noise voltage at a given frequency of a random noise signal. To do this I first look for the maximum noise voltage and then the minimum noise voltage in a given time interval and subtracting these values from each other. So for 0.5Hz, I look at a 2 second time interval in the data, find the maximum voltage in that interval, then the minimum and subtract the values from each other to derive the peak-to-peak voltage for that frequency. Please see my excel screenshot below, hopefully this should explain what I am doing:


    I am sampling at the “highest point” and the “lowest point” in a given time interval. So if I wanted to subsample at 0.5Hz I subtract the highest point in that time interval by the lowest point.

    First I need to characterize the noise floor of the DVM, then I will be using the DVM to measure the noise produced by a HV power supply, using a resistive divider to step it down to 10V output. I will be looking to measure a 1ppm/10uV in 10V.


  12. Oct 9, 2012 #11
    sorry to bump this again, but bump.
  13. Oct 9, 2012 #12


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    If you want the right answer, you need a Nyquist (low pass, anti-aliassing) filter before your sampling circuit or you don't know what frequency of noise in your system is being interpreted as any particular frequency in your data.
    If you are interested in noise at other frequencies, you can still sub-sample but you will need the appropriate band pass filters to restrict the input frequency range to within a bandwidth less than half the sampling frequency.
    PS The noise floor that your DVM will show you can be due to noise over a whole band of internally generated frequencies and you can do nothing about that except to do some very long term averaging of data with no input and with input.
    If you are really fussy, you would need to measure your internal noise with the input terminated with a resistor of the same value as your source signal.
    Last edited: Oct 9, 2012
  14. Oct 9, 2012 #13
    Hi sophiecentaur, it seems like you always come to my rescue lol.

    I can't get my head around why I need a filter before my sampling circuit.

    My DVM has a cut off frequency of 12.5Hz (it samples every 0.08 seconds).

    I don't think Nyquist principles apply here because my excel equation (refer to pic ) is "searching" for the maximum and minimum voltage in a specific time interval* and subtracting these values from each other to derive a peak-to-peak voltage at a subsampled frequency** of 0.5Hz and 10Hz (the pic only shows it for 0.5Hz). What I am effectively trying to do is to calculate the peak-to-peak voltage of a random noise at a sub-sampled frequency.

    * In theory I should be able to subsample all the way upto 12.5Hz, the sampling frequency on the DVM (shouldn't I?)

    **The time interval interval i.e. the C51:C76 part, DICTATES the sub-sample frequency. The MAX bit finds the maximum voltage and the MIN finds the minimum voltage. These are subtracted from each other to find the peak-to-peak voltage at a specific subsampled frequency.


    Look at the pic of my excel sheet do you understand what I am doing??

    Thanks a bunch

  15. Oct 9, 2012 #14


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    I'm using my phone and can't look at big stuff but your DVM samples will not distinguish between in band and out of band signals. No post processing can solve that prob. Sub sampling can be sorted for input signals with filtering, though. To find the internal noise level I think you should find the RMS of all your samples with a zero volts input.
  16. Oct 9, 2012 #15
    I will leave it until you get some time to cast your eye on my excel pic that I posted, hopefully it will clear things up.

    I have a specification that I must adhere to. That is my measurement system (resistive divider) must be quiet enough to enable sub-ppm measurements of a HV power supply for frequencies between of 0.5Hz and below. Thus the time interval that I am defining in my excel sheet allows is 2 seconds, I search the first 2 seconds (and subsequent 2 sec intervals after that) of the output voltage measurement for the maximum voltage and I search it for the minimum voltage and subtract these values from each other to find the peak-to-peak voltage at 0.5Hz.....

    I don't understand why I need filtering to do this.

    I have zero volts input at the moment, I have a short across the input terminals of the DVM. I think you mean post process the data to get rid of any DC offset? This is kind of difficult as its varying positive and negative, but its doable.

    Thanks again.

  17. Oct 9, 2012 #16


    User Avatar
    Science Advisor

    A digital voltmeter takes an instantaneous sample-and-hold "snapshot" of the incoming waveform and then goes through an integration process to work out what the voltage is.

    So, your DVM may be taking 1 μS snapshots and then not looking again for 150000 μS.

    You have no way of knowing what happens in that other 150000 μS.

    There is also no reason to say that this 1 μS snapshot will capture a peak in that time slot. It is just a snapshot and it may or may not be a minimum, an average or a peak value.
    It certainly won't somehow affect the next reading.

    Resistors become very noisy when you put high voltages on them. You should be using a commercial high voltage probe (with known noise performance) and viewing the noise on an oscilloscope. You can use the AC/DC switch on an oscilloscope to get rid of the DC component and observe just the noise.
  18. Oct 10, 2012 #17


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    Sampling theory has to apply to all sampling processes, surely. If you cannot do anything about pre-filtering of your signal then you need to include a strong caveat in any assessment of results you produce.
    However, it may be that your DVM already does this Nyquist filtering for you. You could check by applying a range of LF tones to it and see what it 'thinks' is there. If your sampling is at 12.5 Hz then first see what it thinks of a 3Hz tone, then a 5HZ (both of these are Kosher) then try 9.5HZ and 7.5Hz and 15.5, 17.5 etc. Unless there is some filtering, the results for the higher frequencies will be indistinguishable from the 3 and 5Hz results. Without this assurance, how can you tell that the noise signals that your varying samples contain are, in fact, the in band noise you are looking for? There will always be a degree of filtering, inherent in the sampling process which would ideally be 'instantaneous' but takes a finite time so will have an inherent LP filtering (but only enough to remove relatively high frequencies)

    Also, because of the statistics of noise, it is not usual practice to talk of "peak noise" values because this will depend on chance. Noise is usually specified as a Power (alternatively, an RMS value) which avoids this problem*. It would not be difficult to find your noise floor this way by finding the standard deviation of the DVM output with no input and you will have an 'accepted measure' for it. This value for the noise floor can then be used to give a measure of the uncertainty of your results.
    *Audio SNR is usually specified in terms of Peak Signal to RMS noise, for instance.
  19. Oct 10, 2012 #18
    I cannot use any filter the results that I have were collected a while again and I no longer have access to the DVM or the resistive divider

    I have done this before. Unfortunately I cannot find the result but I remember conducting 2 tests; both tests involved connecting a 50Hz signal generator to the 8 1/2 DVM. The NPLC was set to 4, the reason for choosing 4 power line cycles is because we are trying to measure low frequency noise from 10 Hz to 0.5Hz. When the NPLC is set to 4 the DVM will only attenuate the 10Hz signal by a negligible amount, if the NPLC is greater than 4 then the attenuation on a 10Hz signal starts to become noticeable. If you were to change the NPLC setting and keep the frequency constant here is what happens:

    A 60 Hz sine waveform 1V p-p 60 Hz ac voltage with 5V dc offset. The results show the voltage measured for each NPLC value across 20 readings.

    Because I am evaluating the voltage samples in a time interval across the whole 2 seconds (0.5Hz) and because it is random noise (non periodic in nature) the peak-to-peak voltage will occur at different places within that 2 second interval of voltage data. I am saying that if the peak-to-peak voltage, REGARDLESS* of where it takes place in that 2 second time interval, is greater than the sub-ppm resolution that my measurement system is aiming for, then I know that the noise floor of the DVM is too much.

    *As the noise data contained in that 2 second interval will be random the max and min will could occur anywhere in that interval. The excel code evaluates all the data points gathered in that 2 second interval to find the max and min. So for a 2 sec interval it will evaluate 25 (2/0.08) samples to find voltage max and mins.

    For this project quoting the noise floor in RMS is not suitable because I am trying to build a resistive divider that has a sub-ppm resolution. Therefore if the DVM or any other component for that matter was to produce say a 10Hz spike, greater than the desired resolution that my project specification is aiming for then it would invalidate my results. The raw voltage data that my DVM is gathering consistently needs to be an order of magnitude below that of the resolution of voltage that I want to measure with this resistive divider - I just want to ensure than this is the case with the DVM.

    Last edited: Oct 10, 2012
  20. Oct 10, 2012 #19
    Hi vk6kro as I said I no longer have access to this DVM or resistive divider, the results I collected are from a while ago. I understand what you are saying with the integration process, but there is nothing I can do to change that. I had to set the NPLC to 4 in order to get rid of 50 hz (UK) power line interferance. This meant a minimum sampling time of 0.08sec. But you make a good point. This integration process might be obscuring what is ACTUALLY HAPPENING because the real noise is just getting integrating away. Unfortunately there is nothing I can do now, but I will defiantly include that point in my write up.
  21. Oct 10, 2012 #20


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    I think you have missed my point completely here. Once your subsampling had 'folded down' the original high frequency information it is mixed in with the wanted. in band information and no amount of averaging out will get rid of it. A spike from a 30Hz signal will look the same as the spike from a 5Hz signal to your analysis.

    I'm not sure that I see a connection between the measurements you say you did with a simple frequency response measurement which I was suggesting, in effect.

    I also have a problem with your use of peak noise. The DVM and the HV power supply can be producing random noise spikes. If you know (or assume) the amplitude distribution of the two forms of noise then cannot the statistics of an occasional DVM noise spike be factored into the appearance of noise from your power supply to arrive at a measure of the significance what you are measuring? It's surely statistics that you are dealing with and if you have enough mass of data, you can find out how significant the power supply contribution is to the data fluctuations, compared with the DVM. Number of 'spikes' with and without an input would be a simple comparison, for instance.

    If the power supply is DC, then I am surprised that you didn't AC couple to it to find your noise. You could have been operating way above the DVM noise floor - particularly if you had used a suitable amplifier. But that's water under the bridge, of course.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook