DSP, Micros & Memory


Converting analog controllers to smart controllers with DSPs

29 June 2005 DSP, Micros & Memory

Modern applications demand faster, cheaper, and better motor control systems, and the performance demanded from embedded motor controllers is ever increasing. Programmable controllers offer the unique opportunity to improve performance, reduce cost, and enable designers to improve the efficiency of motor control systems. Such performance objectives typically need advanced algorithms that are computationally intensive and are best implemented on digital signal processors (DSPs).

Most engineers looking to implement control algorithms on DSPs, are faced with a significant barrier - a definite lack of comprehensive information on the process of achieving the conversion. Texas Instruments (TI) has constructed a comprehensive portfolio of control solutions with its TMS320C2000 DSP controllers, to assist with this conversion process.

Motivation

Modern high-performance motor controllers are expected to concurrently achieve several objectives. They must meet or exceed the dynamical specifications, and in addition, they must satisfy several other requirements. Examples are high efficiency, power factor, and electromagnetic compatibility (EMC). To meet all these requirements, designers are turning to mathematical algorithms that are computationally demanding. DSPs provide an excellent means to implement controllers to meet this goal, however a major barrier that designers are faced with is the lack of a clear process and documentation on how to bring everything together.

Analog vs digital controllers

In order to convert analog controllers to digital controllers, the first step is to gain an understanding of the strengths and weaknesses of both forms of controllers. Digital controllers offer several advantages, which make a very convincing case for implementing new controllers with digital techniques - and converting existing analog controllers to new, digital implementations. Some of these advantages are:

* Programmability brings new opportunities: Programmable DSP controllers offer new capabilities, such as implementing advanced algorithms for motor control, which enable higher performance, and lower energy consumption, among other things.

* Drift immunity: Digital controllers work with elements that operate in saturation, well outside the linear operation. As such, their functioning is substantially unaffected by either time or temperature drifts. Equations in software do not drift, so the definitions of the control laws remain consistent, unlike analog controllers.

* Software can automate calibration: Even with digital controllers, there is a significant amount of analog circuitry wrapped around the controller. However, software implemented on programmable controllers can calibrate out the inaccuracies, and software can automate this calibration process. This lowers the cost of manufacturing by eliminating a manual calibration step.

* Ease of implementation: Functions are easily implemented in software. It is far easier to code the equation 'x=y+z'; in software than it is to design an analog circuit to do the addition.

* Faster time to market: Programmable digital controllers make it possible to leverage existing off-the-shelf controllers, which allow the fastest realisation of a design. In addition, design of controllers is often an iterative process, with repeated design and test steps, until the specifications are met. Such an iterative process can be executed very rapidly by means of a software-configurable controller. Such a controller can be configured in minutes, versus a circuit change, which is not easy. Trimming gains can also be done on-line, which gives designers a friendly means of changing the control system while observing the system response.

* Control law changes are software updates: During system design, often it becomes necessary to change the control law, beyond just changing the gains. A new structure may be needed, or a boundary condition must be covered. Making changes to analog controllers is a very slow process. For programmable controllers, it is a matter of designing the controller, and then changing the coefficients in software. Flexibility during design is key to faster system design.

* Far less sensitive to component tolerances: Digital controllers are far less susceptible to component tolerances. Since they implement algorithms in software, gains and parameters are far more consistent and reproducible.

Converting analog controllers to DSP

To convert an analog controller to a DSP-based digital control system involves understanding the existing system, and then creating an equivalent system with a DSP-based controller, that has the desired performance characteristics. Often this is a two-step process; first creating an equivalent, and then adding in additional features. A flowchart outlining the procedure can help:

Figure 1. The conversion process
Figure 1. The conversion process

System identification: This step begins with an overview of an existing system. In this step, a rough specification must be assembled, with a succinct list of the specifications goals and objectives for the new design.

System analysis: The next step, after identifying key system parameters and quantities, is to seek out a mathematical description of the system. To describe the control loop, the techniques that must be used are either based on models of the system, or based on measurements made with a real system.

Create a mathematical definition for the system: Once a proper block diagram is assembled, describe the system mathematically. This involves creating transfer function models for the control systems. The topic of creating models for systems has been dealt with extensively in textbooks.

Partition the system into hardware components and software components: The next step, realising a controller around a digital processor consists of deciding which portions of the systems will be digitised. The first step is to examine the system and then the controller that will be used to implement the system.

Quantisation of signals, analog range and scaling: At this stage, the system would be close to the final form, in terms of the circuit diagrams. The interfacing must then be examined and all the issues ironed out. An important consideration is signal to noise ratio, and resolution.

