Electronic Filters An overview • Electronic filters are circuits which perform processing functions, specifically to remove unwanted frequency components from the signal, to enhance wanted ones, or both. Types • Electronic filters can be:

• Passive/active • Analog/digital • high-pass, low-pass, band-pass, band-stop (band-rejection; notch). • discrete-time (sampled)/continuous-time • Linear/non-linear • infinite (IIR type) / (FIR type) Let us first talk about Signal

1.Time-domain 2.Frequency-domain Sampling Theorem

In the field of DSP, the sampling theorem is a fundamental bridge between continuous-time and discrete-time signals.

It establishes a sufficient condition for a sample rate that permits a discrete sequence of samples to capture all the information from a continuous-time signal of finite bandwidth. Nyquist rate: For lossless digitization, the sampling rate should be at least twice the maximum frequency responses. Indeed many times more the better. Frequency domain

• Why we need it?

Amplitude

S1 = 0.7*sin(2*pi*50*t) Time S2 = 1*sin(2*pi*120*t) • S3=S1+S2; So just by looking at time domain we can only see amplitude changes

Amplitude

So here comes the use of frequency domain representation of any signal.

Time Fourier Analysis

Fourier analysis converts a signal from its original domain (often time or space) to a representation in the frequency domain and vice versa.

Discrete Fourier Transform (DFT) is discrete version of Fourier Transform which transforms a signal (discrete sequence) from Time Domain representation to it's Frequency Domain representation, while Fast Fourier Transform (FFT) is an efficient algorithm for calculation of DFT. • On calculating FFT of S3 we get we can see from the graph that the signal S3 consists of two dominant Frequency signals at 50 and 120 Hz.

So now if we want to separate the two signals, what we will need? Analog vs Digital

• Digital Filters operates on the digital samples of the signals. While implementing the digital filters in hardware or software (for simulation), we need adders, subtractors, delays, etc which are classified under digital logic components.

• Unlike digital, analog filters works on analog signals or the so called actual signals. While implementing the analog filters in hardware or software simulation, electrical components like resistors, and are used. Passive and active are types of analog digital filters. Discrete-time/Continuous-time

• Do we need filter in time domain?

Discrete time views values of variables as occurring at distinct, separate “points in time”. In contrast, continuous time views variables as having a particular value for potentially only an infinitesimally short amount of time. Linear/non-linear

• Linear filters process time-varying input signals to produce output signals, subject to the constraint of linearity.

• A is a filter whose output is not a linear function of its input. That is, if the filter outputs signals R and S for two input signals r and s separately, but does not always output αR + βS when the input is a linear combination αr + βs.

• Most filters implemented in analog electronics, in digital signal processing, or in mechanical systems are classified as causal, time invariant, and linear filters. high-pass, low-pass,… Filters transition from little signal attenuation to high attenuation. The frequency range of little attenuation is the "pass" part of the filter, as in a low "pass" filter allows low frequency signals to pass with little attenuation.

The cut-off frequency is the frequency where the filter begins to make its transition from little attenuation to maximum or high attenuation. Usually it is the point where the response is down by 3dB in magnitude(dB) response plot.

If the filter is a bandpass or band-stop filter, there are two such cut-off frequencies. Digital Filters

• Numerical procedure or algorithm that transforms a given sequence of numbers into a second sequence that has some more desirable properties.

• Digital filters are used for two general purposes: (1) separation of signals that have been combined, and (2) restoration of signals that have been distorted in some way. A is a mathematical representation to describe inputs and outputs of black box models.

The idealized lowpass magnitude response G(f) of filter would be therefore: G(f) = 1 for f < fc 0 for f > fc • Every linear filter has an • – Impulse response • – Step response • – • Each of these responses contain the same information about the filter, but in different form. • All representations are important because they describe how the filter will react under various circumstances.

Implementation of a • By :

• • Convolving the input signal with the digital filter impulse response. • • Each sample in the output is calculated by weighting the samples in the input and adding them together. • • All linear filters can be realized by convolution (by a filter impulse response) • • FIR-Filter (Finite Impulse Response) • By recursion:

• • Extension of the convolution by using previously calculated values from the output, besides the points from the input. • • Made of recursion coefficients. • • IIR-Filter (Infinite Impulse Response) FIR vs IIR • FIR filter uses only current and past input digital samples to obtain a current output sample value. It does not utilize past output samples.

• IIR filter uses current input sample value, past input and output samples to obtain current output sample value.

• FIR filters are preferred due to its response and also they are non-recursive. is not involved in FIR, hence they are stable. Often implemented using convolution methods like FFT. FIR

• The moving average filter operates by averaging a number of points from the input signal to produce each point in the output signal. • In equation form, this is written

• or symmetrical form: when j= -(M-1)/2to(M-1)/2 • Optimal filter for the following tasks: • – Reducing random noise while retaining the sharp step response • – Therefore use-full for time domain encoded signals, but • • Worst filter concerning frequency encoded signals (no frequency separation capabilities !) • Windowed-sinc filters are used to separate one band of frequencies from another.

• The Butterworth filter is designed to have as flat a frequency response as possible in the passband. It is also referred to as a maximally flat magnitude filter.

• The frequency response of the Butterworth filter is maximally flat (i.e. has no ripples) in the passband and rolls off towards zero in the stopband.

• Separating the two signals in S3 using Butterworth filter: • For S1 at 50 Hz • Low-pass filter • fc=80 Hz • Separating the two signals in S3 using Butterworth filter: • For S2 at 120 Hz • High-pass filter • fc=80 Hz Thank You