Jump to content
  • 0

Pulse Width Misbehavior


P. Fiery

Question

Hello,

There is a pulse width jitter caused by some kind of aliasing between various unsynchronized events. My screen capture grabs only one frame of video, but you can see it in the red persistence trace, and I can see it on my Tek scope. I discovered this while running one of the script examples, and then confirmed that it exists in all the pulse modes of the Wavegen except as follows:

It is here with these "simple" settings:

image.thumb.png.76ffc6861b196bffcba2a76127851b24.png

It is here with these "basic" settings:

image.thumb.png.914a8b5e552755544ae6a4677f49b8f3.png

For my buffer setting and 1% at 5KHz the pulse width here varies from 1.870 us to 1.98 us. It should be 2 us of course. The actual frequency is similarly unstable by a few Hz around 5KHz.  Synchronization with a "Run" argument of 200 us or less cures the problem. It appears that when this is =< the set period, it dominates as the period of the waveform. :

image.thumb.png.064f64d474cc89371a4c0b6bbea3e7be.png

Placing Wavegen into "autosynchronized" mode does the same thing, but enforces a 200 us "run" argument:

image.png.14cb22f3e8078d0c57abe31c132ffaca.png

As expected, the "run" argument automatically takes on the period of the set frequency. However, note that at 2KHz a glitch appears in the pulse. (It is real):

image.thumb.png.06705f39c099dec76e6b2aa06db2e121.png

None of these setting produces a waveform that matches the settings exactly.  The glitch is particularly troubling.  Am I doing something wrong here? 

 

- Paul Vo 

 

 

 

 

 

 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Hi @P. Fiery

In order to generate precise pulse lengths use the Wait-Run timing and set pulse frequency to lower value.

image.png.c53f26f77e120a96b74ca481db6b6794.png

 

The glitch you are seeing is probably because of the Disabled Idle option, which should show up only for the EExplorer board. It is not supported by AD.

The signals are generated from the device buffer (4096/16384 samples) and the step increment is a fractional number to be able to generate arbitrary frequencies having a fixed 100MHz DAC rate.
This works well for various waveforms except for square and pulse signals where this causes jitter.

image.png.601597b89a1e4cc8418f369623145029.png

 

Link to comment
Share on other sites

Thank you, this is clarifying regarding jitter.

The glitch:

[ Some time later... Yes, I see that setting "idle output" to "offset" repairs the behavior I've reported here. However, I'll leave this comment here with your permission as it may help someone just discovering the inner workings of the AD2, as I am. One really does need to know these non-obvious things to make proper use of the Wavegen module. ]

I am using the Analog Discovery 2. The glitch seems due to the offset value not being maintained across the entire loop of the waveform buffer. You will not see this problem with any waveform that starts at zero but it shows up when you introduce an offset. In my example, the output should be -1v with a +1v pulse, but at t = 0 the output returns to 0 volts for what looks like one sample interval. Is it possible that a loop in Wavegen code responsible for adding the offset to the output is running from 1 to 4096 and excluding zero? Also, note that the drawn Wavegen signal spends the 5us delay at zero volts, differing from the actual signal produced. All in all, it seems there is something to reconcile here. [I still think the behavior here is counter-intuitive.]

 

Link to comment
Share on other sites

Hi @P. Fiery

I have added the idle disable option to do some internal testing and forgot to remove it from the release version. This option is not supported by AD2 and causes a glitch. 

In case you are interested about more details:
On the AD the AWG has two gains, 1/5V amplitude, 2/10Vpk2pk and separate DAC for offset. This lets you generate low amplitude, high resolution waveform at higher offset level, like 1Vpk2pk signal + 4V offset.
https://reference.digilentinc.com/reference/instrumentation/analog-discovery-2/reference-manual#awg_iv

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...