LSST Telescope and Site Observatory Control System Interface Review Scheduler Design Francisco...

Post on 29-Dec-2015

214 views 0 download

Tags:

Transcript of LSST Telescope and Site Observatory Control System Interface Review Scheduler Design Francisco...

LSST Telescope and SiteObservatory Control System

Interface Review

Scheduler DesignFrancisco Delgado

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 2

Addressing the Charge

2. Is the OCS design mature enough to support (i) the analysis of compliance with the requirements and (ii) the definition of interfaces?

9. Are the plans for implementing the OCS are adequate and realistic, including budget, schedule, and organization/management structure? Are the deliverables for the Scheduler and the Operations Simulator well defined and the corresponding resources properly aligned between the OCS and Systems Engineering teams? Are the deliverables for communication middleware well defined and the assigned resources adequate?

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 3

Scheduling the LSST Survey

• LSST as a robotic observatory

• Survey is automatic

• Multiple science goals

• Combine area distribution with temporal sampling

• Dynamic adaptation to weather

• Flexibility for survey adjustments during operations

• Flexibility for changes in science programs

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 4

Requirements Flow down

Science Requirements Document

LPM-17

Scheduler RequirementsLSE-190

Observatory System Specifications

LSE-30

LSST System Requirements

LSE-29

OpSim RequirementsLSE-189Observatory Control

System RequirementsLSE-62

Science Book

Metrics RequirementsDOC-15319

Science Collaborations

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 5Scheduler Design

Scheduler Requirements Traceability

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 6

Scheduler concepts

• Sky field map, tiling regions, a target is a field/filter combination.

• Fully configurable set of concurrent competing science programs.

• Sky brightness dynamically modeled for each sky field with look-ahead window.

• Comprehensive observatory kinematic model for slew time optimizations.

• Target score balances science value and time cost

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 7

Observatory Control System

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 8Scheduler Design

Scheduler Internal Block Diagram

Control

Observatory Telemetry

Environmental Conditions

Observed Targets

Selected Targets

Database

Conductor Optimizer

Observatory Kinematic Model

Slew Time Estimations

Astronomical Sky Scheduling Data

Suggested Targets

Science Programs

Observation History

Calibration Engineering Programs

Calibration TargetsScience Targets

Scheduler

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 9

Scheduler internal communications

Scheduler Design

Science Program N

Observation History

Calibration Programs

Observatory Kinematic

Model

Astronomical Sky

Conductor Optimizer

Scheduling Data

Science Program 1 …

communications middleware

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 10

Science Programs parameters

• Sky region.

• Number of visits per field in each filter.

• Cadence constraints for revisits or sequences.

• Airmass limits.

• Sky brightness constraints.

• Seeing requirements.

• Activation times.

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 11Scheduler Design

Science Programs classes

Area distribution programs Designed to obtain uniform distribution Basic parameter: goal visits per filter Look-ahead info: future available time for the targets

Time distribution programs Designed to obtain specified intervals in sequences Basic parameter: time window for visits interval Look-ahead info: visibility for next intervals

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 12

Selecting the next visit

Dynamic and adaptive process for each visit: Each science program:

analyzes its assigned sky region and selects the candidate targets that comply with its requirements.

computes the science merit for each selected target according to its own distribution and cadence constraints.

The conductor optimizer combines the targets and their science merit from all the science programs.

The observatory model computes the slew time cost for each target from the current position.

The target with the highest overall rank is selected.

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 13Scheduler Design

Select Next Visit

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 14

Look-ahead

A time window is defined for a number of nights to the future.

For each target from the candidates list: Airmass and sky-brightness are pre-calculated. Visibility is determined from each science program

constraints. Science programs have this look-ahead information for

improving time distribution and efficiency in sequences.

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 15

Operations Simulator

• System simulation and prototype for the Scheduler

• Validate observatory design

• Design science programs to achieve SRD

• Develop an efficient LSST scheduling strategy

• Systems engineering trade off studies

• Support Commissioning and Operations

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 16Scheduler Design

OpSim requirements

• Simulate Operations visit by visit for 10 years

• Simulate Observatory (Telescope & Camera kinematics, slew & track)

