# Presentation: 745824

## LHC controls

**Introduction **
**Control challenges**
**Controls**
**Operations**
**Subsystem**
- Laser, Unicos, Timber, Interlocks, Timing, ...
**Application ASC**
**Example ROSALI**
**Equipment Fesa**
**Example OASIS**
**Conclusion**

*Controls is not only a diverse collection of Hardware and software building blocks, controls is the glue that binds the building blocks together.*
**Controls Rookie book (Fermilab)**

- LARP Meeting

**Notes:**
I want to present you a short introduction to the LHC controls.
This document will not be complete but will reflect my knowledge of the subject.
If you have some question I can not answer, I will try to give you an answer later after I contact the right person.
I would thank the many persons in the OP and CO group that have realized beautiful presentations and website from which most of the material of this presentation is coming

There is many more to say but I will try to stay in the 20 minutes schedule.

## Control Challenges

-  **Super-conducting magnets**
-  **Multipoles**, snap-back, persistent currents,, strong dependence on magnetic history: **key beam parameters affected**
-  **High energy, high intensity beams**
-  **Extremely low tolerance to beam loss**: quench protection collimation mandatory at all times
**Machine design**
-  2 rings, 8 sectors, bits of the ring in common, cross-talk between the rings, small mechanical aperture, large energy swing  large range in magnets and power converters.
**Beam dynamics **
-  Wide range of optics  Beta* 18 m to 0.5 m
-  **Dynamic aperture**, limited by non-linear fields from magnet imperfections or beam-beam. Problem at injection where non-linearities are large and beam **Tight constraints on beam parameters**
-  **Crossing angles****, ****beam-beam effects, ****very tight orbit tolerances**
-   Intra-beam scattering, instabilities, electron cloud, PACMAN bunches, ghost bunches, beta beating ...

- LARP Meeting

- LHC controls

**Notes:**
LHC puts new requirement on control system in terms of modeling, security and how we will operate the machine.

We are expecting a lot of problems but I am sure that we will have a lot of surprises.

Crucial role of the instrumentation and versatility of the controls

## Control room(s)

**Start 2006 CERN is planning to move all accelerator operations into a single control room.**
**For the LHC will include:**
**Beam based operations**
- Machine protection etc.
**Technical services**
- Cooling, ventilation, electricity
**Cryogenics**
- Industrial CS
- Dedicated operators
**Hardware commissioning**
- Cryogenics, QPS, powering. Vacuum, post-mortem, interlocks
- “Mobile” field control rooms foreseen.

- LARP Meeting

- LHC controls

**Notes:**
For the first time we will be in a single control room!
This is a big challenge for us at Cern
It is a fabulous opportunity to unify the 2 divison and also to unify the control system

We had 2 different philosophy between the little, fast, versatile machine and the big, slower powerful one.

In the control system and in the operation things were really different in terms of clients of what you can and can’t do with the beams. 

## Some numbers

**LHC control system**
**Many industrial subsystems (cryogenics, vacuum, experiments) **
**Anticipate 2000 servers, 500 clients, 50000 devices **
**Programming in Java **
**Use industrial software components and interfaces **

- LARP Meeting

- LHC controls

**Notes:**
All those things will be new
Standardization is necessary
Importants milestones
Injection Line test
Isolde renovation
LEIR renovation
Injection Test next year

## High level controls

**Operational Applications**
**Application Standard Components**
- GUI platform / business layer/ thin client/ 3-tier / JAVA
- Data visualization
- Parameter & settings control
**Application Deployment & Management**
- Console manager etc.
- Web start etc.
**Application Servers**
- Databases logging alarms
**High level control system**
- LINUX/Windows

- High Level Controls, Architecture & Development

- LARP Meeting

- LHC controls

**Notes:**
More stress than ever on the software
Without computing LHC will be impossible
We will need high level software for diagnostic security and running the machine
Intelligent software

## UNICOS project (Industrial development)

***UNICOS project (Industrial development)***

**SCADA data servers**

**PLC process control Unit**

**DS1-2-3**

**OS1**
**OS2**

**PLC Field interface**

**Operator worksation**

**PLC programming consols**

**PLC Field interface **
**& Process Control**

**Gateway  FIP**

**Supervision  GUI  part **
**Interface to operators**

**Supervision  Real time DB & Archiving **
**No process control actions**

**PLC process control part**
**All control actions are taken at this level**

**Field interface Layer process data are connected to the control  system  directly or through fieldbuses**

**Utilities**

- LARP Meeting

- LHC controls

**Notes:**
For the utilities 
Including experiment utilities

## Machine protection issue

- LARP Meeting

- LHC controls

**Notes:**
Rossano has already spoken about this
But as we can see here everything is tightly imbricated

## Laser (Alarms)

***Laser (Alarms)***

- Alarm Consoles

- Definition Consoles

- External Clients

- Admin Consoles

- Distribution

- Gathering

- Definition

- Analysis

- Archiving

- Services

- Industrial
- Systems

- Accelerator
- Devices

- Technical
- Services

- Control
- SW

*Presentation*

*Business*

*Resource*

- Alarm Consoles

- Definition Consoles

- LARP Meeting

- LHC controls

**Notes:**
Standard program for all alarms
Huge project One program for all alarms

## Timber LHC logging system

- LARP Meeting

- LHC controls

**Notes:**
LHC logging system

## Timing

**Timing**

**Fine timing TTC system**
**http://ttc.web.cern.ch/TTC/intro.html**

**Master Timing Generation**

- LARP Meeting

- LHC controls

**Notes:**
Fine timing will also be difficult with such long distance
The master timing is like the production engineer in a factory
Cern is a beam factory and we will feed this system with main and spare clients
It will choose the most appropriate way to produce beam 
If LHC does not require filling then the particles can be given for the North area
It handles also the beam permit/inhibit policy

## The way we work

**Virtual scopes**
**OASIS**

**Alarms**
**Laser**

**Console Manager**
**Applications + parameters control**

- LARP Meeting

- LHC controls

**Notes:**
View from PS operators at work

## The way we work

**Fixed Displays**

- LARP Meeting

- LHC controls

## Access Control

**Personal safety**
**Access to the machine**
**Keys**
**Interlock system**
**Beam stopper**
**Doors**
**Camera**

- LARP Meeting

- LHC controls

## PS Console Manager

- LARP Meeting

- LHC controls

**Notes:**
Brief explanation of cmgr

## Applications - Key Points

**Using the ****new Application Frame**
**Released in the production area (via Common Build and Release)**
**Deployed via JavaWebStart**
**Accessible through the ****Console Manager**
**Able to run ****2-tiers or 3-tiers**
**Accessing locally or remotely the business tier**

- LARP Meeting

- LHC controls

**Notes:**
New way of producing application

## Applications

**Standard programs**
**Fixed displays**
**Analogue acquisition,**
**Logging, **
**Post-mortem**
**Alarms, timing, **
**Real-time feedback loops**
**Settings management**
**Etc...**

- LARP Meeting

- LHC controls

**Notes:**
Standard applications needed for LHC
The standard set but with LHC constraint

## JAPC

**JAPC**
- J**ava **A**pi for **P**arameter **C**ontrol**
**JAPC is based on the work done in ASC Layer.**
**It uses Parameters (a property of a device)**
**setValue, getValue (sync, async) and subscription**

- SPS, TZ equipment
- TT40 BLM

- MPS currents

**TT40.BIC, OASIS equipment**

- RDA

- Java
- program

- RDA,Corba

- RDA API
- CMW
- Server
- FWK

- SLEquip
- server

- Mugef
- Server

- SLEquip

- SLEquip
- /RPC

- Mugefs

- Biscoto
- server

- PS-GM
- server

- TT40 BPM, BTV, BCT

- PS-GM
- server

- PS equipment

- FESA

