Basic knowledge of circuits: As a passive energy storage element, the voltage across the capacitor cannot be abruptly changed; similarly, as a passive energy storage element, the current flowing through the indicator cannot be abruptly changed. The fundamental reason is that energy cannot be changed. For capacitors, energy is the stored charge, which takes time.
Theoretically, according to the formula of capacitor current: i(t) = C*du/dt, where C is the inherent property of capacitor and can be considered as a constant. If the capacitor voltage needs to be abruptly changed, then du needs to be infinite, and then it can be achieved, but it needs infinite current, which is obviously impossible. The inductor current is a similar derivation process.
Build the schematic as shown in the figure below for simulation.
1. In the initial state, the voltage drop across the capacitor is 0, and the voltage on both sides is 0V;
2. When the voltage is turned on, the voltage on the left side of the capacitor is 5V. Since the voltage cannot be changed suddenly, the voltage on both sides of the capacitor is equal, and the voltage on the right side of the capacitor is 5V.
3. At this time, due to the voltage dividing effect of the resistor, the right side of the capacitor gradually drops to 2.5V through the resistor R2, and the capacitor is charged.
4. Similarly, when the capacitor is turned off, there is charge stored inside the capacitor, so that the voltage across the capacitor cannot be abruptly changed, and the potential on the right side is lower than the left side. Since the left side of the capacitor is directly connected to the power supply, it immediately becomes 0V, and it can be seen that the voltage on the right side of the capacitor is -2.5V. At this time, the capacitor is discharged through the resistor R2 and gradually becomes 0V.
The figure below shows the waveform of the capacitor charging and discharging. It can be seen that when the capacitor is turned on, the capacitor raises the voltage divider, and when it is turned off, the voltage divider is pulled down, which is the role of the acceleration capacitor. A similar application is the bootstrap capacitor, which also uses the capacitor to charge and discharge, which increases the turn-on voltage of the Mosfet.
Let's look at another example. This is a classic RC filter circuit with a cutoff frequency of 159.2Hz. So a 100Hz square wave can pass.
According to the above analysis, when it is turned on, the capacitor is charged through R1, and the node voltage rises slowly; when it is discharged, the capacitor discharges through R1, and the node voltage drops slowly. Since the right end of the capacitor is grounded, the voltage on the right is constant at 0V. The waveform is shown below.
It can be seen from the above two examples that the capacitor is always charged and discharged through the resistor, which also leads to the reason why the capacitor voltage cannot change abruptly. According to the initial theory, the sudden change of capacitor voltage requires infinite current. In fact, loop resistance is unavoidable. The capacitor is always charged and discharged through the resistance, and even the power supply itself has output resistance.