Fermilab logo
Fermilab

Doc Number: Beams-doc-3299
Version: 2.0
Category: Notes



Some Console Applications for Displaying Main Injector BLM Measurements


Bruce C. Brown and Guan Wu
Main Injector Group, Accelerator Division
Fermi National Accelerator Laboratory*
P.O. Box 500
Batavia, Illinois 60510

6/24/2009



*Operated by the Fermi Research Alliance under contract with the
U.S. Department of Energy.

Abstract

Loss management efforts using the Main Injector Collimators resulted in new programs to display the Main Injector BLM results. For visual monitoring of normal operation, I38 displays all losses at the end of each Main Injector cycle plus the first two PROFILE times for each BLM. For monitoring and studies, I129 provides sums of BLM readings for each PROFILE time with BLM's grouped to provide information on loss patterns. It also stores loss data in a Sybase database and permits the user to write files in .csv format containing either the complete loss pattern or the table which groups losses. Details on the specification and use of these tools will be described.

Overview

Real time beam loss monitoring is accomplished in the Main Injector using the argon gas ionization detector described in [1]. BLM's are placed a bit above the beam line height against the tunnel outer wall at the downstream end of each quadrupole. They are labeled with the half-cell number of the quadrupole, e.g. LM302 is at Q302. Monitors are placed along the extraction channels more densely to monitor losses at LAM40, LAM52, LAM60/61 and LAM62 as well as a few additional monitors at other transfer points and at ECOOL. Originally, the Main Injector BLM's measured losses using electronics moved from the Main Ring. Beginning in early 2007, new electronics [2], developed for Tevatron, MI, and Booster use, was available in the Main Injector. (Implementation for Booster has not yet occured - 2/4/2009). Old console programs were initially used to make the measurements available in the Main Control Room. New displays were created to take advantage of the new electronics. Some features and capabilities of these programs will be described in this note.

A current, proportional to the ionization which the beam loss creates, is delivered to the BLM electronics. The BLM electronics integrates the charge in 22 microsecond intervals and accumulates various sliding sums to be reported or to be used for beam aborts. I38 and I129 use the values stored as "Profiles" which contain the loss reading integrated since the most recent Main Injector clock reset and stored in response to a clock event. This is described in Beams-Doc-1410-V8 Section 7.3, Page 55. A reading of the integral is stored (along with the time) at each of the PROFILE times (see section below) supplied by the Main Injector clock. Additionally, integrated loss is recorded for the end-of-beam clock event[3]. By taking differences between these loss profiles, the loss during the interval can be calculated. Integrated losses are reported by these programs in Rads using the standard calibration for the loss monitors (see BLM Hardware below).

The I38 Comfort Display (PA4009)

The Booster Group provided a loss display with high data content. Using the same concept, the display provided by I38 allows the accelerator operations staff immediate access to a loss picture for each pulse. The integrated loss from each loss monitor is displayed using a three decade log plot. Two data sets are requested from the BLM system. A loss reading from the end of the cycle is displayed in green. The integrated loss for the first two profile times is read. The second PROFILE reading (including losses due to uncaptured beam) overlays the end of cycle reading using yellow while the first PROFILE reading (injection losses before start of ramp) is plotted in blue. For one accustomed to the normal loss patterns, this display permits quick evaluation of loss pattern changes. In Beams-doc-3295[4] the steps needed to understand collimation efficiency for uncaptured beam are discussed. See PROFILE times section below for details. Main Injector Loss Display

To provide context, additional information is displayed. Across the top we are given the Main Injector Machine State - Stat (see Main Injector States table below), Main Injector Ramp Reset type - Evt (usually $23 or $29), the beam intensity sampled at the beginning of flattop ($25 event) and the transmission efficiency (flattop beam divided by beginning of ramp ($22) beam). At the bottom we are given data which is also provided as pseudo-devices (see table below). In green three sums from the loss monitor readings at the end of the cycle: Sum(I:LMSUM), collimator region Coll (I:LMCOL) and their difference (Sum - Coll = I:LMRING). In blue we have the sum of collimator region for the first profile (I:LMCOL0). In yellow we display, as coll-1(I:LMCOL1), the collimator region sum for the second profile minus I:LMCOL0, as well as the fraction of loss in the collimator region between the first and second profile times (I:LMCOL1/I:LMSUM1). As noted above, the loss values are in Rads.

The pseudo-device parameters, which are logged by the D44 Datalogger, are described by the Pseudo-device Definitions table below. They are used to identify the total losses and losses in the collimator region to be sure that proper operation of the collimation system is being maintained. One must invoke I38 in the "ComfortDisplay" mode for it to write the pseudo-devices. Since this mode is traditionally maintained in the control room using console CNS104, one should invoke that instance in "ComfortDisplay" mode while other invocations will needlessly re-create the pseudo-devices if invoked in that mode (that should only waste resources but it is still not desired). For plotting convenience, their difference is recorded as the ring loss. Normal use employs PROFILE times for orbits (BPM) and losses (BLM) at the breakpoint times of the dipole corrector ramps (see PROFILE times below) which places PROFILE 0 at the end of injection and PROFILE 1 after the loss of uncaptured beam so the loss difference is primarily from the uncaptured beam loss. The loss monitors between LM229 and LM309 (inclusive) are defined as the collimator region and losses for that region are summed. As noted elsewhere, the values which depend on PROFILE 0 and PROFILE 1 will have blank periods due to operations such as RR transfer tune-up which set the PROFILE times to different values.

Pseudo-device Definitions
Pseudo-device
BLM's Used
Integral from
Integral to
I:LMSUM
Sum (All BLM's)
Reset
End-of-Beam
I:LMCOL
Collimator Region (LM229 - LM309)
Reset End-of-Beam
I:LMRING
Difference = Sum - Collimator Region
Reset End-of-Beam
I:LMSUM0
Sum (All BLM's) Reset PROFILE 0
I:LMCOL0
Collimator Region (LM229 - LM309) Reset PROFILE 0
I:LMRNG0
Difference = Sum - Collimator Region Reset PROFILE 0
I:LMSUM1
Sum (All BLM's) PROFILE 0 PROFILE 1
I:LMCOL1
Collimator Region (LM229 - LM309) PROFILE 0 PROFILE 1
I:LMRNG1
Difference = Sum - Collimator Region PROFILE 0 PROFILE 1

The Main Injector Machine States identify specific operating scenarios. The expected loss magnitude and patterns are different for different states so we will expect to make comparisons with the data from the same state. A list of machine states is available from several console programs including I6 and I39. Most loss studies will be for one of the following states.

Common Main Injector States For High Intensity
MI State
MI Reset
Description
8 $23 11 Batch Slipstacking on Numi only mode
14 $23 11 Batch Slipstacking on mixed mode
28 $29 Slip Stack Booster Protons in Main Injector

I38 Checks on PROFILE times

For I38, the readings of the integral loss for the cycle do not depend on the PROFILE time settings. However, both the display values and output parameters which use PROFILE 0 and PROFILE 1 will fail to provide suitable data when the MI operation requires a different set of PROFILE time settings. For this reason, I38 determines the breakpoint times for all ramps (with interest in the $23 and $29 breakpoints) upon program invocation. When the data is read, it determines the MI Reset and uses the breakpoint times for that cycle type to compare with the PROFILE 0 time and PROFILE 1 time in the data. It does not update the PROFILE 0 or PROFILE 1 display or create those pseudo-device outputs when the PROFILE times do not match.

Operationally, we have long periods when we run $23 cycles only. The sequencer will modify the PROFILE times for Recycle PBar shot tuneup and will return the $23 profiles time following the PBar shot. The green/yellow/blue loss display will regularly become only green during the shots and green/yellow/blue will re-appear after the shots. The pseudo-device data will be available except during the Shots. When NuMI goes off for a period, the complex will run $29 mode (PBar only) with its shorter times but normally, the sequencer will still load $23 PROFILE times following RR shots. This may lead to periods of many hours when no pseudo-device data will be stored. Manual intervention to execute the sequencer command to load the $29 PROFILE times (as Collimator tools -- $29 _breaks+) is sufficient to return the system to a fully operational state with multicolor comfort display and datalogging of pseudo-devices.

I129 BLM Profiles (PA4115)

Loss monitor readings can be displayed or output to files from previous loss monitor software, but specific features, optimized for collimation loss studies have been implemented in I129. This includes a tabular display of losses grouped by consecutive loss monitors (rows) and by PROFILE times (columns) and file output of either all loss data or the tabular sums. Screen displays are available during operation or from the database. Analysis of studies can be expedited using spreadsheet templates since I129 provides output to .csv files.

The loss data is acquired for I129 using the integrated losses since the MI Reset event (beginning of cycle), as stored by the BLM electronics at each of the PROFILE times. I129 acquires this data for all loss monitors at the requested set of profiles times (one selects the first profile and number of profiles). The integrated loss at end-of-beam as read by I38 could be used to get complete loss data but instead, I129 requires one to set the profile times in order to include a reading at the end of the cycle. I129 can read or set the profile times but for many routine measurements, we have provided for restoring our preferred set using I48 Sequencer commands which are routinely executed following alternative tune-up modes of operation.

Upon request, this integrated data can be stored in Sybase tables for later analysis. Relevant header information (See Appendix - Specification for I129 Header Data) is also stored to be linked to the loss data for analysis purposes. When writing to the database, the following limitations can be expected. With the current Sybase records writing method, if you set profile number to ~15, a reading/writing rate of about one per 4 seconds is supported. If you want to record every cycle you can select between 5 and 10 profiles, maximum.

For analysis convenience, the integrated losses (stored by the BLM electronics for each profile time) are presented only for the first profile read (PROFILE 0 if available). This integral is then subtracted from the next profile (PROFILE 1) with the result stored as the loss reading for PROFILE 1. Subsequent PROFILEs are provided as differences. Thus the I129 displayed data is always the loss integrated during the time interval under consideration.

Reporting and Storage of Individual Loss Monitor Data

Loss data from each BLM can be written to a file. Integral losses are reported for the first profile time with subsequent profile time losses being reported as the increment since the last reported profile as discussed above. A complete set of loss monitor data with header is written out using either live data or data from the database. A .csv format was selected for convenient use as either spreadsheet input or for parsing in perl. An example of the detailed loss monitor data is provided here: pfl-09JAN29-133303-amc01.csv.

Reporting and Storage of Loss Monitor Group Data

To improve feedback during studies, a tabular display can also be invoked to present the loss reading sums and ratios for groups of loss monitors. It can be displayed live or written to a .csv file. The user selects a loss monitor group definition and set of PROFILE times. Using live or stored data, the header data is displayed and integrated loss accumulated between profile times is reported in rows of the table where each column shows data

The final column shows GrpSum which provides the cycle sum for that group (row). The table is shown here while the .csv file is available: grp-09JAN29-133303-amc01.csv.
Main Injector Group Loss Display

Data is provided in one block as losses in Rads and in the block below in fractions. The data columns display these results for each PROFILE time with a total column (GrpSum) at the end. The PfSum row shows the total BLM losses in the GrpSum column. The group (and "rest") loss fractions are the group loss sums divided by the column PfSum. The PfSum row in the fractions block show the ratio of the column sum (PfSum in loss block) divided by the total loss (PfSum in GrpSum column). Similarly, the fractions shown in the GrpSum column reflect the ratio of the integrated loss for the group to the total loss.

Pedestals and Negative Values

The high sensitivity of the BLM system is maintained through the readout system but at the expense of the potential for integrating an offset. The current implementation is described in sections 2.5 through 2.9 of Beams-doc-1410 [1]. Current experience for the Main Injector is that regions of very low loss may report a loss which changes linearly when displayed as a fast time plot. A few channels show a linear positive drift. Many more show a linear negative drift. The level of losses which are of current concern are sufficiently high as to allow us to find ways to ignore these limitations. For now we either display and use the values as reported or we ignore negative values, setting them to zero. When writing to Sybase, the information stored is the original readings from the BLM system.

Averaging Many Cycles

In order to obtain a bit more precision, one may wish to average data over a number of cycles. This may be desired for looking at an individual loss monitor or perhaps for the one of the groups. This has been implemented by

The data sent to the display or the database will reflect the average over the selected number of cycles. The group table display, the individual loss monitor .csv file or the group table .csv file will show the "average multiple cycles" in the header. The number of cycles which have been averages is documented for the file by the number following "amc" in the file name.

Database and File Issues

The I129 SAVED PROFILE DATA menu items permit selection of data for display or for creating .csv files. See the interface and some description below under User Interface for I129. Provision is made here to delete unneeded data from the Sybase database. Some long term comparisons will be valuable so the user is encouraged to discuss deletion of data from previous studies. The .csv files are written to the console Unix file system in

/usr/local/cbs_files/cns_write/pa4115

PROFILE times

The use of PROFILE times permits various data acquisition tasks to be coordinated. A program to manage sets of profile times is available in console program I102 (070 DISPLAY/CONTROL). The 070 module creates the desired pulses which are then encoded as Tevatron Clock events. Up to 128 PROFILE times can be created and that many can be employed by the BPM and BLM electronics. Since these timers are used in various ways, we choose to minimize operational changes by employing them for many of our loss measurement by using the set of times employed for other activities.

The routine monitoring of collimation efficiency for uncaptured beam must employ a pair of profile times which separate injection losses from uncaptured beam losses. Tuning efforts for uncaptured beam can change the effective momentum aperture by changing the radial position of the primary collimator or tuning the time bump at that location. These will change the time at which the uncaptured beam is lost. For this reason, a narrow window for viewing uncaptured beam loss would have to be modified when tuning changed the loss time. For routine monitoring and measurements, a convenient alternative is available.

In particular, a set of PROFILE times exist which are defined to optimize the use of the horizontal and vertical correctors to control both injection orbits and orbits up the ramp. They can be set based on data from the I2 power supply program. These times are used for BPM readings for orbit control and as dipole corrector ramp break points. With PROFILE times set to breakpoint times, PROFILE 0 is at the end of the 8 GeV injection porch and PROFILE 1 occurs at 9.4 GeV/c or after about 5.8% momentum change. Code for creating these times is available in I129, in I50 (MI ORBIT /C453) and other applications. The breakpoints for $23 (NuMI plus PBar) have a large time offset compared with the same breakpoints for the $29 (PBar only) ramps resulting in quite different profiles time at the same momentum for these ramps.

For I38, values of the integrated loss at the first two profiles times are read as well as the integrated loss at end-of-beam (near the end of the flattop time). For I129, we frequently want readings at these profile times. The last breakpoint is below 120 GeV so we add a PROFILE time just after the abort clean-up ($2F) but before the end of beam ($26). This was done by editing in this extra point on I102 and saving a file. As profile times are switched between PBar transfer operation tune-up and stacking operation, the I48 Sequencer sends the needed profile time file.




Appendix

BLM Hardware

Reference [1] describes the BLM's as follows: "The BLM detector is a sealed glass ion chamber with a 110 cc active volume filled to about 1 Atm with pure argon gas. The detector calibration is about 7E-08 Coulombs per Rad, and has been found to be nearly linear to 100 Rads instantaneous dose, when operated at 2.5 kV."

We find in Beams-Doc-1410-V8 [2]
Page 3: " The digitizer has 16 bit resolution with scaling such that one digitizer count represents 15.26 fC of charge in the integrator. The sensitivity of the BLM ion chamber is approximately 70 nC of charge per Rad."
Page 16: " The response of the digitizer has been calibrated in prototypes. The least count in the low integration range corresponds to a charge of ~0.2pC or a loss of 0.3microRad. In the high range, the least count corresponds to a factor of 5 more charge."

Specification for I129 Header Data

For both the group display at the console and for the .csv files we will want information about the machine status The information provided is:
Here is a list it items for the header of the I1129 Group Table

Item		  Label		    Example Value	  Comment

gettimeofday()	  Data Date:	    1-NOV-2008 11:17:22	  
TCLK reset	  Event:	    $29			  
I:MCRT56	  State:	    28
                  TimeInSuperCycle: 18.2             in sec. with 1/15 sec accuracy

		  Beam:                              All reported in E13 except PBar
I:BEAM2X[0]	  AfterInj:	    38.52E12	     Sampled after last Inj., issue read after $22
I:BEAM2X[1]	  BeforeRamp:	    37.32E12         Sampled at $22, issue read after $22
I:BEAM1           AfterBump:        35.52E12         BEAM Sampled after $22 
                                                     for  Uncap Loss using delay 
                                                     of 0.07408 from <22/  /  /  /  > 
I:BEAM2X[5]       Flattop:	    34.93E12	     Sampled at $26
M:TR105B	  PBar:             0.823E12	     
E:TOR101	  NuMI:		    26.70E12	     

Losses:		  
I:BEL2x		  BEL:              3.124            read BEL23 or BEL29 and 
                                                     report correct one.
Collimators:
I:CHP230          CHP230            600              units in mils (1/1000 inch)
I:C301DV          C301DV            300              units in mils (1/1000 inch)
I:C303DV          C303DV            322              units in mils (1/1000 inch)   
I:C307DV          C307DV            400              units in mils (1/1000 inch)
I:C308DV          C308DV           -440              units in mils (1/1000 inch)
I:C301H           C301H            -1100             units in mils (1/1000 inch)
I:C303H		  C303H            -1050             units in mils (1/1000 inch)
I:C307H		  C307H            -1350             units in mils (1/1000 inch)
I:C308H		  C308H             1400             units in mils (1/1000 inch)
Console Application I129: BLM Profiles

User Interface for I129

I129 provides for acquiring and displaying data. The interface includes provision for setting, reading and displaying (limited) the profile times, controlling acquisition of data for display and/or storage, defining the group table display, control of averaging features and provisions for selecting stored data to be displayed, to be written to .csv files, or to be deleted.

We will touch on a few parameters here. Averaging over multiple cycles can be done using the live or stored data. For acquisitions, up to 9 cycles of data can be averaged. While taking data one can save live data to Sybase, write BLM Groups Table data to .csv files or only display the BLM Groups Table. With saved data one can write .csv files of the BLM losses for all profiles or write .csv files for the BLM Groups Table. One can select from the currently define Groups or define new groups. Console Application I129: BLM Profiles

Since PROFILE times define the data to be acquired, an interface is provided to permit setting them. For the most commonly used, the tools described in the section PROFILE times will be more convenient. The hardware supports 128 PROFILE times and I129 can read and store up to that limit. The .csv output of BLM readings also supports the full range but the Group table display is limited to 30 PROFILE times (and only 10 are seen in the live window but one can display the .csv file at the console or during analysis to get the full data set). While the capabilities have been described here, the performance with demanding requirements have not been explored carefully.

References

[1] R.E. Shafer et al. The Tevatron Beam Position and Beam Loss Monitoring Systems. In Francis T. Cole and Rene Donaldson, editors, Proceedings of the 12th International Conference On High-Energy Accelerators, pages 609-615. Fermilab, 1983. Also available as FERMILAB-CONF-83-112-E
[2] Alan Baumbaugh et al., BLM Upgrade Users' Guide. Beams-doc-1410-v8
[3] Note that the data collected by I38 on the end-of-beam clock event is also "profile" data as described by the BLM documentation.
[4] Bruce C. Brown, Improved Measurement of Main Injector Collimation Efficiency for Uncaptured Beam, Beams-doc-3295.html

Other documents about the BLM system include:
Beams-doc-3077-v1 	BLM Upgrade - Digitizer Card Operating Guide
Beams-doc-2433-v9 	BLM Upgrade Controller Card Program Design
Beams-doc-1422-v1 	Main Injector BLM electronics calibration
Beams-doc-1420-v1 	Some data on present and new BLM system calibration
Beams-doc-1417-v2 	Dynamic Range Issues for New BLM
Beams-doc-1405-v1 	Development of a New Data Acquisition System for the Fermilab Beam Loss Monitors
Beams-doc-1068-v1 	A tutorial on beam loss monitoring
Beams-doc-412-v1	FNAL instrumentation: Lessons Learned
Beams-doc-292-v1	Beam Line Beam Loss Monitors
FERMILAB-CONF-07-095-E  Readout process and noise elimination firmware 
                        for the Fermilab beam loss system