Bluewind



 Tutorial: using a DSP in your next UPS design

by Stefano Costa (see contacts info)

Abstract

The full digital control of a UPS (Uninterruptible Power Supply) is not only a matter of the inverter regulation. From this point of view, the choice of using a DSP is straightforward. Unfortunatly, a UPS is somehow a sophisticated device and by its nature the user needs to know exactly how its different parts are working. Manufacturers today tend to offer mixed analog-digital solutions based on topologies derived from the all-analog past; using the correct DSP with some innovative ideas leads to a much simpler approach.

top

More than a DSP?

When choosing the electronics architecture for a new UPS, the designer must balance exactly marketing needs and technical possibilities. Choosing to control the entire UPS behaviour with a digital approach means using a lot of processing power for logics, protocols, user interface and so on. But from different points of view (cost, performance, reliability) the digital control of the inverter is what makes the difference.

So it seems to be a good idea to concentrate on this subject choosing the right CPU for this task, and then try to fulfill all other requirements using the remaining processing power and peripherals. The right choice for a three-phase inverter control is today a specialized 16-bit fixed-point DSP, and this leaves only little or no space for other functions, being the DSP typically not suited for protocols, user interface or strong bit manipulation (as required by such a complicated logic found in UPS design). So to keep the cost reasonable and benefit from using a DSP in your next design, you should:

Cost, test, production and maintenance
Everyone in the electronics industry has learned that production and test of any equipment is today a critical path when trying to deliver faster and faster new products in all fields. This is also true for UPS, being this kind of products linked to the ever-growing information technology market.

Producing faster means deep automation, reliability and low testing times. It’s easy to understand that the more a product is controlled by a microprocessor, the more this product can be linked directly to the production and testing equipment thus speeding up all operations. For instance, if a microprocessor is present inside the UPS, a complete set of identification information like the serial number, the model and size and the kind of testing already performed can be written in some portion if the on-board memory. This way it’s always possible to track down and solve the problems without having to manually follow each production step. But the same applies during the development and maintainance of the UPS. Developing a new product is a process that takes time, and during this time requirements change, the marketing discovers new features that can be added, competitors conquer the market with appealing options. In this situation an architecture where the software running on a microprocessor determines most of the functioning of a UPS means having the opportunity of adding and changing its behaviour on the fly, without having to re-invent the hardware.

Maintaining a UPS ranges from almost nothing in small low-end products, to periodical visits and tests at the customer’s site with some kind of penality in case the UPS fails to supply the power during its life, maintainance time included. Of course the cost of these operations is lowered down only by including part of the diagnostic inside the UPS, and again the microprocessor enables to record and communicate any problem that may occur between the visits. But more important, visits can be partially substituted with dial-up connections between the aftersales service and the UPS itself so that information regarding the its behaviour is easly kept under control.

top

Communication

Inside and outside a UPS several communication links control and drive its good behaviour. Big and complex UPS require perheaps more microprocessors and DSP inside and thus some kind of communication link is needed between them; in any case the user very often requires that the UPS can be connected to a computer and a software application running on it collects information.

Supervision and remote monitoring
The UPS has been considered mainly an analog- and power-electronics based product for many years in the past. This continues to be true if we consider that a significant percentage of cost in a UPS is related to the presence of batteries, mechanics, heat sinks and power converters. But having said this, it’s also true that a big part of the performance of a UPS tends to be evaluated by customers in terms of availability of information from the UPS itself, regarding mains quality and battery life for instance, so that the UPS can be connected directly to the information system that it’s been powered.

This way the customer wants to automate some important processes: the unattended shutdown of a server when the battery is going near end of discarge after a mains failure, or calling the aftersales service when the UPS needs it. Of course these tasks can be accomplished in a lot of different ways, depending on the kind of application. The market requires more sofisticated communication options, when the UPS is used in large-scale plants like hospitals, big manufactoring sites or complex information systems. On the other hand, the little and low cost UPS sold to the single user for its own Personal Computer needs only some easy-to-set-up connection that perheaps Microsoft Windows or Linux will understand natively.

The UPS communicates using a lot of different protocols: starting with simple dry contacts for signaling, up to SNMP Messages (Simple Network Management Protocol) and HTML Pages sent throught an Ethernet port. Of course using a more sophisticated microprocessor inside the UPS means not having to add some external processing power to achieve this. But keep in mind that a large volume of UPS is intended to be used very near to some sort of computer (workstation or server) and it’s always possible (and acceptable) to connect the UPS with the computer by some simple serial line and trivial protocol, with an application running on the computer having the task to convert the information to a much complex protocol.

In the low end market, where the UPS powers a small workstation or server, the requirement for supervision and management is mostly a typical marketing request to differentiate products. Sometimes a lot of complex software applications and serial line connections are offered but rarely understood and used by customers. The real need is for a simple utiliy running on the computer being powered by the UPS and showing if it’s working from mains or batteries, and if batteries are going near end of discharge due to a long failure of mains. This is easily done by sending simple messages to a serial line.

