Figure 1 shows the list of waveforms sources.
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.
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.
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.
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.
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
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
General form of the formula:
$$A*T$$
Where | A– Slope of the ramp in Volts/second |
Rising Exponential
General form of the formula:
$$1-Exp(-t/T_c)$$
Where | Tc – Time Constant in seconds |
Decaying Exponential
General form of the formula:
$$Exp(-t/T_c)$$
Where | Tc – Time Constant in seconds |
Sine
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
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.
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.
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.
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
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
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
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
General form of the formula:
$$Abs(Sin(2*3.141592*F_s*t))$$
Where | FS – Sine wave frequency in Hertz |
Half Wave Rectified Sine
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 |