We are Apogeeweb Semiconductor Electronic

WELCOME TO OUR BLOG

Home Filters What is RC Low Pass Filter? Calculation and Applications  # What is RC Low Pass Filter? Calculation and Applications

Author: Apogeeweb
Date: 18 May 2021
910 ## Introduction

As everyone knows, in order to create a passive low pass filter, combing resistive elements with reactive elements happens often. Put simply, a typical circuit composed of resistors and capacitors or inductors. According to theories, the resistor–inductor (RL) low-pass topology is equivalent to the resistor-capacitor (RC) low-pass topology in terms of filtering capability. However. in fact, RC low pass filters are more common, so this article will focus on first-order RC low pass filters.

In this video, Passive RC Low Pass Filter has been discussed.

Catalog

 Introduction Ⅰ Typical RC Circuit1.1 Time Domain1.2 Frequency Domain Ⅱ First-order Low Pass Filter on Software2.1 Basic Filtering Algorithm2.2 Basic Algorithm of First-order RC Digital Filtering Ⅲ Optimization Method- Filtering Coefficients Adjustment

## Ⅰ Typical RC Circuit

The RC circuit has thousands of uses and is a very important circuit to study. Not only can it be used to time circuits, it can also be used to filter out unwanted frequencies in a circuit and used in power supplies, like the one for your computer, to help turn ac voltage to dc voltage. Figure 1. Typical RC Circuit (DC, AC, and Pulse Signals can all use it)

### 1.1 Time Domain

Capacitor Current: According to Kirchhoff’s Voltage Law: Where, the unit of Ui is volts, the unit of RC is seconds, and τ=RC, get: Suppose the initial voltage of the capacitor is 0, where:
R=1000Ω
C=4.7uF
Ui=1V
t=0.0001~0.1s
τ=RC
Vc(τ)=0.632 Figure 2. Step Response Curve of a First-order RC System

### 1.2 Frequency Domain

Taking the capacitor voltage as the output, the network function of the circuit is: Where u1=Ui, u2=Uo
Let ωc be equal to: , which is the cut-off frequency.

Amplitude and phase angle function:  Value of variables:
R=1000Ω
C=4.7uF    |A(fc)|=0.707 θ(fc)=-45, f=0.001, 1, …….100000.

Amplitude and phase frequency characteristics: Figure 3. Figure 4.

Logarithmic representation of amplitude-frequency characteristic: Figure 5.

• Analysis:

When ω<ωc, the amplitude is a straight line parallel to the coordinate, and there is no attenuation.
When ω>ωc, it is a straight line whose slope is proportional to -20dB/decade.
When ω=ωc, the gain is attenuated to 0.707, which is -3dB, and the phase lags by 45 degrees, corresponding to a low-pass filter. This frequency is usually called the cutoff frequency.

When using this analog filter to suppress low-frequency interference, the filter is required to have a larger time constant and a high-precision RC network. Increasing the time constant requires increasing the value of R, and meanwhile, the leakage current increases accordingly, thereby reducing the filtering effect. Figure 6. RC Circuit

## Ⅱ First-order Low Pass Filter on Software

1) The use of digital filtering algorithms to achieve dynamic RC filtering can well overcome the shortcomings of analog filters.
2) This kind of algorithm is more practical when the simulation constant is required.
3) It has a good inhibitory effect on periodic interference.
4) Save RAM space

1) Exit phase lag, resulting in low sensitivity.
2) It cannot filter out interference with a frequency higher than half of the sampling frequency (called the Nyquist frequency. For example, if the sampling frequency is 100 Hz, it cannot filter out interference signals above 50Hz). In this case, an analog filter should be used.
3) For the single-chip microcomputer without multiplication and division running instructions, the workload of the program operation is relatively large.

### 2.1 Basic Filtering Algorithm • Origin of the Algorithm

The transfer function of the first-order RC low-pass filter in the S domain for frequency analysis:
Through z-transformation (there are many methods, such as first-order forward difference, bilinear transformation, etc. Here, the first-order backward difference method is used): • Into the S-domain Transfer Function After the derivation is transformed into the difference equation, we can get: The transfer function in the S domain can be transformed into a difference equation in the time domain through the Z transformation.