Diagnostic communication
Diagnostic is a strong need in this field, because no customer will understand that he would have to wait hours or days before his UPS gets repaired when some large device is being powered using such an expensive protection system. It’s very useful to make it available a communication link between the UPS itself and a personal computer, and a software application displaying diagnostic information collected from inside the UPS.

It will be the task of the microcontroller(s) used in the design of the UPS to record and decode all these information, based on measurements and inputs from the rest of the electronics. Then, some standard protocol over a serial line can be used to deliver information to the personal computer.

Internal communication bus
Internal communication between more microprocessors and DSPs can be accomplished in different ways. Typically, the manufacturer choses to establish some internal standard for doing the task through serial lines or parallel buses. Nowadays, the choice exist of using fast standard communication links already enclosed and supported by a lot of embedded microcontrollers (like CAN Bus) but in case a DSP is also used in the design, either an external peripheral must be used or a sincronous serial line link would be preferred.

Parallel bus
The link between more UPS in a parallel configuration must have certain characteristic:

CAN Bus is again very well suited, making it possible to accomplish all these features with little effort of the software specialist. Of course the same is true for a lot of other industrial buses, but it’s very difficult to find another good combination of cost, reliability and easyness that CAN Bus can give to the developer. In case a UPS is based only on a single DSP as microprocessor, an external CAN Bus controller should be added but again this is not a big cost.

Some more innovative parallel strategy for UPS can be studied, and connectionless parallel systems can be further investigated expecially if a DSP is used to directly control the inverter.

top

Topologies

The UPS is composed of five main blocks, always present and differently connected together depending on the topology:

The main existing topologies divide themselve in three categories: the latest being a sort of on-line but with some important differences.

On-line
The UPS is considered on-line when the load is supplied continuously by power transformed inside the UPS, with the battery connected as a buffer. This way, any kind of problem on the input mains can never cause loss of power to the load as long as the battery can supply the needed energy to the output inverter. Of course if the input mains gets lost for a long time, at a certain point (depending on the load and battery capacity) the battery discharges below the minum limit for the inverter to function properly and the load must be disconnected.

In on-line UPS the input stage must be sized so that it can supply the output power plus the energy for charging the battery; the output stage is basically a switch normally composed of solid state components, so that a commutation between input mains and inverter (for maintainance or other reasons) can be performed with no significant hole at the output. The inverter runs directly from the battery voltage, or a boost stage can optionally be connected between them in case low-voltage batteries are used.

Off-line
Off-line UPS are products where the inverter is only powered up when the input mains reveals some kind of problem; in this situation of course a small hole or defect can be present at the output, but this is generally not important for a large range of typical loads. Sometimes off-line UPS offer more advanced features, like the ability to compensate for limited variations of input mains mean value by inserting automatically an auto-transformer with multiple configurations. It's clear that off-line UPS offer much more efficiency than on-line types; the main drawbacks are two:

To overcome the second problem some strategies can be implemented, like periodical battery testing and power cycling the inverter. But nothing can be done in case the mains is not perfectly sinusoidal and the load requires it; in this case the on-line UPS is the only solution. Another reason why a customer would prefer complete conversion of the power (as in on-line UPS) is when the load tends to produce armonics and disturbancies back to the input mains; in this case, expecially when high power loads are involved, on-line UPS can be very effective in separating loads and mains.

Single conversion
Single conversion UPS is a category of products where, generally speaking, the inverter is put in parallel to the mains delivered to the load. The inverter must then compensate for defects of the mains while it’s present, and generate the sinusoidal output when absent. The UPS switches between the two functioning modes with no interruption. Charging the battery can be another task of the inverter, being it possible that it transfers energy both ways. Or an external battery charger can be used. It’s clear that this topology takes the best of both on-line and off-line:

The only drawback is that the control and detection of input mains (which is exactly equal to the output, by the way) must be really sophisticated and precise, and in this case one single DSP controlling both the inverter and this logic can be a perfect fit.

More about on-line and single conversion
We may say that on-line is the reference technical topology best suited for medium power UPS. However, an emerging need for low cost and high volume products leads more to a trade-off between several different new and well known topologies such as:

As stated above, the need for new topologies is driven mainly by cost and volume: lower prices due to competition, and simpler UPS due to high volume of production. Using a DSP in the design means in this case having the opportunity to change the topology (or the behaviour) of the UPS depending on the market needs, without redesigning most of the electronics. It must be clear that a true on-line topology is rarely really needed; in a vast majority of applications, the real point is reliability which is not the same as microsecond continuity.

It’s not so usual that devices powered by the UPS are sensitive with respect to a 20 milliseconds hole in the mains; of course, it’s very important that after that hole, the energy coming from the batteries is safely converted down to the device!

So, the need for on-line UPS is often pushed by the manufacturer itself, to maintain a high level in competition. Now that cost is more and more important, and that the players in this field are growing, there is space for smart new topologies that keep simple the electronics and need the DSP usage to accomplish the task. In this scenario, the single conversion UPS seems to be the winning topology: it saves a lot of expensive components, it’s very efficient, and it integrates enaught the control to enable using one single fixed-point DSP to drive everything even in high power three-phase products.

top

AN001

Abstract
More than a DSP
Communication
Topologies