# Presentation: 000291

## PSI digital power supply controller

- T. Korhonen
- Credits & contact persons:
- EPICS interface, drivers:Andreas Luedeke (andreas.luedeke@psi.ch)
- Power supply controller: Felix Jenni (felix.jenni@psi.ch) & the PSI Power Supply group
- PS-link Industry Pack design:Guido Janser (guido.janser@psi.ch)
- Fast Orbit feedback: Thomas Schilcher et.al. (thomas.schilcher@psi.ch)

## Contents

- Introduction to “digital regulated power supplies”
- Controllers and control link
- Particularities of the EPICS Interface
- Applications at PSI and elsewhere

## Introduction: “Digital Regulation”

- Regulation by “pulse width modulation” (PWM)
- Digital “set-value” (switch U0 *on* or *off *)
- No analogue outputs (for control), regulation quality determined by system bandwidth (switch & control loop performance)

## Introduction: Digital PS Controller

- The PSI type “digital” controller
- To be built into power supply
- FPGA to generate PWM signal
- DSP to run 50 *kHz* regulation loop
- Fast optical fibre + RS232 service IF
- ADC card for digitizing output-current
- Two ADC 16 *bit,* 50 *kHz*
- High-precision voltage reference

## PS controller structure

- 1) DSP for the feedback control loop
- 2) FPGA to generate the PWM switching pulses
- 3) Control system interface (optical link): POF, 5 MHz
- 4) Service PC interface: full control of the power supply/controller card with a service program, used in commissioning and debugging
- The controller software has to be parameterized for each load (=magnet): impedance, inductance, max. current, etc. Done when commissioning the power supply (transparent to control system.)

- 1

- 2

- 3

- 4

## Controller ADC Card

- 2x precise 2-channel ADC with high stability voltage reference
- 4 channels less precise ADC
- 2 x DAC for utility (debugging) purposes

## VME Hardware

- Industry Pack Carrier
- VME64x 4 slot boards
- “off-the-shelf”:
-  Greenspring
-   Vipc664
-  Hytec 8002
- Carriers available
- for many different
- busses (PCI, ...)

- VME64x
- Transition module
- for 8 PS
- (optolink drivers)

- IP Module for 2 PS

## Link operation

- The IP module has (for each PS):
- -6 register groups (3*16 bit) for communicating with the PS
- High-priority write (**fast feedback**, etc.)
- Write (setpoint)
- Read (current, etc.)
- Waveform write
- Waveform read
- FPGA status (error handling)
- Concurrent access automatically prioritized (order as above)
- -2-byte status register
- Link presence/absence is automatically detected
- -IRQ vector register

- Communication registers are write-sensitive:
- Writing to these registers (lowest word) triggers a communication cycle
- -Communication is handled by FPGA: serial protocol is transparent to the card.
- -response from PSC appears automatically in the registers (signaled by an interrupt)

## Link protocol & performance

- -Communication frame (command + data), 66 bits
- 	command (8 bits), address (8 bits), data(32 bits)
- 	“overhead”: start, stop, parity bits (6*3 = 18 bits)
- -13 us for pure transfer at 5 MHz
- 	transfer rate limited to 10 kHz in firmware
- 	one data request cycle takes about 60 us (request + reply)

## EPICS Interface: Scope

- A power supply an “intelligent device”
- Freely programmable: RAM & flash memory
- Sending and receiving waveforms
- Communication via 256 read/write registers (attributes)
- Reacts to trigger inputs and digital I/O
- Each PS has an unique ID (PSI convention)
- Fast interface
- 5 MHz optical fibre link
- Extra trigger input

## EPICS Interface: Features

- Serializes record access to the IP registers
- Reading and writing of parameters & status
- Waveform (ramp) download & upload
- Enhanced fault diagnostics
- Currently 135 different error messages from PS
- Check of Controller ID  cabling ok?
- Detailed link communication diagnostics
- Allow for parallel VME bus access

## EPICS Interface: Device / Driver

- ~400 functions

-  read
- task

-   write
- task

-   down
- load

-  up
- load

- VME

- PS Controller

- VME_IO:
- #C$(*card*) S$(*slot*)
- @$(*link*)$(*function*)

- “high priority write”
- register, used by fast orbit feedback

## Applications at PSI

- About 600 magnet power supplies at SLS
- Ring dipole PS: 440 *kW*, 15 *ppm* stability
- Booster dipole PS: 1 *MW*, 10 *ppm*, DC+3 *Hz*
- Correctors: 1 *kHz* BW, +18 *bits, 4 kHz setpoints*
- Planned to use some for the SLS RF plants
- PSI proton cyclotron facilities will replace old magnet power supplies with digital ones

## Application in Fast Orbit Feedback

- “high priority write”
- register, used by fast orbit feedback

## Applications at PSI

- In PSI Proton Cyclotron, an intelligent IP carrier board (Hytec8003) is used
- The board communicates autonomously with the PS (up to 6 PS/carrier plus interlock channels)
- Monitors the operating conditions and current; generates an interlock if problems detected (2 mA proton beam!)
- Reduces IOC load, faster response, simpler interface to the control system

## Applications elsewhere

- Diamond will have ~1500 digital PS
- PSI facility license fee: manufacturer can use hard- and software for Diamond orders
- Several PS manufacturer bought PSI license
- Just ask your favourite PS manufacturer