Moving shuttle comb Fixed frame comb Theory H(r) curve Live RK4 measurement

MEMS Comb-Drive Resonance Curve Simulator (2D)

This 2D companion to the 3D comb-drive actuator models the same real electrostatic MEMS resonator, but computes it a genuinely different way: instead of a single live amplification readout, it integrates the driven spring-mass-damper equation of motion with 4th-order Runge-Kutta and plots the exact closed-form resonance transfer function H(r) = 1/sqrt[(1-r²)²+(r/Q)²] that the same linear ODE predicts. A live marker measured straight from the running integration rides along the theoretical curve as you sweep the drive frequency, so you can watch a numerically-simulated device track its own analytic prediction — including the small extra lift from second-harmonic mixing that a real comb drive shows when the AC swing is not negligible next to the DC bias. Adjust bias voltage, AC drive amplitude, frequency ratio and quality factor to see the peak shift, sharpen and rescale exactly as the formula predicts.