I. What is torque control?
Permanent magnet synchronous motors are increasingly widely used in automobiles, from power drives to steering and braking actuators. Today, I'd like to discuss the control of permanent magnet synchronous motors.
Anyone who works in control knows that the control of any motor boils down to three different control objectives:
Position control: The motor can rotate by the specified number of degrees.
Speed control: The motor can rotate as fast as you want it to.
Torque control: The motor can output exactly how much force you want it to output.
Regardless of the control objective, the difference lies in whether it's a single closed loop, two closed loops, or three closed loops. Torque control, as the innermost loop, is indispensable. Today, let's talk about what torque control is.
To control a motor, understanding the controlled object is essential. Let's use the following animation to help understand how a permanent magnet synchronous motor moves. After alternating voltages with a 120-degree difference are applied to the three phases of the stator, a rotating magnetic field is generated on the stator core (the red and green colors representing the direction of the magnetic field rotate counterclockwise in the animation). Under the influence of this rotating magnetic field, a force is generated between it and the rotor magnetic field, causing the rotor to rotate.
How is motor torque generated? In the previous article, "Motor Torque, Speed, and Power," we analyzed that torque is directly proportional to armature (stator) current.
So how is the current generated? We can imagine each winding of the motor as a resistor and inductor rotating in a magnetic field, as shown in the equivalent circuit below:
Assuming the motor operates in open-loop mode, once a rotating magnetic field is established by applying a voltage 120 degrees different between the three phases of the stator, if there is no load at this time, the motor will rotate rapidly (no-load) until the back EMF is exactly equal to the applied voltage. At this time, the current in the stator winding is still 0. The rotating magnetic field of the stator can be imagined (virtual/equivalent) as a magnet rotating around the motor axis, and the south pole of this imaginary magnet coincides with the north pole axis of the rotor magnet.
When a load is applied to the rotor, according to Newton's laws of motion, the motor speed will inevitably decrease. This means that the back electromotive force in the equivalent circuit decreases, and with the given voltage remaining constant, the remaining voltage will generate current in the resistor. What else happens during this deceleration process? Because of the load pulling it, the axis of the rotor magnet is positioned at an angle behind the axis of the virtual stator magnet. This angle is what we call the "power angle".
Regarding vector models of motors, you can find all sorts of diagrams on the internet, but these diagrams are either too abstract, leaving you confused after looking at them for a long time, and unable to be compared with the real thing; or they are not comprehensive enough, with limited content in a single diagram, offering little practical guidance.
Therefore, in my actual work, I like to combine a large number of related vectors together, as shown in the figure below:
The small circle in the very center is the rotor (N pole and S pole), and the rotor is surrounded by a three-phase stator with phases AX, BY, and CZ arranged at 120-degree intervals.
Stationary two-phase coordinate axis: α coincides with stator A phase, β leads α by 90 degrees (green coordinate axis in the figure).
Rotate the two-phase coordinate system to find: the d-axis coincides with the rotor's N pole, and the q-axis leads the d-axis by 90 degrees (purple coordinate axis in the diagram).
X-axis: Stator rotating magnetomotive force ψs, which can be decomposed into rotor magnetomotive force ψf, id*Lq and Iq*Ld (red vectors in the figure).
Voltage vector: The spatial representation of voltage that can be represented by a three-phase full-bridge switch combination (yellow arrow).
In essence, the torque control of a motor is achieved by using a specific control algorithm to find combinations of switching transistors (yellow parts in the diagram) to synthesize a given voltage for the motor stator (large red arrow in the diagram). The torque corresponding to the current generated after this voltage cancels out the back EMF is just balanced with the external load.
II. FOC and DTC
The two main schools of thought in motor torque control are Field Oriented Control (FOC) and Direct Torque Control (DTC). In principle, the algorithms for these two control methods are applicable to all AC motors. This article only discusses their similarities and differences when used for permanent magnet synchronous motor control.
FOC:
The FOC control theory was first proposed by Siemens engineers in the 1970s. As mentioned above, the magnetic field generated by the stator can be virtualized as a high-speed rotating magnet around the rotor. The stator magnetomotive force (MF) can be decomposed into d-axis MF and q-axis MF. The d-axis MF is coaxial with the rotor MF and cannot generate a tangential torque, but it does affect the magnetic field generated by the permanent magnets in the rotor of the permanent magnet synchronous motor. The q-axis MF is 90 degrees out of phase with the rotor MF, thus generating a tangential torque (similar to the interaction force between two perpendicular bar magnets).
The basic idea of FOC control is to transform the relevant variables in the three-phase stationary ABC coordinate system to the rotating coordinate system (d, q) for mathematical calculations. The controller changes the voltages on the d and q axes to control the currents on the d and q axes. However, the final three-phase voltage supplied to the motor can only be the voltage in the stationary coordinate system. Therefore, the control algorithm needs to convert the voltages on the d and q axes back to the ABC three-phase voltages for the drive bridge. In other words, there is a process from physical model → mathematical model → control algorithm → physical model.
To achieve FOC, the following inputs are required:
1. Motor three-phase current (two current sensors as shown in the figure above can be used, or a low-side or high-side bus current sensor can be used to reconstruct the three-phase current using a time-division sampling current reconstruction method)
2. The motor position signal is indispensable.
The following control modules are essential:
1. Clark-Park Transform
2. PI adjustment of d-axis and q-axis
3. Inverse Clark-Park Transform
4. SPWM/SVPWM (SVPWM is preferred)
DTC:
DTC emerged more than a decade later than FOC, proposed in the mid-1980s by German scholar Professor Depenbrock. Its basic idea is to no longer translate stator-side variables into the rotor's rotating coordinate system, abandoning the current decoupling control concept in vector control. It removes the PI control module, inverse Clark-Park transform, and SVPWM module, instead directly calculating the motor's flux linkage and torque by detecting the bus voltage and stator current, and using two hysteresis comparators to directly achieve decoupled control of the stator flux linkage and torque.
As shown in the diagram above, the control algorithm first obtains the voltage and current Uα, Uβ, Iα, and Iβ under the stationary two-phase coordinate axis based on the motor's line current and phase voltage. Then, based on these four quantities, it estimates the stator flux and torque. How is this estimation done? It can be done using the following two formulas (without requiring the motor angle signal):
At the same time, the current rotor position range must be estimated based on the voltage and current of the motor stator.
Of course, if there are concerns about cumulative errors in the software's integral calculations leading to inaccuracies, or inaccurate values for the rotor flux or power angle, an angle sensor can be added to the system. All relevant parameters can then be calculated using the dq-axis rotating coordinate system. After calculating the stator flux and torque values, they are compared with their reference values and passed through a hysteresis comparator, resulting in two non-zero (1) state variables representing the relationship between the current magnetic flux and force and the reference values. The relationship is as follows.
1. Regarding the current torque and magnetic field, regardless of the exact difference between the output magnetic field and torque and the reference value, we only consider whether they are "under- or "over-" balanced.
2. In the control strategy, instead of providing an accurate voltage vector for each operation, one of V1-V6 is provided within each operating cycle (therefore, the concept of duty cycle does not exist).
The next question is how to choose between V1 and V6? Let's go back to this diagram of the DQ axis coordinate system (although it won't be used in the control algorithm). With a little thought, it becomes clear that if the applied voltage vector is within ±90 degrees of the d-axis, it will lead to an increase in magnetic flux; if the applied voltage vector is within ±90 degrees of the q-axis, it will lead to an increase in torque.
The relationship can be represented using the four quadrants of the following polar coordinate system:
Therefore, we can give the motor drive bridge instructions according to the current rotor position value and the following switch table:
Combining the two diagrams above, taking the motor in the first sector as an example,
1. If the motor is undermagnetized and underpowered (11), given U2, the angle between the given voltage and the voltage at the current position of the motor is between [0° and 60°], thus achieving magnetization and power enhancement;
2. If the motor is under-magnetized (10), given U6, the angle between the given voltage and the voltage at the current position of the motor is between -60° and 0°, thus achieving magnetization and force enhancement.
3. If the motor is underpowered due to overmagnetism (01), given U3, the angle between the given voltage and the current position of the motor is between [60°120°]. The motor will increase its power, but the magnetic state is not monotonic. However, with multiple cycles of adjustment, the magnetism will eventually be able to balance with the given voltage (this is unavoidable, as the 6 voltage vectors divide the space into 6 intervals; while the increase and decrease relationship is 4 intervals, which will inevitably overlap).
4. If the motor experiences over-magnetic force (0°), and given U5, the angle between the given voltage and the motor's current position is between [180° and 240°]. The motor will then demagnetize and reduce force.
The same principle applies to the remaining intervals, and the final stator flux linkage is shown in the figure below:
In summary, the two control algorithms can be summarized as follows:
III. Regarding motor position signals
The importance of motor position signals
In the FOC control algorithm of permanent magnet synchronous motor, a very important physical quantity is the motor's position signal.
Just how important is this position signal? Let's look at the data. I built a current loop simulation model of a motor, and under a fixed motor speed, given a control command of 3.2 Nm, I simulated three operating conditions:
Operating Condition 1: Rotor signal is normal (green line in the image below)
Operating Condition 2: A 30-degree offset is superimposed on the rotor signal (blue line in the figure below).
Operating Condition 3: ±7 degrees of Gaussian random white noise superimposed on the rotor signal (red line in the figure below).
Simulation results show that in operating condition 2, the motor output torque is insufficient and there are inherent fluctuations related to the rotor position; in operating condition 3, there is a certain degree of torque ripple. Therefore, the importance of this signal is evident.
Types of motor position signals
Currently, there are two main types of motor position signal sensors commonly used in automotive motors:
(1) Inner and outer magnetic rings + Hall chip
This solution involves installing a magnetic ring plate at the end of the motor, coaxial with the rotor. The plate contains an inner magnetic ring and an outer magnetic ring. A PCB is installed near the magnetic ring, on which three single-linear Hall chips output Hall_A,B,C signals and one bilinear Hall chip outputs Hall_Q1,Q2 signals.
The inner magnetic ring has N and S magnetic poles evenly distributed, equal to the number of pole pairs of the motor. These poles are sequentially induced by three single Hall chips with a 120-degree phase difference. Therefore, the arrangement requirement for these three Hall chips on the PCB is that they should be evenly distributed within the range of [0360/number of pole pairs].
Several N and S magnetic poles are distributed on the outer magnetic ring (typical numbers are 72 and 80). As the rotor rotates, each time the N and S magnetic poles pass under the dual Hall chip, the chip senses and outputs a set of HallQ1 and Q2 signals that change orthogonally by 90 degrees.
The following figure shows a typical relationship between Hall signals and motor back EMF:
Generally, five signals are sufficient to obtain the absolute position of the motor, and they have mutual redundancy verification functions. However, in some more demanding applications, seven Hall signals may be used.
(2) Rotary transformer
In a rotary transformer, the stator winding serves as the primary side, receiving the excitation voltage; the rotor winding serves as the secondary side, obtaining an induced voltage through electromagnetic coupling. Its working principle is basically similar to that of a conventional transformer. The difference lies in the fact that in a conventional transformer, the primary and secondary windings are relatively fixed, so the ratio of output voltage to input voltage is constant. However, in a rotary transformer, the relative positions of the primary and secondary windings change with the angular displacement of the rotor, thus the magnitude of its output voltage varies with the rotor's angular displacement.
Its typical signal characteristics are as follows:
In addition, magnetoresistive position signal sensors have been gaining momentum in recent years, showing a strong tendency to take over the market.
Application of motor position signals
Hall signals are generally processed by a simple shaping circuit and then directly input to the microcontroller's comparison and capture unit for decoding. Some microcontrollers even have dedicated Hall signal quadrature encoding units to decode HallQ signals in hardware. Resolver signals, on the other hand, require a dedicated decoding chip (generally referring to the RDC resolver chip, with ADI in the US and Tamagawa in Japan being the best at it, but this is not absolute; for example, a certain Japanese manufacturer uses a microcontroller with a powerful arithmetic unit but few peripherals).
Disclaimer: This article is a reprint. If it involves copyright issues, please contact us promptly for deletion (QQ: 2737591964). We apologize for any inconvenience.