## Detail of how does AWG on Pico 5442B work

Post any questions you may have about our current range of oscilloscopes
ThongHuynh
Newbie
Posts: 0
Joined: Tue May 29, 2018 11:26 am

### Detail of how does AWG on Pico 5442B work

I would like to generate a waveform by AWG, not by defining the output freq, but using a defined generator freq, say 200MHz --> dt=5ns. The waveform is denied in a 1D array. In MATLAB code, the waveform should like that:

Code: Select all

``````dt=5e-9;
wfSize=1000;
t=(0:dt:dt*(wfSize-1));
x=(t-dt*wfSize/2).^2;
plot(t,x);``````
Is it possible to do this with the AWG on 5442B and how? I have read the api document, but still do not understand how the AWG work. The formula in 4.61.2 is quite strange: it uses deltaPhase and waveform size as variables, but does not refer to values defining the waveform.

AndrewA
PICO STAFF Posts: 218
Joined: Tue Oct 21, 2014 3:07 pm

### Re: Detail of how does AWG on Pico 5442B work

Note the AWG update rate for PS5000B/D units is 200MHz so this is the maximum frequency that can be generated.
The term 'arbitrarywaveform' is your buffer of values/points for the AWG. These are passes as int16_t values, but the AWG resolution for PS5000B/D is 14 bits (output step size approximately 0.25 mV).
The formula in 4.61.2 would make more sense if were transposed for deltaphase. As these are the values needed for the function 'ps5000aSetSigGenArbitrary()'. (startDeltaPhase, stopDeltaPhase and IncreasmentDeltaPhase)
The terms in the formula are mostly constants depending the scope you have(listed in the table on the same page), apart from the output frequency and arbitrary waveform size.
The arbitrary waveform size has to be equal to or less awgBufferSize for your scope.
For best frequency accuracy make the number of points the same as the buffer ie arbitrary waveform = awgBufferSize. Especially at low frequencies- 0.1-10Hz.
Instead of using the formula you can call the function 'ps5000aSigGenFrequencyToPhase()' to calculate the values for deltaPhase terms for a desired frequency.
It will return the closest whole number value for the requested frequency. (You can always put the deltaPhase number into formula to see what the exact frequency will be generated)

Note, if you want to sweep an arbitrary waveform, the variable 'dwellCount' can be calculated by-
'dwellCount' = Dwell Time in seconds / DACPeriod
So for the PS5000B/D models the DACPeriod is 5ns.
Regards Andrew
Technical Specialist