### 2.2 Basic Algorithm of First-order RC Digital Filtering X is the input, Y is the output value after filtering, then: a is a parameter related to the RC value, called the filter coefficient, its value determines the weight of the new sample value in the filtering result of this time, and its value is usually far less than 1, when the sampling interval t is small enough: 1) The smaller the filtering coefficient, the smoother the filtering result, but the lower the sensitivity.
2) The larger the filtering coefficient, the higher the sensitivity, but the more unstable the filtering result.
3) The output value this time mainly depends on the last filtered output value, and the current sampled value has a relatively small effect on this output, which plays a corrective role.
4) Cutoff frequency For example: t=0.5s (f=2Hz), a=1/32
where fl=(1/32)/(2*3.14*0.5)=0.01Hz

• Basic Program

Write the program according to the basic principles and formulas of first-order filter, as follows:
/*In the program, integer arithmetic is faster than decimal arithmetic. In order to speed up the processing speed of the program, for calculation convenience, a is an integer (from 0~255), 1-a is replaced by 256-a, which means that the new sample value is being filtered. The weight in the result (you can also change the base of 1-a to 100-a, and the calculation result will be processed accordingly)*/

#define a 128

char value; //Last filtering value
char filter()
{
char new_value;
return(256-a)*value/256+a*new_value/256；
}

• Initial Optimization of the Program

Reduce the number of operations of multiplication and division to increase the speed of operations.
Specific optimization methods:
First compare the new sampled value with the previous filtering result, and then use different formula calculations based on the comparison, so that the calculation efficiency of the program is doubled.
Resolve the basic formula to get:  • Process Notes:
S → New Sampling Value
R → Previous Filtering Result
C→ Filter Coefficient
N→ New Filtering Result

• Program

/*Int: NEW_DATA     New sampling values
OLD_DATA       Last filtering result
k        Filter coefficient (0~255)
Out:         The filtering results
*/
char filter_1(char NEW_DATA,char OLD_DATA,char k)
{
int result;
if(NEW_DATA<OLD_DATA)
{
result=OLD_DATA-NEW_DATA;
result=result*k;
result=result+128;//+128 Round Up
result=result/256;
result=OLD_DATA-result;
}
else if(NEW_DATA>OLD_DATA)
{
result=NEW_DATA-OLD_DATA;
result=result*k;
result=result+128;//+128 Round Up
result=result/256;
result=OLD_DATA-result;
}
else result=OLD_DATA;
return((char)result);
}

• Filtering Analysis

When the filtering coefficient is 30: Figure 7.

When the filtering coefficient is 128: Figure 8.

When the filtering coefficient is 200: Figure 9.

It can be seen that the smaller the filtering coefficient, the smoother the filtering result, but the lower the sensitivity. On the contrary, the larger the filtering coefficient, the higher the sensitivity, but the more unstable the filtering result.

• Insufficient

1) The contradiction between sensitivity and smoothness
2) Errors caused by discarding decimals.
For example: the current sampling value=25, the last filtering result=24, and the filtering coefficient=10;
According to the algorithm, the filtering result of this time = 24.0390625
In single-chip microcomputers, floating-point numbers are rarely used, and the fractional part is either discarded or needs to round up. In this way, the result is 24. If the sampling value is always 25, the result will always be 24. Because the filtering result and the actual data will always have an error that cannot be eliminated. Sometimes it will cause the filtering result curve to deviate from the actual value when the sampling data is stable at a certain value (that is, there is a large error between the filtering result and the actual result although in a stable case).

• Be Careful

1) Changing the filtering coefficient, increasing it will reduce the smoothness, and if it is too large, the filtering will lose its meaning.
2) The use of decimal part in calculations will bring heavy computational pressure to the CPU.

## Ⅲ Optimization Method- Filtering Coefficients Adjustment

• Realize the Function

1) When the data changes rapidly, the filtering results can be followed up in time, and the faster the data changes, the higher the sensitivity should be (sensitivity priority principle).
2) When the data becomes stable and oscillates within a range, the filtering result can become stable (the principle of stability first).
3) When the data is stable, the filtering result can be approximated and finally equal to the sampling data (eliminate the error caused by decimals in the calculation).

