MCCS Beam Weight Store Implementation

The MccsBeamWeightStore is a Tango device that provides centralized storage and retrieval of beam weights for the SKA Low telescope. MCCS uses it to compute station phase centres during beam configuration and to determine per-antenna weights for beamforming.

The beam weight store is also used by OSO (Observatory Science Operations) to add and manage weights, and by TMC (Telescope Monitoring and Control) to calculate substation phase centres for generating geometric delays for the CBF (Correlator Beam Former). After calibration, attributes are updated with the applied phase centres [Thorn-198].

Currently, weights are the same for all stations, but there is one instance of the MccsBeamWeightStore per station to support future per-station weightings.

Key Features

  • Stores complex-valued weights for 256 antennas per station

  • Supports CRUD operations via Tango commands

  • Provides versioning of antenna weight recipes

  • Supports multiple weighting keys for different configurations

  • Backend-agnostic interface allows switching between implementations

Tango Commands

Command

Description

Insert

Add new weights with a weighting key

Update

Modify existing weights

Delete

Remove weights by key

Select

Retrieve weights by key

Contains

Check if a weighting key exists

GetIndices

Get EEP indices for antennas

GetWeightingKeys

List all available weighting keys

Architecture

The following figure shows a class diagram illustrating the MccsBeamWeightStore architecture.

@startuml
class MccsBeamWeightStore {
    +Url: str
    +TelescopeName: str
    +Backend: str
    +Insert(weighting_key, weights, indices)
    +Update(weighting_key, weights, indices)
    +Delete(weighting_key)
    +Select(weighting_key, indices)
    +Contains(weighting_key)
    +GetIndices()
    +GetWeightingKeys()
}

interface MccsBeamWeightStoreBackend {
    +insert(weighting_key, weights, indices)
    +update(weighting_key, weights, indices)
    +delete(weighting_key)
    +select(weighting_key, indices)
    +contains(weighting_key)
}

class MccsBeamWeightStoreDatabaseBackend {
    -_engine: Engine
    -_telescope: str
    +insert(weighting_key, weights, indices)
    +update(weighting_key, weights, indices)
    +delete(weighting_key)
    +select(weighting_key, indices)
    +contains(weighting_key)
}

class MccsBeamWeightStoreTelmodelBackend {
    -_url: str
    -_telescope: str
    +insert(weighting_key, weights, indices)
    +update(weighting_key, weights, indices)
    +delete(weighting_key)
    +select(weighting_key, indices)
    +contains(weighting_key)
}

StationBeam "0..*" ..> "1" MccsWeightingStore
MccsBeamWeightStore "1" *-- "1" MccsBeamWeightStoreBackend
MccsBeamWeightStoreBackend <|.. MccsBeamWeightStoreDatabaseBackend
MccsBeamWeightStoreBackend <|.. MccsBeamWeightStoreTelmodelBackend

@enduml

The MccsBeamWeightStore has been implemented with two backend options:

  • Database Backend: Uses an SQL database for persistent storage

  • Telmodel Backend: Integrates with the telescope model database service

These are provided via the following main device and backend classes:

  • MccsBeamWeightStore: Tango device interface

  • MccsBeamWeightStoreBackend: Abstract backend interface

  • MccsBeamWeightStoreDatabaseBackend: SQL database implementation

  • MccsBeamWeightStoreTelmodelBackend: Telmodel REST API implementation

The eventual aim is to use the Telmodel database service once it is properly deployed. However, the SQL backend is provided to enable use of the beam weight store in the meantime. The SQL backend will be used in deployment with the same Postgres database used by the MCCSCalibrationStore Tango device.

Usage in MCCS

Within MCCS, the beam weight store is used during beam configuration. TMC provides configuration parameters, including a weighting_key_ref, which is used during the station beam Configure command to query the MccsBeamWeightStore for the appropriate weights.

These weights are combined with the BeamformerTable (set up during Allocate and Configure commands) to compute per-channel, per-antenna weights. The calculated weights are then applied to the SPS subsystem via calibration coefficients.

The calculatePhaseCentre command (currently unimplemented) will compute the station phase centre, which is used by MCCS pointing algorithms for beam steering.

A command flow diagram is provided below for reference:

@startuml

' Participants
participant Subarray
participant SubarrayBeam
participant StationBeam
participant MccsBeamWeightStore
participant Station
participant StationCalibrator
participant SpsStation

' Configuration flow
Subarray -> SubarrayBeam: Configure()
SubarrayBeam -> StationBeam: Configure()
StationBeam -> Station: configure_channels()

StationBeam -> MccsBeamWeightStore: Select(weighting_key)
MccsBeamWeightStore --> StationBeam: antenna_weights
StationBeam -> Station: apply_weights(subarray_beam_id: [antenna_weights])

Subarray -> Station: ApplyConfiguration()

' Station internal processing
Station -> Station: Generate weighting matrix\n(256 x 384) using:\n - beamformerTable\n - antenna_weights \n using subarray_beam_id as link.
Station -> Station: Apply antenna mask:\n - Zero weights for masked antennas across all channels

Station -> Station: Create channel_gain_map \n (i.e reach out to calibrationStore) \n{antenna_id: [channel_gain]}

Station -> Station: Multiply channel_gain_map\nby weighting matrix (256 x 384)

note right of Station: Final result:\nPer-antenna, per-channel calibrated weights

' Calibration application
Station -> SpsStation: load_calibration_coefficients(coeffs)
Station -> SpsStation: ApplyCalibration (i.e switch bank)

@enduml

System Integration

System

Interaction with MccsBeamWeightStore

MCCS

Retrieves weights and calculates station phase centres and applies weights to the station beams on a per antenna per channel basis.

OSO

Adds/updates weights via API or device interface

TMC

Calculates substation phase centres to derive geometric delays for CBF

References