lsst scheduler development workshop scheduler design francisco delgado sr. software engineer...
TRANSCRIPT
LSST Scheduler Development Workshop
Scheduler Design
Francisco DelgadoSr. Software Engineer
Telescope & Site
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 2
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 3
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 4
LSST Control Hierarchy
• DDS publish/subscribe• Topics for Commands, Telemetry and Events
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 5
Observatory Control System
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 6
Scheduler Internal Block Diagram
Conductor Optimizer
Slew Time
Scheduling Data
Candidates
Observation History
Scheduler
Control
Telemetry
History
Image Quality
Visits
Targets
Sched Telem
Sched Mode
Downtime
Degraded
Targets
Observatory conditions
Environment conditions
Forecast
Quality parameters
Past observations
Current observation
Sched Telem
Astronomical Sky
Sky brightness
coordinates
Science ProgramsValue functions
Cost functionsTime
Observatory Model
Kinematic model
coordinates
CandidatesEnvironment conditions
Sched Config
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 7
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 8Scheduler 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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 9
OpSim implementation
• Python language for the logic and data handling• C++ for libraries• 20k lines of code approx.
• MySQL database with 22 tables for the history of visits, slews and sequences, sky conditions, etc.
• Typical 10 year run takes 50 hours in personal computers• Time dominated by DB access & Slew time
calculations• 4~5 Gb in Database for a 10 year run• Memory dominated by deterministic look-ahead
data, 4Gb per lunation with 5 mins granularity
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 10
OpSim Architecture
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 11
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 12Scheduler 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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 13
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 value 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
aslewBonusValueRank
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 14
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 15
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 16
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 17
Look-ahead
A time window is defined for a number of nights to the future.
For each target from the candidates list: Alt-Az-Pa, 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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 18
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 19
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 20
Science Proposals balance
– This equations promote a balanced progress in the competing science proposals
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 21Scheduler Design
SchedulerTelemetry
History
Control
Targets
Image Quality
Scheduler Interfaces in OCS
OCS Application
communications middleware
TCSEFD DMCS
OCS Sequencer
VisitsSchedTelem
CCS
CmdVisits
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 22Scheduler Design
SchedulerTelemetry
History
Control
Targets
Image Quality
Scheduler Interfaces in OBSIM
OBSIMSimulation
kernel
communications middleware
OBSIMObservatory
Model
OBSIMSurvey
Database
OBSIMSimulation
kernel
VisitsSchedTelem
CmdVisits
OBSIMEnvironment
Model
OBSIMQuality
Simulator
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 23
ObSim Internal Block Diagram
SimulationKernel
Survey Database
ObSimControl
Telemetry
History
Image Quality
Visits
Targets
Sched Telem
Sched Mode
Downtime
Degraded
Targets
Observatory conditions
Environment conditions
Forecast
Quality parameters
Past observations
Current observation
Sched Telem
Quality Simulator
Downtime Model
Time
Sequencer
Observatory ModelKinematic model
coordinates
Environment ModelSky brightness
coordinates
Time
Config
Sched Config
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 24
Scheduler Internal Block Diagram
Conductor Optimizer
Slew Time
Scheduling Data
Candidates
Observation History
Scheduler
Control
Telemetry
History
Image Quality
Visits
Targets
Sched Telem
Sched Mode
Downtime
Degraded
Targets
Observatory conditions
Environment conditions
Forecast
Quality parameters
Past observations
Current observation
Sched Telem
Astronomical Sky
Sky brightness
coordinates
Science ProgramsValue functions
Cost functionsTime
Observatory Model
Kinematic model
coordinates
CandidatesEnvironment conditions
Sched Config
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 25
Scheduler Inputs/Outputs
Inputs Control
Scheduler Configuration Scheduler Mode Downtime Degraded
Telemetry Observatory conditions Environment conditions Forecast
Image Quality DM feedback
History Past observations
Visits Current observation
Outputs Targets Scheduling telemetry
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 26
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 28
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.
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 30
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 31
OCS communications
Scheduler Design
DDS COMMUNICATIONS MIDDLEWARE (Commands, Telemetry, Events)
OCSApplication
OCSRemote
OCSSequencer
OCS Maintenance
OCSTelemetry
OCSMonitor
OCSOperator
OCSScheduler
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 32Scheduler 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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 33
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 35
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 36
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 38
Scheduler Architecture
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 39
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 46
Scheduler Target List
Scheduler Design
OpSim: start night
Scheduler: update target list
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 49
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 50
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 51
Survey database analysis
• Simulation Survey Tools for Analysis and Reporting (SSTAR).• Automatic analysis from the output DB.• Statistics, charts and metrics.
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 52
Filter Map
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 53
Joint completeness comparison
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 54
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
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 62
Perform Science Observations Validation
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 63
Select Target Validation
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 64
Rank Targets validation
Scheduler Design
Scheduler Development Workshop • Tucson, Arizona • March 18-19, 2015 65
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