Proceedings of IBIC2012, Tsukuba, Japan

TUPA33

FAST ORBIT FEEDBACK CALCULATION IMPLEMENTATION FOR TPS
P. Leban, A.Bardorfer, Instrumentation Technologies, Solkan, Slovenia
K.T.Hsu, C.H.Kuo, NSRRC, Hsinchu, Taiwan
Abstract
Fast orbit feedback (FOFB) application is planned for
the Taiwan Photon Source (TPS) at storage ringcommissioning. Part of the application is transferred tothe beam position electronics which implements global
orbit position data concentration, its processing andactuating the magnet power supply controllers via opticallinks. The beam position electronics (Libera Brilliance+)
includes gigabit data exchange (GDX) modules withVirtex6 field programmable gate array. The feedback
calculation algorithm is based on the SVD – the PI
controller will be applied in the modal space forindividual eigenmodes. The calculation will be distributed
to all GDX modules to reduce overall latency. Each GDX
module will calculate either 4 vertical or 4 horizontal
magnet corrections.
This article presents details about the FOFB topology
and implementation in the GDX module.

The module contains Virtex6 field programmable gatearray (FPGA) with TPS custom-made FOFB application.
There is also 1 GB of DDR3 available as a circular buffer
for the fast data.

CONTROL TOPOLOGY
The Libera Brilliance+ instruments are daisy-chainedwith fibre optic or copper cables to form a single group of168 BPMs installed in 48 chassis (see Figure 2). Each
instrument runs the EPICS IOC and communicates overGbE network interface to the Control System. The FOFB
application runs in the FPGA in the GDX modules. FOFB
related parameters are controlled by Libera BASE,
running in the Libera Brilliance+.
ControlsystemTimingsystem
Libera Brilliance+

The TPS storage ring will use a 24-cell DBA lattice andwill have 24 straight sections for insertion devices, six ofthem 12 m-long and 18 of them 7 m-long. It will be a
combined-function magnets lattice structure with 10 nm
rad emittance and will be located in the inner tunnel of theTPS storage ring [1].
The Libera Brilliance+ instrument is a beam position
processor instrument used in the TPS. It provides wideand narrow bandwidth data paths with excellent
measurement and stability capabilities [2]. The fast orbit
feedback capability (FOFB) is provided by an extension
module – the Gigabit Data Exchange (GDX) module. TheGDX module is tightly connected with its neighbour
BPM and TIM modules and receives fast position data
streams over Low-voltage Differential Signalling (LVDS)
links to ensure low latency [3].

FOFB calculation

CPSC
Fastcorrector
magnets

Libera Brilliance+
FOFB calculation

CPSC
Fastcorrector
magnets

Libera Grouping loop

Figure 2: Global control topology.
There are 8 fast corrector magnets located in each of
the cells: 4 for the horizontal and 4 for the verticaldirection. Fast corrector magnets are controlled by aCorrector Power Supply Controller (CPSC) device whichfeatures 2 optical inputs (SFPs) and 8 analogue outputs(20 bit) [4]. Each cell contains 2 Libera Brilliance+
instruments with 3 or 4 BPM modules and 1 GDXmodule. One Libera Brilliance+ calculates and outputs thedata for one set of the fast corrector magnets only (either
horizontal or vertical). See Figure 2 for more details.

Figure 1: The Gigabit Data eXchange module.

ISBN 978-3-95450-119-9Feedbacks and Beam Stability

1c 2012 by the respective authors — cc Creative Commons Attribution 3.0 (CC BY 3.0)
Copyright ○SYSTEM OVERVIEWTUPA33

Proceedings of IBIC2012, Tsukuba, Japan
10 kHz data(from BPMs)
Horizontal fast
corrector setting (x4)4xFA data

CPSC

SFP 4

LiberaGrouping
Global orbit
data (P)

Vertical fast
corrector setting (x4)Goldenorbit (G)LiberaBrilliance+

Figure 2: Local control topology.

c 2012 by the respective authors — cc Creative Commons Attribution 3.0 (CC BY 3.0)
Copyright ○IMPLEMENTATIONThe source of the fast orbit feedback look is the beam
position data stream with 10 ksamples/second data rate.
The data stream is lead from the BPM modules overLVDS connections to the GDX module. The data content
after the data concentration includes horizontal andvertical positions (X, Y), SUM and status. The Libera
Grouping communicates with its neighbours over two
Small form-factor pluggable transceivers (SFPs) at 6.5
Gbps bitrate. It concentrates the source data from all
daisy-chained instruments and forms global orbit data.
The design includes a measurement of the time needed toconcentrate all BPM data. This time can be interpreted as
the Libera Grouping latency. The global orbit data packet
is then immediately output to a dedicated GbE link whichis configured for UDP/IP at 1 Gbps. Due to standard
protocols used, the orbit data stream can be received witha standard Windows or Linux based PC with compatible
network interface (GbE, support for jumbo frame).
Further down the matrix multiplication scheme (Figure4), the orbit data is compared to the golden orbit(reference orbit) and its diff enters the matrix
multiplication block. The transform matrix from orbit
reading to magnet correction is:.

