Advertisement

Floating-point DSCs yield greener control systems

Floating-point DSCs yield greener control systems

Sophisticated algorithms can be easier to design and have

higher performance with floating-point control

BY ANDREW SOUKUP
Texas Instruments
Houston, TX
http//:www.ti.com

Digital signal controllers (DSCs) offer the most advanced form of single-chip control processing available for high-end embedded systems. DSCs with floating-point architecture take fewer processing cycles, need less program memory, and enable more computationally advanced algorithms that can help save energy while extending system capabilities. Floating-point programming is faster than fixed-point, and system-on-a-chip (SOC) integration keeps board space, component counts, and overall system costs in line.

As embedded systems continue to undertake more sophisticated tasks, whether to conserve power or to enable new capabilities such as vehicle guidance, they demand ever greater performance from control processors. The need to conserve energy affects every type of equipment we use, including some that are not obvious to consumers. Industrial motors, for instance, consume huge amounts of power as much as two-thirds of all the electricity used by industry, according to the ABB Group, a supplier of power and automation technology. Almost all motors could be made to run more efficiently with variable speed control, but only one motor in twenty has the digital control electronics that enables this feature. Even so, every year variable-speed motors manage to save the output of 10 power plants some 68 million tons of greenhouse gases compared with their fixed-speed equivalents. Clearly, advanced motor control offers a great opportunity for saving energy and benefiting the environment.

Adding sophisticated control saves energy

Renewable energy sources, such as solar panels and wind turbines, are other “green” opportunities for control. Like motors, these energy gatherers need advanced digital control for efficiency. Control is necessary in order to convert the raw voltage from panels or turbines in real time to the appropriate voltage for battery storage or running appliances. Variable levels of sunlight and wind require sophisticated algorithms to help maximize the power output at all times; and since many renewable energy systems tie into the electrical grid, real-time control is needed for protection as well.

For example, TI’s F283x floating-point DSCs (see Fig. 1 ) bring high performance and easy software development to embedded applications such as motor and motion control, automotive radar systems, and renewable energy generation from sources such as solar arrays and windmills. The 32-bit DSC family operates at speeds up to 150 MHz and can perform as many as 300 million floating-point operations per second (MFLOPS).

The floating-point architecture boosts performance by 50% or more over TMS320F28x fixed-point DSCs. The devices include a six-channel DMA controller that offloads data transfer management from the processing core, and software innovations that make it easier to develop both floating- and fixed-point code from the same source.

Floating-point DSCs yield greener control systems

Fig. 1. The F28335 floating- point DSC includes a six-channel DMA controller that offloads data transfer.

Floating-point math

Most of the advantages of the F283x DSC generation derive from its numeric format, which simplifies programming, saves execution cycles and reduces code size. The fixed-point format used in other DSCs and DSPs represents only integers (positive and negative numbers without a decimal point), so that additional notation is necessary to deal with fractions. By contrast, the floating-point format represents real numbers (those with decimals) over a much greater range. The internal representation of decimals and the wide numeric range means that scaling operations such as multiplication, division and the trigonometric functions, which are quite common in control algorithms, can be more efficiently carried out.

Consider the 32-bit fixed-point architecture, which represents integer values ranging from 2 31 to 231 , with one sign bit. While this is an extensive range, it can be used up quickly when the system has to perform numerous scaling operations, causing numbers to grow beyond 32 bits, thus overflowing registers. The program can deal with this problem, known as saturation, by rounding or truncating the numbers, which will sacrifice precision. Alternatively, the program can slice the long numbers into shorter ones that it operates on piece by piece, 32 bits at a time. In the latter case, full precision can be retained, but performance suffers since the processor is busy moving and storing the pieces. Also, program size grows with the additional instructions required.

Here the floating-point architecture shows its worth. As Fig. 2 illustrates, eight of the 32 bits in the F283x word are used as an exponent, leaving 23 bits for the mantissa, and one bit for the sign. Although there is no sign bit for the exponent, a normalizing bias is added to the stored exponent in operation, yielding a range of exponents that are both negative and positive in value.

The numeric values that can be stored in this 32-bit floating-point word, then, have a normalized range from ~±1.738 to ~±3.438 considerably greater than the 32-bit fixed-point range. Since the negative exponents represent fractions, this range extends from extremely small values to extremely large ones. Such a wide range presents little likelihood of saturation, so the program avoids the dilemma of either sacrificing precision through rounding or truncating, or sacrificing performance and storage by using additional cycles and instructions to operate on separate pieces of long numbers.

Floating-point DSCs yield greener control systems

Fig. 2. Eight of the 32 bits in the F283x word are used as an exponentThe 32-bit floating-point word of the F283x digital signal controller.

Processor performance enhancement

The operations listed in Table 1 illustrate how much advantage the floating-point architecture brings to DSC performance. The first column lists four arithmetic and trigonometric functions and two algorithms (fast Fourier transform and infinite impulse response) that are commonly used in control systems.

Floating-point DSCs yield greener control systems

The second column shows the cycles required on a fixed-point DSC to perform the operation, and the third shows the cycles required on a floating-point DSC. The final column divides the second column by the third to show relative performance. The floating-point device performs all the math operations listed two to three times as fast as the fixed-point device. The FFT is in this range as well, and the IIR slightly slower but still much faster than with fixed-point math.

In general, control algorithms benefit more than signal processing algorithms because control code performs more basic math operations, requiring fixed-point scaling and saturation manipulations. Even so, cycle counts are much lower across the board for the floating-point architecture, with an average performance enhancement of about 50% for all signal-processing benchmarks run.

In application, these and other benchmarks translate into a number of tangible advantages. Finer-grained, multidimensional control is possible for robotics and computer numeric control (CNC) machines. Servo motor drives become more power efficient, with the capability of implementing power line control (PLC) and other advanced algorithms. Solar and wind-powered inverters and uninterruptible power supplies can gain improved power conversion efficiency, helping bring down the cost per kilowatt produced, and control of different configurations of panel arrays or turbines is possible.

Software development advantages

The floating-point format also simplifies writing and debugging code. Floating-point numeric representations are more natural to mathematical operations than fixed-point and are thus supported more readily in high-level languages. Once the code has been written and debugged for validation, it can be directly ported to the floating-point DSC for further testing and ultimate production.

By contrast, the method of developing code for a fixed-point controller has been to write and debug the program on a PC for validation, then tediously rewrite the code using the more stringent fixed-point representations of the hardware. This adds significantly to the development cycle, and once the transition has been made there is no going back.

Ordinarily, separate fixed- and floating-point versions of the code have to be maintained, bringing a risk that discrepancies can creep in. Since F283x controllers require only the development of floating-point code, they simplify this process, save time, and promote software reliability.

Cost constraints sometimes make it advantageous to follow the strategy of using a floating-point controller as a development platform for prototyping and early release, then changing over to a fixed-point controller for volume manufacturing. The C compiler and IQ Math support this strategy by making it easy to compile the same source code either way. The F283x DSC offers economy, since it is the first floating-point controller with SoC integration. The crossover point for floating- versus fixed-point costs now rises to higher volume levels, so that many advanced systems may not need to make the change in order to see savings. The higher performance and easier development of a floating-point architecture is now more affordable to a much wider range of applications, spurring the development of further innovations in embedded system control. ■

For more on embedded control systems, visit http://electronicproducts-com-develop.go-vip.net/digital.asp.

Advertisement



Learn more about Texas Instruments

Leave a Reply