1) Whether the data changes consistently. For example, when the two consecutive sampling values are larger than the previous filtering result, it is normal, otherwise it is regarded as inconsistent.
2) Whether the data changes quickly, which is to judge the difference between the sampling value and the previous filtering result.
1) When the two data changes are inconsistent, it means there is jitter. Clear the filtering coefficient to zero, and delete the new sampling value.
2) When the data changes consistently, gradually increase the filtering coefficient to provide the weight of this sampling.
3) When the data changes quickly (difference value> debounce count acceleration response threshold), the filtering coefficient should be increased quickly. ① Calculate the difference (absolute value) between the current sampling value and the last filtering result; Set the data change direction flag.
② Two changes in the same direction?
③ First order filter coefficient + coefficient increment (the maximum value is taken when the result is greater than the maximum value).

• Several Constant Parameters and Their Ranges

1. Debounce counting acceleration response threshold is determined according to the actual situation.
2. The maximum value of debounce count, which is generally 10.
3. The increment of filtering coefficient range is 10~30.
4. The maximum value of the filtering coefficient is generally 255.
Before starting the first-order filtering program, open the adjustment filter coefficient program to adjust the coefficients in real time.

• Filtering Effect

1. When the sampled data is accidentally interfered, the interference in the filtering result is completely filtered out.
2. When the data oscillates within a range, the filtering result curve is very smooth, almost a straight line.
3. When the sampling data has real changes, the filtering results can be followed up in a relatively timely manner.
4. When the sampling data becomes stable, the filtering result gradually approaches and is finally equal to it. Finally, improve the algorithm. Taking into account the requirements of sensitivity and stability; and meanwhile, it does not consume too much RAM space. As long as a few constants are adjusted reasonably, the algorithm is more suitable for practical applications.

1. What is RC low pass filter?
A low pass filter is a filter which passes low-frequency signals and blocks, or impedes, high-frequency signals. ... Low pass filters can be constructed using resistors with either capacitors or inductors. A low pass filter composed of a resistor and a capacitor is called a low pass RC filter.

2. Why RC circuit is low pass filter?
Then by carefully selecting the correct resistor-capacitor combination, we can create a RC circuit that allows a range of frequencies below a certain value to pass through the circuit unaffected while any frequencies applied to the circuit above this cut-off point to be attenuated, creating what is commonly called a rc low pass fiter.

3. What is difference between RC low pass filter and RC high pass filter?
Low pass filter is the type of frequency domain filter that is used for smoothing the image. It attenuates the high frequency components and preserves the low frequency components. High pass filter: ... It attenuates the low frequency components and preserves the high frequency components.

4. What is the transfer function of a low pass filter?
Low Pass Filters and their Transfer Functions
As its name implies, a low pass filter is an electronic device that allows low frequency AC signals to pass a current through the filter circuit. The output from the filter circuit will be attenuated, depending on the frequency of the input signal.

5. How is low pass filter frequency calculated?
The cut-off frequency or -3dB point, can be found using the standard formula, ƒc = 1/(2πRC). The phase angle of the output signal at ƒc and is -45o for a Low Pass Filter.

## Best Sales of diode

Photo Part Company Description Pricing (USD) 10127720-182LF Company:Amphenol ICC (FCI) Remark:CONN HEADER R/A 18POS 3MM Price:
 540+: \$0.76859
Inquiry 10131318-0611100LF Company:Amphenol ICC (FCI) Remark:CONN HEADER R/A 6POS 4.2MM Price:
 1+: \$1.02000 10+: \$0.89700 100+: \$0.77350 500+: \$0.63288 1000+: \$0.56256 5000+: \$0.49224 10000+: \$0.46763
Inquiry AD708SQ-883B Company:Analog Devices Inc. Remark:IC OPAMP GP 2 CIRCUIT 8CERDIP Price:
 1+: \$75.78000 10+: \$71.98700 25+: \$70.09280
Inquiry AD9269BCPZ-80 Company:Analog Devices Inc. Remark:IC ADC 16BIT PIPELINED 64LFCSP Price:
 1+: \$127.77000 10+: \$1251.79000