- New developments

- LARP Meeting

- LHC controls

**Notes:**
API in JAVA 
Front End Computer broadcast messages
And clients subscribe to this

## Architecture – Physical View

**Datastore**

**Devices**

**accsoft-settings**

**macsy-generation**

**macsy-trim**

**macsy-sequence**

**macsy-explotation**

**accsoft-optics**

**JAPC**
**cmw-**
**rda**

**Hibernate**

**DAO**

**JAPC**

**JAPC**
**remote**
**client**

**macsy**
**client**

**Remote**
**HTTP**
**Layer**
**(Spring)**

**macsy**
**client**
**impl**

**Business Tier (Web Container)**

**JAPC remote server**
**Parameters concentration**

- LARP Meeting

- LHC controls

**Notes:**
For LHC we will need also many more elaborate devices and connection to a database for parameters computation
Lattice calculation etc ...

## ROSALI

**One application example**
**ROSALI (Rapid Online Software ALgorithm Implementation) **
- http://project-rosali.web.cern.ch/project-rosali/default.htm
- Application to test instrument and algorithms

- LARP Meeting

- LHC controls

**Notes:**
One interesting application written by BDI group

## ROSALI

**One application example**
**ROSALI (Rapid Online Software ALgorithm Implementation) **
- http://project-rosali.web.cern.ch/project-rosali/default.htm
- Application to test instrument and algorithms
- Defines
- Viewers
- Actions
- Sequences

- LARP Meeting

- LHC controls

**Notes:**
One interesting application written by BDI group

## Front-End Software Architecture 

- LARP Meeting

- LHC controls

**Notes:**
The 5 steps are 
Design (What are the properties,methods of this class)
	How is the class synchronized 
Code
	What should the real part do when triggered
	What should the server do (Data processing)
Compile the code
Deploy (split or not the code)
Create the Devices

## An interesting FESA Class

**Oasis**
**http://project-oasis.web.cern.ch/project-oasis/**
- Open Analog Signals Information System
- Virtual scopes written in FESA

- LARP Meeting

- LHC controls

## Conclusions

**LHC is a big, complex machine:**
**Everything is pushed at the limit**
**Especially control system**
- Huge number of devices to control
- Security
- Reliability
- Post-Mortem
- Logging
**Control group has pushed a renovation of the control system**
- Java
- With the many utilities it implies
- Many modernisation has occurred in the hardware
- VME with PowerPC
- Linux system

- LARP Meeting

- LHC controls

## From LEP to LHC

**It is a very **
**big step !!**

- LARP Meeting

- LHC controls

## Accelerator Software Component

**Accelerator Software Component**

- LARP Meeting

- LHC controls

**Notes:**
Sotware component ready to be dragged and dropped in a new application

## Accelerator Software Component

- LARP Meeting

- LHC controls

**Notes:**
You can also combine some of those (ex Chromaticity equipment acting on some power supplies)

## Software lifecycle

- Versions

- LARP Meeting

- LHC controls

## Tools

**Analysis**
**Rational Rose**
**Build, package & publish**
**Common build**
**Version management**
**CVS **
**IDE**
**Eclipse**
**NetBeans **
**GUI**
**GP**

**EJB**
**XDoclet**
**Device access**
**JAPC**
**O/R mapping**
**Oracle TopLink/Hibernate**
**Testing & debugging**
**JUnit**
**Commons Logging & Log4j**
**Deployment**
**Java Web Start**

- LARP Meeting

- LHC controls

## LHC Flow Chart

**LHC Flow Chart**

- LARP Meeting

- LHC controls

## LHC times and ramps

| Phase | Time |
| --- | --- |
| Ramp down | 18 minutes |
| Pre-injection plateau | 15 minutes |
| Injection | 15 minutes  |
| Ramp | 26 minutes |
| Squeeze | 5 to 10 minutes |
| Physics | 5 – 15 hours |

**LHC times and ramps**

- LARP Meeting

- LHC controls