Location:Home Page > Archive Archive

The most complete ever! Graphical analysis of electric drive current loop circuit (dry separation)

2023-09-22Archive

The design of current loop of an electric drive, as an important and complex point in field of drive technology, puzzles many engineers. Let's lift veil together today.

For motor, if current becomes larger, there are two dangers:

1.The motor itself gets hot and fails;

2. Our driver MOSFET will get hot or even damaged due to excessive current. In addition, our system is powered by a power supply or battery. If current increases, that is, power increases. At this time, power supply or battery providing power will have problems, or abnormal protection will work.

Therefore, in order for our system to work stably, we need to monitor motor current.

As a rule, after monitoring current, there are two protection measures:

1. When overcurrent is detected, we will implement trip protection;

2.In some cases, we cannot turn off protection. For example, if drone is overloaded for some reason, if it is turned off after overcurrent, it will fall, so it cannot be turned off in this time, and it must continue to maintain a certain amount of power to work. Of course, it cannot work with too much power. At this time, we need to limit its output power, also called constant output power.

The goal of constant power is then a constant output current, which we call a "current loop". There are actually many "loops" for a motor, such as: a voltage loop, a speed loop, a position loop, and a current loop. This time we are mainly talking to you about current loop, so if we are talking about this current loop, first of all we will talk about how to measure motor current.

Motor current sampling is generally divided into two forms: first way is that we directly select data from power supply terminal, to sample power supply terminal, for example, as in this bridge circuit, +15V is voltage for power supply battery supply, set as follows. One of voltages is called Vbus voltage (as shown below).

The Vbus voltage is actually supplied by power supply. We can connect a small resistor in series before this voltage. Of course, network of this circuit needs to be changed (as shown in figure below), and if R3 is used as a selective resistor, its resistance should not be large. If it is large, it will affect output power. For example, we can use resistor as 10 ohm. When it flows through current, since it has a resistance value, a potential difference occurs at both ends of it. We measure potential difference, and then its current is equivalent to potential difference divided by resistance value of 10 ohms, and voltage at both ends of R3 is obtained. through OU. If output in this way, then average current is collected.

If Vbus voltage is high, say tens of volts or more. As for our op amp, its input voltage cannot be very high, in this case, op amp cannot directly collect, and it needs to divide voltage, or perform isolation, such as using a high-speed optocoupler for isolation, and then sampling in this case is also a relatively good method, but its cost will be relatively high.

We have another method: since R3 is placed on Vbus terminal, it belongs to power supply terminal. If its voltage is relatively large, cost of op-amp will be relatively high, so we can put a current-sensing resistor on ground terminal (as shown below) ). If you put it on ground, then there will be a low voltage. For a conventional op-amp, low voltage is within its electrical parameters, so there is no problem in this case. So one of those ways we can take a sample.

Ideally we have a differential input and two ends of op amp should be next to this current sense resistor. It is not possible to directly connect this place to ground, or even connect this "ground" to other places during wiring, in order to collect interference (as shown in figure below).

Because in diagram, ground at point "1" is actually different from ground at point "2" (as shown in figure below). Theoretically, potential of these two points is same, but in reality it is not same. The reason is very simple. This circuit is connected to phase wire of motor, and current will be very large. If such a large current descends, after reaching ground, ground will inevitably vibrate. Why is ground between point "1" and point "2" incompatible after a large current? We can imagine, assuming it is a huge lake, when lake is very calm, water level at these two points is same height, if we throw a stone at "2", in this case, water level will be Ripple, since surface of water constantly sways up and down, these two points are not same water level. Therefore, we need to collect in a place close to current sense resistor. So even if there are high and low fluctuations, both ends of current sense resistor will become high or ground at same time, but voltage difference between two ends of current sense resistor remains unchanged and in this case is determined by flowing current through it. Of course, since M6 is a high speed switch, R61 must be a low ESL resistor, generally a chip resistor, which must have a low ESL. If inductance is too large due to relatively large di/dt value, then there will be inductive reactance, voltage at both ends of R61 will be relatively high, but voltage is actually not that high, so there are resistor sizing requirements at this location.

As shown in figure below, voltage collected by resistor R61 needs to be amplified, why amplify it? First of all, firstly, resistance of current sense resistor should not be too large. If resistance is too large, assuming a current of 30A is flowing, if resistance is 1 ohm, then power of resistor is: 30 * 30 * 1 = 90W, in general there is no such resistor, and if there is, it is very expensive.

Therefore, a small resistor should be chosen in this place, of course, this place should be chosen according to motor and current. It is best that power of this resistor is normal, such as 1206, 1210, 1811, 2510, 2512, up to 2512, in fact, 2512 is already very expensive, and costs more than one yuan.

