Proceedings of IBIC2012, Tsukuba, Japan

MOPA34

IMPROVEMENT OF HARDWARE AND SOFTWARE SETUP FOR THE
ACQUISITION AND PROCESSING OF SIAM PHOTON SOURCEBPM SIGNAL
N. Suradet, S. Klinkhieo, P. Sudmuang, S. Krainara, C. Preecha, S. Boonsuya, P. Klysubun
SLRI, 111 University Avenue, Muang District, Nakhon Ratchasima, 30000, Thailand
Data acquisition and processing system has beendeveloped for the Siam Photon Source (SPS) storage ring
BPM system in order to improve monitoring and logging
performances. BPM readout, i.e. scanning of BPM
electrode voltage outputs and subsequently converting to
X-Y position values, is now performed by an upgraded
Programmable Logic Controller (PLC) with higher bit
resolution (16-bit) analog-to-digital converter (ADC).
Moving averaging is then performed on the obtained
BPM data utilizing a LabVIEW code to reduce
background noise during on-line measurement. All data isthen stored on a dedicated computer serving as a central
data logging system, which can be remotely accessed via
a network communication link. In this report, details of
the new setup will be presented, and comparison will bemade between the performance of the new and previous
setups, together with suggestions on furtherimprovements.

INTRODUCTION
The Siam Photon Source (SPS) is the first synchrotron
light source of Thailand. The accelerator complex consistsof a 40 MeV electron linac, a 1.0-GeV injector and a 1.2
GeV electron storage ring, the configuration of which isbased on a four-fold symmetric double bend achromat(DBA) lattice. [1-3] In recent years, the demand for betterbeam position stability has continually increased. Toaddress this issue, the machine group has undertaken anumber of coordinated efforts, for e.g., improving sensor
systems in the storage ring, stabilizing ambient andcooling water temperatures, improving the diagnostic
beamline setup, developing a slow orbit feedback system,
among others. One of the most important tasks in thisundertaking is undoubtedly the improvement of the orbit
measurement and monitoring systems.
The improved SPS storage ring BPM system has
provided the machine group with the possibility to
improve the beam quality by providing accurate andreliable reading, assisting the group in making correct
analyses. The new logging and retrieval systems also help
making the correlation between the monitored beam
fluctuation and any machine parameters easier. It is also avital part of the slow orbit feedback system, which had
not been possible to implement since the machine
produced its first synchrotron light. [4, 5]. This report
describes the improvement of BPM data acquisition andprocessing system, the development of a new logging
system, along with the upgraded hardware and software
configurations. The measurement results before and after
the improvement will be presented and discussed.

HARDWARE CONFIGURATION
Figure 1 shows a schematic block diagram of thedeveloped BPM signal processing for the SPS storagering. The BPM electrode signals processed by the BPM
electronic modules are passed to the programmable logiccontrollers (PLC). Signal averaging and data logging arethen performed by two dedicated computer servers.

BPM System
BPM pickups are installed in 20 locations next to thequadrupole magnets along the 81.3 meters long
circumference of the SPS storage ring. Each BPM block
consists of four electrodes. Raw signals from theelectrodes will be sent to the BPM electronic modules
where they are processed to provide horizontal (X) andvertical (Y) beam position outputs, simultaneously [4, 5].

Programmable Logic Control
The PLC has to accomplish several tasks. First, theoutput signals from BPM electronic modules areconverted by a new 16-bit ADC (Allen Bradley 1756IF6I) in the PLC’s module at 40 Hz sampling frequency.
The X-Y beam positions are calculated and subsequently
fed into the PC-Average and PC-Logger computers. All
PLC and BPM modules, as well as all electronic devices
for data acquisition are installed in the same rack, situatedjust outside the storage ring in the experimental hall area.

Computers
The two processing computers are located in themachine control room. The data processing server (PCAverage) and the data acquisition server (PC-Logger) areconnected to each other via a LAN network.

SOFTWARE CONFIGURATIONAs mention in the previous section, the softwaredevelopment and implementation are divided into twoparts: (i) the data processing (moving average) part on
PC-Average computer, and (ii) the data acquisition (datalogging) part on PC-Logger computer.

ISBN 978-3-95450-119-9
Data Acquisition Techniques

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

MOPA34

Proceedings of IBIC2012, Tsukuba, Japan
MX-BPM

BPM
A

B
X

D

C

PC-Average

PLC

A

A

A

A

A

B

B

B

B

B

CCCC

D

D

D

DX

X

Output
4 Ch. Sampling Time: 10 kHz
1 Ch. Sampling Time: 2.5 kHz

4 Electrodes

Y

Y

C
Input
Sampling Time: 40 Hz
Resolution: 16 bits, 0 to 10 VDC
OutputSampling Time: 10 Hz

DX

X

Y

Y

Input
Sampling Time: 10 Hz
OutputMoving Average 40 data
Average Sampling: 10 HzX

