Waveform averaging - the PicoScope way

Forum for discussing PicoScope version 6 (non-automotive version)
lab!fyi
Newbie
Posts: 0
Joined: Mon Dec 12, 2016 6:58 pm

Re: Waveform averaging - the PicoScope way

Post by lab!fyi »

Noticed averaging keeps same "sample interval" as current sample rate dictates. But does not keep phase with original signal. When starting capture it assumes some random position within total "play" approx same as sample interval. Average trace is in magenta, and max play observed is marked with cursors. Sometimes, randomly, it starts in correct phase and keeps it.
Average trace phase shifted
Average trace phase shifted
Average trace ok, lucky strike
Average trace ok, lucky strike
Perhaps averaging should also have [option of] higher res horizontally, than current sampling rate, to work sort of like ETS works.

PS. Please increase allowed attachment size - 256KB not enough for screenshot PNGs and even JPGs, if do not compress to garbage!

lab!fyi
Newbie
Posts: 0
Joined: Mon Dec 12, 2016 6:58 pm

Re: Waveform averaging - the PicoScope way

Post by lab!fyi »

When observing some other similar product noticed that sample points on normal trace are aligned with trigger pos. When enable averaging it also keeps same sample interval as regular trace, and also keeps sample points aligned with trigger pos. Getting more smooth trace is governed by "oversampling" control (2X, 4X, etc).
With this system averaged trace does not shift in phase.
Probably Picos "non aligned" triggering system is more accurate but need to account for it in secondary processing.

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Waveform averaging - the PicoScope way

Post by Martyn »

Thank you for the comments which will be passed on to the development team for further discussion.

There are many data paths from the analog front end of the scope through to the display of data on the screen so, although a suggestion may seem easy to implement when looking at it in isolation, it may not be as straightforward in context of the full system.
Martyn
Technical Support Manager

Sensorman
Newbie
Posts: 0
Joined: Tue Feb 20, 2018 8:31 am

Re: Waveform averaging - the PicoScope way

Post by Sensorman »

Having recently switched from using ADC212-100 (running under XP) to a 5444B and PicoScope 6, I found this thread very helpful - for a moment, I thought averaging was not possible!

Just want to check a couple of points. Having created, say, "average(A)" as a Math Channel, and displaying only this channel while working, then:

When saving in native .psdata format, a current displayed average trace will NOT be available (stored) if you select "current waveform only". It seems that you need multiple traces in the buffer in the saved file, otherwise the "average(A)" trace will be identical to the single normal trace. This implies that a displayed average from a saved file is created from the average of the buffer traces (whereas a live "average(A)" trace may include data not held in the buffer).

But if you "save as" another format, such as .csv, then the current displayed average trace IS exported when "current waveform only" is selected. Actually, I haven't checked whether this is exactly the displayed trace, or an average of all traces in the current buffer, but the difference would be minor in my case.

A slight peculiarity I have observed is that, using the Math Channel Wizard, unchecking the Range tickbox "Override automatic range selection" does not seem to be persistent. I found that auto range was quite often overridden when arranging the display, and I had to go back into the Wizard quite frequently to uncheck this box again.

Finally, and this may be an obvious comment, note that the averaging facility enormously increases vertical resolution, while maintaining original sampling rate. Say you select 8 bit resolution to get fastest possible SR (1 ns, in my case). I found resolution was enhanced by 6 bits in the "average(A)" trace, giving apparent 14 bit result. And for 12 bit original resolution, averaging appeared to enhance this to >25 bit.

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Waveform averaging - the PicoScope way

Post by Martyn »

Yes you are correct, average works from start of run when live, not just the buffer memory, but obviously can only work with the data buffers from the saved file. We have a request with the development team to just average the buffer memory as an option, but this work has not been scheduled yet.

The range tickbox issue is already in the system for investigation by the development team.
Martyn
Technical Support Manager

Benedito
Newbie
Posts: 0
Joined: Sun Feb 25, 2018 12:08 pm

Re: Waveform averaging - the PicoScope way

Post by Benedito »

In reality the Math Channel Averager are a powerfull COMB FILTER

eilert
Newbie
Posts: 0
Joined: Wed Mar 14, 2018 7:25 am

Re: Waveform averaging - the PicoScope way

Post by eilert »

Benedito wrote:In reality the Math Channel Averager are a powerfull COMB FILTER
Hi Nedi,
When I read your message first I wondered what made you think of a comb filter.

Normally these are used to separate equally spaced channels, so how should they do the desired averaging.

But investigating how comb filters are implemented and how the Picoscope averaging actually works made things clear, and you are right.

Picoscope averaging adds up buffered samples of the signal. So this can be seen as a time delay. The triggering makes sure that the starting point of the repetitive signal is the same for all samples. Therefore the resulting comb fillter will have its pass bands at the harmonics of the repetitive signal and erase the frequencies in between, thus clearing the signal from distortions.

This explanation requires good understanding of signal and filter theory.

One could also explain the signal improvement simply by looking at the properties of a noise signal.