Because resistance value is relatively small, voltage difference between two ends of resistance after current is passed is relatively small. At present, we need to design an op-amp circuit for amplification. How many times is it increased at moment? In fact, it is increased by 1 + 51K / 1K \u003d 52 times, among which R51 and R54 are used to match resistances. That's why I talked about "source", "loop" and "impedance". The impedance of this location has a relatively large influence. If impedance is different, voltage after amplification at that location will fluctuate, which is not the actual desired value.

As shown in figure below, voltage at both ends of R61 is output after simple differential amplification. We analyze point behind R62. This point represents an amplified signal, so how much is it amplified? The amplified signal is for our single-chip microcomputer, which corresponds to AD sampling port of single-chip microcomputer. The sampling port of single-chip microcomputer is generally 3.3V, and now 5V is little used, so corresponding voltage after maximum current amplification cannot exceed 3.3V, because if it exceeds 3.3V, then it has exceeded its upper limit for AD sampling, so it is meaningless. In this case, it is necessary to calculate maximum current on motor in advance and choose right resistor, after amplification it should not exceed 3.3V, and it is best not to exceed 3V, so that measurement is more accurate.

Secondly, we need to consider operational amplifier. The current sense resistor R61 at our input has a relatively steep edge, as shown in figure below.

General-purpose operational amplifiers are divided into broadband and narrowband. As shown in figure below, if op-amp's bandwidth is relatively high, its output edge is relatively steep, and we also call it slew rate. If slew rate is relatively small, its output signal is relatively slow. it is stipulated that increasing value of voltage for 1 s is rate of rise. Obviously, value of rising voltage of first red line for 1 s is relatively high, and second red line is relatively low. Ideally, slope of op-amp's output is equal to slope of R61 at input, so if slew rate of op-amp is relatively slow, if input value is being sampled, sampled value is not real value. but value moves slowly, so we have to pay attention to slew rate of op amp. Of course, if your signal is a signal with a relatively long period, you can ignore it, but in a motor control design, this period cannot be ignored, so higher slew rate, better request made.

There is another problem with current sense resistor: since there will be ground noise here, noise at that location will be coupled to op amp. op amp, so measurement The outgoing signal will contain a lot of noise that we don't want to see. It was said earlier that smaller internal resistance, larger current, larger current, larger surrounding magnetic field, and greater ability to withstand external interference, so current must be larger. There are currently two types of operational amplifiers, one is a DMOS process, and other is equivalent to a transistor process.

If previous interference is relatively large, you can choose transistor technology op-amp, because transistor technology op-amp has stronger anti-jamming properties because it has current and is a flow control type. If previous interference is relatively small, you can choose a DMOS technology op-amp, which has a relatively low power consumption. The reason for low power consumption is that internal resistance of MOSFET is relatively large, so its noise immunity is relatively weak. Installed itself must pay attention.

In addition, after op amp is set up, we also need to pay attention to value of R69. We cannot take it too large, because larger value, greater resistance value of network of resistors, smaller current, will be more. If it is susceptible to interference, then it is easy to connect it with interference, and then output will be amplified. Experiments have shown that maximum value of R69 should not exceed 300K, and we require that maximum value should not exceed 200K, otherwise, in case of interference, its output will carry interference, so it should not be greater than 200K if it is not large enough after one level of gain. do, then add another level, or even three levels of increase, rather than increase to infinity on first level.

The amplified signal is sent to microcontroller. The microcontroller can estimate current current according to boosted voltage value. Once it decides that current is too high here, it will take some protective measures such as shutdown, this is most commonly used method of protecting motor from current by directly cutting off current. There is also a power limit, it cannot be turned off, you can only limit power, for example, drone mentioned earlier.

For limited power, first set value here, like 10A, these 10A are limited, they can't exceed 10A, if they are over 10A, turn them off if they are below 10A, anyway, it's called cutting width. As shown in figure below, if current is below 10A, don't worry, but once it exceeds it, cut it off.

So we need to measure current in real time. The following shows that only two MOSFETs are enabled for three arms of bridge.

When MOSFET is on, current will flow through resistor, and when tube is not on, no current will flow. Therefore, when sometimes one of MOSFETs is not turned on, no value can be collected, so other channels must be sampled. After collecting, it needs to be processed, as shown in figure below, here is designed by hardware, in fact, more people use software to process, we will also explain how software works in detail in the video How to make a current loop and how to build a current loop with using equipment, here's how to build a current loop using equipment.

Actually, basic principle is very simple. It is detailed in parts 11-13 of my PFC video which uses current tracking method. If it's higher, cut it off like in same as comparator. We can use a comparator and one end of comparator should combine three currents and pass them.

