+---------+---------+---+-----+----------------+-----------------------+
|         |         |   |     |                |                       |
| !       |         |   |     |                |                       |
| [](medi |         |   |     |                |                       |
| a/image |         |   |     |                |                       |
| 1.wmf){ |         |   |     |                |                       |
| width=" |         |   |     |                |                       |
| 1.08472 |         |   |     |                |                       |
| 2222222 |         |   |     |                |                       |
| 2221in" |         |   |     |                |                       |
| he      |         |   |     |                |                       |
| ight="1 |         |   |     |                |                       |
| .088194 |         |   |     |                |                       |
| 4444444 |         |   |     |                |                       |
| 445in"} |         |   |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
| Fun     |         |   |     |                |                       |
| ctional |         |   |     |                |                       |
| Requi   |         |   |     |                |                       |
| rements |         |   |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
| TUNE    |         |   |     |                |                       |
| Appl    |         |   |     |                |                       |
| ication |         |   |     |                |                       |
| -- HIGH |         |   |     |                |                       |
| LEVEL   |         |   |     |                |                       |
| REqui   |         |   |     |                |                       |
| rements |         |   |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
| A       |         |   |     |                |                       |
| bstract |         |   |     |                |                       |
|         |         |   |     |                |                       |
| The     |         |   |     |                |                       |
| r       |         |   |     |                |                       |
| equired |         |   |     |                |                       |
| e       |         |   |     |                |                       |
| lements |         |   |     |                |                       |
| for the |         |   |     |                |                       |
| B       |         |   |     |                |                       |
| aseband |         |   |     |                |                       |
| Tune    |         |   |     |                |                       |
| Meas    |         |   |     |                |                       |
| urement |         |   |     |                |                       |
| appl    |         |   |     |                |                       |
| ication |         |   |     |                |                       |
| are     |         |   |     |                |                       |
| listed, |         |   |     |                |                       |
| de      |         |   |     |                |                       |
| scribed |         |   |     |                |                       |
| and     |         |   |     |                |                       |
| ex      |         |   |     |                |                       |
| plained |         |   |     |                |                       |
| here.   |         |   |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
| P       |         |   | C   |                | *Approved by:*        |
| repared |         |   | hec |                |                       |
| by :    |         |   | ked |                | R. Jones, AB/BI       |
|         |         |   | by  |                |                       |
| J.      |         |   | :   |                | R. Bailey, AB/OP      |
| P       |         |   |     |                |                       |
| atrick, |         |   | J   |                |                       |
| F       |         |   | -J. |                |                       |
| ermilab |         |   | Gr  |                |                       |
|         |         |   | as, |                |                       |
| M.      |         |   | AB  |                |                       |
| Lamont, |         |   | /BI |                |                       |
| AB/OP   |         |   |     |                |                       |
|         |         |   | L.  |                |                       |
| R.      |         |   | J   |                |                       |
| Stei    |         |   | ens |                |                       |
| nhagen, |         |   | en, |                |                       |
| AB/BI   |         |   | AB  |                |                       |
|         |         |   | /BI |                |                       |
| D.      |         |   |     |                |                       |
| Ni      |         |   | E.  |                |                       |
| cklaus, |         |   | Hat |                |                       |
| F       |         |   | zia |                |                       |
| ermilab |         |   | nge |                |                       |
|         |         |   | li, |                |                       |
| J.      |         |   | AB  |                |                       |
| Annala, |         |   | /CO |                |                       |
| F       |         |   |     |                |                       |
| ermilab |         |   | H.  |                |                       |
|         |         |   | Sc  |                |                       |
| D.      |         |   | hmi |                |                       |
| Still,  |         |   | ckl |                |                       |
| F       |         |   | er, |                |                       |
| ermilab |         |   | AB  |                |                       |
|         |         |   | /CO |                |                       |
|         |         |   |     |                |                       |
|         |         |   | J.  |                |                       |
|         |         |   | W   |                |                       |
|         |         |   | enn |                |                       |
|         |         |   | ing |                |                       |
|         |         |   | er, |                |                       |
|         |         |   | AB  |                |                       |
|         |         |   | /OP |                |                       |
|         |         |   |     |                |                       |
|         |         |   | S.  |                |                       |
|         |         |   | Gys |                |                       |
|         |         |   | in, |                |                       |
|         |         |   | Fe  |                |                       |
|         |         |   | rmi |                |                       |
|         |         |   | lab |                |                       |
|         |         |   |     |                |                       |
|         |         |   | E.  |                |                       |
|         |         |   | Mc  |                |                       |
|         |         |   | Cro |                |                       |
|         |         |   | ry, |                |                       |
|         |         |   | Fe  |                |                       |
|         |         |   | rmi |                |                       |
|         |         |   | lab |                |                       |
|         |         |   |     |                |                       |
|         |         |   | D.  |                |                       |
|         |         |   | McG |                |                       |
|         |         |   | inn |                |                       |
|         |         |   | is, |                |                       |
|         |         |   | Fe  |                |                       |
|         |         |   | rmi |                |                       |
|         |         |   | lab |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
|         |         |   |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
| History |         |   |     |                |                       |
| of      |         |   |     |                |                       |
| Changes |         |   |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
| Rev.    | Date    | P |     | Description of |                       |
| No.     |         | a |     | Changes        |                       |
|         |         | g |     |                |                       |
|         |         | e |     |                |                       |
|         |         | s |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
| 0.1     | 16-Apr  | 8 |     | First draft    |                       |
|         | il-2007 |   |     |                |                       |
| 0.2     |         | 8 |     | Second draft   |                       |
|         | 23-Apr  |   |     |                |                       |
| 0.3     | il-2007 | 9 |     | Third draft    |                       |
|         |         |   |     |                |                       |
| 0.4     | 26-Apr  | 8 |     | Fourth draft   |                       |
|         | il-2007 |   |     |                |                       |
| 0.9     |         | 8 |     | Fifth draft    |                       |
|         | 01-Ju   |   |     |                |                       |
|         | ne-2007 |   |     |                |                       |
|         |         |   |     |                |                       |
|         | 16-Ju   |   |     |                |                       |
|         | ly-2007 |   |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+

Table of Contents

1\. Introduction [4](#introduction)

1.1 About this document [4](#about-this-document)

2\. Application Overview [5](#application-overview)

2.1 Objectives [5](#objectives)

2.2 Roles and Responsibilities [5](#roles-and-responsibilities)

3\. Functional Requirements [5](#functional-requirements)

3.1 FuNCtionality [5](#functionality)

3.1.1 basic considerations [5](#basic-considerations)

3.1.2 basic measurement and display capabilities
[6](#basic-measurement-and-display-capabilities)

3.1.3 beam parameter calculations [7](#beam-parameter-calculations)

3.1.4 Data archiving and retrieval [7](#data-archiving-and-retrieval)

3.2 Scope, Performance and Concurrency
[8](#scope-performance-and-concurrency)

4\. References [8](#references)

# Introduction

The betatron tune values of each LHC beam are measured by the Base-Band
Tune system (BBQ). Pickups in the LHC tunnel provide beam position
information. Front-end electronics based on Direct Diode Detection (3D)
\[1\] produces a baseband signal that is presented to a VME based Data
Acquisition Board (DAB). The DAB digitizes the input signal and computes
Fast Fourier Transforms in real time, and can compute the tune by
searching for peaks within a prescribed window of each FFT. The Tune
Application will allow the operator to initiate tune measurements, view
the data, and store it. In addition to single tune measurements, the
application will be able to initiate a series of measurements to compute
the coupling and chromaticity.

Beam excitation for the tune measurement is provided by dedicated tune
kickers, or transverse dampers, or dedicated stripline kickers. Control
of the latter two is via the DAB.

The application interface to the hardware is through a FESA front-end.
The front-end acquires data from the DAB, and can modify configuration
parameters for the tune measurement and beam excitation functions it
controls. This is through the FESA class BQBBQLHC.

There are two complete systems, each consisting of horizontal and
vertical pickups for each of the two beams. The first is used to provide
traditional information including position and FFT measurements as well
as the measured tune to the control room in response to beam excitation
of finite duration. The second is a dedicated Phase Locked Loop (PLL)
system. This system measures and tracks the tune generally in response
to low level continuous excitation. As variations occur, the PLL system
sends tune and coupling measurements to the orbit feedback controller
for its use in computing corrections to stabilize the beam. All
electronics, DAB firmware, and FESA software are the same for both
systems. Data from both these systems will be acquired and displayed by
a single application.

## About this document

The functional requirements for the Base-Band Tune Application are
listed and described here. It is anticipated that this software
application will be used by AB/OP and others in the CERN Control Centre
during the commissioning and operation of the LHC.

This application will be written by the LAFS team at Fermilab. Fermilab
personnel will be present at CERN as needed during the writing,
commissioning and operation of this application. The FESA interface to
the hardware is provided by the AB/BI/SW group.

First, we present an overview of the application; the objectives, the
roles and responsibilities. Then we present the formal requirements.

The priorities of the requirements are listed as either "Critical" or
"Expected." The former means that the application absolutely must have
this feature. The latter means that the application should have it, bit
it will not be necessary in the initial version(s) of the application.

# Application Overview

## Objectives

The tune application provides the operator interface for measuring the
tune of the LHC beams. Excitation parameters are configured and a
measurement initiated. The application acquires FFT and tune data from
the front-end, computes tunes, displays the data, and may optionally
store and retrieve measurement data. The same application reads and
displays data from the PLL system. This application is intended to
provide the functionality needed for routine operation of the LHC. By
initiating a series of measurements together with other beam modulation
it will also be used to measure coupling and chromaticity. Separate
expert applications will exist that provide additional functionality and
access to additional features of the system.

## Roles and Responsibilities

The BBQ FESA front-end interfaces with the DAB, which in turn interfaces
to the BBQ electronics, the damper and strip-line exciters, and the
feedback system. Configuration of the tune kicker is through this
application but via a separate front-end. There is interaction with the
timing system to synchronize firing the tune kicker with data
acquisition. Interaction with the timing system may also be required for
synchronization of tune measurements with injection and with RF
manipulation for chromaticity determination.

# Functional Requirements

The functionality and the scope, performance and concurrency of the tune
application are discussed and presented in this section.

## FuNCtionality

The functionality of the tune application is listed here. It is divided
into 4 sections, based on the general capabilities required.

### basic considerations

The tune application will be written using the standard LSA framework.

  --------- --------------- -------------------------------------------- --------------
  **Num**   **Title**       **Description**                              **Priority**

  1.10      Common          The tune application shall be written in the Critical
                            standard LSA architecture.                   

  1.20      Look and Feel   The tune application shall have the standard Critical
                            LSA look and feel.                           

  1.30      Communication   The application shall follow standard        Critical
                            JAPC/CMW and real-time feedback              
                            communication protocols.                     

  1.40      Security        The application shall use Role-Based Access  Critical
                            Control for authentication and authorization 
                            to protect against unauthorized use.         
  --------- --------------- -------------------------------------------- --------------

*Table 3‑, General requirements.*

### basic measurement and display capabilities

The tune application is responsible for performing tune measurements.
Excitation and other parameters are configured, the measurement is
initiated, and data are read and displayed. The following modes of
operation are possible:

Tune-FFT system:

-   Monitoring of spectra with no excitation

-   Measurement from single kick excitation by tune-kicker

-   Measurement from chirp excitation via transverse damper

Tune-PLL system:

-   Monitoring of spectra with no excitation

-   Measurement from continuous excitation via transverse damper

-   Measurement from continuous excitation via stripline

  --------- ------------ ------------------------------------------- --------------
  **Num**   **Title**    **Description**                             **Priority**

  2.05      Excitation   The tune application shall allow the        Critical
            Control      operator to select the beam excitation      
                         method from none/tune kick/damper/stripline 

  2.10      Excitation   The tune application shall allow the        Critical
            Control      operator to set parameters associated with  
                         the selected excitation method including    
                         the strength and duration, and which of the 
                         two beams to excite.                        

  2.15      Front-end,   The tune application shall not allow        Expected
            DAB, and PLL setting of BBQ front-end, DAB or PLL        
            Control      parameters. It will be assumed that the     
                         defaults are suitable for normal            
                         operations.                                 

  2.20      Data         The tune application shall acquire FFT data Critical
                         from the FFT system, and tune and coupling  
                         results from the PLL system, for each beam. 

  2.25      Data Display The tune application shall display the most Critical
                         recently measured values and excitation     
                         parameters.                                 

  2.30      Time Display The tune application shall plot the         Critical
                         measured tunes as a function of time.       

  2.35      Resonance    The tune application shall display the      Expected
            Line         measured tune as a function of time on a    
                         resonance line plot.                        

  2.40      FFT Display  The tune application shall be able to plot  Critical
                         single FFT spectra with the tune peak       
                         noted.                                      

  2.45      FFT Data     The tune application shall plot the FFT     Expected
            Display      spectrum as a function of time as a contour 
                         or waterfall plot. It should be possible to 
                         select a slice from this plot for detailed  
                         display.                                    

  2.50      3-D display  The tune application shall provide a full   Expected
                         3-D display of the FFT versus time.         
  --------- ------------ ------------------------------------------- --------------

*Table 3‑, Measurement and Display Capability Requirements.*

### beam parameter calculations

The tune application shall be able to calculate the tune, coupling, and
chromaticity from FFT data acquired from the front-ends.

  --------- -------------- ------------------------------------------- --------------
  **Num**   **Title**      **Description**                             **Priority**

  3.10      Calculation    The tune application shall be able to       Critical
                           calculate the tune from FFT data using      
                           possibly modified search parameters.        

  3.20      Coupling       The tune application shall be able to       Expected
            Calculation    measure the coupling using the closest tune 
                           approach method as a supplement to the      
                           measurements made by the PLL system.        

  3.30      Chromaticity   The tune application shall be able measure  Expected
                           the chromaticity by measuring the tune      
                           variation in response to RF frequency or    
                           phase modulation. LSA functions will exist  
                           to configure the RF system for this         
                           measurement.                                
  --------- -------------- ------------------------------------------- --------------

*Table 3‑, Tune Calculation requirements.*

### Data archiving and retrieval

It should be possible to store and retrieve FFT and tune data. The tune
application should be able to log tune values it has computed, and be
able to read files generated by the post-mortem system. It does not
itself produce post-mortem files.

  --------- ----------- -------------------------------------------- --------------
  **Num**   **Title**   **Description**                              **Priority**

  4.10      Data        The tune application shall be able to        Critical
            Storage     archive blocks of FFT data and resulting     
                        beam parameter calculations in a standard    
                        format under operator control.               

  4.20      History     The tune application shall be able to read   Critical
                        and display the archived data. It shall be   
                        possible to apply different peak search      
                        parameters to the data and redisplay it.     

  4.30      Logging     The tune application shall log calculated    Critical
                        tunes to the logging system.                 

  4.40      Post Mortem The tune application should be able to read  Expected
                        and display tune data stored by the          
                        Post-Mortem system                           
  --------- ----------- -------------------------------------------- --------------

*Table 3‑, Data Archiving and Retrieval requirements.*

## Scope, Performance and Concurrency

  --------- ------------- -------------------------------------------- --------------
  **Num**   **Title**     **Description**                              **Priority**

  5.10      Scope         The scope of the tune application shall be   Expected
                          limited to the BBQ hardware and beam         
                          excitation controllers attached to the       
                          BQBBQLHC front-end, and the interaction with 
                          the user to manipulate these items. It also  
                          interacts with the tune kicker, and with RF  
                          system for chromaticity measurement. It      
                          shall not be required to interact directly   
                          with other application software.             

  5.20      Performance   The tune application shall be able to        Expected
                          display the data that are produced by the    
                          front-end in real time.                      

  5.30      Concurrency   More than one instance of the tune           Expected
                          application may run simultaneously. But it   
                          is acceptable for one of these instances to  
                          initiate a reservation on control of the     
                          beam excitation hardware. Note the tune      
                          kicker may also be operated in an AC-dipole  
                          mode under control of a separate             
                          application. That application should         
                          participate in the reservation process for   
                          the tune kicker.                             
  --------- ------------- -------------------------------------------- --------------

*Table 3‑, Scope, performance and concurrency.*

# References

1.  LHC-Project-Report-853 "The Principle and First Results of Betatron
    Tune Measurement by Direct Diode Detection".

2.  LHC-B-ES-0009 (EDMS 463763) "On the Measurement of Tunes, Coupling,
    and Detunings with Momentum and Amplitude in the LHC".