Virtual engineering lab

Function Generator Fundamentals

Configure a reusable virtual function generator and verify its sine, square, triangle, and DC outputs with the two-channel oscilloscope.

Electrical Engineering / InstrumentationintroductoryValidated educational model
Learning mode

Guided laboratory

Use the checklist when you want a structured lab. Explore mode leaves the instruments unrestricted.

Virtual instrument

Function generator

Sine
Output1.000 kHz · 4.000 VppOffset 0 V · Phase 0°
High +2.000 VLow −2.000 VPeriod 1.000 ms

Generator output is connected to oscilloscope CH1.

Virtual instrument

Two-channel digital oscilloscope

Auto · waiting

Run the experiment to acquire the reference signals.

CH1
CH2
HorizontalSample rate —
Trigger
Cursors
Δt —1/Δt —ΔV —
Automatic waveform measurements

CH1

Frequency
—
Period
—
RMS
—
Mean
—
Maximum
—
Minimum
—
Peak-to-peak
—
Rise time (10–90%)
—
Fall time (90–10%)
—
Duty cycle
—

CH2

Frequency
—
Period
—
RMS
—
Mean
—
Maximum
—
Minimum
—
Peak-to-peak
—
Rise time (10–90%)
—
Fall time (90–10%)
—
Duty cycle
—
Measurements

Instrument readings

Measured frequency
—
Oscilloscope frequency measured from the generator output.
Measured period
—
Average period from oscilloscope threshold crossings.
Measured RMS
—
RMS voltage calculated from acquired CH1 samples.
Measured mean
—
Mean voltage calculated from acquired CH1 samples.
Measured peak-to-peak
—
Maximum minus minimum acquired CH1 voltage.
Measured duty cycle
—
Fraction of acquired time above the waveform midpoint.
Measured high level
—
Maximum acquired CH1 voltage.
Measured low level
—
Minimum acquired CH1 voltage.
Result visualization

Acquisition and cursor checks

Use these numerical acquisition readouts to verify what the graticule shows. Cursor values remain available even when color perception or display size makes the waveform harder to inspect.

Acquisition window
—
Sample rate
—
Trigger
—
Cursor Δt
—
Cursor 1/Δt
—
Cursor ΔV
—

A useful manual check is to place the two time cursors one period apart. The reciprocal of Δt should agree with the automatic frequency measurement within cursor-placement resolution.

Theory

Equations and model

Amplitude and offset

For a symmetric periodic waveform, peak-to-peak amplitude is the difference between the maximum and minimum values. DC offset shifts the entire waveform without changing its peak-to-peak amplitude.

Vhigh=Voffset+Vpp2V_{\mathrm{high}} = V_{\mathrm{offset}} \frac{+ V_{\mathrm{pp}}}{2}Vlow=Voffset−Vpp2V_{\mathrm{low}} = V_{\mathrm{offset}} \frac{- V_{\mathrm{pp}}}{2}

Frequency, period, and phase

Frequency describes cycles per second and period describes seconds per cycle. Phase shifts a periodic waveform in time relative to a reference.

T=1fT = \frac{1}{f}ϕtime=ϕdeg360f\phi_{\mathrm{time}}=\frac{\phi_{\mathrm{deg}}}{360f}

Square-wave duty cycle

Duty cycle is the fraction of one period spent in the high state. A 50% square wave spends equal time high and low; changing duty cycle changes the mean value even when high and low levels remain fixed.

D=thighT×100%D=\frac{t_{\mathrm{high}}}{T}\times100\%

Independent verification

The oscilloscope receives the waveform model as an electrical source and computes measurements from sampled data. It does not copy the generator readout, which makes the scope a meaningful independent check.

Validation

Independent checks

Generator frequency checkNot run

Compares oscilloscope-measured frequency with the configured generator frequency.

Expected
—
Simulated
—
Error
—
Tolerance
0.5%

Run the experiment to perform this check.

Generator amplitude checkNot run

Compares oscilloscope-measured peak-to-peak voltage with the configured generator amplitude.

Expected
—
Simulated
—
Error
—
Tolerance
0.5%

Run the experiment to perform this check.

Engineering interpretation

Run the experiment to generate an engineering interpretation.

Assumptions and limitations
Assumptions
  • The Phase 1.3 generator is an ideal voltage source with deterministic waveform timing.
  • Output impedance and load-dependent amplitude are not yet modeled.
  • Periodic outputs are mathematically ideal in this source-fundamentals experiment; downstream measurements can layer the shared Phase 1.7 non-ideality model.
  • The educational front panel limits output extrema to ±20 V.
Limitations
  • Burst, sweep, modulation, arbitrary-waveform memory, sync output, and hardware-specific impedance modes are outside Phase 1.3.
  • Rise/fall bandwidth, quantization, noise, calibration error, and output impedance are introduced later through the shared measurement-error model.
  • Phase is meaningful relative to a reference signal; this single-generator exercise displays phase mathematically but does not yet provide a second independently adjustable generator channel.
Local experiment export

Save your measurements and setup

Exports are generated in your browser. No account or server upload is required.

Settings JSON
Current parameters and instrument controls, including waveform, output enable, scope coupling, timebase, trigger, and cursors when present. Data labs also include the dataset, mappings, exclusions, budget, or propagation setup.
Measurements CSV
Completed instrument readings with labels, units, and descriptions.
Plot PNG
The current canvas-based scope, transient, sweep, or statistics visualization when available.
Summary
Markdown report with objectives, setup, measurements, validation, interpretation, assumptions, and graded guided concept-check results.

Ready to export the current local experiment state.

Learning objectives

What this experiment should establish

  • Generate sine, square, triangle, and DC waveforms from one reusable instrument model.
  • Set amplitude, DC offset, frequency, duty cycle, and phase from a virtual front panel.
  • Relate peak-to-peak amplitude and offset to the waveform high and low levels.
  • Verify the generator output independently with oscilloscope measurements.
  • Recognize settings that exceed the virtual generator output range instead of accepting physically invalid combinations.
Check your understanding

Questions to answer from the experiment

  1. Why does changing DC offset move both waveform peaks without changing peak-to-peak amplitude?
  2. Why does a square wave with a duty cycle other than 50% have a different mean voltage?
  3. Why is edge triggering not meaningful for a constant DC waveform?
  4. Why is measuring the generator with a separately modeled oscilloscope more useful than simply displaying the configured values twice?
Continue learning

Sources and model review

Reviewed 2026-09-08. The educational model exposes its assumptions and validation; source references do not imply external certification.

  • Function-generator fundamentals — Uses standard waveform definitions for amplitude, DC offset, frequency, period, phase, and square-wave duty cycle.