AKS Anvil

Signal theory

Signal generator & scope

Dual-channel waveforms, triggered scope, spectrum, measurements, and export for HIL-style offline work.

Waveforms

x(t) = A · w(φ(t)) + offset

Sampling & Nyquist

Δt = 1 / fₛ
content above fₛ/2 aliases

Keep tones well below half the sample rate. The scope timebase (ms/div) chooses how much history is drawn.

Triggering

Rising/falling edge on CH1 re-aligns the display buffer at a threshold crossing — similar in spirit to a real digital scope “auto/normal” capture, simplified for teaching.

FFT spectrum

When the window length is a power of two, a Cooley–Tukey FFT computes the magnitude spectrum. Hann windowing reduces leakage. Peak frequency and a rough THD estimate (harmonics 2…8 over fundamental) are shown.

X[k] = Σₙ x[n] e−j 2π k n / N
f_k = k · fₛ / N

Measurements

X-Y (Lissajous)

CH1 → X, CH2 → Y. Equal frequencies with 90° phase produce a circle/ellipse; frequency ratios draw classic Lissajous figures.

Export & audio

CSV columns t_s, ch1, ch2 for HIL/co-sim. WAV is a mono mix. Browser audio uses the Web Audio API (looped buffer) — watch levels.

Open the Signal Generator & Scope, set CH2 phase to 90°, and switch to X-Y view.