Distributed Power Supply Control for SSRF
Jinhong Zhang, Tianjian Shen, SINR, China
Abstract
The project of SSRF (Shanghai Synchrotron RadiationFacility) will be started at the end of 2000[1]. Now it is in
the stage of R&D. There are more than 600 magnet power
supplies distributed along the storage ring. To control
such a large number of magnet power supplies, it’s very
important to construct a kind of power supply control
system with high reliability, good speed and also low cost.
After discussion, we decide to design a distributed power
supply control system based on CAN-Bus. The magnet
power supply controller is composed of an INTEL
80C196KC microprocessor and a PHILIPS 82C200
CAN-Bus interface. It contains 8 bits digital I/O and 4channels analogue I/O. 16 bit DAC and 16 bit ADC areboth selected here. Every digital and analogue I/O for
power supply control is optically isolated from the CPU
and bus section. The microprocessor receives commands
from the upper control computer via CAN-Bus, and thensends signals to the magnet power supply. And it can also
take the information from the magnet power supply andpass on to the upper control computer in case ofnecessity.

1 Introduction
The SSRF is an advanced third generation synchrotron
radiation light source including the linac accelerator, thebooster, the transport line and the storage ring. It will
work at 3.5GeV to serve the synchrotron radiation
experiments. According to the requirements, thedistributed control system that has been widely used in
the world will be adopted in the SSRF. The whole control
system has three levels: the central control layer, thesubprocessing layer and the device control layer. In thedevice control layer, the Fieldbus will be chosen for data
communication between devices and upper control
computer. For the distributed power supply control
system, we want to use CAN-Bus. This has the following
advantage [2]:U High reliability. All of the digital and analogue signals
are handled right at the power supply controller. And
no analogue signals are sent over long wire.
U M ulti-master capability. Every controller can send themessage to CAN-Bus immediately if necessary. TheCSMA/AMP protocol is on silicon.
U G ood speed. The maximum speed is 1Mbit/s at a 40m
bus length (According to the ISO11898 standard).
U T he low cost for controlling per power supply can beachieved. We will use the shielded twisted pair cableto save cost.
U T he CAN-Bus is an ISO defined serial communicationbus. Compared with the parallel bus, it’s easier toinstall and maintain.
And now we are developing the power supply interface
controller module.

2 Architecture
The distributed power supply control system that is basedon CAN-Bus belongs to the device control layer [SeeFig.1]. And Ethernet (100Mbps) is chosen as the control
LAN in the subprocessing layer. This two level controllayers are connected by the personal computer or VME(upper control computer) which has the adaptors for
Ethernet and CAN. So the Console and File Server
computer can communicate with the magnet powersupplies. The commands from the console can be sent to
the magnet power supplies and the data messages fromthe magnet power supplies can also be sent to the consoleand file server. All of the real-time tasks will run on thecontroller that is plugged into the magnet power supplyand links to the CAN-Bus. Only the commands,
configuration messages and some necessary information
will be sent via the CAN-Bus.

3 Controller
3.1 Hardware Configuration
The distributed power supply control system can support
about 100 power supply controllers on one CAN-Bussegment. A functional diagram of the controller is shownin Figure 2. It is based on an INTEL 80C196KC
microprocessor, a PHILIPS 82C200 CAN controller and aPHILIPS 82C250 transceiver. The INTEL 80C196KC
microprocessor is used to control the magnet power
supply and handle the communication with the upper
control computer. It provides a Watch-dog timer facility

ConsoleConsoleFileServerEthernetPC

PC or VMEU U UCAN-Bus

Fieldbus

U U U

U U UController

Controller

Magnet PS

Magnet PS

DeviceDeviceFigure 1: The device layer control system architecture
CAN-Bus
Isolated

PHILIPS
82C250Digital

Opto

UVRAM

RAM+/-15 Volts

Coupler

PHILIPS

Power Supply

INTEL

Opto

16 BitCouplers

ADC

Opto
Coupler

Input

Analogue
Input

Analogue
82C20080C196KC

Opto

16 BitCouplers

DAC

Isolated
5 Volts PS

OutputDigital
EPROM

OutputFigure 2: Functional Block Diagram of the power supply controller
for recovering the system from the dead-lock problem.
PHILIPS 82C200 and 82C250 deal with the works relatedwith CAN-Bus such as receiving or transmitting data. The
NVRAM (non-volatile RAM) is used to store theconfiguration parameters and some important message.
Since the power supply controllers are to be used without
any change for all types of magnet power supplies, thenumber of the digital I/O and analogue I/O should beflexible. So we make every controller contain 8 bits
digital I/O and 4 channels analogue I/O. In order to fulfill
the demand of high accuracy, 16 bit DAC and 16 bit ADC
are both selected here. At the same time, each digital andanalogue I/O is optically isolated from the CPU andCAN-Bus section. The power supply status is indicatedby LEDs.

3.2 Communication Protocol
The communication protocol mainly depends on theselected CAN controller, PHILIPS 82C200, which fully
meets CAN specification 2.0A. Its message frame format
is shown in Figure 3. The identifier field contains 11 bits
and is used for determining its bus access priority. The
priority is defined to be the highest for the smallest binary
value of the identifier. And the allocation of priorities tomessage makes CAN-Bus particularly attractive for useArbitration Field

ControlField

11 bit IDENTIFIERSOFDLC

Data Field

0~8 Bytes

CRCField

ACK

EOFIntBus Idle

15 bit CRC

RTR R1 R0

Figure 3Message Frame Format

within a real-time control environment. The identifier
format is shown in Table 1. Bits 2~0 of the identifier fielddefine the message type (See Table 2). The broadcast
frame can be received by all of the CAN controllers
which are on the same CAN-Bus. In the data field, thefirst byte defines the destination address.
Bit #109~3
2~0Usage
Undefined
Source addressMessage type

Table 1CAN-Bus Identifier Format

bit2101100

10011110XX1010Definition
Single-frame broadcastSingle-frame
Unfinished Multi-framebroadcastThe Last Multi-frame broadcastUnfinished Multi-frame
The Last Multi-frame

Table 2Message Type Definition
The application-layer protocol is still being
developed now. On power up, the upper control computerthat has an adaptor for CAN will send the configuration
parameters to the power supply controller through CANBus. From then on, every controller will send its data
message to the upper control computer per second. The
data message may include the controller status, the DAC
values and the ADC values. The controller will keep thepower supply in a well-defined status, and run thediagnostic routine to check itself. If the error is fatal, themagnet supply controller will be shut off by itself or by
the upper control computer.

4 Conclusion
The SSRF has just been in the stage of R&D. We aredesigning and developing the power supply control
system now. Although we still have not finallydetermined which kind of Fieldbus will be adopted for
SSRF, there is no doubt that CAN-Bus is one of theexcellent candidates, and this kind of distributed power
supply control system will be one of the good solutions.

5 REFERENCES[1] “Conceptual Design Report (Draft) of SSRF”, SSRF
Working Group, September 1996.
[2] M.Clausen, “CAN & EPICS”, ICALEPCS’97,
November 3~7 1997.