# Presentation: 049619

## Fast Orbit Feedback (FOFB)at Diamond

- Guenther Rehm,
- Head of Diagnostics Group

- FOFB at Diamond

- 29/06/2007

## Ground, Girder and Beam Motion

- FOFB at Diamond

- 29/06/2007

## Fast Feedback Design Philosophy

- Low latency:
- Ensures high bandwidth for feedback, good suppression
- Major contribution to latency should be unavoidable group delays of filters
- Robust:
- FOFB has to perform with components failed
- Try to avoid single point of failure
- Accessible for maintenance / development:
- Have only what is necessary inside the FPGA
- Implement feedback algorithm on PowerPC boards
- Truly global:
- No slow orbit feedback to run in parallel
- RF frequency correction also to be calculated

- FOFB at Diamond

- 29/06/2007

## Measurement Resolution

| Type | Application | Rate | BW | RMS X | RMS Y |
| --- | --- | --- | --- | --- | --- |
| Slow Acq. | Slow orbit feedback, response matrix measurement | 10 Hz | 4 Hz | 45 nm | 45 nm |
| Fast Acq. | Fast orbit feedback | 10 kHz | 2 kHz | 140 nm | 190 nm |
| Turn-by-turn | Tune measurement, betatron amplitude and phase | 534 kHz | 267 kHz | 1.5 μm | 3 μm |

- All values are typical for RMS of 10000 samples in lab tests

- FOFB at Diamond

- 29/06/2007

## FOFB Overview

- Libera EBPM produces FA data 10072 S/s (2 kHz 3dB bandwidth)
- RocketIO on Libera sends and forwards data at 2.12 Gbit/s using in house developed “Communication Controller”
- Communication is broadcast, no routing information
- PMC card with RocketIO receives data and transfers via DMA to CPU memory
- Dedicated CPU board (1GHz PowerPC MVME5500) performs matrix multiplication and feedback controller
- Resulting corrector PS values are written through VME into PS controller

- FOFB at Diamond

- 29/06/2007

## Fast Orbit Feedback

- Processor

- Controls Network

- PS VME crate

- eBPM

- eBPM

- eBPM

- eBPM

- eBPM

- eBPM

- eBPM

- Cell -m

- Cell -n

- Cell +n

- Cell +m

- 14 Corrector PSUs

- PSU 1

- PSU 14

- PSU IF

- ...

- Event Network

- FB Processor

- PMC Rocket IO

- Processor

- Diagnostics VME crate

- Event Rx

- PSU IF

- FOFB at Diamond

- 29/06/2007

## FOFB Installation (one of 24 cells)

- Power supply
- VME crate

- Corrector
- power supplies

- Diagnostics rack

- FOFB at Diamond

- 29/06/2007

## FOFB connections

- SC/MC/Trigger/PM fan out

- Galvanic SFP connections

- Multi mode fibre to PS rack

- Single mode fibre to other CIAs

- FOFB at Diamond

- 29/06/2007

## PMC interface to FOFB network

- FOFB at Diamond

- 29/06/2007

## Global Connections of FOFB

- FOFB at Diamond

- 29/06/2007

## FOFB Latencies / Bandwidth

- Group delay of FIR: 			148 μs
- Group delay of 2 IIR:			<71 μs
- Distribution of data around ring:        	  50 μs
- DMA transfer to CPU:                      	  49 μs
- Conversion integer to float :              	    5 μs
- Matrix multiplication 2*7*168:		    4 μs
- PID controller:				    1 μs
- Write into PS controller: 			    3 μs
- Total:				         <331 μs
- Magnet/chamber estimated to have 500 Hz BW
- Bandwidth of PS controller currently limits loop (set to 100Hz, but programmable)

- calculated

- measured

- FOFB at Diamond

- 29/06/2007

## FOFB Performance

- 60mA

- Suppression
- of beam motion

- FOFB at Diamond

- 29/06/2007

## FOFB Performance on XBPM

- FOFB at Diamond

- 29/06/2007

## Measured PSD

- FOFB at Diamond

- 29/06/2007

## Ring PSD

- FOFB at Diamond

- 29/06/2007

