Difference between revisions of "Motor Control"
| Line 1: | Line 1: | ||
[[Category:Electric Vehicle]] | [[Category:Electric Vehicle]] | ||
| + | |||
| + | Motor control is a complex field which requires knowledge of linear algebra, control theory, and an understanding of electric machines. However, the overarching goal of every style of motor control is this keyword (look it up): rotating magnetic field, or RMF. This page aims to break down various styles of motor control, but focuses on the primary modern method, Field-Oriented Control or FOC. | ||
| + | |||
=DC Brushed Motor Control= | =DC Brushed Motor Control= | ||
=Six-Step Control= | =Six-Step Control= | ||
=Field Oriented Control for Synchronous Machines= | =Field Oriented Control for Synchronous Machines= | ||
| − | Most | + | Most FSAE-grade motor controllers use Field-Oriented Control. This decouples the torque and flux (magnetic field strength) control within the motor, which offers improved efficiency and dynamic performance of the motor & controller. To summarize, there are 7 main steps to FOC. |
| + | 1) Measure phase currents and rotor position - done using 2 or 3 phase current sensors + encoder/resolver for rotor position | ||
| + | 2) Clarke transform - linear transformation from the 3-phase stationary (abc) to 2-phase stationary (alpha/beta) of the currents in the stator windings | ||
| + | 3) Park transform - linear transformation from the 2-phase stationary (alpha/beta) to 2-phase rotating frame (DQ) - this turns the 2-phase currents in the stator windings into 2-phase currents that the rotor sees as it rotates | ||
| + | - Here is the important part: the Q-axis of the rotor is what controls torque while the D-axis of the rotor controls the flux. Since we can request D and Q-axis currents independently now, we can control the torque and flux separately respectively. | ||
| + | 4) PI control loops: set the D-axis and Q-axis currents of the rotor based on the error between reference values given by throttle position and measured values from the phase current & rotor position sensors | ||
| + | 5) Inverse-Park transform: going back from the 2-phase rotating (DQ) frame to the 2-phase stationary (alpha/beta) frame | ||
| + | 6) Inverse-Clarke transform: going back from the 2-phase stationary (alpha/beta) to the 3-phase stationary (abc) frame | ||
| + | 7) SVPWM: space-vector pulse-width modulation: calculates the required PWM signals for the IGBT/MOSFET half-bridges to generate the correct 3x AC phase voltages which drive currents in each phase | ||
| + | |||
==Transformations== | ==Transformations== | ||
===Clarke Transform=== | ===Clarke Transform=== | ||
| Line 83: | Line 95: | ||
There are a couple ways to calculation the required current to achieve a desired torque | There are a couple ways to calculation the required current to achieve a desired torque | ||
===Zero D-Axis Current=== | ===Zero D-Axis Current=== | ||
| + | This strategy is used for Surface Permanent Magnet (SPM) motors since they do not have a reluctance torque component. Maximum torque is generated when the stator field is 90* ahead of the rotor field (T = F x r). An important note is that negative current on the d-axis means that the stator field is oriented such that it fights, or weakens the rotor's magnetic field. This is called field weakening and allows SPMs to operate above their base speed. | ||
===Maximum Torque Per Amp (MTPA)=== | ===Maximum Torque Per Amp (MTPA)=== | ||
| − | MPTA is a control strategy to obtain the greatest torque out of | + | MPTA is a control strategy to obtain the greatest torque out of IPM motors, which have a difference in their Q-axis and D-axis inductances. Specifically the quantity (Lq-Ld) is positive. This is due to the fact that an IPM's rotor's magnets are buried in the rotor, rather than located on the surface as for Surface Permanent Magnet AC motors. MTPA works by introducing a small (compared to q-axis) negative d-axis current which takes advantage of reluctance torque of the IPM. Essentially, MTPA is maximizing the sum of magnetic and reluctance torque, rather than maximizing just magnetic torque with zero d-axis current. |
===Thermal Limiting=== | ===Thermal Limiting=== | ||
Losses in the motor and motor controller are a function of current. Therefore we need to reduce the current through the devices to limit the temperature of both the motor and controller. | Losses in the motor and motor controller are a function of current. Therefore we need to reduce the current through the devices to limit the temperature of both the motor and controller. | ||
Revision as of 04:53, 25 December 2024
Motor control is a complex field which requires knowledge of linear algebra, control theory, and an understanding of electric machines. However, the overarching goal of every style of motor control is this keyword (look it up): rotating magnetic field, or RMF. This page aims to break down various styles of motor control, but focuses on the primary modern method, Field-Oriented Control or FOC.
Contents
- 1 DC Brushed Motor Control
- 2 Six-Step Control
- 3 Field Oriented Control for Synchronous Machines
- 4 Field Oriented Control for Asynchronous Machines
DC Brushed Motor Control
Six-Step Control
Field Oriented Control for Synchronous Machines
Most FSAE-grade motor controllers use Field-Oriented Control. This decouples the torque and flux (magnetic field strength) control within the motor, which offers improved efficiency and dynamic performance of the motor & controller. To summarize, there are 7 main steps to FOC. 1) Measure phase currents and rotor position - done using 2 or 3 phase current sensors + encoder/resolver for rotor position 2) Clarke transform - linear transformation from the 3-phase stationary (abc) to 2-phase stationary (alpha/beta) of the currents in the stator windings 3) Park transform - linear transformation from the 2-phase stationary (alpha/beta) to 2-phase rotating frame (DQ) - this turns the 2-phase currents in the stator windings into 2-phase currents that the rotor sees as it rotates - Here is the important part: the Q-axis of the rotor is what controls torque while the D-axis of the rotor controls the flux. Since we can request D and Q-axis currents independently now, we can control the torque and flux separately respectively. 4) PI control loops: set the D-axis and Q-axis currents of the rotor based on the error between reference values given by throttle position and measured values from the phase current & rotor position sensors 5) Inverse-Park transform: going back from the 2-phase rotating (DQ) frame to the 2-phase stationary (alpha/beta) frame 6) Inverse-Clarke transform: going back from the 2-phase stationary (alpha/beta) to the 3-phase stationary (abc) frame 7) SVPWM: space-vector pulse-width modulation: calculates the required PWM signals for the IGBT/MOSFET half-bridges to generate the correct 3x AC phase voltages which drive currents in each phase
Transformations
Clarke Transform
The Clarke transform is used to convert the measurements of the phase currents or voltages to a rectangular 2d space vector, which represents both a complex phasor representing the AC current in the phases, and a vector with the same direction of the magnetic field that the current will create. The real axis/the axis aligned with the phase A vector is called , while the imaginary axis/perpendicular axis is labeled . k is a scaling factor, where results in a vector with the same magnitude as the original 3-phase signals, and results in a power-invariant transform.
Park Transform
The Park transform is used to transform quantities from being referenced to the stator to being referenced to the rotor. The -frame is "stationary", as in the axes remain fixed while the current and voltage vector spins around with the rotor. in the DQ-frame, because it is referenced so the D axis always is aligned with a north pole on the rotor, constant current results in constant torque regardless of rotation. The transform itself is simply a rotation matrix, rotating the -frame by the electrical angle of the rotor.
Current Regulation
A PI controller is commonly used to regulate the currents. This is explained by starting with a simple motor model in the DQ-frame (the motor is represented by a voltage source, resistance, and inductance).
We can then write the equation for the system as follows:
The pole of the system can be cancelled out by a an appropriately tuned PI controller. The equation for the entire current controller can then be written as follows:
More explicitly, the desired output voltage at any given point in time can be written as:
The back EMF is estimated using motor parameters and rotational speed. Also note that the entire system simplifies as follows:
Torque Regulation
There are a couple ways to calculation the required current to achieve a desired torque
Zero D-Axis Current
This strategy is used for Surface Permanent Magnet (SPM) motors since they do not have a reluctance torque component. Maximum torque is generated when the stator field is 90* ahead of the rotor field (T = F x r). An important note is that negative current on the d-axis means that the stator field is oriented such that it fights, or weakens the rotor's magnetic field. This is called field weakening and allows SPMs to operate above their base speed.
Maximum Torque Per Amp (MTPA)
MPTA is a control strategy to obtain the greatest torque out of IPM motors, which have a difference in their Q-axis and D-axis inductances. Specifically the quantity (Lq-Ld) is positive. This is due to the fact that an IPM's rotor's magnets are buried in the rotor, rather than located on the surface as for Surface Permanent Magnet AC motors. MTPA works by introducing a small (compared to q-axis) negative d-axis current which takes advantage of reluctance torque of the IPM. Essentially, MTPA is maximizing the sum of magnetic and reluctance torque, rather than maximizing just magnetic torque with zero d-axis current.
Thermal Limiting
Losses in the motor and motor controller are a function of current. Therefore we need to reduce the current through the devices to limit the temperature of both the motor and controller.
Torque Ramp
Slowly ramp up torque (over a period of 10's or 100's of milliseconds) in order to prevent mechanical damage to drivetrain.
Surface Mount Permanent Magnet Machines
Interior Permanent Magnet Machines
Position Feedback
Field oriented control relies on having the magnetic angle of the motor for the park transform. This can either be directly measured through an encoder or resolver (sensored control), or estimated/calculated from either the back EMF or motor impedance (sensorless control). One of the main limitations of sensorless control is that the angle is only easily estimated at either high or low speeds (depending on the method). A sensor ensures reliable angle feedback across the operating range.