Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unstable parameter computations when applying ramp/triangle signal. #77

Open
amiclaus opened this issue Apr 4, 2017 · 4 comments
Open

Comments

@amiclaus
Copy link
Contributor

amiclaus commented Apr 4, 2017

Connect M2K. Start Scopy and connect to the detected device. Open the Oscilloscope and enable the Measure feature.
Apply a ramp/triangle signal with any frequency 1Hz-200kHz (5Vpp).
Observe the measurement box values.
Parameter values: Low, High, Amplitude, Middle, +Over, -Over, Rise, Fall, +Width, -Width, +Duty, -Duty are fluctuating too much (are unstable) due to the fact that the proper computation cannot be done in some of these cases.
Should we somehow disable the display of these inaccurate values in these specific situations?

@claudiupop
Copy link
Contributor

The problem with the measurements on triangle / sawtooth signal is that the histogram generated is random (See picture) when it should be uniform. To calculate low / high value it picks the most common value found above / below midpoint (on histogram). Because the most common value is changing often, all the measurements, that use low / high value for computation, are fluctuating.

trianglehistogram

We connected the m2k to an oscilloscope. For the same signal, the scopy failed to calculate the low / high values, while the oscilloscope displayed a constant value for low / high. Eg: for a triangle wave at 100 kHz 5Vpp the oscilloscope measured:
Min.Value: -2.594v
Max.Value: 2.531v
Low: -2.484v
High: 2.432

while scopy measured :
Min.Value: -2.534v
Max.Value: 2.550v and low/high were fluctuating.

On oscilloscope the values for low/high were very close to min/max values but different.

@dNechita
Copy link
Contributor

There is no predominant component in a histogram for signals like triangle and sawtooth. If you can detect that situation you should fall back to other methods of detecting 'high' and 'low' measurements. The histogram approach is just not that effective for these types of signals.
No ideal methods come to my mind but some ideas I have are:

  • for detecting the 'low' get a couple of the lowest values and since you now know their distribution, you could compute a weighted arithmetic mean for those values.
  • or apply a low pass filtering and then try again the histogram approach

@adisuciu adisuciu modified the milestones: phase2, R1.1 Aug 17, 2018
@adisuciu
Copy link
Contributor

Most scopes don't have this functionality. One should understand the way measurements work. I'm just gonna close it.
-Adrian

@rgetz
Copy link

rgetz commented Jul 16, 2020

Most scopes do have this functionality.

It's a simple way - keep track of successive measurements (across buffers) - if they vary more than 10% - display "-----" rather than the number.

@rgetz rgetz reopened this Jul 16, 2020
@adisuciu adisuciu removed this from the R1.1 milestone Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants