Skip to content

Function Generator preview has misleading aliasing artefact  #237

@fietser28

Description

@fietser28

Setting the function generator to a full rectified waveform (or sine) and frequency of 1Hz (and min=0, max= 10V):

If the timespan is set to 1 second, you will see 10 cycles. That's fine:
artefact2

If you increase the timespan, more cycles will be shown. Unit you reach 50s, suddenly few cycles are shown (20 instead of 500):
artefact1

The explanation I have for this is aliasing: The preview is sampled with too little samples and heavy aliasing starts to occur from a given point.

Solution: The screen is 480 pixels this equals the number of samples you want to display/calculate. If there are more then 120 cycles to be displayed, just show a bar between min/max. 120 means = 4 samples per cycle (think Nyquist theorem). Below this some artefacts already appear but I think these are acceptable and clearly look as a mild form of aliasing to a user.

Interesting example, with 2 frequencies (10 Hz and 0,4Hz@180degree phase): They look the same in the preview but in reality they are 25x apart:
artefact3

Another interesting example (misleading to user):
artefact4
It should look like this (except the channel name is not visible now):
artefact5

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions