LCLS Feedback November 12, 2008 Controls Software D. Fairley

advertisement

November 12, 2008

Controls Software

LCLS Feedback

D. Fairley

Topics

MATLAB Feedback

Where we are now

Still to do

Fast Feedback Plans

The Team

The Work

Types of feedbacks

Proposed Feedback Architecture

Major subprojects

The Schedule

November 12, 2008

Controls Software D. Fairley

MATLAB:Where we are now

13 Feedback loops in operation

Bunch charge

5 Launch loops

7 configurations of Longitudinal feedback

November 12, 2008

Controls Software D. Fairley

November 12, 2008

Controls Software D. Fairley

MATLAB: Still to do

Still to do

New Launch feedbacks

Additional Longitudinal configurations

Smart Longitudinal Feedback

Time-slot awareness

November 12, 2008

Controls Software D. Fairley

Still to do: Launch Feedbacks

L3 Launch

BSY Launch

LTU Launch

Undulator Launch

NOTE: Launch feedbacks are fairly easy to create and deploy, as long as all devices are EPICS controlled.

November 12, 2008

Controls Software D. Fairley

Still to do: Longitudinal Feedback

Longitudinal Feedback

RF Control in L2 and L3

Want to try out ‘Energy’ and ‘Chirp’ PVs as actuators for L2 need to add similar control for L3

Add DL2 energy (or BSY energy) to Longitudinal

Must calculate the new ‘Energy’ measurement two different ways, depending on beam destination.

One Shift – test L2 control

One Shift – test L3 control + BPM measurements at

DL2

One Shift – test 6x6 Feedback

Make Longitudinal a single, smart feedback

November 12, 2008

Controls Software D. Fairley

Smart Longitudinal Feedback

Why do this?

It’s already difficult to keep track of which longitudinal should run, and to remember to change it when beam conditions change. With the addition of DL2 energy, the number of longitudinal feedbacks to choose between, increases from 7 to 13+.

The feedbacks do not respond to chicane on/off and there are no feedbacks that work with BC1 Off / BC2 On scenario. We can add this capability.

Each longitudinal feedback has its own set of archived PVs – when switching from one longitudinal to another, the archiver also changes

PVs. When looking back at archive, the user needs to look at all 7 (13+) sets of PVs or know which feedback was running at the time of interest.

A new, smart Longitudinal feedback will have only one set of PVs.

The feedbacks do not respond to online/offline devices right now. We can add this capability, and use it in a smart way.

November 12, 2008

Controls Software D. Fairley

November 12, 2008

Controls Software D. Fairley

Time-Slot Aware in MATLAB

Measurement by Time-slot

System eDefs already have time-slot info. For example, we can set F1 for TS1 and F2 for TS4.

Actuators by Time-slot

Not available now. Ideally, an actuator PV per time-slot would work best for feedback, eg: BDES_TS1, BDES_TS4

For two time-slots, double the number of feedbacks in their configuration files use the Time-slot specific names for measurement, actuator, state PVs.

In the soft IOC, double the number of states and state setpoints PVs, storage PVs, status PVs etc…

Therefore, with Actuator enhancements, MATLAB feedback can work with two time-slots.

November 12, 2008

Controls Software D. Fairley

Fast Feedback Plans

The Team

The Work

Types of feedbacks

Proposed Feedback Architecture

Major subprojects

The Schedule

November 12, 2008

Controls Software D. Fairley

The Team

Project Manager: Patrick Krejcik

Software Lead: Diane Fairley

Network Software

Stephen Norum

Till Straughman (consulting)

Sheng Peng (consulting)

Coordinating with Photon Diagnostics Group

Timing: Stephanie Allison

IOC Software (controller, actuators, measurements)

Diane Fairley

Debbie Rogind

Stephanie Allison (consulting)

IOC Software Group member

Configuration Application

HLA team member(s)

November 12, 2008

Controls Software D. Fairley

Types of Feedbacks

Bunch Charge Feedback

Longitudinal Feedback

Multiple Transverse Feedbacks

More added in the future…

NOTE: the bunch charge and longitudinal feedbacks are unique. The transverse feedback type needs to be easily created and configured

November 12, 2008

Controls Software D. Fairley

Major Subprojects

1. Dedicated Network

2. Feedback Controller IOC Application

3. Actuator IOC Application

4. Measurement IOC Application

5. Feedback Configuration Application

Includes automated creation of new feedbacks

November 12, 2008

Controls Software D. Fairley

Proposed Fast Feedback Architecture

November 12, 2008

Controls Software D. Fairley

Dedicated Network

A dedicated network must be developed and installed to support the required 120Hz data throughput

Additional hardware is required for each actuator, measurement and controller IOC.

Interface layer(s) of software must be developed for each of these IOCs as well:

Generic network management, send & receive layer

Layer for packaging, sending, recieving data specific to each feedback controller.

November 12, 2008

Controls Software D. Fairley

Controller IOC Application

Runs on an IOC; one instance per feedback

Provides a user interface to the running loop via EDM screens and

PVs

Is Timing driven (loop wakes up on a timing event)

Runs the actual feedback loop; reads setpoints, on/off, gains, matrices, beam and device conditions from PVs;

Gets measurements and actuator readbacks from devices via dedicated network checks beam and device conditions,

If conditions good, calculates states and new actuator values, sends actuator commands via dedicated network stores all measurement, actuator, and calculated state values to PVs on IOC to meet post-mortem requirement

Outputs feedback parameter data (BLD to Photon group) via the FF network

Energy, launch parameters (x,x’,y,y’), peak current at the end of the linac

November 12, 2008

Controls Software D. Fairley

Actuator IOC application

Runs on the actuator IOCs

LLRF, Magnets, Laser Power and/or

Manages interface to dedicated FF network

Accepts actuator commands from controller via dedicated FF network.

Support multiple time-slots. The actuators are set per timeslot.

Actuator commands from FF network are applied within one pulse rep. interval.

Readback values are sent back to controller via FF network on the next pulse interval.

Readback data includes device name, value, quality, timestamp, timeslot

November 12, 2008

Controls Software D. Fairley

Measurement IOC Application

Runs on the measurement device IOCs

BPMs, BLENs, TOROs

Sends each pulse measurement to feedback controllers via the dedicated

FF network

Measurement data includes device name, value, quality, timeslot, timestamp

Send measurement data for all devices in IOC?

November 12, 2008

Controls Software D. Fairley

Configuration Application

Written in HLA java framework

Runs on the OPI

Allows user to choose feedback devices, and configure limits, gains, matrices, setpoints, reference orbits

Allows user to load a configuration to the Feedback

Controller IOC (and possibly to the Actuator and

Measurement IOCs)

Allows user to save configurations to the RBD

Supports the automated creation of new feedbacks

November 12, 2008

Controls Software D. Fairley

Fast Feedback Architecture Issues

Ethernet is the preferred solution (it is multi-source and cost effective), but reflective memory appears to be the only solution that works within our schedule and staffing constraints.

Where will the Controller IOC Application run?

On a single feedback IOC? Multiple feedback IOCs? On each actuator IOC?

What devices will be on the fast feedback network?

At what rates will the feedback itself operate?

1Hz, 10Hz, 30Hz, Full Rate

– like the EDEFs?

What data does the Photon Group need? (BLD data)

Energy, launch parameters (x,x’,y,y’), peak current at the end of the linac

How can we automate creation of a new feedback? (database driven)

November 12, 2008

Controls Software D. Fairley

Proposed Schedule

Network Preliminary Design -- Jan 2009.

This allows us to begin on networking

Detailed design & review of subprojects -- Spring 2009

Timeslot control of feedback actuators – Spring 2009

Network established -- Summer 2009

Provide 120Hz Photon data link -- Fall 2009

First Fast Feedback loop -- January 2010

November 12, 2008

Controls Software D. Fairley

Reference:Creating a new feedback in general

Current general process for creating new Feedback loops

If necessary, create up to three new MATLAB scripts for the feedback: getMatrix function, loop init function, loop algorithm. Currently there are three versions of each of these, one for each feedback ‘type’.

Add EPICS DB template for each new feedback and re-build the softIOC *

Create a configuration file for the feedback *

Create EDM screens for the new feedback *

Update ChannelWatcher config

Add Alarms for the feedback

Archive new feedback PVs

Most time is spent updating support applications

– alarm handler, channelwatcher, archiver, and particularly EDM displays. How to ‘automate’ these?

The ability to dynamically create PVs with relevant names would be an awesome thing. At this time, auto-creating feedbacks requires pre-loading the feedback IOC with generic named records that can be assigned on the fly. Is this a problem?

* Usually done by copy and edit

November 12, 2008

Controls Software D. Fairley

Download