While the noise amplitude randomly changes at equally spaced points, summing up a number of such samples eqals to almost zero, while the underlying repetitive signal amplitude will be the same at these times and therefore multiplied by the number of sample sets.(Needs to be divided afterwards to get the correct amplitude.)

So the signal will be restored while the noise is averaged away. However both ways require proper triggering.

Kind regards
Eilert

lab!fyi
Newbie
Posts: 0
Joined: Mon Dec 12, 2016 6:58 pm

Re: Waveform averaging - the PicoScope way

Post by lab!fyi »

Hello, I did look into theory a bit and have no issues with Min, Max, Peak, Average functions as such. For example during actual capture Min/Max resume positions +-0.5 sample apart from Average, and have logical temporal sync between them.

However, global timing of the traces is really broken and I will point it out again because it is especially broken when loading saved file. You see traces resume different pseudo-random position even when loading static data!

First look thumbnail of saved PSDATA. Trace group shifted to max right (+1 sample from trigger). This is how it looked during capture also. When load saved file traces moved to completely different positions more than 1 sample apart which is incorrect even by theory. When loading file again traces moved to max left... :shock: There is not even remote possibility for user to compensate for this kind of bug other than fiddle with compensation timings each time.
2205_pulser__min_max_average_peak__thumbnail.jpg
2205_pulser__min_max_average_peak__1.jpg
2205_pulser__min_max_average_peak__2.jpg
For example with resolution enhancement trace also moves but always has always logical fixed position and when needed user can deal with it using time shifts (to sync with other channels etc).

Correction would be rather simple. Hard-fix sample points for these traces with +-0.5 sample shift about T=0 (so average lands approx on trigger like expected by end user).

PSDATA attached in ZIP.
Attachments
2205_pulser__min_max_average_peak.zip
(18.29 KiB) Downloaded 181 times

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Waveform averaging - the PicoScope way

Post by Martyn »

This may be an issue due to the way data is collected and processed on the low memory 2205, which doesn't support memory segments on the device as our other scope models do, instead handling this within the driver and application.

If you export the data as a csv file you will find that there are actually 102 data points and this may be throwing the buffer based math functions out of sync. I will raise this for investigation by the development team.
Martyn
Technical Support Manager

lab!fyi
Newbie
Posts: 0
Joined: Mon Dec 12, 2016 6:58 pm

Re: Waveform averaging - the PicoScope way

Post by lab!fyi »

Martyn wrote:
Thu Sep 27, 2018 9:12 am
This may be an issue due to the way data is collected and processed on the low memory 2205, which doesn't support memory segments on the device as our other scope models do, instead handling this within the driver and application.
Hi, initially I discovered the "walking math" phenomenon on 2408B so suspect it is common to all scopes. I did example on 2205 because it nice well behaved puppy and gets bored in the drawer.

mstone31
Newbie
Posts: 0
Joined: Wed Oct 24, 2018 4:17 pm

Re: Waveform averaging - the PicoScope way

Post by mstone31 »

Martyn wrote:
Fri Feb 23, 2018 10:10 am
Yes you are correct, average works from start of run when live, not just the buffer memory, but obviously can only work with the data buffers from the saved file. We have a request with the development team to just average the buffer memory as an option, but this work has not been scheduled yet.

The range tickbox issue is already in the system for investigation by the development team.
So, it looks like we are pushing three years waiting for this control of the display averaging issue to be solved? Any news?

mike

hamidnaghi
Newbie
Posts: 0
Joined: Mon Feb 10, 2020 3:04 pm

Re: Waveform averaging - the PicoScope way

Post by hamidnaghi »

If I leave it for averaging for a few minutes then it make ravage of hundreds of waveforms and I need to save it. How can I save that long average average?

Ketan_UniAdl
Newbie
Posts: 0
Joined: Wed Jan 12, 2022 5:58 am

Re: Waveform averaging - the PicoScope way

Post by Ketan_UniAdl »

Dear Stuart,

How do I:
1. Stop scanning when the buffer memory is full?
2. Export the averaged waveform to another format such as .cvs?

Kind regards,
Ketan

YASERARAFATH44
Newbie
Posts: 0
Joined: Mon Dec 19, 2022 7:57 pm

Re: Waveform averaging - the PicoScope way

Post by YASERARAFATH44 »

Hi,
Has the waveform averaging has been implemented in picoscope 6 software?
If i have 10 waveforms in the buffer and if I'm averaging using the math operator, when i save the matlab file it's saving all the 10 waveforms. So which is the averaged waveform?
Is it possible to download only the averaged waveform file?

YASERARAFATH44
Newbie
Posts: 0
Joined: Mon Dec 19, 2022 7:57 pm

Re: Waveform averaging - the PicoScope way

Post by YASERARAFATH44 »

Hi Martyn,
How can I average 10 waveforms for each channel and save only the final averaged waveform in 5443B?
Also reading the other post will my averaged waveforms save a different data ( i mean does it have a change in phase?)

My intention is to average form in all the 4 channels 0f 5443B and save the averaged file so that i can eliminate the uncorrelated noise.

Post Reply