***27

Digital implementation of RC low pass filter

Thanks to the nice article from Xilinx TechXclusives [XLNX-TECH], let us try to understand the probable digital implementation of resistor-capacitor based low pass filter. This article used to available on Xilinx website (here), but seems it has been removed.

Consider a simple RC filter shown in the figure below. Assuming that there is no load across the capacitor, the capacitor charges and discharges through the resistor path.

RC low pass filter

Figure: RC low pass filter

is the voltage at the input of resistor and

is the voltage at the output.

From capacitor theory, the charge in the capacitor is , where

is the capacitance

is the voltage and

is the constant current flowing for short duration of time .

With the input voltage is greater than output voltage , resulting in current flowing through the resistor , where

.

When this current flows into the capacitor for a short time , the capacitor will charge and the voltage across the capacitor increases to

, where

is the new value of output voltage.

Digital Implementation

The above equation seems to be convenient for digital implementation as shown in the equation below:

where,

,

is ,

is and

is .

The transfer function of the above equation is

.

Simulation model

Script for plotting the frequency and step response of a digital RC low pass filter.

Click here to download.

Frequency response of a digital RC low pass filter

Figure: Frequency response of the digital implementation of RC low pass filter

Step response of a digital RC low pass filter

Figure: Step response of the digital implementation of RC low pass filter

Observations

1. As expected, lower the value of k, tighter is the frequency response and slower is the settling time. This is in synch with analog RC implementation, where a higher value of R and C suggests that the capacitor takes more time to charge/discharge (Note that k is inversely proportional to RC).

2. To facilitate simpler digital implementations not involving multipliers, the value of k can be chosen to be a power of 2.

References

[XLNX-TECH] Xilinx TechXclusives: Digitally Removing a DC Offset (or “DSP Without Math?”), By Ken Chapman Senior Staff Engineer, Applications Specialist, Xilinx UK. This article used to available on Xilinx website (here), but seems it has been removed. The link from Google cache available here (Accessed on 2 December 2007)

Hope this helps.

Krishna

Please click here to SUBSCRIBE to newsletter and download the FREE e-Book on probability of error in AWGN. Thanks for visiting! Happy learning.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

If you liked this post, you may leave a comment below, or subscribe to the RSS feed.

You may also find these posts relevant...
  • Polyphase filters for interpolation
  • Articles
  • Objective
  • Update: Correction in Matlab code for raised cosine filter
  • Example of Cascaded Integrator Comb filter in Matlab
  • Comments

    No comments yet.

    Leave a comment

    (required)

    (required)