Simple Software Lowpass Filter

Simple Software Lowpass Filter - B Y BA R RY L D O R R D O...

This preview shows pages 1–2. Sign up to view the full content.

ardware-design engineers have long recognized the usefulness of RC lowpass filters ( Figure 1 ). Lowpass filters are useful for performing signal conditioning, removing noise from a signal, or rejecting unwanted signals. The first-order recursive filter is the digital equivalent of the RC filter, and, as the ratio of the sample frequency to the band- width increases, their responses become identical. All lowpass filters produce a weighted average of the current input value and past inputs. A filter’s characteristics depend on the weighting used for the past inputs. For example, a lowpass filter ( Figure 2 ) smoothes noisy input signals. One possibility for weighting the past-input samples is to give them equal weight. Although this approach produces a useful lowpass fil- ter, it makes more intuitive sense to weigh newer samples more heavily than older samples. A designer can use recursion to implement a weighting func- tion ( Figure 3 ). This approach minimizes the processing impact of the multiplications in this filter because the designer can implement the multiplications as left or rights shifts in the soft- ware. The designer feeds data samples with bit width B1 into the filter at a fixed sample rate. Bit width B2 may be larger than bit width B1. The summing block adds the input sample to the last output sample, and the delay is a digital delay of one sam- ple. The parameter k is a shift value that controls the filter band- width. Mathematically, the recursion in Figure 3 is: y(n) 5 (1 2 2 2 k ) 3 y(n 2 1) 1 x(n), where x is the input, y is the out- put, and n is the sample index. As an example of filter oper- ation, suppose that k 5 4 so 1 2 2 2 k 5 0.9375, the value at the delay output is zero, and the fil- ter input is a single sample of one followed by all zeros. If you use the summing block as the out- put, the first output from the fil- ter is one. When you feed this output back to the summing block, the multiplier scales it, and it becomes 0.9375. The next

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 02/08/2012.

Page1 / 2

Simple Software Lowpass Filter - B Y BA R RY L D O R R D O...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online