The picture below shows rectification because collected signal is sometimes positive and sometimes negative, why does it appear negative because sometimes it will continue to flow, and due to effect of inductance, current will flow from bottom to top, what is collected in this time, is a negative voltage. For an op amp, if it wants to collect a negative voltage, it must use a dual power supply. And we are powered here from one power supply, so negative voltage cannot be collected, so what to do? We need to raise it. Here we use a bias resistor to raise it through 7.5V after dividing voltage.

As shown in figure below, here is an approximate drawing of its meaning. For a normal signal, it can only see voltages above 0V, and voltages below 0V cannot be seen. But there really is a negative pressure here, and there may be an overcurrent in process of free running, so how to be with a voltage below 0V? Actually, it can be raised. For example, initial negative pressure below 0V is cut off. is 0V, but after rising by 7.5V, it is a negative voltage relative to 7.5V, but relative to 0V axis, voltage is positive pressure, so negative pressure can also be collected.

What are benefits of boosting voltage? It is convenient to use single-supply powered op-amps because there are now more single-supply powered op-amps, and dual power supplies were more common in past. It is problematic to use a dual-powered op-amp because it must be a negative voltage power supply, so circuit is more complicated and cost is relatively high, so we use a single-powered solution for this.

The waveform of rectified signal is shown in figure below, and compared voltage can be processed. Use it for comparison. When it is greater than a certain voltage value, it will be closed. When it is less than a certain voltage value, it will be closed.

As shown in figure below, a synthesized voltage is applied to + terminal of comparator, and this voltage reflects current generated by hardware circuit. Just mentioned 7.5V, specific situation needs to be determined by yourself. Assuming current limit is 2A, voltage value after dividing voltage of VR1 and R83 is equivalent to 2A, then synthesized voltage is compared with voltage equivalent to 2A, if it exceeds 2A, then output of comparator is high, otherwise output is low. So how to control current when output is high or low?

For current motor control, PWM is actually used for speed control, meaning PWM duty cycle can be wide or narrow to reflect high and low speed. In this case, we divide it into previous cycle and next cycle. If opening time of previous cycle is small (the duty cycle is small, then reaction current will be small. If current is small, we do not care, but if current For precise control, if current is small, we need to control it. In next cycle, duty cycle will be adjusted to be larger, that is, to control current in real time, but what we focus here is "high". If current in previous cycle exceeds my set value, then we will turn it off, and when next cycle comes, we will make current judgment again.

If it is decided that current is low and not exceeded, we will continue turning on, but if it is decided that current is still exceeded, then I will continue to turn off, that is, losing duty cycle. Then it is easier to understand comparator circuit. The collected current (actual voltage) is compared with set current (actual voltage) through comparator U4. is latched, and at this time, D terminal is pulled up to +15 V through pull-up resistor, so Q terminal is high when Q terminal is high. The MOS tube is turned off by excitation circuit of MOS tube, current drops, and this method is used for protection.

For constant power output, circuit needs to be modified as shown in figure below, RST is connected to output of comparator, CLK is connected to normal PWM wave, Connected to output, when overcurrent, comparator output is high, RST input is high, and Q output is low. Just right for tall ones. If overcurrent condition continues when next cycle arrives, RST is still high, then Q is still low, It is still high, unless RST is 0 (no flow), then Q is high, It is low so that protection is achieved.

The circuit mentioned above is built using Hall method, as shown in figure below, Hall signal is converted into six outputs through a multi-channel selector switch, and six signals are transmitted through a multi-channel selector switch. The output of OR gate circuit is sent to CD4053 analog switch, and then through CD4081 output to control M1, M4, M3, and then to control opening and closing of the MOS tube. The above is a square wave circuit with position, of course, there are other circuits such as sine wave with position, square wave without position, and sinusoid without position.

Let's briefly introduce you to diagram of a three-phase motor without position. This scheme is more complex.

As shown in figure below, this is decoding scheme. After engine turns, it needs to convert Hall to a Hall, virtualize Hall, and then determine its position and how to move to next element. next conduction phase sequence is output according to the current conduction phase sequence.

The circuit in figure below captures back electromotive force of a phase current line. At low speed, current detection method is used, and at high speed, voltage detection method is used. Finally, the two elements of high speed and low speed are synthesized. After synthesis, phase-locked loop tracking is performed, and after tracking, switching and position storage is required.

The circuit below is designed to realize strong motor resistance, and it needs to be replaced after a certain resistance.

The following circuit is designed to implement negative pressure required at low speed.

The diagram below is intended to provide damping. The motor must be damped after every commutation that cannot be assembled.

The circuit below is a three-phase bridge circuit.

The solution is to replace work done by software with hardware so that software and hardware are not separated.