1. PWM
PWM has a very wide range of applications, such as stepless speed regulation of DC motors, switching power supplies, inverters, etc. I personally think that to fully understand or master analog circuits and make breakthroughs, it is necessary to thoroughly understand these three knowledge points:
-
PWM
-
inductance
-
ripple
PWM is a technical means, and PWM wave is a pulse wave under the control of this technical means. If you don't understand it, you can't grasp PWM wave!
As shown in the figure below, this metaphor is very vivid and appropriate. I hope it will be helpful and inspiring to friends who are studying. The full name of PWM is Pulse Width Modulation: Pulse Width Modulation (referred to as Pulse Width Modulation, in layman's terms is to adjust the width of the pulse), is a very important control technology in electronic power applications. Before understanding TA, let's understand a few concepts.
-
Pulse period T: the unit is time, such as nanosecond ns, microsecond μs, millisecond ms, etc.;
-
Pulse frequency f: the unit is hertz Hz, kilohertz kHz, etc., and has an inverse relationship with the pulse period, that is, f=1/T;
-
Pulse width W: referred to as pulse width, is the duration of the pulse high level, and the unit is time, such as nanosecond ns, microsecond μs, millisecond ms, etc.;
-
Duty cycle D: The value obtained by dividing the pulse width by the pulse period, expressed as a percentage, such as 50%, and often expressed as a decimal or fraction, such as 0.5 or 1/2.
The relationship between the above is the formula listed in the figure below: The PWM wave in engineering applications is a pulse wave with constant amplitude and period (or frequency) and adjustable pulse width (or duty cycle). Next, let’s recognize What exactly is this PWM wave, and what thoughts does TA hide?
When we want to control the speed of a DC motor, we can change the voltage at both ends of it, but this method has great limitations. The structure of the adjustable DC power supply is complicated and the cost is high, so it is very unrealistic to apply.
So we use another control method: voltage source→driver→DC motor, the voltage source provides DC voltage, different drivers control different DC motors, the application is very flexible, and the speed control of the driver to the motor is to use PWM.
Both adjustable DC power control and PWM control can adjust the speed, so what do they have in common?
As shown in the figure below, when the motor is at the same speed, red represents the PWM wave output by the driver with a constant amplitude, and blue represents the output voltage of the adjustable DC power supply, both of which are directly applied to the load.
Learned from the above:
When the duty cycle of the PWM wave is larger, the corresponding DC voltage is closer to the amplitude of the PWM wave; otherwise, it is closer to 0V.
The sum of the rectangular areas under the periodic red PWM wave pulse width is equal to the area of the blue DC voltage, that is, the volt-second product is equal:
U red (amplitude) × ton = U blue × T
Both ends are divided by T at the same time, and the following relationship is obtained:
U red (amplitude) × duty cycle = U blue
For example, when the amplitude of the PWM wave is 24V and the duty cycle is 50%, the effect of applying the DC voltage 12V to the motor is exactly the same, that is, the speed is the same, that is, 24V×50%=12V.
In addition, since this relationship is satisfied, the frequency of the PWM wave can be arbitrary. The answer is of course not. If the frequency is too low, the motor will not run smoothly, with large vibration and noise; There are cases where the motor will whine and not turn.
Generally, the PWM frequency of 1k~30k is more common, and there are also hundreds of Hz. In fact, it is advisable to determine the appropriate PWM frequency range during the test according to the motor power.
The picture below is the physical test, the pulse width is changing, and the PWM wave with the same period.
The added load is as shown in the figure below, which is a physical test of the speed regulation of the PWM controlled motor. The PWM stepless speed regulation of the brushed DC motor, in which the LED is connected in parallel at the input end of the motor, and its brightness reflects the change of the motor speed. whaosoft aiot http://143ai.com
Main points:
-
PWM wave is actually a rectangular pulse wave whose pulse width can be adjusted continuously;
-
The duty cycle is actually the ratio between the pulse width and the pulse period. It is a quantitative value, which is convenient for analysis and research. When we express it in duty cycle, we don’t care so much about the pulse width;
-
Duty ratio adjustment is pulse width adjustment, the expression is different, but the essence is the same;
-
The PWM wave satisfies the volt-second product calculation: U red (amplitude) × duty cycle = U blue, and the effect is the same as that of DC voltage.
2. Overshoot and phase margin
Negative feedback plays an important role in many fields such as electronics and control because of its functions such as stabilizing gain, reducing distortion, expanding bandwidth, and transforming impedance. As small as a power chip, as large as a car, with the help of negative feedback technology, our lives are enriched. However, the use of negative feedback also has a price, which may lead to system instability.
In order to understand the stability of the system, the most direct and accurate way is to measure the phase margin (Phase Margin/PM) of the system, and we usually use a loop analyzer for testing.
Introduce another method to you, that is, by measuring the overshoot (OS) to get the phase margin of the system.
Second-order Systematization of Circuits
Some common feedback circuits are usually second-order systems. Let’s take the capacitive load of an op amp as an example to discuss: * Capacitive load of an op amp * Open-loop gain curve of a typical general-purpose op amp
The open-loop gain curve of a typical general-purpose op amp is shown in the figure above. It generally has a low-frequency dominant pole, such as 100Hz, and the high-frequency pole is usually designed to be much higher than the crossover frequency, so the conventional op amp circuit is stable.
When the op amp has a capacitive load, the pole formed by the open-loop output reactance (Zo) and the output capacitance (Co) will be in the feedback loop. When the pole frequency is close to or less than the crossover frequency, the phase margin of the system will be reduced. The speed is significantly reduced, resulting in an unstable situation.
Therefore, the transfer function of an op amp with a capacitive load can be expressed as:
Among them, K is the DC open-loop gain of the op amp, and β is the feedback coefficient (when used as a follower, β=1, and when it is amplified by 100 times, β=0.01).
1/τa is the angular frequency of the low-frequency dominant pole of the op amp, and 1/τb is the angular frequency of the parasitic pole generated by Zo and Co. It can be seen that τa >> τb.
The above formula can be transformed into a standard second-order system . Since K is the DC open-loop gain of the op amp, Kβ>>1
where ωn is the natural frequency of the circuit, ξ is the damping coefficient, and
The relationship between time domain overshoot and damping coefficient
We know that the system is in an underdamped state, that is, 0<ξ<1, there will be overshoot.
For a standard second-order system,
The unit step response function can be obtained as: The time corresponding to the first peak value of the step response is obtained:
Therefore, we can draw the following curve of overshoot and damping coefficient
* the relationship between overshoot and damping coefficient
Overshoot can be obtained by giving a small step signal at the input and measuring the output. The figure below shows the overshoot measured by using a 100mV step input at 1ms in a system with ξ=0.35, and the overshoot is 31%. Relationship between Phase Margin and Damping Coefficient
We next analyze the relationship between the damping coefficient and the phase margin (Phase Margin)
The loop gain of the system is: Therefore, we can draw the following curve of phase margin and damping coefficient
* the relationship between phase margin and damping coefficient
Relationship between Phase Margin and Overshoot
From this, we use the damping coefficient to obtain the relationship between phase margin and overshoot, and draw the curve as follows *The relationship between phase margin and overshoot
As can be seen from the figure above, when the phase margin is greater than 70˚, there is almost no overshoot
When the phase margin is 60˚, OS(60˚)≈8.8%
When the phase margin is 45˚, OS(45˚) ≈23.4%
The discussion is based on a second-order system, so if the actual circuit is not a second-order system, the relationship between phase margin and overshoot will not strictly follow the above inference. But fortunately, most circuits in reality are similar to second-order systems, so the method of judging system stability by observing the overshoot (OS) is useful for sometimes system debugging (especially for differential amplifiers or SOC etc., where a loop analyzer cannot be used because a feedback pin is not provided), or qualitative analysis, are of great benefit.