fast orbit feedback - bpm to ps
DESCRIPTION
Fast Orbit Feedback - BPM to PS. Yuke Tian Control Group, Accelerator Division Photon Sciences Directory Brookhaven National Lab. EPICS Collaboration Meeting, BNL, 2010. Outline. NSLS-II orbit feedback system requirements Fast orbit feedback system architecture - PowerPoint PPT PresentationTRANSCRIPT
Fast Orbit Feedback - BPM to PS
Yuke Tian
Control Group, Accelerator Division
Photon Sciences Directory
Brookhaven National Lab
EPICS Collaboration Meeting, BNL, 2010
Outline
• NSLS-II orbit feedback system requirements• Fast orbit feedback system architecture
• Overall architecture• BPM FOFB data measurement• BPM FOFB data delivery – fiber SDI link• FOFB calculation – compensation for each eigenmode• Corrector setpoints to power supply system
• Progress • Summary
EPICS Collaboration Meeting, BNL, 2010
NSLS-II orbit feedback system requirement
Energy 3.0 GeVCircumference 792 mNumber of Periods 30 DBALength Long Straights 6.6 & 9.3mEmittance (h,v) <1nm, 0.008nmMomentum Compaction .00037Dipole Bend Radius 25mEnergy Loss per Turn <2MeV
Energy Spread 0.094%RF Frequency 500 MHzHarmonic Number 1320RF Bucket Height >2.5%RMS Bunch Length 15ps-30psAverage Current 300ma (500ma)Current per Bunch 0.5maCharge per Bunch 1.2nCTouschek Lifetime >3hrs
NSLS-II technical Requirements & Specifications
EPICS Collaboration Meeting, BNL, 2010
NSLS-II orbit feedback system requirement
Long ID Short IDDispersionRegion
Lattice function for one cell
EPICS Collaboration Meeting, BNL, 2010
NSLS-II orbit feedback system requirement
5
,,
'
'
105/
1.0
1.0'1.0
1.0'1.0
pp
yy
xx
yxyx
yy
xx
my 3In short insertion, , hence must hold orbit stable to m3.0Orbit stability requirements can be met using orbit feedback.
EPICS Collaboration Meeting, BNL, 2010
NSLS-II orbit stability requirement
NSLS-II orbit feedback system requirement
Long term - Years/MonthsGround movementSeason changes
Medium - Days/HoursSun and MoonDay-night variations (thermal)Rivers, rain, water table, windSynchrotron radiationRefills and start-upSensor motionDrift of electronicsLocal machineryFilling patterns
Short - Minutes/SecondsGround vibrationsTraffic, Earth quakes Power suppliesInjectorsInsertion devicesAir conditioningRefrigerators/compressorsWater coolingBeam instabilities in general
Noises source need to be suppressed
EPICS Collaboration Meeting, BNL, 2010
NSLS-II orbit feedback system requirementTypical noises source frequency in light source
EPICS Collaboration Meeting, BNL, 2010
NSLS-II orbit feedback system requirementBeam motion from long term group motion
Floor motion around the ring. Maximum movement is 107 µm, and the RMS around the ring is 36 µm.
Electron beam motion (vertical) without feedback loop; maximum is 600 µm.
Lihua Yu
EPICS Collaboration Meeting, BNL, 2010
Orbit feedback system architectureOverall architecture: slow and fast correctors
EPICS Collaboration Meeting, BNL, 2010
Fast orbit feedback system in one cell
Orbit feedback system architecture
EPICS Collaboration Meeting, BNL, 2010
NSLS-II two tier device controller architecture
Orbit feedback system architecture
Cell 1
Cell 2
Cell 3
Cell 16
Cell 30
Cell 29
Storage Ring
Cell 15Cell 17
SDI linkSDI link
EPICS Collaboration Meeting, BNL, 2010
Orbit feedback system architecture
EPICS Collaboration Meeting, BNL, 2010
NSLS-II FOFB latency/bandwidth
● BPM group delay: less than 50 us (estimate)
● BPM data from 8 BPMs transferred to cell controller: 3.5us
● BPM data distribute among the storage ring 6us (12us if one link broken)
● FOFB calculation with separate mode compensation: 3.5us
● Set power supply by PS SDI link: 5.4 us (11us if one link broken)
● Fast corrector PS bandwidth (10 degree phase shift): 8KHz
● Corrector magnet/chamber bandwidth: 1KHz
(measured with Inconel beampipe, 10 degree phase shift)
BPM FOFB data measurement
Orbit feedback system architecture
EPICS Collaboration Meeting, BNL, 2010
Joseph Mead
BPM FOFB data measurement
Orbit feedback system architecture
EPICS Collaboration Meeting, BNL, 2010
Kiman Ha
BPM FOFB data delivery – fiber SDI link
Orbit feedback system architecture
EPICS Collaboration Meeting, BNL, 2010
Joseph De Long
FOFB calculation – compensation for each eigenmode
Orbit feedback system architecture
• Fast orbit feedback system is a typical multiple-input and multiple-output (MIMO) system. For NSLS-II, there are 240 BPMs and 90 fast correctors. Tranditional singular value decomponsition (SVD) based FOFB treats each eigenmode the same.
• The reality is, a MIMO system will have different frequency response for different eigenmode and thus it is desirable to design different compensation to each eigenmode.
• The challenge is to finish the large computation within the time budget of FOFB system.
• NSLS-II FOFB system takes advantage of our two-tier communication structure and the parallel computation capability of FPGA to do the compensation for each eigenmode in FPGA.
EPICS Collaboration Meeting, BNL, 2010
Orbit feedback system architecture
A simple SISO feedback system
Controller
C(z)
Plant
H(z)
)(tx )(ty
)()(1
)()(
)(
)(
zHzC
zHzC
zX
zY
EPICS Collaboration Meeting, BNL, 2010
Orbit feedback system architecture
Fast orbit feedback system algorithm (MIMO system)
Controller
R-1=VΣ-1UT
Accelerator
R=UΣVT
d
goldd
11 MxNxMxN dR
11
1 MxNxMNx dR
Compensator
(PID etc)
R: response matrix
R-1: reverse response matrix
FOFB baseline algorithm
Offline operation: kick each corrector measure all BPM and get response matrix R
calculate R-1 with SVD
(10KHz) operation: measure/distribute all BPM data calculate corrector setpoints
set correctors
EPICS Collaboration Meeting, BNL, 2010
Orbit feedback system architecture
FOFB baseline calculation
11
1 MxNxMNx dR 11
Mxrowii dR th
N
N
NTUVR
.
1....
1
1
,..., 2
1
2
1
2111
Each of the corrector setpoint is calculated from a 1xM vector and Mx1 vector multiplication. If 8 BPM/cell, M=240.
For each corrector plane
EPICS Collaboration Meeting, BNL, 2010
Orbit feedback system architecture Problems for baseline algorithm
The ill-conditioned response matrix will cause numerical instability Solution: 1) Truncated SVD (TSVD) regularization: sharp cut off 2) Tikhonov regularization
N
N
N
N
NTUVDR
.
1....
1
1
,..., 2
1
2
2
22
22
2
21
21
1
2111
11
1 MxNxMNx dR 11
Mxrowii dR th Each of the corrector setpoint is calculated from a 1xM vector and Mx1 vector
multiplication. If 8 BPM/cell in NSLS-II, M=240. Total: ~240 MAC.
For each corrector plane
EPICS Collaboration Meeting, BNL, 2010
Orbit feedback system architecture Problems for baseline algorithm
To suppress high frequency contribution to the integrated amplitude, it is desirable to compensate each mode in frequency domain . So far, all the FOFB has an assumption that each mode has the same frequency response (same bandwidth).
UT Accelerator
R=UΣVT
d
goldd
Qi(z-1)id V
EPICS Collaboration Meeting, BNL, 2010
Compensation for each eigenmode
Orbit feedback system architecture
dzqdUzqV
N
N
N
N
NT
.
)(
1....
1
1
,...,)( 2
1
1
2
2
22
22
2
21
21
1
2111
21
21
2
11
1
21
)(
.
)(
)(
,...,
dzQ
dzQ
dzQ
n
N
: Compensator for mode i. )( 1zQi
:eigentspace components of dd ii
d
Calculation with the compensation for each mode
EPICS Collaboration Meeting, BNL, 2010
Orbit feedback system architecture
1. Calculate the eigenvector components (d1,d2,…dN) for BPM displacement
Total calculation: 1xM vector times Mx1 vector. Do this N times (for each ). This is N times larger calculation than gain-only FOFB calculation. For NSLS-II, N=90. Total MAC: 240 * 90 = 21,600
2. For each , design compensation .
3. Output modes (V) times . 1xN vector times Nx1 vector.
Challenge: need to finish the calculation within a few microsecond.
FPGA is perfect for this task. It can carry out the calculation (Matrix calculation and DSP compensation) in parallel.
1)1( MxxMii dd i
id )( 1zQi
ii dzQ )( 1
1Mxd
Calculation with the compensation for each mode
EPICS Collaboration Meeting, BNL, 2010
Implementation of fast orbit feedback Calculation with the compensation for one mode
Dual
Port
RAM
Dual
Port
RAM
Dual
Port
RAM
MUX
X Compensation
(PID, Notch filter etc) +
From control system
From control system
Eigenvector
Eigenvector
Select Active
Eigenvector
BPM dataFrom SDI link
EPICS Collaboration Meeting, BNL, 2010
Implementation of fast orbit feedback
EPICS Collaboration Meeting, BNL, 2010
Single mode component compensation (floating point module)
Implementation of fast orbit feedback
EPICS Collaboration Meeting, BNL, 2010
Single mode component compensation (floating point module)
Simulated BPM data Simulated input matrix Single mode component
Single mode component with compensation
Implementation of fast orbit feedback
EPICS Collaboration Meeting, BNL, 2010
Single mode component compensation (compare fixed point and floating point module)
Implementation of fast orbit feedback
SystemGenerator: floating point with fixedx point
EPICS Collaboration Meeting, BNL, 2010
Implementation of fast orbit feedback
EPICS Collaboration Meeting, BNL, 2010
Single mode component compensation (compare FPGA fixed point and Matlab floating point calculation)
Calculation difference for single mode component
Calculation difference for single mode component with compensation
Implementation of fast orbit feedback
EPICS Collaboration Meeting, BNL, 2010
Single mode component compensation (FPGA hardware co-simulation and Matlab floating point calculation)
Implementation of fast orbit feedbackCompare FPGA hardware co-simulation results and Matlab floating point calculation
EPICS Collaboration Meeting, BNL, 2010
Implementation of fast orbit feedbackFlexible frequency compensation in FPGA for each eigenmode
EPICS Collaboration Meeting, BNL, 2010
60Hz notch filter 200KHz low path filter
Implementation of fast orbit feedback
Calculation for corrector setting (one plane)
One mode Total
Speed (240+12)*10 = 2520ns 2520 + (90+8)*10 =3500ns
Accuracy <10ppm <10ppm
BRAM Resource (Virtex5FX70)
1% of BRAM 33% of BRAM
DSP Resource Depend on the compensation design.
Need lots of DSP resource to compensate for all eigenmodes.
Virtext5 (Virtex 6) provides many DSP resources to achieve single mode
compensation requirement.
EPICS Collaboration Meeting, BNL, 2010
Corrector setpoint to power supply system
Orbit feedback system architecture
Master
(PSC master,
Cell controller)PSC PSC
PSC
PSC PSC
PSC PSCPSC PSC
PSC
TX RX TX RXTX RX TX RX
RX TX RX TXRX TX RX TX
RX TXRX TX RX TX
TX RXTX RX TX RX
Power supply SDI link
RX TX
TX RX
RX TX
TX RX TX RX
RX TX
TX RX
RX TX
EPICS Collaboration Meeting, BNL, 2010
Redundant 100Mbps link to deliver FOFB calculation results (corrector setpoints) to PSC
Dynamic ID assignment
Flexible package size
Simply cabling between PSCs and cell controller.
Progress
EPICS Collaboration Meeting, BNL, 2010
BPM – finished first revision
SFP for fiber SDI link
RF signal inputs
V5 FPGA
4 ADC channels
256MB DDR2
GigE to EPICS IOC
Progress
EPICS Collaboration Meeting, BNL, 2010
Cell Controller – finished first revision
SFP for fiber SDI link
V5 FPGA
256MB DDR2
16 isolated TTL inputs
12 50Ohm TTL outputs
4 analog outputs2 PS SDI links
GigE to EPICS IOC
Progress
EPICS Collaboration Meeting, BNL, 2010
Power supply controller – in production
1 = JTAG connectors – Programming to FPGA and CPLD.
2 = RS232 port – Communication to PC for diagnostic and software development.
3 = DDR2 memory modules – PS diagnostic data, CPU memory.
4 = SDI connectors – Communication between PSC master (or cell controller) and PSC slaves.
5 = Fiber transceiver – Communication with PSI.
6 = Ethernet connector – Communication to EPICS IOC for PSC master.
7 = FPGA (Spartan3A)
8 = CPLD(8a) & SPI memory(8b) – Dual boot and remote programming functions.
7a1
2
3
4
5
6
8a
8b
7
Progress
• BPM hardware (DFE and AFE) passed the first revision. The second revision is underway.
• Cell controller (DFE and IO board) passed the first revision. • BPM FOFB data measurement is tested with lab simulated data and real
beam data.• BPM FOFB data delivery (fiber SDI link) is tested. • FOFB calculation is tested. • Power supply SDI link is tested. • Power supply controller is in production.• We are working on the FOFB system integration. It includes integration
of BPM, cell controller and power supply controller units.
EPICS Collaboration Meeting, BNL, 2010
Summary
• NSLS-II tow tier structure provides fast and deterministic data transfer for BPM data (BPM to cell controller), and power supply setpoints (cell controller to power supply controller). Cell controller is the central data concentrator/generator that has all the necessary data for FOFB calculation and needs no extra data shuffling. All BPM and power supply data bits are put “on wire” once.
• NSLS-II FOFB is taking advantages of the two tier structure and the parallel computation capability of FPGA to implement a unique FOFB algorithm that can carry compensation for each eigenmode. NSLS-II will be the first facility to implement such FOFB approach.
• NSLS-II FOFB hardware, firmware and software design will be fully open to the community. For more hardware and firmware details, please go to tomorrow’s “Open Hardware Development Workshop”.
EPICS Collaboration Meeting, BNL, 2010