Many friends think that PID is a kind of control that is out of reach, very mysterious, and very high-sounding. They are also very vague about its control principle and only know it at the conceptual level. They know the result but not the reason. So this issue explores the essence of differential and integral circuits from an alternative perspective, aiming to help understand the control principle of PID (PID: P stands for proportional control; I stands for integral control; D stands for differential control).
Before we understand differential and integral circuits, we all know the characteristics of capacitors: the current of a capacitor leads the voltage by 90°. Many textbooks describe it this way, which is very confusing. What is its essence?
To thoroughly master differential, integral circuits or PID control ideas, you must first understand capacitors.
A capacitor is a container that holds electric charge. From a microscopic perspective, when electric charge flows into the container, the electric field between the electrodes gradually increases over time. Take Figure 1 as an example:
① At the beginning of charging, Uc=0V, the voltage difference △U=Ur=Ui, at this moment there is no charge in the container, and there is no electric field to repel the inflowing charge; therefore, the current Ic is the largest, which is manifested as the smallest capacitive reactance, which is close to a short circuit;
② When Uc rises, the pressure difference △U begins to decrease. This process forms an electric field, and the container begins to repel the inflowing charges; the current Ic gradually decreases, which is manifested as a gradual increase in capacitive reactance;
③When Uc=Ui, the pressure difference △U=Ur=0V, at this moment the electric field in the container is the strongest, and the inflow of charges is blocked with the maximum repulsive force; the current Ic=0, which shows the maximum capacitive reactance, which is approximately an open circuit.
Figure 1: Capacitor charging model
When the charge flows out of the container, the inter-electrode electric field gradually decreases with time; the capacitor in this discharge process can be regarded as a voltage source with zero internal resistance, taking Figure 2 as an example (remove the power supply and ground):
① At the beginning of discharge, Uc=Ui. At this moment, the container is full of charge, so the electric field is the strongest, and the resistance remains unchanged, then the discharge current Ic is the largest (the direction is opposite to the charging direction), the voltage across the resistor Ur=Uc, then Ur=Ui;
②When Uc decreases, the electric field weakens, the discharge current Ic gradually decreases, and Ur=Uc also gradually decreases;
③ When the discharge is exhausted, Uc=0V. At this moment, there is no charge in the container, so there is no electric field, Ur=0V.
Figure 2: Capacitor container discharge model
A capacitor is like a bucket. No matter how large or small the water flow is, the water level must rise continuously from the lowest level. The charge in the capacitor also gradually accumulates from 0. The accumulation process is related to the natural constant e, which will not be discussed in depth here.
Figure 3 is the voltage-current curve of capacitor charging and discharging.
Figure 3: Capacitor charging and discharging, voltage-current curve
In connection with the previous analysis, it can be summarized as follows:
① The capacitor voltage cannot change suddenly, but the current can change suddenly (the textbook definition is that the rate of change of the capacitor current is proportional to the voltage);
② The capacitor during the charging process can be equivalent to a variable resistor, and the capacitor during the discharging process can be equivalent to a voltage source;
③The capacitor current reflects the amount of charge flowing per unit time, and the capacitor voltage (or electric field) reflects the amount of charge. In layman's terms, the flowing charge will lead to changes in the amount of charge (consistent with ①); in mathematical terms, the capacitor current leads the voltage phase by 90°;
④The charging and discharging speed of a capacitor is related to the size of the capacitor and the resistance.
After fully understanding the capacitor, let's first get to know the simplest voltage divider circuit, as shown in Figure 4. According to Ohm's law, VCC=2.5V, this purely resistive voltage divider circuit is the prototype of the proportional operation circuit.
Figure 4: Voltage divider circuit
As shown in Figure 5, we replace R2 with a 104 (0.1μF) capacitor, and the C1 capacitor is approximately open circuit after being fully charged, VCC=5V; this circuit is the prototype of the integral operation circuit. Then, changing 5V to a signal source constitutes a low-pass filter circuit.
Figure 5: Integrator circuit
Figure 6 shows the charging waveform in the figure above. The red color represents the 5V waveform and the blue color represents the VCC waveform. Because the capacitive reactance of the capacitor increases from small to large until it is open circuit when charging, the voltage VCC also increases from small to large until it reaches 5V. Moreover, it takes a certain amount of time to charge the capacitor, which results in a slower waveform of VCC. (The 5V is the output waveform when the switching power supply is powered on and soft-started)
Figure 6: Integrator circuit waveform
Combining Figure 4 and Figure 5 gives the circuit of Figure 7, which is the PI circuit (proportional integral) we often use. It is very common in reference voltage or voltage divider circuits. The purpose of adding capacitors is to increase the delay and stabilize the voltage of VCC so that it does not fluctuate due to 5V fluctuations. VCC=2.5V.
Figure 7: PI circuit
By exchanging the positions of the capacitor and the resistor in Figure 5, we get the circuit shown in Figure 8. After the capacitor C1 is fully charged, it is approximately open circuit, and VCC = 0V; this circuit is the prototype of the differential operation circuit. Then, changing 5V to the signal source constitutes a high-pass filter circuit.
Figure 8: Differentiator circuit
Figure 9 shows the charging waveform in the figure above. The red color represents the 5V waveform, and the blue color represents the VCC waveform. Because the reactance of the capacitor changes from small to large until it is open circuit when it is charged, the voltage VCC changes from large to small until it reaches 0V. That is, the moment the red waveform jumps from 0, VCC is already the maximum value, so the differential has the property of advanced prediction (reflecting the rate of change of the input signal).
Figure 9: Differentiator Circuit Waveforms
Figure 10 shows an (inverting) proportional operation circuit.
Figure 10: Ratio operation circuit
As shown in Figure 11, Uo and Ui are in a linear relationship.
Figure 11: Ratio operation circuit waveform
Figures 12 and 13 show the charging and discharging process of the differential operation circuit:
The capacitor C1 during the charging process can be equivalent to a variable resistor. The capacitive reactance of C1 when it starts to charge is 0. If the voltage cannot change suddenly, the voltage is 0. The divided voltage obtained at the input end of the op amp is the maximum positive peak value, so Uo is the maximum negative peak value of the op amp. As the capacitor is fully charged, U0 gradually becomes 0.
Figure 12: Differential operation circuit - charging
The capacitor C1 in the discharge process can be equivalent to a voltage source, and the voltage cannot change suddenly. At this time, the reverse current is the maximum value, and the instantaneous reverse voltage of R1 is also the maximum value. The voltage divided by the input terminal of the op amp is the negative maximum peak value, so Uo is the positive maximum peak value of the op amp. As the capacitor is discharged, U0 gradually becomes 0.
Figure 13: Differential operation circuit - discharge
As shown in Figure 14, the input and output waveforms of the differential operation circuit are shown. Combined with the previous analysis results, Uo reflects the rate of change of Ui, thus achieving the effect of predicting ahead of time.
Figure 14: Differential operation circuit waveform
Figure 15 shows a differential operation simulation circuit. In order to prevent the operational amplifier from saturation, the input current must be limited. In actual use, a small resistor R2 needs to be connected in series with the input end of capacitor C1. The circuit after the series resistor is no longer an ideal differential operation circuit, but as long as the input signal period is greater than 2 times the RC constant, it can be approximated as a differential operation circuit.
Figure 15: Differential operation simulation circuit
Figure 16 shows the waveform of the differential operation simulation circuit, where IN- is the waveform of the op amp input terminal.
Figure 16: Differential operation simulation circuit waveform
Figures 17 and 18 show the charging and discharging process of the integral operation circuit:
The capacitor C1 during the charging process can be equivalent to a variable resistor. The capacitive reactance of C1 when it starts to charge is 0. If the voltage cannot change suddenly, the voltage is 0, and the voltage divided by the input terminal of the op amp is 0, so Uo is 0. As the capacitor is fully charged, the voltage divided by the input terminal of the op amp is the positive maximum value, and U0 is the negative maximum peak value of the op amp.
Figure 15: Integral operation circuit - charging
The capacitor C1 in the discharge process can be equivalent to a voltage source, and the voltage cannot change suddenly. The voltage divided by the input terminal of the operational amplifier cannot change suddenly either. As the capacitor is discharged, Uo gradually changes from the negative maximum peak value to 0.
Previous article:Under certain conditions, does a higher speed motor have better performance?
Next article:Siemens PLC pointer type and indirect addressing tutorial
- Popular Resources
- Popular amplifiers
- CVPR 2023 Paper Summary: Transparency, Fairness, Accountability, Privacy, Ethics in Vision
- ICCV2023 Paper Summary: Fairness, Privacy, Ethics, Social-good, Transparency, Accountability in Vision
- Signal Integrity and Power Integrity Analysis (Eric Bogatin)
- IC packaging basics and engineering design examples
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- CC26xx product model and suffix description
- AD19, board layer, layer type, what are the uses of each? Please guide
- Melexis for you: Detailed explanation of the implementation and technical support of functional safety in semiconductor R&D. Registration for the prize-winning live broadcast is open!
- One week evaluation report~
- Six key issues when designing a universal serial bus protocol interface
- Reference book on porting from SXX32F103 to MH32F103A
- Good book recommendation! A brief review of Luo's "Basics of Power Supply Design"
- Please give me some advice, is this an amplifier impedance issue?
- Will the wave of Internet layoffs in 2019 have an impact on salary negotiations when changing jobs?
- STEVAL-MKI109V3 Basics