Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6...

20
This work has been carried out within the framework of the EUROfusion Consortium and has received funding from the Euratom research and training programme 2014-2018 and 2019-2020 under grant agreement No 633053. The views and opinions expressed herein do not necessarily reflect those of the European Commission. B.Sieglin, M.Maraschek, O.Kudlacek, A.Gude, W.Treutterer, M.Kölbl, A.Lenz, ASDEX Upgrade Team and EUROfusion MST1 Team Rapid prototyping of advanced control schemes in ASDEX Upgrade 1 14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Transcript of Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6...

Page 1: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

This work has been carried out within the framework of the EUROfusion Consortium and has received funding from the Euratom research and training programme 2014-2018 and 2019-2020 under grant agreement No 633053. The views and opinions expressed herein do not necessarily reflect those of the European Commission.

B.Sieglin, M.Maraschek, O.Kudlacek,A.Gude, W.Treutterer, M.Kölbl, A.Lenz,

ASDEX Upgrade Team and EUROfusion MST1 Team

Rapid prototyping of advanced control schemes in ASDEX Upgrade

114.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Page 2: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Overview

2

• Introduction and strategy for rapid prototyping of advanced control schemes.

• Implementation of runtime expression parsing

into the discharge control system (DCS).

• Disruption avoidance testing: H-mode density limit

• Summary

Page 3: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Advanced control schemes in ASDEX Upgrade

3

Past

Independent feed back controllers.

Feed forward for many systems.

Limited number real time diagnostics.

Present

Higher degree of coupled controllers.

Feed back for many systems.

Exception handling for dedicated (known) scenarios.

Increasing number of real time diagnostic.

Future

Objective driven control.

Decision logic with exception handling.

Comprehensive plasma state provided by full real time diagnostic coverage.

Increasing levelof abstraction.

Switch onheating source X

of type Yat time Z

Provide X MWof heating with

property YIn case ofevent Z

Page 4: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Basic Strategy

4

Decision Logic

ActuatorManagement

RequestDetermination

SignalEvaluation

Diagnostics

Overview

Diagnostics provide data in real time.

Provided signals are evaluated to determine plasma state.

Decision logic determines which action has to/can be taken.

The request (for the different tasks) is determined.

Actuator management takes the decision which actuators to use and issues the commands accordingly. [O.Kudlacek, P.558]

Page 5: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Basic Strategy

5

Decision Logic

ActuatorManagement

RequestDetermination

SignalEvaluation

Diagnostics

Decision Logic

ActuatorManagement

RequestDetermination

SignalEvaluation

Diagnostics

Overview

Diagnostics provide data in real time.

Provided signals are evaluated to determine plasma state.

Decision logic determines which action has to/can be taken.

The request (for the different tasks) is determined.

Actuator management takes the decision which actuators to use and issues the commands accordingly. [O.Kudlacek, P.558]

Scope of this talk

Configuration based

signal evaluation for physical quantities.

state space observers and request calculation.

Example:

H-mode density limit disruption avoidance in ASDEX Upgrade.

Page 6: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Discharge Control System (DCS)

6

The philosophy is to define the control behaviour via configuration.

DCS satellite concept utilizes the framework to be able to flexibly add, for example, additional diagnostics, actuators or computation nodes.

The signal evaluation for rapid prototyping is implemented as a so called application process (AP) which can be added to a DCS satellite via configuration.

Central DCS

DCS SatelliteVRT

DCS SatelliteMagnetics

DCS SatelliteObserver

DCS SatelliteJANET++

DCS Satelliteother

Page 7: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Implementation goals

7

Enable to define the computation of an output signal using

multiple parameters (e.g. constants).

multiple input signals (from e.g. diagnostics or other signal evaluations).

an arbitrary mathematical expression for the calculation.

Exploit possibility of DCS to have automatically scheduled concurrent tasks.

Ease of use for the experimentalist to define new signals. No expert knowledge of DCS shall be required to define a signal.

Deployment to live DCS is done by CODAC operators.

Page 8: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Desired workflow

8

Automatedgeneration

Selection ofcalculation node

Real timecommunicationSignal

DefinitionDCS

ConfigurationDCS AP

Instantiation

Central DCS

The experimentalist should not have to know anything about DCS.

The definition should be clear and simple.

Deployment of new signals should be quick and effortless.

Page 9: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Desired workflow

9

Automatedgeneration

Selection ofcalculation node

Real timecommunicationSignal

DefinitionDCS

ConfigurationDCS AP

Instantiation

Central DCS

Signal definition is done using YAML (YAML Ain’t Markup Language).

Conversion to the DCS configuration XML is done automated.

GreenwaldDensity: Expression: Prefactor * abs(Ip) / pi / (ahor^2) Parameters: Prefactor: 1.0e14 Signals: Ip: rts:Dia/FPC/IpiFP.val ahor: rts:Dia/FPG/ahor.val Output: rts:Dia/OBS/GreenwaldDensity.val

nGW=1⋅1014 Ipπahor

2

Page 10: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Implementation

10

Requirements

The solution needs to be included into the existing DCS framework (C++).

Performance needs to be sufficient to handle control cycle times of ~ 1 ms.

● Evaluation times of a signal « 1 ms

Tools

C++ Mathematical Expression Library (ExprTk)

Developed by Arash Partow. http://partow.net/programming/exprtk/

Provides extensive expression parsing and evaluation features.

The library builds an abstract syntax tree (AST) which connects the expression with the C++ variables, which can be configured and evaluated at runtime.

Has a wide user group.

and more ...

Page 11: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

For

Testi

ng

Decision Logic

ActuatorManagement

RequestDetermination

SignalEvaluation

Diagnostics

11

Disruptions pose a significant risk for the operation fusion experiments and might be intolerable for large devices.

Disruption avoidance aims at

early detection of an off normal behaviour

application of the required action to return to the nominal path

Disruption Avoidance

Page 12: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

For

Testi

ng

Decision Logic

ActuatorManagement

RequestDetermination

SignalEvaluation

Diagnostics

12

Disruptions pose a significant risk for the operation fusion experiments and might be intolerable for large devices.

Disruption avoidance aims at

early detection of an off normal behaviour

application of the required action to return to the nominal path

For each disruption type/path

a suitable identifier needs to be defined

the required and applicable action needs to be identified

Disruption Avoidance

Page 13: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

For

Testi

ng

Decision Logic

ActuatorManagement

RequestDetermination

SignalEvaluation

Diagnostics

Disruption Avoidance (Testing)

13

Disruptions pose a significant risk for the operation fusion experiments and might be intolerable for large devices.

Disruption avoidance aims at

early detection of an off normal behaviour

application of the required action to return to the nominal path

For each disruption type/path

a suitable identifier needs to be defined

the required and applicable action needs to be identified

For testing of a single disruption avoidance scheme the decision logic is not required.

Page 14: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

H-Mode Density Limit Disruption

14

H-Mode discharges encounter a disruptive state at high densities where the confinement of the discharge is degrading.

Area of disruptivity defined by an empirical contour in H98,y2 and ne,edge/ne,edge,crit diagram.

● With empirical H-mode density limit, which indicates the start of the H to L transition.

0.7 0.8 0.9 1.0 1.1 1.2ne(H-5) / ne,scal(H-5)

0.5

0.6

0.7

0.8

HIT

ERH

-98P

(y,th

,2)

#33676 disrupts

#33681 recovered

detection contour for auto-detection

ne ,edge ,crit=5.06⋅1019P tot0.396⋅ Ip

0.265 ⋅|q95|−0.323

[M.Bernert, PPCF, 2014]

[adapted from,M.Maraschek, PPCF, 2017]

Identified disruption avoidance scheme:

Application of central heating when approaching the disruptive area.

02•105

4•105

6•105

8•105

1•106

02•106

4•106

6•106

8•106

1•107

02•1022

4•1022

6•1022

8•1022

1•1023

02.0•1019

4.0•1019

6.0•1019

8.0•1019

1.0•10201.2•1020

1 2 3 4 5 Time [s]0

1•105

2•105

3•105

4•105

Ipa

PNI

Dtot

PECRH

<ne(edge)>

Wmhd

Page 15: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Requirements for avoidance scheme test

15

Required signals need to be calculated during the discharge:

All required quantities need to be made available to DCS

Calculation of position in state space needs to be available:

DCS AP implemented which calculates the distance to the border of a configurable polygon. (Uses Boost Geometry library.)

Distance

> 0: Point is outside of polygon

< 0: Point is inside of polygon

= 0: Point is on the boundary

Calculated heating power request has to be used as input for the actuator management, which controls the heating systems. [O.Kudlacek, P.558]

Page 16: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Signal Dependencies for H-Mode density limit

16

H98,y2

τE,98,y2τE

WMHD PtotdWMHD/dt Ip BtorRgeoκarea ahorq95

fe,edge,crit

State spaceobserver

Pdirsc,avoid

AcutatorManagement

Produced by diagnostic

Calculated by ExprTk

State space observer AP

Provided by: O.Kudlacek [P.558]

Required signals have been defined and are included into the DCS calculation.

State space observer calculates the distance to the disruptive area.

Actuator management realises the desired heating power request.

Page 17: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Closed loop example

17

Used real time calculated disruption avoidance heating power as input for ECRH heating, controlled via actuator management.

Controlled gas puff is applied which would lead to a disruption if no action is taken.

Control scheme is able to stabilise the discharge. Disruption only after planed ECRH switch off.

Page 18: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Summary

18

A simple and fast way to include new signals into DCS is implemented.

The signal evaluation is implemented for the H-Mode density limit disruption avoidance.

Successfull application of the disruption avoidance control scheme has been demonstrated using the new tools.

Further control schemes will be tested in the future. Validated control schemes are foreseen to be made available to e.g. exception handling.

Page 19: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Backup

19

Backup

Backup Slides

Page 20: Rapid prototyping of advanced control schemes in ASDEX Upgrade · Discharge Control System (DCS) 6 The philosophy is to define the control behaviour via configuration. DCS satellite

14.05.2019 12th IAEA Technical Meeting on Control, Data Acquisition and Remote Participation for Fusion Research, Daejon, Republic of Korea

Signals within DCS

20

Central DCS

DCS Process

Sample Updateand Retreival

Registration ofSignals

DataAccess

Configuration

Notifications

Management

Communication viaGateway AP

SignalAgent

Local APSignal Storage

AP

SampleStorage

Signals are registered before the real time phase.

During the real time phase the storage location of each signal does not change.

DCS is handling the update and notification of the signals.

ExprTk is configured before the real time phase, using the known storage locations of the local process.

During runtime the evaluation is triggered by DCS once the required signals are available and the result made available for other tasks after the evalution is complete.