Question:

How do I generate a haversine waveform using the Agilent 33120A? 

Answer:
A haversine waveform is an inverted cosine offset by half its amplitude.

Getting Started:

Haversine(A)
The haversine of an angle A is half the versine of A, or is �(1-cos(A))
Haversine Waveform
A haversine waveform is an inverted cosine offset by half its amplitude. A continuous haversine would look like a sine wave with offset.
Front Panel Example We wish to output a 5 Vpp, 5 kHz bursted haversine waveform. Our waveform will be a sine wave with a starting phase of 270 degrees and an offset voltage of 2.5 Volts.
  1. Select the function, frequency, and amplitude of the carrier. Press the [SINE] key on the front panel to select the sine wave (this is actually the default). Next, adjust the frequency to 5 kHz using the arrow keys, the knob, or the enter number methods. Adjust the amplitude to 5 Vpp in the same manner.
  2. Set the offset Press the [OFFSET] key on the front panel to select the offset. Using the arrow keys, the knob, or the enter number methods, set the offset to half the amplitude (2.5 Volts). Note that the OFFSET annunciator turns on.
  3. Turn on BURST [SHIFT] [BURST] Note that the BURST annunciator turns on. At this point, the waveform is output with the default BURST parameters (1 sinewave cycle being output at a 100 Hz rate).
  4. Set the number of cycles, rate, and phase of the bursted signal.
    1. Burst Count Press the [SHIFT] [RECALL MENU] to go directly to the BURST COUNT command in the menu. Press the down arrow, confirm that the burst count is set to 1. This may be adjusted using the arrow keys, the knob, or the enter number methods. Press [ENTER] to change the number of cycles in each burst signal and exit the menu.
    2. Burst Rate Press the [SHIFT] [RECALL MENU] to go directly to the last executed command in the menu. Press the right arrow to get the BURST RATE command, and press the down arrow. Note that the BURST annunciator flashes, indicating that the displayed frequency is for burst rate. Adjust the frequency to 100 Hz using the arrow keys, the knob, or the enter number methods. Press the [ENTER] key to save the change and exit the menu.
    3. Burst Phase Press the [SHIFT] [RECALL MENU] to go directly to the last executed command in the menu. Press the right arrow to get the BURST PHASE command, and press the down arrow. Note that the BURST annunciator flashes, indicating that the displayed phase is for the burst phase. Adjust the phase to 270 degrees using the arrow keys, the knob, or the enter number methods. Press the [ENTER] key to save the change and exit the menu.
The bursted signal is now ready to view on the oscilloscope. When the haversine waveform (phase shifted sine wave) is output, it will look like an inverted cosine, with the minimum amplitude at 0 Volts and the maximum amplitude at 5 Volts (or whatever value you set the amplitude). Programming Example Below is a sample program in HP Basic for the front-panel example. The example set up a 5 Vpp, 5 kHz haversine waveform. This program sets up a burst waveform with 270 degree starting phase. By adding an offset voltage to the burst, a haversine is created. This program also shows the use of a trigger received over the HP-IB interface to initiate a single trigger.
     10 !

     20 CLEAR 7                       ! clear bus interface

     30 ASSIGN @Gen TO 710            ! assign I/O path to default address

     40 OUTPUT @Gen;"*RST"            ! Reset the function generator

     50 !

     60 OUTPUT @Gen;"FUNC:SHAP SIN"   ! carrier waveform shape

     70 OUTPUT @Gen;"FREQ 5000"       ! carrier frequency is 5 kHz

     80 OUTPUT @Gen;"VOLT 5"          ! carrier amplitude is 5 Vpp

     90 OUTPUT @GEN;"VOLT:OFFS 2.5"   ! offset voltage is 2.5 Vdc

    100 OUTPUT @Gen;"BM:NCYC 1"       ! burst count is 1 cycle

    110 OUTPUT @Gen;"BM:PHAS 270"     ! burst phase is 270 degrees

    120 OUTPUT @Gen;"TRIG:SOUR BUS"   ! trigger source is bus

    130 OUTPUT @Gen;"BM:STAT ON"      ! turn BURST on

    140 !

    150 ! Trigger the 33120A over the HP-IB interface.

    160 !

    170 OUTPUT @GEN;"*TRG"            ! or "TRIGGER 710"

    180 END
Other ways to create a continuous haversine waveform There are two ways to create a continuous haversine waveform. The first is to use a continuously running sinewave. A continuous haversine waveform looks like a sinewave with offset. Adjust the offset so that it is equal to the peak voltage of the waveform.

The second method is to create an arbitrary waveform. This waveform should be a sinewave shifted by 270 degrees and offset by the peak voltage of the waveform. One reason for using an arbitrary waveform rather than the sinewave is for triggering purposes. The sync output signal associated with the sinusoidal function is TTL "high" when the waveform output is positive relative to the dc offset value, and TTL "low" when the output is negative relative to the dc offset value. For arbitrary waveforms, a momentary TTL "high" pulse (>200 ns) is output which corresponds to the first point in the waveform. Using the arbitrary waveform method will allow you to use the sync output signal to correspond with the starting phase of the haversine waveform.

When outputting a continuous haversine waveform, you need to know how the phase is related before deciding which method to use. If the phase is related to the SYNC pulse, the arbitrary waveform method must be used. If the waveform is related to an external trigger, either the offset sinewave method (with burst phase set to 270 degrees) or the arbitrary waveform method may be used.

When using two Agilent 33120A s with option 001 (Phase Lock Loop), the continuous sinewave method is recommended for generating a haversine. Set zero phase with the offset sinusoidal waveform 270 degrees out of phase to the standard sinusoidal.
  Revision 1.0       22 Mar 99       cld