1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Algorithm for Numerical approximation to add data points

  1. Feb 10, 2015 #1

    I am working on TDR (Time Domain Reflectometry). I send a 7GHz bandwidth fast rising edge (14ns) square wave into a coax. I get a return Signal. I have an ADC with 10Msamples/sec. I am using MPLAB IDE for coding the microcontroller.

    Now I would like to increase the Points on the reflected signals to view small reflections with more Resolution. And also find the slope of the rising edge of the inverted square.

    I would like to use some Newton's Divided Differential Polynomial Method to approximate the slope and to add more Points between the sample Points.

    Could anyone help me with the idea of how to use this method and develop an algorithm and to run it on MPLAB?

    Thanks & regards.
    Last edited: Feb 10, 2015
  2. jcsd
  3. Feb 10, 2015 #2


    User Avatar
    Science Advisor

    You are talking about two different things. In order to get better resolution, you need to sample faster. If you use a mathematical algorithm to add points, you are in a way falsifying your data.
  4. Feb 10, 2015 #3
    I have a fixed ADC on PCB with 10MSamples/sec. The slope of the Signal is varying. Also the small reflections are to be measured.

    Is there any other possibility to acquire the reflections data without increasing the sampling rate?

    I am just putting my query in here, apologies to return the same question!
  5. Feb 10, 2015 #4

    Stephen Tashi

    User Avatar
    Science Advisor

    You question is a matter of "inference" rather than a matter of "interpolation". You can legitimately ask how to "infer" missing values of data. This is a different question that how to supply the actual missing values.

    To infer things about the signal between the samples, you need some plausible assumptions about the behavior of the signal based on the physics of the problem.

    To do things in MPLAB, you need an MPLAB expert! I don't know whether those are easy to find on this forum.

    I suggest you first ask about the physics of the problem. For example, what is a plausible family of functions that represent the signal? If the purely mathematical aspects of the problem can be determined then perhaps you can figure out how to implement it in MPLAB yourself.
  6. Feb 10, 2015 #5
    Thank you Mr. Stephen!
  7. Feb 10, 2015 #6


    User Avatar
    Science Advisor

    There is a fundamental problem. To get "interpolated data" with a 10 Msps converter you must stagger the samples taken over many repetitions of the TDR ranging waveform. That requires an analogue or digital "sampling oscilloscope".

    A sampling oscilloscope will have two ramp generators, one is a fast ramp generator that triggers a TDR ranging pulse every time it starts a new ramp. The ranging TDR pulses are therefore generated say every 10usec as the fast sweep rate repeats. The other ramp is a much slower ramp that takes maybe 20 msec. A fast analogue voltage comparator compares the two ramp voltages and triggers the ADC to take a sample of the TDR waveform each time the two ramps pass.

    In that example with ramps of 10usec and 20msec you will get 20m/10u = 2000 pulses per sweep. There will be 1 / (20 msec) = 50 sweeps per second. The sweep will appear to be 2000 points sampled over 10 usec which appears as 5 nsec samples or 200 Msps. That will give about 1 metre resolution along the line.

    The number of repetitions and the number of points sampled to generate a full trace will be determined by the accuracy of the two ramp generators and the total of the time “jitters” of the ranging pulse trigger, the voltage comparator and the ADC sampling clock.

    What is the part number of the ADC you are using?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook