• 0

Pulse Width Misbehavior



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:


It is here with these "basic" settings:


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. :


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


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):


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 post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @P. Fiery

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



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.



Link to post
Share on other sites
  • 0

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.]


Edited by P. Fiery
Link to post
Share on other sites
  • 0

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.


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now