Figure 1 shows the list of waveforms sources.

#### Figure 1:

The list of component waveform sources in ArbStudio

While standard waveforms like sine and squarewave (rectangular) are commonly used, either alone or in combination with other waveshapes, there are many waveforms that cannot be created by a simple combination of these waveforms. In these cases, importing waveforms from a measurement instrument, file, or creating it analytically using equations or formulae are ideal methods. This paper will focus on creating waveforms using formula entry.

After creating or opening a workspace in ArbStudio double click on the Waveform Sequencer in the channel of your choice. This will bring up the Waveform Sequencer for the channel as shown in Figure 2.

#### Figure 2:

Double clicking on the Waveform Sequencer under one of the channel will open the Waveform sequencer window

Press the add advanced waveform button to add a component waveform. Double click on component 1 in the waveform manager to access the component definition window as shown in Figure 3.

#### Figure 3:

Selecting the component definition

Click on the Type scroll list in the component definition to show waveform sources. Select Formula to access the formula editor in Figure 5.

Pressing the Edit key in the Formula box of the Component definition will open the formula editor shown in Figure 6.

#### Figure 6:

The formula editor allows you to build a waveform analytically using equations. Equation can be based on time (t) or samples (x)

Equations can be based on the functions Sine, Cosine, Log base 2, Log Base 10, raise to a power (^), Square Root, Sign, Tan, Natural Log (Ln), Abs, Exp, Integer, ArcSine, Arc Cosine, Arc Tan, Ceiling and Floor along with the basic arithmetic operations addition (+), subtraction (-), multiplication (*), and division (/).

Numeric values can be entered from the keypad along with multipliers (nano, micro, milli, kilo, Mega, and Giga).

The preview key will compile your formula and display the results graphically above the Component definition box, as shown in Figure 7. When you are completed with all the edits pressing Confirm will save the equation and exit the editor.

#### Figure 7:

Previewing the results of the formula

Once you have completed work on this component you can move on to additional components or choose to add this component to the sequencer and output the waveform from the ArbStudio.

The balance of this application note will show some typical formula based waveforms.

### Exponentially Decaying Sine wave

#### Figure 8:

Exponentially Decaying 2 MHz sine wave 2*Exp(-t/E-6)*Sin(2*3141592*2*E6*t)

General form of the formula:

$$V*Exp(-t/Tc)*Sin(2*pi*t*Fs)$$

 Where Fs – Sine wave frequency in Hertz Tc – Time Constant in seconds V – Signal amplitude in Volts peak

### Ramp

#### Figure 9:

Ramp 0.2*E6*t

General form of the formula:

$$A*T$$

 Where A– Slope of the ramp in Volts/second

### Rising Exponential

#### Figure 10:

Rising Exponential 1-Exp(-t/2*E-6))

General form of the formula:

$$1-Exp(-t/T_c)$$

 Where Tc – Time Constant in seconds

### Decaying Exponential

#### Figure 11:

Decaying Exponential Exp(-t/(2*E-6))

General form of the formula:

$$Exp(-t/T_c)$$

 Where Tc – Time Constant in seconds

### Sine

#### Figure 12:

Sin(2*3.141592*2E6*t)

General form of the formula:

$$V*Sin(2*pi*t*F_s)$$

 Where Fs – Sine wave frequency in Hertz V – Signal amplitude in Volts peak

### Linear Amplitude Sweep of a Sine

#### Figure 13:

Linear Amplitude Sweep of a 1 MHz Sine 0.2*E6*t*Sin(2*3.141592*E6*t)

General form of the formula:

$$(A*t) *Sin(2*pi*t* F_s)$$

 Where Fs – Sine wave frequency in Hertz A – slope of the ramp in Volts/second

### Frequency Modulation (FM)

Note, the ArbStudio, operating in Direct Digital Synthesis (DDS) mode can create both frequency and phase modulation. This example shows how to create FM by formula.

#### Figure 14:

Frequency Modulation Sin (2*3.141592*2*E6*t+2*Cos(2*3.141592*0.4*E6*t))

General form of the formula:

$$Sin (2*pi*t*F_c+(F_D/F_M)*Cos(2*pi*t*F_M))$$

 Where Fc -Carrier frequency in Hertz FD – Frequency deviation in Hertz FM – Modulation frequency in Hertz

### Phase Modulation (PM)

Note, the ArbStudio, operating in Direct Digital Synthesis (DDS) mode can create both frequency and phase modulation. This example shows how to create PM by formula.

#### Figure 15:

Phase Modulation Sin(2*3.141592*2*2*E6*t+(3.141592*Sin(2*3.141592*0.4*E6*t)))

General form of the formula:

$$Sin((2*pi*t*F_c+ K*Sin(2*pi*t*F_M))$$

 Where Fc – Carrier frequency in Hertz K – Peak phase excursion in radians FM – Modulation frequency in Hertz

### Linear Frequency Sweep

Note, the ArbStudio, operating in Direct Digital Synthesis (DDS) mode can create both frequency and phase modulation. This example shows how to create a linear frequency sweep by formula.

#### Figure 16:

Linear Frequency Sweep Sin(3.141592*(2*t*E6+((4*E6-1*E6)/(10*E-6))*t^2))

General form of the formula:

$$Sin(pi*(2*t*F_s+((F_E-F_s)/T_s)*T^2))$$

 Where FS – Start frequency in Hertz FE – End frequency in Hertz TS – Sweep duration in seconds

### Gaussian Pulse

#### Figure 17:

Gaussian Pulse Exp(-(0.5)*((t-5*E-6)/(E-6))^2)

General form of the formula:

$$Exp(-(1/2)*((T-T_M)/T_σ)^2$$

 Where TM – Time location of the mean of the Gaussian pulse Tσ – Half width point of Gaussian pulse corresponds to the standard deviation σ

### Lorentzian Pulse

#### Figure 18:

Lorentzian Pulse 1/(1+((t-5*E-6)/(0.5*E-6))^2)

General form of the formula:

$$1/(1+((t-5*T_D)/(T_W))^2)$$

 Where TD – Time delay in seconds TW – Half width point of the Lorentzian pulse @ 50% amplitude

### Amplitude Modulated Sine

#### Figure 19:

Amplitude Modulated 2 MHz Sine Sin(2*3.141592*2*E6*t)*(1+0.75*Cos(2 * 3.141592*0.2*E6*t))

General form of the formula:

$$Sin(2*pi*t* F_s) *(1+K*Cos(2*pi*t*F_M))$$

 Where FS – Sine wave frequency in Hertz FM – Modulation frequency in Hertz K – Modulation index, 0 < K < 1

### Full Wave Rectified Sine

#### Figure 20:

Full Wave Rectified Sine Abs(Sin(2*3.141592*E6*t))

General form of the formula:

$$Abs(Sin(2*3.141592*F_s*t))$$

 Where FS – Sine wave frequency in Hertz

### Half Wave Rectified Sine

#### Figure 21:

Half Wave Rectified Sine 0.5*(Sin(2*3.141592*E6*t)+(Abs(Sin(2*3.141592*E6*t))))

General form of the formula:

$$0.5*(Sin(2*3.141592*F_s*t)+(Abs(Sin(2*3.141592*F_s*t))))$$

 Where FS – Sine wave frequency in Hertz