Control for Elliptically Polarizing Undulator at SRRC
K. T. Pan, Jenny Chen, J. S. Chen, C. S. Chen, C.H. Kuo, S.Y. Hsu, K.T. Hsu
Synchrotron Radiation Research CenterNo. 1 R&D Road VI, Hsinchu Science-Based Industrial Park, Hsinchu 30077, Taiwan

Abstract
A Sasaki-type elliptically polarizing undulator (EPU)
which will be an important project of insertion device atSRRC is in the construction phase. It can produce anelliptically polarization for advance study in soft X-rayregion. The precision of phase is main issue for this controlsystem. The loads of the motor drivers vary with different
magnetic force which results from changing the phase andthe gap position to result in affecting positioning precision.
For minimizing the steady state error and getting a better
tracking performance, the parameters of the control loop
are necessary to optimize. The control system provides thefunctions so beamline users can adjust gap or phase. The
graphical user interface provides a easy operation interface
for operators. The details of the EPU control will bepresented in this report.

process, DDB (dynamic database) upload process, generalreading process and motion control related logicalprocess. The setting service process handles all settingsfrom the console computer and the ID service process isnecessary to set the interface modules, which deals withthe setting from the beamline end-station computer. The
DDB upload process is responsible for uploading theDDB to the console computer 10 times per second,
whereas the update rate of the DDB is 100 times per
second from setting and reading processes and motion
control related information. The motor information updateand correctors gap/phase control is to collect informationfrom motion controllers, to control motors and to executeresidual field compensation mechanism. The software
structure on VME controller is shown in Figure 1.

Beamline ID
Access Program

Main Control
Programs

Console Computer

1 Introduction
There are two insertion devices, a 1 m EPU prototype
and a EPU5.6. The 1 m EPU is 1 meter long with a 56mm undulator period, and is used on engineering test.
However, the EPU5.6 is 3.9 meters long with a 56 mm
undulator period and 65 periods which is in construction
phase and will be installed in the storage ring in 1998. Itis optimized to provide a highly polarizing light in the 80
eV to 1400 eV range[1][2]. The purposes of control system
for the EPU are to achieve the simplicity, easy
maintenance and good performance that are properties ofinsertion devices control at SRRC.
2 Structure of the VME crate controller
The VME crate controller is the core of the controlsystem. The 1 m EPU is a engineering prototype, it exists
only with phase control and the encoder type is different
from the EPU5.6. The following structure is described for
the VME crate controller of the EPU5.6 system[3].
2.1 Software
There are two operation modes, local/remote control, on
the control system. In the local control mode, the system
can be operated independently with computer via networkor a terminal via RS232, and a program exists for local
debugging and maintenance. A PMC form-factor VGA
interface is mounted on the CPU board to establish amonitor environment. The current status of the system isdisplayed whether the right of control is on local control
mode or remote control mode. In the remote control
mode, the processes of the VME crate controller include
setting service process, ID (insertion device) service

Local Controller
SettingService
Process

ID Service
Process

DDB Upload
Process

DynamicDatabase
GeneralReading
Process

Motor Information
Update & Corrector
Follow Gap /PhaseControlDigital
OutputAnalogOutputPower Supplies

MotionController

DigitalInput

MotorDrivers

AnalogInput

Tiltsensors... etc

Figure 1. Software structure on EPU controller
2.2 Hardware
The hardware of the VME crate controller is composedof a CPU board running LynxOS, two motion controllers,
one analog-to-digital interface card and one digital-toanalog interface card for end-pole corrector power supplies
control and tilt sensors readings, one serial EnDat interface
card for reading absolute linear encoders, a digital input
card for status monitoring and a digital output to disable
the motor drivers if an interlock occurrs. In thedevelopment phase, there is only a dumb terminal
connected to a RS232 port on the CPU board in order torun a local debugging and maintenance program.
3 Properties of control system

The control system needs the requirements of highprecision, good reproducibility, fast control response,
multiple axes synchronization as well as reliability. The
considerations of the control system are described in thefollowings.

torque limitation on motion controllers and motor drivers.
If one of the these interlocks is active, the motors wouldstop immediately. There is an optional interlock in case aconnector is disconnected or a wrong connection is made,in which case the controller would not operate.

3.1 Motion control

4 Main operator interface

3.2 Residual field compensation mechanism
The residual field compensation mechanism provides aeasy operation and maintenance for machine physicist.
When the gap is in movement, it includes a compensationtable that uses the end-pole correction power suppliessupporting current for the end-corrector winding tocompensate for the residual field. The setting values of theend-pole correction power supplies are followed thecorresponding gap value. When the gap is in target
position, another compensation table which the setting
values of the end-pole correction power supplies follow thecorresponding gap value and phase position. The control
system provides a convenient method to machine physicist
who needs to edit a table file on the control server and toissue an updating event via graphic user interface on main
control. The file sharing system (NFS, network file system)
is used to download the table to VME crate controller. The
new compensation table will be built and the compensation
procedure can be done 10 ms per step .

Normal operation includes the setting and reading of
the gap and phase position and end-pole corrector power
supplies, the status monitoring of the tilt sensors, limit
switches and motor drivers, motors stopped function,
local/remote switched and residual field compensation
mechanism selected. For the critical functions such as
errors recovery, reset motion controllers, homing
procedure and updating the residual field compensationtable are hidden in another page and can be used bysystem maintenance people only.
5 Control performance
There are several control performance issues about theEPU control system such as the resolution, reproducibility
and multiple axes tracking for gap and phase. The
definition of axes tracking is the axes synchronization
during moving. Presently, the encoder resolution is 5m forthe phase control of the 1 m EPU system. The two adjacentaxes tracking performance is shown in Figure 2. The
encoder resolution of phase and gap for the EPU5.6 system
is 0.5m and 0.4m individually. From the control experienceof the 1 m EPU system, the multiple axes tracking will be
expected to achieve several microns for the phase and gap
movement of the EPU5.6 control system.

1m EPU Two Axes Tracking (upstream direction move 10 mm)
0.01
Kp=50,Ki=1,Kd=360
0.008
Encoder Difference (mm)The motion control is a key point in insertion device
control. To meet the requirements, the servo mode motion
control method is chosen. The gap and phase are theelements of the motion control for the EPU5.6system.There are two absolute linear encoders withincremental signals and EnDat signals for gap
information, and four incremental linear encoders withincremental signals for phase information. The
incremental signals of the absolute linear encoders andincremental linear encoders are used as the control
feedback loop signals to different motion controllers. For
getting better performance, there will be different PID(proportional, integral and derivative) parameters on the
motion controllers. It is needed particularly for the phasemotion control because of the magnetic force effect.

0.006
0.004
0.002
0-0.002-0.004-0.006-0.008-0.01050

100

150200250Time (x 10ms)

300350400450(a)3.3 Homing

1 m EPU Two Tracking (opposition direction move 5 mm)
0.01

3.4 Protection and interlock
The safety of the system is an important consideration.
There are the tilt and slip detection, software limits
protection, maximum and minimum limit switches andEncoder Difference (mm)Kp = 150, Ki = 0, Kd = 350

When the power for the incremental encoder is lost, theincremental encoder information will be lost. However,there is an optional method that saves the information in
non-volatile RAM on the CPU board to avoid information
lost. If the position information is lost by accident, thehoming procedure is necessary to recover the lostinformation. Thus, the homing procedure is needed forphase control. Whereas, the homing procedure for gap
control is eliminated due to the use of absolute linear
encoders.

0.005

0-0.005-0.01
050

100150200
Time (x 10 ms)

250300350400(b)Figure 2. Two adjacent phase axes tracking of a 1 m EPU(a) same direction (b) opposition direction
6 Beam line user interface
The controller possesses the capability to accept issued
commands from the end-station computer to change gap

or phase directly via Ethernet. There are three steps of theoperation procedure to obey. The first, the end-station
computer sends the request to main control system. The
second, the VME crate controller should be
acknowledged and the end-station computer should begranted simultaneously by the control room operator.
Finally, the VME crate controller is linked with the endstation computer to execute the requests sent from thebeamline end-station. The relation among main controlsystem, EPU5.6 controller and the beamline end-station isshown in Figure 3.

7.2 Overshoot
It needs to adjust the parameters (PID) of the motion
controller to critical damping region.
7.3 Response time
Currently, If the command setting is from the terminal
via a RS232 port the response time is 0.1mm movementin 0.25 sec for phase movement. If the command setting
is from main control computer, the response time will be
expected to be 0.5 mm movement within 1 sec .
7.4 Protection, error reporting and recovery

PC-Based machine status broadcast system

VAXstation

DECServer

DECstation / ALPHAstation / PC Windows NT

Step 2 :acknowledgedby Console
ComputerStep 2 :grantedby Console
Computer

VME
crate

I/O
I/O
I/O
I/O

VME
crate

CPU

I/O
I/O
I/O
I/O

CPU

I/O
I/O
I/O
I/O

CPU

Control System Ethernet
VME
crate

Update : 100 msec

I/O
I/O
I/O
I/O

EPUs

CPU

Setting/Acknowledge: 20-30 msec

VME
crate

Step 1 :requested•byEndstation
ComputerRouteror
Switching
NetworkDecices

Step 3 :controled by Endstation
ComputerEndstation

Beamline

Experimental Area Ethernet

Optional
Ethernet
toIEEE-488
Adapter
Peripheral Hardwarefor EPUIEEE-488
RS-232
Direct I/O

Monochromator Controller
Vacuum Subsystem
Diagnostics (Io, ...)
Interlock... etc

Interlock
SRe-Beamline Control
ComputerPC, VME, ... etc.

Vacuum, Optics, ..etc.

CAMAC

Endstation
Computer

Optional
IEEE-488/RS-232

Global Interlock(Accelerator, ...etc.)

Endstation
Equipments

Monochromator

Figure 4. Relation among main control system, EPU
controller and the beamline end-station
7 Discussion
Currently, the control effects of the 1 m EPU system are
as following :7.1 Dynamic tracking
According to adjacent phase axes, there is a magnetic
loading varying with phase shift. If a phenomenon of aburst movement occurring on the same axis and same
phase position during the two adjacent phase axes moving
the same or opposite direction is found. More torqueoutput from the motion controller overcomes theovershoot to recover the normal track. If there is nomagnet array on the axes, the dynamic tracking is lessthan or equal to ±10µm.

The tilt sensor which is a dual-axis solid aluminum
housing containing a Applied Geomechanic precisionelectrolytic transducers with aresolution of 0.1
microradian[5] is provided to promote the judgment for thedrive mechanisms working well or not. In the future, theinformation of the system status during the movement
will be saved in the intelligent motion controller. If anerror occurred, this information would be dumped forerror analysis reference. There will also be a error
reporting function to suggest a troubleshooting method.
Acknowledgments
Thanks are extended to the staff of the instrumentationand control group, the magnetic construction andmeasurement group. The help of top management at SRRC
are also highly appreciated.

References[1] C.H. Chang, et al. , “SRRC Elliptically PolarizingUndulator Prototype to Examine Mechanical Design
Feasibility and Magnetic Field Performance”, The 6th
Conference on Synchrotron Radiation, Instrument,Himeji, Japan, Aug. 1997
[2] C.H. Chang, et al. , “ Optimization design for SRRC
Elliptically Polarizing Undulator”, MT-15 Conference,Beijing, China, 1997
[3] K.T. Pan, et al, “Insertion Devices Control
Development at SRRC “, Proceedings of the PAC’97.
[4] Bahrdt, A. Gaupp, G. Ingold, M. Scheer “ Status of theInsertion Devices for BESSY II”, Rev. EPAC96, 2535
[5] G.S. Knapp, et al. , “On the use of electronic tilt
sensors as angle encoders for synchrotron
applications”, Rev.Sci.Instrum., Vol. 66, 1995