AWG

Come here to introduce yourself, who you are, and what you do
Post Reply
Hans de Vries
User
User
Posts: 6
Joined: Sat Nov 10, 2012 10:55 pm

AWG

Post by Hans de Vries »

I would like to program the following equation of a fundamental frequency and as many harmonics as possible up to the 18th harmonic in the Equation Editor:

sin(x)+0.41*(sin(x*2)+sin(x*3)+sin(x*4)+sin(x*5)+ ...sin(x*17)+sin(x*18))

Any help, please. :roll:

Hans

Gerry
PICO STAFF
PICO STAFF
Posts: 1145
Joined: Mon Aug 11, 2014 11:14 am

Re: AWG

Post by Gerry »

Hi Hans,

I'm not exactly sure what you mean by the 'equation editor' in the AWG, as there isn't one in the PicoScope 6 AWG, and as far as I'm aware, there isn't one in the SDK, unless someone has created one specifically for either. The only way to do something similar to what I believe you are asking would be to put your equation into a Math Channel, export the resulting waveform to a CSV file correct it to the required number of samples in Excel and then import it into the AWG as a CSV file. However, you would have to specify a value or channel for x.

Could you explain exactly what your goal is in doing this?

Regards,

Gerry
Gerry
Technical Specialist

Hans de Vries
User
User
Posts: 6
Joined: Sat Nov 10, 2012 10:55 pm

Re: AWG

Post by Hans de Vries »

Hi Gerry,

The equation Editor mentions trigonometric functions besides the arithmetic functions. But I cannot activate it for application to the AWG port.

Thank you for the suggestion to use a Math Channel.

I'm engaged in research to use electrical fields to obtain better health. The more higher harmonics are involved the stronger the effect of the signal on the body is.

I'll consider your suggestion.

Best regards,

Hans

imgreen
User
User
Posts: 2
Joined: Fri Mar 08, 2019 2:28 pm

Re: AWG

Post by imgreen »

Hello Hans,

I agree with Gerry. But at least for the PS2000 SDK, one can program the AWG waveform directly, should you be into programming. The function is ps2000_set_sig_gen_arbitrary().

Maximum length of the AWG waveform is 4096 samples per waveform cycle. This will allow you to go very much higher than the 18th harmonic, should you wish. Note that the AWG outputs through a low pass filter, so harmonics above the stated bandwidth of the AWG will be attenuated.

By the way, when the number of harmonics is very high, your waveform tends to a low level sine wave plus a differentiated impulse once per cycle. You could get a good approximation to that by starting with the sine wave only, and switching from that to maximum +ve AWG voltage for a few samples at the start of each cycle, and maximum -ve for a few samples at end of cycle.

Regards,
Ian

Post Reply