.

.

LiberaGrouping

SFP 2

Global orbit output

SFP 1

Magnet control output-M= V . PI [ S.U.dP]

The global orbit data is present in each GDX moduleand can be output via UDP/IP as a data stream.

=SFP 3(1)

The position delta (dP) is first multiplied with almost
diagonal matrix of singular values (S-1.UT) whichtransforms the data from BPM to eigenmode space. The
PI controllers are applied to the multiplication result. In
the end, multiplication with the V matrix transforms thedata from the eigenmode space to the corrector magnet
space and selects which magnet correction is sent to theoutput.
The multiplication scheme is flexible in terms of thenumber of BPMs, magnets and eigenmodes. It can output
corrections for all magnets or just for local ones. The
selection is done with a dedicated filter which in the end
equips data packets with corresponding magnet IDs. The
magnet correction output is sent through the SFP1, whichis configured for AURORA at 2.5 Gbps.

FOFB
control

Figure 4: Implementation scheme.
Such approach requires several multiplications of bigmatrices (up to 128 x 256) but it is designed to do all
multiplications in parallel. This was done to reduce thecalculation to minimum possible extent. It is estimatedthat the calculation latency is 2 µs at maximum number ofelements and approximately 1.5 µs for the TPS storage
ring configuration (96 x 168).
The multipliers used are 18 x 25 bits. The designcontains several checkpoints that detect saturation after
critical multiplication steps. Whenever necessary, bitwidth is narrowed to fit multipliers.
Control over matrices is fully supported by the EPICS
IOC as well as all the parameter settings.

PRELIMINARY RESULTS ANDOUTLOOKThe main driver of the implementation in the FPGA
was the overall latency, which consists of a Libera
Grouping latency and FOFB calculation latency as thetwo main contributors. The Libera Grouping latency waspushed to the limits with the use of 6.5 Gbps bitrate in theSFPs and optimization of the Libera Grouping block.
Preliminary tests show the Libera Grouping latency ofabout 50 ns per BPM (not including transmission timeover cables around the storage ring). The matrix
multiplication block was optimized for the XC6VLX240Tchip. Its 768 DSP48E1 slices allow multiplications inparallel thus reducing the calculation latency to minimum(below 2 µs).
Additional reduction of the overall latency wasachieved by calculating a single direction per GDX(horizontal or vertical). This reduction is almost
negligible compared to the overall latency, however.
First installation at NSRRC will be done in October
2012 and will include software and FPGA upgrade of theISBN 978-3-95450-119-9
2Feedbacks and Beam Stability

Proceedings of IBIC2012, Tsukuba, Japan
Libera Brilliance+ instruments. Beam tests are foreseen in
the existing TLS booster ring. Besides the generalconfiguration and test of the Libera Grouping
functionality, the compatibility test with the CPSC will beperformed. Fine tuning will be done on-site withadjustment of bit cutting, to allow for optimal use ofmultipliers’ dynamic range, transform-matrix-elements
normalization and fitting the calculated values tocorrector magnets.

TUPA33Preliminary tests showed excellent results for the overalllatency and the system will be tested on a larger scale
during Autumn/Winter 2012.
Installation and system integration of the TPS
accelerator systems is scheduled in 2013. Commissioning
will be performed in 2014. FOFB is planned to test at
early commissioning phase. Operational FOFB is
expected from day one of user service.

REFERENCES

ISBN 978-3-95450-119-9
Feedbacks and Beam Stability

3c 2012 by the respective authors — cc Creative Commons Attribution 3.0 (CC BY 3.0)
Copyright ○CONCLUSION
The FOFB implementation has been customized
specifically for the TPS. The decision for the highperformance Virtex6 chip was correct because it offersflexibility in the design and high performance operation.

[1] TPS Design Handbook, version 16, June 2009.
[2] Libera Brilliance+ documentation, http://www.itech.si[3] GDX Module Specifications, http://www.i-tech.si[4] CPSC module Specifications, http://www.d-tacq.com