Y

PC-LoggerA
B
CDX

Log Rate: 5 seconds: 1 second (temporary)
Format: CSVYXYFigure 1: Schematic block diagram of BPM signal acquisition and processing system.
The BPM signal processing codes are developed by themachine group based on Microsoft Windows platform andLabVIEW programming development environment.

c 2012 by the respective authors — cc Creative Commons Attribution 3.0 (CC BY 3.0)
Copyright ○Moving Averaging
Moving averaging is a basic and useful tool for
reducing background noise on a real-time measurement. Itis commonly used with time series data to smoothen out
short term fluctuations by averaging a number of points
from the input signal. More specifically, it is described as:y[i ]The PC-Logger computer manages most of the datatransfer from the PLC and PC-Average computer via an
OPC server and NI shared variable protocols. The logging
process is executed every 5 sec. The logged data is thenwritten to the database in a comma separated value (CSV)
file format (Figure 3).

1 M 1¦ x[i  j ]M j0

where x is the input signal, y is the output signal, i is theoutput index and M is the number of points used in theaveraging. In our case, M=40, and the sampling interval
is 100 ms (Figure 2).
The sampling interval of 100 ms (0.1 s) is sufficient toprovide the orbit position control with an on-line data.
The feedback control loop in the SPS orbit feedback
system just amounts to 10 s [5].
40 Samplings

100 msData Logging

100 ms...

100 ms

100 msFigure 3: The LabVIEW-GUI of SPS data logger system.
The PC-Logger computer used for data logging is an
HP Proliant ML350 G4 with Intel Xeon 3.2 GHz/800
MHz FSB/1 MB L2 cache, 1 GB of memory, and 72 GBSCSI hard disk drive with RAID1 (mirror), serving as acentral data logging system. It can be remotely accessed
via a network communication link.

100 msData fromADC...

Average (T0-200 ms)
Average (T0-100 ms)

MEASUREMENT RESULTS

Average (T0)
Average (T0+100 ms)

T0-3900 (ms)T0-3800 (ms)T0-200 (ms)T0-100 (ms)

T0

Time

Figure 2: Moving averaging diagram.

T0+100 (ms)Figures 4 and 5 compare the X and Y orbit positions
with and without moving averaging during beam position
scan. The fluctuation (noise) of the X and Y orbit
measurements without signal moving average was ratherlarge (Figs. 4(a) and 5(a)). The fluctuation was reduced
from more than 10 Pm down to about 3 Pm with themoving averaging (Figs. 4(b) and 5(b)).

ISBN 978-3-95450-119-9
2

Data Acquisition Techniques

Proceedings of IBIC2012, Tsukuba, Japan

MOPA34(a)(b)

Figure 7: The standard deviations of the Y orbit positions
with and without moving averaging.

(a)

(b)

CONCLUSION
The new acquisition and processing system at the Siam
Photon Source has been developed to improve thefunctionality of the storage ring BPM system. Major
upgrades on both the hardware and software have been
undertaken. The system architecture and design isstraightforward, resulting in short development time, butpossess excellent flexibility, expandability, andmaintainability. The system has been successfully
implemented along with the orbit feedback system in thebeginning of 2012. The results show significant
improvement of the BPM system performance.

ACKNOWLEDGMENT
The authors wish to thank all members of Accelerator
Technology Division for their devoted contribution andsupport.
Figure 5: Y orbit fluctuation with and without moving
averaging during beam position scan.
Figures 6 and 7 show the standard deviations of X andY orbit positions obtained from all the BPMs with andwithout moving averaging. The filled and open bars
correspond to the standard deviations of the BPM
readings with and without moving averaging,respectively. The results show that the moving averaged
data provides good real-time orbit performances with 10
Hz refresh rate, with the level of signal fluctuation
reduced to approximately one-tenth of that of the raw
signal.

REFERENCES[1] S. Rujirawat et al., “Improvement of the SPS Machine
Performance”, APAC’04.
[2] P. Klysubun et al., “Operation and Recent Developments atthe Siam Photon Source”, APAC’07, Indore, February
2007, p. 607.
[3] P. Klysubun et al., “Operation and Improvement of theSiam Photon Source”, Nucl. Instrum. Meth. A 582 (2007)
18.
[4] S. Klinkhieo et al., “Improvement of BPM system at SiamPhoton Source” IPAC’12.
[5] S. Klinkhieo et al., “Commissioning Results of Slow Orbit
Feedback using PID Controller Method for Siam PhotonSource” IPAC’12.

Figure 6: The standard deviations of the X orbit positions
with and without moving averaging.

ISBN 978-3-95450-119-9
Data Acquisition Techniques

3c 2012 by the respective authors — cc Creative Commons Attribution 3.0 (CC BY 3.0)
Copyright ○Figure 4: X orbit fluctuation with and without moving
averaging during beam position scan.