Filters selectively attenuate certain frequency ranges in a signal. They are used widely in electronics, telecommunications, audio/video, and other applications. Filters are classified as analog or digital depending on the signal type. Ideal filters have constant gain in the passband and zero gain in the stopband with linear phase, but practical filters have variable gain and non-zero/non-linear characteristics. Digital filters are further divided into finite impulse response (FIR) filters, which depend only on past inputs, and infinite impulse response (IIR) filters, which are recursive and depend on both past inputs and outputs. IIR filters are designed by first designing an analog filter prototype and transforming it to the digital domain using techniques like impulse invari