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:
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.
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.
© Technews Publishing (Pty) Ltd | All Rights Reserved