In life, being able to control your destiny makes you a happy individual. When it comes to engineering and, in particular, motor control, the same principle applies: You must have full control of the closed-loop algorithm. The ability to compensate for parametric variations or system input changes in a motor-control scheme affords efficient operation of the device.
The most commonly used control loop for motor control is the proportional integral derivative (PID) controller. This closed-loop control scheme comprises three main elements: error calculation (reference minus measured variable), compensator (controller) and output generation to the plant. Lack of full control over the PID controller eventually leads to compromising performance in some critical areas, with less than ideal results.
Some vendors offer a hardware-based PID controller, which limits the flexibility of the controller section. This is because the motor-control algorithms are “hard wired” on a PID controller and therefore are proprietary, expensive and inflexible. Additionally, these PID controllers are usually found on 8-bit microcontroller units (MCUs) that are not fast enough to perform mathematical operations in software.
Now designers have to be prepared for more control loops in their system designs. For instance, in advanced motor-control systems, a minimum of three control loops is necessary. An outer system-control loop keeps the speed of the motor fixed under varying load conditions. It does so by interacting with an inner loop, which controls the motor current by constantly adjusting the duty cycle of the pulse-width modulator (PWM) peripheral, under an analog-to-digital converter's (ADC) interrupt. Another inner loop monitors current in the same manner, except that it uses a different current vector.
Given the options available on the market today, efficiency and cost savings in motor-control systems can only come from advanced control algorithms running on efficient digital signal controllers (DSCs). For example, the latest washers, air conditioners and automotive applications rely on permanent magnet synchronous motors.
Further, home appliances conforming to the latest energy standards require efficient motor-control algorithms, involving current control at very-high-speed operation. These appliances use the field-oriented control (FOC) algorithm, which requires two current-control loops running between 8-kHz and 20-kHz rates, and a third control loop of a speed controller executed at a rate of 1 kHz or thereabouts.
Traditional motor-control solutions relying on 8-bit MCUs supported by motor-control-specific peripherals will not work in scenarios like those mentioned previously, because these MCUs are only capable of executing one or two control loops at a rate of about 1 kHz. Additionally, designers have to pay for the external PID controller and other peripheral devices.
By the same logic, using expensive digital signal processors (DSPs) is overkill — akin to driving a very fast car with very weak brakes — and entirely unsuitable for motor-control applications. While the FOC computation can be sped up with DSPs, without the right on-chip peripheral support, the motor-control schemes tend to get very expensive, because you need to deploy additional peripheral chips. Furthermore, DSPs need external RAM for fast code execution to match internal CPU speed. And, the programming complexity of DSPs will not go away, making the solution unattractive to customers.
DSCs offer a clear-cut design advantage over these two approaches. Featuring application-specific peripherals — such as PWMs, ADCs, digital-to-analog converters and comparators — DSCs support most motor-control schemes in an economical manner. The DSP core on a DSC speeds up computation, while the on-chip motor-control-specific peripherals accommodate more than five to six control loops, making it easy to implement any type of motor-control scheme to any degree of sophistication.
Best of all, DSCs are easy to program, just like MCUs. With the availability of free FOC algorithms and code for implementing PFC blocks, designers should seriously consider using DSCs and take control of their motor-control schemes.
Jorge Zambada joined Microchip Technology in 2004 as an applications engineer for the Digital Signal Controller Division. He has worked in the area of motor control and embedded systems since 2001. Zambada earned his bachelor's degree in electronics systems engineering from the Monterrey Institute of Technology in Guadalajara, Mexico.