# Signal-level problem: V_GS = V_0 + a sin(wt) with a small and a large a,
# and the square-law drain current I_D = (V_GS - V_TH)^2 (normalized, V_0 - V_TH = 1).
import numpy as np
t = np.linspace(0, 5, 801)
ov = 1.0
small, large = 0.25, 0.8
vs = ov + small*np.sin(2*np.pi*t)
vl = ov + large*np.sin(2*np.pi*t)
np.savetxt('siglevel.dat', np.column_stack([t, vs, vl, vs**2, vl**2]),
           header='t vgs_small vgs_large id_small id_large', comments='', fmt='%.5f')