## Model Gain

- FOFB at Diamond

- 29/06/2007

## FOFB vs SOFB

- With FOFB on
- RMS orbit
- stays <50nm

- SOFB not fast enough to
- correct distortions introduced
- by ID movement, RMS
- orbit sometimes > 5um

- 1um

- 100nm

- 10nm

- 10um

- Orbit RMS

- FOFB at Diamond

- 29/06/2007

## Integrated position noise

- 125mA, 2/3 fill, lab test

- FOFB at Diamond

- 29/06/2007

## Libera Tuning

- Libera is a complex system with many clocks interacting
- Clocks and ratios can be adjusted or routed from different sources
- Some things can be done purely in software (e.g. FIR and IIR filters in FA data processing), others require FPGA changes (e.g. sync switching with external MC)
- Instrumentation Technologies take experience and solutions from Diamond on board, if slowly

- FOFB at Diamond

- 29/06/2007

## FIR filter improvement

- FA sampling
- frequency

- FA Nyquist
- frequency

- FOFB at Diamond

- 29/06/2007

## Total filter response (FIR+IIRs)

- FOFB at Diamond

- 29/06/2007

## Switch Delay Optimisation

- FOFB at Diamond

- 29/06/2007

## BCD and ? on XBPMs

- FOFB at Diamond

- 29/06/2007

## BCD with “real” beam

- Measured on 48 primary EBPMs

- FOFB at Diamond

- 29/06/2007

## BCD with phase shift of one input

- FOFB at Diamond

- 29/06/2007

## Cable Length Differences

- FOFB at Diamond

- 29/06/2007

## Synchronisation of FA data

- All Liberas have to produce FA data synchronously
- As FA is decimated from sample clock, all sample clocks need to be same frequency and decimation needs to be aligned
- Sample clocks are locked to externally supplied revolution clock using software daemon (lmtd)
- Synchronisation is achieved by announcing through control interface and supply a single start trigger on trigger input.
- Same method is used to start output (and time frame counter) of FA data on fast network synchronously

- FOFB at Diamond

- 29/06/2007

## Python Synchronisation Script

- commands to all
- 24 event receivers

- commands to all
- 168 EBPMs

- FOFB at Diamond

- 29/06/2007

## Starting and Stopping FOFB

- Calculations run distributed on 24 CPUs
- Synchronous starting / stopping is essential as otherwise correction is applied on part of correctors for some time
- All feedback CPUs communicate status (stopped, ready, running) through fast network
- When **all** are ready, feedback starts on next cycle
- When **any **is stopped, all stop on next cycle
- Stopping can be caused by:
- command
- out of limits for total corrector current
- out of limits for corrector current step (around 2 s average)
- out of limits for beam position

- FOFB at Diamond

- 29/06/2007

## Calculating a Pseudo Inverse Response Matrix

- In principle, Diamond has 168 EBPMs and 168 correctors each plane, so decoupled response matrices are 168x168
- Square matrices could be directly inverted
- However, system should also work with fewer EBPMs or correctors
- Use singular value decomposition for pseudo inversion
- Orbit motion can then be transformed into “mode space”

- FOFB at Diamond

- 29/06/2007

## Response Matrix Eigen Values

- FOFB at Diamond

- 29/06/2007

## Orbit Motion in Mode Space

- dB

- FOFB at Diamond

- 29/06/2007

## Inversion and Conditioning

- FOFB at Diamond

- 29/06/2007

## Summary

- Libera integrates well into a FOFB system
- Communication Controller performs reliably and without additional hardware
- Feedback calculations on CPU have been relatively easy to commission
- Effective suppression of orbit motion demonstrated
- Running in user mode since 22 July

- FOFB at Diamond

- 29/06/2007

## Acknowledgements

- Diagnostics: Alun Morgan, Graham Cook
- Controls: Michael Abbott, Isa Uzun,James Rowland, Mark Heron
- Accelerator Physics: Ian Martin, Riccardo Bartolini
- External: Stephen Duncan (OU), Andrej Terebilo (SLAC), Leo Breuss (SCS)

- FOFB at Diamond

- 29/06/2007