Notch filter

control.notch

Second-order band-stop filter (s^2 + w0^2) / (s^2 + (w0 / Q) s + w0^2). It removes the frequency w0 and passes the rest; a higher Q makes the notch narrower.

Ports

NameDomainDirection
usignalin
ysignalout

Parameters

NameUnitDefaultRangeDescription
w0rad/s100 to ∞Notch frequency
Q110.000001 to ∞Quality factor

Variables

NameUnitDescription
x11Low-pass filtered input
x21/sRate of change of x1

Equations

der(x1) = x2
der(x2) = w0 ^ 2 * (u - x1) - w0 / Q * x2
y = u - x2 / (Q * w0)