Inquiry AD5361BSTZ Company:Analog Devices Inc. Remark:IC DAC 14BIT V-OUT 52LQFP Price:
 1+: \$52.52000 10+: \$48.99800 25+: \$46.94400 100+: \$42.54300
Inquiry AD5752RBREZ Company:Analog Devices Inc. Remark:IC DAC 16BIT V-OUT 24TSSOP Price:
 1+: \$20.56000 10+: \$18.89500 25+: \$18.11160 100+: \$15.17450 250+: \$14.19552
Inquiry

## Alternative Models

 Part Compare Manufacturers Category Description Mfr.Part#:1N6303ARL4G Compare: 1.5KE200A VS 1N6303ARL4G Manufacturers:ON Semiconductor Category:Zener Diodes Description: 171V 1500W Mfr.Part#:1.5KE200CA-TP Compare: Current Part Manufacturers:Micro Commercial Components Category:TVS Diodes Description: Trans Voltage Suppressor Diode, 1500W, 171V V(RWM), Bidirectional, 1Element, Silicon, DO-201AE, ROHS COMPLIANT, PLASTIC PACKAGE-2 Mfr.Part#:1.5KE200CA Compare: 1.5KE200CA-TP VS 1.5KE200CA Manufacturers:Good-Ark Electronics Category: Description: Diode TVS Single Bi-Dir 171V 1.5KW 2-Pin DO-201AE Mfr.Part#:1.5KE200CA Compare: 1.5KE200CA-TP VS 1.5KE200CA Manufacturers:Fairchild Category:TVS Diodes Description: TVS DIODE, 1.5kW, 200V, DO-201AE

## Ordering & Quality

Image Mfr. Part # Company Description Package PDF Qty Pricing (USD) AD780BRZ Company:Analog Devices Inc. Remark:IC VREF SERIES/SHUNT 8SOIC Package:8-SOIC (0.154", 3.90mm Width) DataSheet
In Stock:1209
Inquiry
Price:
 1+: \$14.03000 10+: \$12.89200 25+: \$12.35800 100+: \$10.35400 250+: \$9.68600
Inquiry AD9249BBCZ-65 Company:Analog Devices Inc. Remark:IC ADC 14BIT PIPELINED 144CSPBGA Package:144-LFBGA, CSPBGA DataSheet
In Stock:On Order
Inquiry
Price:
 1+: \$168.98000
Inquiry ADG444BRZ-REEL Company:Analog Devices Inc. Remark:IC SWITCH QUAD SPST 16SOIC Package:16-SOIC (0.154", 3.90mm Width) DataSheet
In Stock:On Order
Inquiry
Price:
 2500+: \$1.37750
Inquiry ADM7155ACPZ-04-R7 Company:Analog Devices Inc. Remark:IC REG LIN POS ADJ 600MA 8LFCSP Package:8-WFDFN Exposed Pad, CSP DataSheet
In Stock:1500
Inquiry
Price:
 1500+: \$3.10300
Inquiry ADUM5401ARWZ Company:Analog Devices Inc. Remark:DGTL ISO 2500VRMS 4CH GP 16SOIC Package:16-SOIC (0.295", 7.50mm Width) DataSheet
In Stock:13164
Inquiry
Price:
 1+: \$11.88000 10+: \$10.72900 25+: \$10.22960 100+: \$8.48300 250+: \$7.73452 500+: \$7.23550
Inquiry ADXRS645HDYZ Company:Analog Devices Inc. Remark:IC GYROSCOPE YAW RATE 32CBGA Package:15-TRIIP DataSheet
In Stock:35
Inquiry
Price:
 1+: \$1413.75000
Inquiry HMC284MS8GE Company:Analog Devices Inc. Remark:IC RF SWITCH SPDT 3.5GHZ 8MSOP Package:8-TSSOP, 8-MSOP (0.118", 3.00mm Width) Exposed Pad DataSheet
In Stock:On Order
Inquiry
Price:
Call
Inquiry REF192GSZ-REEL7 Company:Analog Devices Inc. Remark:IC VREF SERIES 0.4% 8SOIC Package:8-SOIC (0.154", 3.90mm Width) DataSheet
In Stock:On Order
Inquiry
Price:
 1000+: \$1.92850
Inquiry