IDCP correction coil control (ACS)

Introduction

Correction coils are used to minimize effects of the undulator’s magnetic fields on the electron beam.

For this reason power supplies in the undulator control cabinet provide correction coils with current, depending on the position of the undulator.

This means that the undulator control program, IDCP, sets correction coil currents depending on gap and/or shift position according to given tables.

Note that the position of the undulator is measured with at least at 10 Hz, on some devices with 20 Hz. This is also the speed at which new currents are set at the correction coils.

At positions between points in these tables the current is linearly interpolated (one- or two-dimensional, see below).

Tables

IDCP supports two kinds of tables, one- and two dimensional tables.

One dimensional tables define functions i(p) where i is the current and p a gap-, shift of logical position of the undulator.

Two dimensional tables define functions i(p1,p2) where p1 and p2 are gap-, shift or logical positions.

All tables are located in directory dbd of the idcp application on the bootserver.

The table files are named idcpNN_gap2ccMM.tab where idcpNN is a string unique for each undulator and MM is the number of the correction coil.

One-dimensional tables

The format of one-dimensional tables is very simple, it consists of an ASCII file with an arbitrary number of rows which tow columns in each row. The first column is the position p, the second column is the current. Here is an example with gaps from 155 mm to 59.9994 mm:

155.0000  -0.0000
150.0000  -0.0000
124.9990  -0.0180
 99.9994  -0.0210
 79.9996  -0.0470
 69.9994  -0.0650
 64.9994  -0.1015
 59.9994  -0.1180

Two-dimensional tables

Two dimensional tables also contain numbers in their ASCII representation separated by spaces. Here the numbers are positioned in a format similar to a spreadsheet. The first line provides headings for all columns except column one. Column one provides the parameter p1 for each line. Here is a short example:

       -23.2  -10.0  0.0  10.0  23.2
 15.0    0.0    0.1  0.2   0.1   0.0
 20.0    0.0    0.2  0.3   0.2   0.1
150.0    0.1    0.3  0.5   0.4   0.2

In this case p1, the gap, runs from 15 mm to 150 mm. p2, the shift, runs from -23.2 mm to 23.2 mm. The current for 150 mm gap and 0 mm shift would be 0.5 A in this example.

The configuration file

The names of the table files and their input parameters are defined in the undulator configuration file. This is a file named idcpNN_config.tab where idcpNN is a string unique for each undulator.

In this file are definitions of the table file filenames, here is an example:

# filenames for the current correction tables
GAP2CC_0_TABLE= idcp12_gap2cc0.tab
GAP2CC_1_TABLE= idcp12_gap2cc1.tab
GAP2CC_2_TABLE= idcp12_gap2cc2.tab
GAP2CC_2_TABLE= idcp12_gap2cc3.tab

Below these are definitions of the table inputs, here is an example from a configuration file together with the leading comment:

# Flags for the current correction tables:
# format: [coil-index],[input1]{,input2}
# [coil-index] : 0-11 (Ue56) or 0-5 or (other)
# input:
#   [DriveChar][Axno]
#   DriveChars:
#      V: gap
#      H: shift
#      C: chicane
#      P: pseudo-shift
#   note that calculated axles follow immediately the real axles

GAP2CC_0_FLAGS= 0,V0
GAP2CC_1_FLAGS= 1,V0
GAP2CC_2_FLAGS= 2,V0,H4
GAP2CC_3_FLAGS= 3,V0,H4

The flags consist of two or three values. The first value is the correction coil index. Each correction coil at the undulator has a number, starting with 0.

The one of two values that follow are the input specifications.

In the example above, coil 0 has only one input, “V0”. This means the first axle of the gap drive.

Coil 2 has two inputs, V0 and H4. “V0” again is the first axle of the gap drive. “H4” is the 5th axle of the shift drive.

In this example, the undulator only has 4 shift axles. There are two more virtual axles that contain a position calculated from the position of the 4 real shift axles. The calculation is defined in variables H_CALC_AX1 and H_CALC_AX2 in the configuration file. In this case H4 is the parallel shift axle and H5 is the antiparallel shift axle. By this mechanism, you can have one set of tables for the “parallel” and one for the “antiparallel” drive mode of the shift drive.

Changing the configuration

The correction tables can be changed and reloaded by the undulator control program without the need to reboot the IOC.

See also Reload the current correction tables idcpnn_gap2ccmm.tab.