• Simulate Environment (clouds, seeing, sky brightness)

• Prototype Scheduler (targets generation and scheduling algorithms)

• Set of proposals, SRD defined universal plus auxiliary projects

• Flexibility for algorithm experimentation

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 17

OpSim Architecture

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 18

Environment Models

• slalib for sun & moon

• Sophisticated sky brightness model using the Krisciunas and Schaeffer model with twilight.

• Actual seeing historic measurements from the site.

• Actual clouds historic record from the site.

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 19

Observatory Model

• Second order kinematic model for the slew activities Mount Azimuth with cable wrap.……………………. Mount Altitude………………………………………………. Mount Settle time………………………………………….. Dome Azimuth……………………………………………….. Dome Altitude……………………………………………….. Rotator Angle………………………………………………….

• Delay model for Camera filter change…………………………………………………… Shutter time…………………………………………………… exposure time………………………………………………… Readout time………………………………………………….

• Active Optics correction…………………………………………..

Scheduler Design

slew exposure

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 20Scheduler Design

OpSim activity diagram of a visit

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 21

OpSim implementation

• Python language for the logic and data handlingC++ for libraries, such as slalib20k lines of code approx.

• Typical 10 year run takes 50 hours in personal computers

• MySQL database with 22 tables for the history of visits, slews and sequences, sky conditions, etc.

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 22

Sky coverage per filter

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 23

OpSim & Scheduler configuration

• System 117 parameters, including the site, sky model and the kinematic model

• Scheduler 11 parameters for controlling the algorithms• Survey 130 approx. parameters for each the science programs• Typical set of 5 programs• 3600 sky fields• Parameters for depth per color• Parameters for sequence cadences• Sky brightness limits• Airmass limits• Seeing limits

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 24Scheduler Design

SchedulerTelemetry

History

Control

Targets

Image Quality

Scheduler Interfaces in OCS

OCS Application

communications middleware

TCSEFD DMCS

OCS Sequencer

VisitsSchedTelem

CCS

CmdVisits

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 25Scheduler Design

SchedulerTelemetry

History

Control

Targets

Image Quality

Scheduler Interfaces in OPSIM

OPSIMSimulation

kernel

communications middleware

OPSIMTelescope

Model

OPSIMDB

OPSIMSimulation

kernel

VisitsSchedTelem

CmdVisits

OPSIMWeatherModel

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 26

Scheduler Inputs/Outputs

Inputs Control

Mode Downtime Degraded

Telemetry Observatory conditions Environment conditions Forecast

History Past observations

Visits Current observation

Image Quality Quality parameters

Outputs Targets Scheduling telemetry

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 27

Scheduler Development Partition

Design & Implementation (T&S) API Architecture Coding System parameters

Conductor/Optimizer Scheduling Data Generic Science Program Calibration Engineering Programs

Scheduler Design

Cadence & Algorithms (SE Simulation) Science cases Algorithms Survey and Scheduling parameters Coding

Observatory Kinematic Model Astronomical Sky Specific Science Programs Observations History

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 28

Deliverables

Telescope & SiteSystems

EngineeringSimulation

Scheduler Team

Scheduler

API

OCS environment

OPSIM environment

SchedulerCode & Framework

SchedulerCadence & Algorithms

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 29

Summary

Scheduler design integrated with OCS architecture.

OCS telemetry architecture enables the use of any variable for scheduling purposes.

Partition and architecture makes for a flexible implementation.

Designed to allow a distributed deployment.

Scheduling strategies have been extensively tested in OpSim.

Simple scheduling algorithms applied to thousands of competing targets produce emerging behavior to solve a complex problem.

Scheduler Design

End of Presentation

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 31

Backup slides

Scheduler Design

LSST Introduction

The Large Synoptic Survey Telescope is a complex hardware – software system of systems, making up a highly automated observatory in the form of an 8.4m wide-field telescope, a 3.2 billion pixel camera, and a peta-scale data processing and archiving system. The survey consists of a continuous cadence of visits covering the entire observable sky in 6 different colors with different specifications for depth and time intervals for multiple science programs.

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 33

LSST Control Hierarchy