Anti-aliasing considerations: A phenomenon that is introduced into a control system, as a direct consequence of the sampling process, is aliasing. Aliasing can cause a number of undesirable effects, and is undesired most of the time.

Choosing sampling rates in a quantised discrete time domain system: To discretise the controller, the designer must choose a sampling frequency that allows the designer to convert to a discrete form. Obviously, the criterion for avoiding aliasing are important. However, in control systems, it is almost always necessary to go far beyond the sampling rates suggested by the Nyquist criterion.

Design discrete time controllers to implement the control function: Several approaches are used in designing software controllers in the discrete time domain. The first approach consists of designing continuous time controllers - the s-plane design - and then translating this to the z-plane, ie, to the discrete time domain.

Leveraging existing collateral

Whether converting an existing analog control circuit into a digital DSP-enabled controller, or whether creating a new control system around a DSP, one of the common denominators is the creation of a large number of 'infrastructure' or re-use libraries.

Figure 2. Block diagram of a TMS320F2812 DSP controller
Figure 2. Block diagram of a TMS320F2812 DSP controller

Texas Instruments has done some of the work for designers, and has created a 'Motor Control Foundation Software Library' that supplies several often re-used and commonly used components. These components make the creation of the control system software easier, and reduce the development cycle.

Summary

The choice of the control strategy is driven by the overall application complexity. For all but the simplest applications, designers are using advanced algorithms to address ever-increasing application requirements. TI's C2000 DSP controllers are making their lives easier. Analog-to-digital conversion is driving increasing features, and enabling new technology.

Making the conversion from analog to digital control brings numerous advantages. Careful management of the conversion process ensures that the application is partitioned correctly and makes the best possible use of the opportunities that the conversion brings.

The conversion process itself is helped by ready-to-use software collateral, which reduces the implementation time significantly. Also, powerful compilers for the TMS320C2800 DSPs make implementation of fixed point arithmetic simpler.

Local distributor for TI, Avnet Kopp, has a full version of this application article, authored by Kedar Godbole of TI DSP Digital Control Systems, available to interested readers.





Share this article:
Share via emailShare via LinkedInPrint this page

Further reading:

The 8-bit survival syndrome – Part 2
DSP, Micros & Memory
Just like the 4-bit pre-microcontroller, the 8-bit MCU has been finding ways to stick around. Their features and speeds have been improving, offering competitive reasons to work with them.

Read more...
Enhanced code protection for USB µC portfolio
Future Electronics DSP, Micros & Memory
To help easily incorporate USB power and communication functionality into embedded systems, Microchip Technology has launched the AVR DU family of microcontrollers.

Read more...
General-purpose MCU with RISC-V architecture
EBV Electrolink DSP, Micros & Memory
Renesas has released a general-purpose MCU to enhance its existing RISC-V portfolio, and this is its first MCU using a RISC-V core developed internally at the company.

Read more...
8-bit MCU with I3C support
Avnet Silica DSP, Micros & Memory
The PIC18-Q20 8-bit microcontrollers from Microchip easily interface with devices operating in multiple voltage domains, and the built-in I3C interface supports higher-speed and lower-power data transfers than I2C.

Read more...
An evolutionary step in customisable logic
Altron Arrow DSP, Micros & Memory
Microchip Technology is offering a tailored hardware solution with the launch of its PIC16F13145 family of microcontrollers, which are outfitted with a new Configurable Logic Block module.

Read more...
MCU for battery-powered applications
Altron Arrow DSP, Micros & Memory
Included in ST’s family of devices is the STM32U031, an ultra-low-power MCU featuring an ARM Cortex-M0+ 32-bit core running at up to 56 MHz.

Read more...
Serial SRAM up to 4 MB
EBV Electrolink DSP, Micros & Memory
The chips are designed to provide a lower-cost alternative to traditional parallel SRAM products, and include optional battery backup switchover circuitry in the SRAM memory to retain data on power loss.

Read more...
SiP supports LTE/NB-IoT and GNSS
RF Design DSP, Micros & Memory
The nRF9151 from Nordic Semiconductor is an integrated System-in-Package that supports LTE-M/NB-IoT, DECT NR+ and GNSS services.

Read more...
Qi2 dsPIC33-based reference design
DSP, Micros & Memory
Powered by a single dsPIC33 Digital Signal Controller, the Qi2 reference design offers efficient control for optimised performance.

Read more...
MIKROE’s IDE now includes MPLAB XC compilers
DSP, Micros & Memory
MIKROE has announced that the latest version of its multi-architectural IDE, NECTO Studio 6.1, now includes Microchip’s MPLAB XC compilers for 8-, 16- and 32-bit MCUs.

Read more...