• DDS publish/subscribe• Topics for Commands, Telemetry and Events

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 34

DDS COMMUNICATIONS MIDDLEWARE (Commands, Telemetry, Events)

OCSApplicati

on

CCSInterface

OCSRemote

OCSSequenc

er

OCS Mainten.

OCSTelemetr

y

OCSMonitor

OCSOperator

OCSSchedule

r

DMCSInterface

TCSEnviro

n.Control

ler

TCSEnclos

ureControl

ler

TCSRot/Hex

Controller

TCSMountControl

ler

TCSM2

Controller

TCSM1M3Control

ler

TCSOptics

Controller

Calibration

TCSOperat

or

TCSPointin

gKernel

TCSAppl.

TCSWavefro

ntInterface

MUXDEMUX

MUXDEMUX

CameraGuider

Interface ILCNetwor

kTemper.

ILCNetwor

k

Device

Control

Device

Control

Device

Control

Device

Control

ILCNetwor

kSurface

ScienceData

Interface

:

:

DDS Communications

NON DDS Communications

AuxiliaryTelescop

e

OCSEngineering Facility

DB

Alignment

Auxiliary

Equipment

-Distributed Control System-Scalable Architecture-Loosely-coupled systems-Interfaces defined by the information model-Connectivity complexity managed by the data bus

LSST CONTROL ARCHITECTURE

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 35

OCS communications

Scheduler Design

DDS COMMUNICATIONS MIDDLEWARE (Commands, Telemetry, Events)

OCSApplication

OCSRemote

OCSSequencer

OCS Maintenance

OCSTelemetry

OCSMonitor

OCSOperator

OCSScheduler

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 36Scheduler Design

Sim

ulati

onO

pera

tions

SchedulerTelescope Telemetry

Weather Telemetry

Downtime Status

Telescope Model

Weather Model

Downtime Model

Observatory Database

Survey Database

Observatory Control System (OCS)

Scheduler

SelectedTargets

Simulation Kernel

Telemetry

EnvironmentalConditions

ObservedTargets

Control

Database

Simulation Params

Scheduling Params

Telemetry

EnvironmentalConditions

ObservedTargets

Control SelectedTargets

Database

OpSim includes Scheduler prototype

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 37

Scheduler Composition

Scheduler Design

Model Based Systems Engineering (MBSE)

• The LSST uses MBSE to capture the high level system development

• The language is SysML• The tool is Enterprise Architect• The model captures and relates:

– Requirements – Interfaces – Overall System Architecture – Components Structure – System Behavior – Operational Definitions

• Document 9336 “Using SysML for MBSE Analysis of the LSST System

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 39

Model-Based Systems Engineering

Scheduler Design

OCS requirements flow-down

• Science Requirements Document is the parent for all requirements flow down.

LPM-17

• LSST System Requirements (high level what the LSST is and must do)

LSE-29

• Observatory System Specifications (high level how the LSST will do what it must)

LSE-30

• Observatory Control System Requirements (Subsystem Requirements)

LSE-62

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 41

Scheduler Architecture

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 42

Selecting the next visit Dynamic and adaptive process for each visit:

Each science program: analyzes its assigned sky region and selects the

candidate targets (field/filter) that comply with its requirements for airmass, sky-brightness and seeing.

computes the science merit for each selected target according to its own distribution and cadence requirements.

The conductor optimizer combines the targets from all the science programs and using the observatory model incorporates the slew cost to obtain an overall rank.

The target with the highest rank is selected.

)(*

bSlewTime

aslewBonusMeritRank

Scheduler Design

Scheduling Visits

Dynamic and adaptive process for each Visit:– Each science proposal analyzes its assigned sky region, and

selects the candidate targets that comply with its requirements for airmass, sky-brightness and seeing.

– Each proposal computes the scientific merit for each target according to its own distribution and cadence requirements.

– The observation scheduler combines all the targets and invokes the telescope model to compute slew cost for each one.

– The scheduler computes the overall rank and select the best.

Rank = CoaddedMerit +

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 44

Area distribution programs

– Designed to obtain uniform distribution– Basic parameter: goal visits per filter

– Field-filters receiving visits reduce their rank, while not observed Field-filters increase their rank.

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 45

Area distribution with look-ahead

– availableTime is the addition of the future time windows when the target (field-filter) is visible for the science program.

– targetMerit gives a normalized range of values– These example equations balance the area distribution

taking into account the future availability of the field-filter

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 46

Time distribution programs

– Designed to obtain specified intervals– Basic parameter: time window for visits interval

– Each field has a sequence of visits with time intervals.– This rank envelope promotes visits as close to the desired

intervals as target competition allows

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 47

Sequence Possibilities

One single sequence per field Multiple subsequences per field, different filters Option for collecting pairs of visits in any subsequence Option for combining area with time distribution Option for collecting deep drilling sequences, back-to-back

visits changing filters Option for nested subsequences

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 48

Sequences filtering with look ahead

– A science program with sequences evaluates the look ahead visibility of the field-filter series of visits given a start time.

– A list of possible start times is populated for each sequence.

– The goal is to start only feasible sequences increasing the efficiency

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 49

Science Proposals balance

– This equations promote a balanced progress in the competing science proposals

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 50

SummaryPowerful tool for designing the survey and systems engineering

OpSim was key on site-selection, validation of telescope-camera specifications, and demonstrated that the science requirements could be met.

OpSim-Scheduler as a prototype for OCS-Scheduler.

OpSim as a simulation environment for the Scheduler prototype.

OpSim will be evolved into an operational tool for survey assessment and planning.

New look-ahead capabilities and scheduling algorithms in development.

Scheduler Design

Operations Simulator

• Verify the specifications of LSST hardware and survey against SRD

• Experiment with sets of science programs

• Experiment scheduling algorithms and strategies

• Systems engineering trade off studies

• Refine requirements for OCS Scheduler

Operations Simulator

Software package for simulating the 10 years survey in a visit by visit, slew by slew detail.

Detailed kinematic model of the telescope+camera+dome

Sophisticated sky model, calculating sky brightness using the Krisciunas and Schaeffer model. It tracks the sun and moon using SLALIB routines.

Actual seeing and clouds historic tables from the site.

Multiple science programs that implement a cadence that satisfies the science requirements.

Operations Simulator Requirements

• Simulate Operations

• Simulate Observatory (Telescope & Camera kinematics, slew & track)

• Simulate Environment (clouds, seeing, sky brightness)

• Prototype Scheduler (targets generation and scheduling algorithms)

• Set of proposals, SRD defined universal plus key projects

• Flexibility for algorithm experimentation

OpSim requirements in SysML

OpSim components

OpSim activities

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 57

Scheduler Target List

Scheduler Design

OpSim: start night

Scheduler: update target list

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 60

OpSim Telescope model parameters# speed in degrees/second# acceleration in degrees/second**2DomAlt_MaxSpeed = 1.75DomAlt_Accel = 0.875DomAlt_Decel = 0.875

DomAz_MaxSpeed = 1.5DomAz_Accel = 0.75DomAz_Decel = 0.75

TelAlt_MaxSpeed = 3.5TelAlt_Accel = 3.5TelAlt_Decel = 3.5

TelAz_MaxSpeed = 7.0TelAz_Accel = 7.0TelAz_Decel = 7.0

# not used in slew calculationRotator_MaxSpeed = 3.5Rotator_Accel = 1.0Rotator_Decel = 1.0

# absolute position limits due to cable wrap# the range [0 360] must be includedTelAz_MinPos = -270.0TelAz_MaxPos = 270.0

Rotator_MinPos = -90.0Rotator_MaxPos = 90.0

Rotator_FollowSky = False

# Times in secFilter_MoveTime = 120.0

Settle_Time = 3.0

# In azimuth onlyDomSettle_Time = 1.0

Readout_Time = 2.0

# Delay factor for Open Loop optics correction,# in units of seconds/(degrees in ALT slew)TelOpticsOL_Slope = 1.0/3.5

# Table of delay factors for Closed Loop optics correction# according to the ALT slew range.# _AltLimit is the Altitude upper limit in degrees of a range.# The lower limit is the upper limit of the previous range.# The lower limit for the first range is 0# _Delay is the time delay in seconds for the corresponding range.TelOpticsCL_Delay = 0.0TelOpticsCL_AltLimit = 9.0 # 0 delay due to CL up to 9 degrees in ALT slewTelOpticsCL_Delay = 20.0TelOpticsCL_AltLimit = 90.0

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 61

Detailed slew simulation

Session ID: 271 number of nights: 365 number of exposures: 173999exposures/night: 476.7

average slew time: 9.79s

statistics for angle TelAlt: min= 15.1d max= 86.5d avg= 54.9d std= 14.2dstatistics for angle TelAz: min=-270.0d max= 270.0d avg= -19.0d std= 99.8dstatistics for angle RotPos: min= -90.0d max= 90.0d avg= -9.4d std= 52.1d

slew activity for DomAlt: active= 90.5% of slews, active avg= 3.47s, total avg= 3.14s, max= 22.05s, in critical path= 0.0% with avg= 0.00s cont= 0.00sslew activity for DomAz: active= 90.5% of slews, active avg= 5.55s, total avg= 5.02s, max=106.25s, in critical path= 0.8% with avg= 83.63s cont= 0.64sslew activity for TelAlt: active= 90.5% of slews, active avg= 3.47s, total avg= 3.14s, max= 22.05s, in critical path= 38.2% with avg= 3.69s cont= 1.41sslew activity for TelAz: active= 90.5% of slews, active avg= 4.87s, total avg= 4.41s, max=105.94s, in critical path= 45.3% with avg= 5.83s cont= 2.64sslew activity for Rotator: active= 90.5% of slews, active avg= 4.68s, total avg= 4.23s, max= 54.81s, in critical path= 3.9% with avg= 16.18s cont= 0.63sslew activity for Filter: active= 2.2% of slews, active avg=120.00s, total avg= 2.67s, max=120.00s, in critical path= 2.2% with avg=120.00s cont= 2.67sslew activity for TelOpticsOL: active= 90.5% of slews, active avg= 0.99s, total avg= 0.89s, max= 18.55s, in critical path= 16.9% with avg= 1.89s cont= 0.32sslew activity for Readout: active= 99.7% of slews, active avg= 1.00s, total avg= 1.00s, max= 1.00s, in critical path= 0.0% with avg= 0.00s cont= 0.00sslew activity for Settle: active= 99.7% of slews, active avg= 1.00s, total avg= 1.00s, max= 1.00s, in critical path= 75.9% with avg= 1.00s cont= 0.76sslew activity for TelOpticsCL: active= 3.1% of slews, active avg= 22.87s, total avg= 0.71s, max= 40.00s, in critical path= 3.1% with avg= 22.87s cont= 0.71s

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 62

Survey database analysis

• Simulation Survey Tools for Analysis and Reporting (SSTAR).• Automatic analysis from the output DB.• Statistics, charts and metrics.

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 63

Filter Map

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 64

Joint completeness comparison

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 65

Organization

Telescope & Site

Systems EngineeringSimulation

Scheduler TeamEngineering LeadSWScheduler Scientist

SW

SE

Science Lead

Simulation Runs

Scheduler Design

Design Validation using MBSE

The following slides show an example of the triad validation methodology for the OCS design. From LSST Observatory all the way to the OCS Scheduler Kinematic model structure component, flowing top down through the corresponding requirements and behavior.

Scheduler structure traceability to requirements

OCS Requirements Organization

OCS Requirements Context

OCS Scheduler Requirements

OpSim structure traceability to requirements

Perform Survey Activity

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 73

Perform Science Observations Validation

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 74

Select Target Validation

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 75

Rank Targets validation

Scheduler Design

OCS Interface Review • Tucson, Arizona • September 10-11, 2014 76

Summary

Powerful tool for survey designing and systems engineering

OpSim was key on site-selection, telescope-camera specifications validation, and finding a survey that fulfilled the science requirements.

OpSim-Scheduler as a prototype for OCS-Scheduler, reducing the risk on a critical component.

OpSim can be evolved into an operational tool for survey assessment and planning.

OpSim as a simulation environment for the Scheduler prototype

Scheduler arquitecture designed for flexibility and multiple goalsScheduler Design