of the kstar tokamak monitoring system

2
Sixth IAEA Technical Meeting on Control, Data Acquisition, and Remote Participation for Fusion Research 4 ~8 June 2007, Inuyama, Japan Software Development of the KSTAR Tokamak Monitoring System K. H. Kim, T. G. Lee, S. Baek, S. I. Lee, Y. Chu, Y. O. Kim, J. S. Kim, M. K. Park, and Y. K. Oh National Fusion Research Center, 52 Eoeun-dong, Yuseong-gu, Daejeon 305-333, Republic of Korea Abstract The Korea Superconducting Tokamak Advanced Research (KSTAR) project, which is constructing a superconducting tokamak, was launched in 1996. Much progress in instrumentation and control has The TMS utilizes Cernox sensors for low temperature measurement and each sensor has its own characteristic curve. In addition, the TMS needs to perform complex arithmetic operations to convert been made since then and the construction phase will be finished in August 2007. The Tokamak Monitoring System (TMS) measures the temperatures of the superconducting magnets and structures and hence monitors the superconducting conditions during the operation of the KSTAR tokamak. The TMS also measures the strains and displacements on the structures in order to monitor the mechanical safety. There are around 500 temperature sensors, more than 360 strain gauges, and 20 displacement gauges. the measurements into temperatures for each Cernox sensor for this large number of monitoring channels. A special software development effort was required to reduce the temperature conversion time and multi-threading to achieve the higher performance needed to handle the large number of channels. We have developed the TMS with PXI hardware and with EPICS software. We will describe the details of the implementations in this paper. Cryogenic Monitoring Functions of KSTAR Tokamak Monitoring System (TMS) Hardware Choice of Hard ware and Software Measure large number of channels (~ 700 channels) System requirements of the TMS Cryogenic Monitoring Monitoring superconductive characteristics Temperature monitoring Cernox/PT-100 sensors Calculate Helium properties (super-critical He) Input: pressure, temperature Output: density, entropy, internal energy and etc. Structural Monitoring Monitoring mechanical safety Displacement Strain-Stress Magnetic filed: Hall sensors Hardware National Instruments: PXI / SCXI Cheap & Powerful CPU board Multi channel I/O : >100ch/module Signal Conditioner: 15kV isolation, Low-pass filter, adjustable gain control, and etc A/D converter (digitizer): PXI-6280 Signal Conditioner: Cernox/Hall sensor: SCXI-1125 Displacement/Strain-Stress: SCXI-1520 and etc. Software OS: Linux (kernel-2.6) Middleware: EPICS (R3 14 8 2) control software standard in KSTAR Measure large number of channels ( 700 channels) Temperature: 500 channels Cenorx Sensor: ~400 PT-100 Sensors: ~100 Displacement: ~20 Strain-Stress: ~ 250 Hall sensor: ~ 10 High voltage isolation and Noise filtering Fast monitoring : 10~50Hz sampling Continuous operation: 24 hours in a day Continuous monitoring Continuous archiving Middleware: EPICS (R3.14.8.2) - control software standard in KSTAR Measurements & I/O control: EPICS IOC software Data conversion & network transmit: IOC software Data Archiving: EPICS channel archiver Monitoring & User Interface: EPICS channel access library, Qt Applications TMS IOC#1: Cryogenic monitoring SCXI modules: cernox sensors & Hall sensors CompactFieldPoint: PT-100 sensors TMS IOC#2: Structural monitoring SCXI modules: Displacement, Strain-Stress Channel Archiver Continuous data archiving SAN Storage Operator Interface Structure and functions of TMS EPICS IOC core software Communication: Channel Access Server/Client Bundled device/record supports User programming environment DB Application: Graphical/Visual programming State Notation Language (SNL): C like syntax / finite state machine De elopment of Soft are Implementation of TMS IOC software Operator Interface User Interface, Alarm, Stripchart CA gateway Communication relay between the machine network and control network Reduce communication overhead on IOCs Control Network / Ethernet Operator Interfaces (OPIs) CA gateway Metafile Servers Development of Software PXI hardware driver & device drvPXISCXI: interface layer between NI DAQmx and EPICS device support layer devPXISCXI: data transmit between hardware to EPICS record, data conversion, and etc DB Application Data conversion: Raw data to Physical data (for displacement, strain-stress , Hall sensors and PT-100) Hardware control: sampling rate, gain, filter option and etc. (by operator or by control logic) SNL program Cooling status, Detection of abnormal status Cernox Data Conversion (Special requirement) each Cernox sensor has its own characteristic curve (fit the curve by Chebyshev polinomials) require a database for fitting coefficients each sensor Machine Network / Ethernet TMS IOC#1 TMS IOC#2 C i M it i Channel Archiver Data Storage System Storage Area Network CompactField Point Temperature Data from PT-100 sensors Temperature Data from Cernox sensors Displacement and Strain Data from sensors Hardwired signal to Interlock system PXI Chassis PXI Chassis SCXI Chassis SCXI Chassis Relay contact to bypass module fast conversion time Implement a function block in device supports with C language an IOC thread executed by a request from record support asynchronous processing to avoid blocking of the record processing EPICS IOC Software Channel Access Communication Layer Reducing the calculation time : example of the Cernox Data Conversion Recursion with Trigonometric function Recursion with arithmetic only Measurements of computation time Implemented with C and embeded into the device supports Choose more faster algorithm Cryogenic Monitoring Structural Monitoring Structure of the TMS NI DAQmx PXI Library Li Driver Supports / genericPXI (*) Device Supports / genericPXI (*) Record Supports Sequencer SNL Applications (*) DB Applications (*) IOC shell Cernox Sensor Data Conversion (*) Command line Configuration and Debugging (*) Iteration with Trigonometric Function Iteration with arithmetic only Calculation Time Fail Calculation Time Fail Cache Fail 25.677 L1 Cache 1.684 L1 Cache Cache Hit 2.113 0.106 sec μ sec μ sec μ sec μ () ( ) = = 9 0 1 cos cos n n x n C x T () () = = 9 0 n n n x T C x T 1 1 2 + = n n n T xT T ( ) R r 10 log = a b b a r r norm = 2 ( ) = n norm n r n C T 1 cos cos 1 1 2 + = n n n T xT T = = x T T 1 0 , 1 ( ) ( ) = n norm n n norm r T C r T Linux PXI/SCXI Hardware ( ) EPICS Native Features (*) Developed for KSTAR TMS Function block in EPICS IOC

Upload: others

Post on 10-May-2022

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: of the KSTAR Tokamak Monitoring System

Sixth IAEA Technical Meeting on Control, Data Acquisition, and Remote Participation for Fusion Research

4 ~8 June 2007, Inuyama, Japan

Software Development of the KSTAR Tokamak Monitoring SystemK. H. Kim, T. G. Lee, S. Baek, S. I. Lee, Y. Chu, Y. O. Kim, J. S. Kim, M. K. Park, and Y. K. Oh

National Fusion Research Center, 52 Eoeun-dong, Yuseong-gu, Daejeon 305-333, Republic of Korea

Abstract

The Korea Superconducting Tokamak Advanced Research (KSTAR) project, which is constructing asuperconducting tokamak, was launched in 1996. Much progress in instrumentation and control has

The TMS utilizes Cernox sensors for low temperature measurement and each sensor has its owncharacteristic curve. In addition, the TMS needs to perform complex arithmetic operations to convert

been made since then and the construction phase will be finished in August 2007. The TokamakMonitoring System (TMS) measures the temperatures of the superconducting magnets and structuresand hence monitors the superconducting conditions during the operation of the KSTAR tokamak. TheTMS also measures the strains and displacements on the structures in order to monitor themechanical safety. There are around 500 temperature sensors, more than 360 strain gauges, and 20displacement gauges.

the measurements into temperatures for each Cernox sensor for this large number of monitoringchannels. A special software development effort was required to reduce the temperature conversiontime and multi-threading to achieve the higher performance needed to handle the large number ofchannels. We have developed the TMS with PXI hardware and with EPICS software. We willdescribe the details of the implementations in this paper.

Cryogenic Monitoring

Functions of KSTAR Tokamak Monitoring System (TMS)Hardware

Choice of Hard ware and SoftwareMeasure large number of channels (~ 700 channels)

System requirements of the TMSCryogenic Monitoring

Monitoring superconductive characteristics Temperature monitoring

Cernox/PT-100 sensorsCalculate Helium properties (super-critical He)

Input: pressure, temperatureOutput: density, entropy, internal energy and etc.

Structural MonitoringMonitoring mechanical safetyDisplacementStrain-StressMagnetic filed: Hall sensors

HardwareNational Instruments: PXI / SCXI

Cheap & Powerful CPU boardMulti channel I/O : >100ch/moduleSignal Conditioner: 15kV isolation, Low-pass filter,

adjustable gain control, and etcA/D converter (digitizer): PXI-6280Signal Conditioner:

Cernox/Hall sensor: SCXI-1125Displacement/Strain-Stress: SCXI-1520 and etc.

SoftwareOS: Linux (kernel-2.6)Middleware: EPICS (R3 14 8 2) control software standard in KSTAR

Measure large number of channels ( 700 channels)Temperature: 500 channels

Cenorx Sensor: ~400 PT-100 Sensors: ~100

Displacement: ~20 Strain-Stress: ~ 250 Hall sensor: ~ 10

High voltage isolation and Noise filteringFast monitoring : 10~50Hz samplingContinuous operation: 24 hours in a day

Continuous monitoringContinuous archiving

Middleware: EPICS (R3.14.8.2) - control software standard in KSTARMeasurements & I/O control: EPICS IOC softwareData conversion & network transmit: IOC softwareData Archiving: EPICS channel archiverMonitoring & User Interface: EPICS channel access library,

Qt ApplicationsTMS IOC#1: Cryogenic monitoring

SCXI modules: cernox sensors & Hall sensorsCompactFieldPoint: PT-100 sensors

TMS IOC#2: Structural monitoringSCXI modules: Displacement, Strain-Stress

Channel ArchiverContinuous data archivingSAN Storage

Operator Interface

Structure and functions of TMS

EPICS IOC core softwareCommunication: Channel Access Server/ClientBundled device/record supportsUser programming environment

DB Application: Graphical/Visual programmingState Notation Language (SNL): C like syntax / finite state machine

De elopment of Soft are

Implementation of TMS IOC software

Operator InterfaceUser Interface, Alarm, Stripchart

CA gatewayCommunication relay between the machine network and control networkReduce communication overhead on IOCs

Control Network / Ethernet

Operator Interfaces (OPIs)

CA gateway

Metafile Servers

Development of SoftwarePXI hardware driver & device

drvPXISCXI: interface layer between NI DAQmx and EPICS device support layerdevPXISCXI: data transmit between hardware to EPICS record, data conversion, and etc

DB ApplicationData conversion: Raw data to Physical data (for displacement, strain-stress , Hall sensors and PT-100)Hardware control: sampling rate, gain, filter option and etc. (by operator or by control logic)

SNL programCooling status, Detection of abnormal status

Cernox Data Conversion (Special requirement)each Cernox sensor has its own characteristic curve (fit the curve by Chebyshev polinomials)

require a database for fitting coefficients each sensor

Machine Network / EthernetTMS IOC#1 TMS IOC#2

C i M it i

Channel ArchiverData Storage SystemStorage Area Network

CompactField Point

Temperature Datafrom PT-100 sensors

Temperature Datafrom Cernox sensors

Displacement and Strain Datafrom sensors

Hardwired signalto Interlock system

PXI Chassis PXI ChassisSCXI Chassis SCXI Chassis

Relay contactto bypass module

fast conversion timeImplement a function block in device supports with C language

an IOC threadexecuted by a request from record supportasynchronous processing to avoid blocking of the record processing

EPICS IOC Software

Channel Access Communication Layer

Reducing the calculation time : example of the Cernox Data Conversion

Recursion with Trigonometric function Recursion with arithmetic only Measurements of computation time

Implemented with C and embeded into the device supportsChoose more faster algorithm

Cryogenic Monitoring Structural Monitoring

Structure of the TMS

NI DAQmx PXI Library

Li

Driver Supports / genericPXI (*)

Device Supports / genericPXI (*)

Record Supports

Sequencer

SNL Applications(*)

DB Applications(*)IOC shell

Cernox SensorData Conversion(*)

Command lineConfiguration and Debugging (*)

Iteration with Trigonometric Function

Iteration with arithmetic only

Calculation Time Fail Calculation Time Fail

Cache Fail 25.677 L1 Cache 1.684 L1 Cache

Cache Hit 2.113 0.106

secμ

secμ

secμ

secμ

( ) ( )∑=

−=9

0

1coscosn

n xnCxT ( ) ( )∑=

=9

0nnn xTCxT

11 2 −+ −= nnn TxTT

( )Rr 10log=

abbarrnorm −

−−=

2

( )∑ −=n

normn rnCT 1coscos

11 2 −+ −= nnn TxTT

⎩⎨⎧

==

xTT

1

0 ,1

( ) ( )∑=n

normnnnorm rTCrT

LinuxPXI/SCXI Hardware

( ) EPICS Native Features(*) Developed for KSTAR TMS

Function block in EPICS IOC

Page 2: of the KSTAR Tokamak Monitoring System

Sixth IAEA Technical Meeting on Control, Data Acquisition, and Remote Participation for Fusion Research

4 ~8 June 2007, Inuyama, Japan

How to avoid blocking of the Record processingduring hardware configuration

Command line interface (CLI) on IOC shell

EPICS Driver Thread

Request to change the hardware configuration

Kernel moduleand Kernel Thread

ocessin

g P

hase I

Control Thread

during hardware configurationSampling Rate, Gain, Low-pass filter control

hardware setup delay > 100 ms for PXI/SCXI modulesTo avoid blocking of record processing: multi-threading

control thread message queue resume and suspend

Extensions for IOC shell commandDebugging Features

Report information of hardware configuration, task status, channel configuration List up information of sensors, counters, parameters for software internalTurn on and turn off the debugging messages

Configuration FeaturesCreate task to handle PXI hardwareCreate channel and configure properties of channelDestroy the channelDestroy the task

The driver is running on-_main_ thread-CA-Client thread-Scanxx thread-ScanOnce thread- etc

EPICS Message Queue

Keep p

erf

orm

the p

rocessin

g c

hain

on t

he d

river

thre

ad

Record

Pro

cessin

g P

hase II

Suspended until receive messagesNo pay for watching events

Suspended

Resume

Record

Pro

Term

inate

the p

hase I p

rocessin

g

Terminate the phase II processing

Driver support for PXISCXI

Device support for PXISCXI

Record support (EPICS Conventional)

Record Processing FlowFor the PXISCXI control

Example of IOC shell command

Operator Interface (OPI)Developments

Graphic library: Qt/Qt DesignerCommunication: EPICS Channel Access library

Operation evironmentRedhat Enterprise Linux WS4

Network ConnectionTMS OPIs: control network (Ethernet)TMS IOCs: machine network (Ethernet)CA gateway

relay station of Channel Access communication

Screen Shots of the TMS OPIs

relay station of Channel Access communicationReduce communication overhead on IOCs

(make virtual connection with OPIs)

Channel

Meta Server1 Meta Server2Machine Network (Ethernet)

Meta file Network (Private/Ethernet)Control Network (Ethernet)

OPI

Control Network (Ethernet)

CA gateway

OPI

Data ArchivingEPICS Channel ArchiverContinuous archiving

Data Archiving & Retrieve System

Total 1,300 PVs(13,000 events/sec)

TMS IOCsChannelArchiver

Storage

Data AnalysisServer

SAN Switch1 SAN Switch2

Data Generation Data Storage Data Retrieve

Data Archiving System

TMS IOCs

Machine Network (Ethernet)

Function of CA gateway

gPeriodic / Event driven archiving

Data StorageSAN StorageIBM DS8100 StorageStorNext File system (Shared file system)

Data Retrieveby Data analysis serverArchiverExport (CLI tools)Web based export (apache, XML rpc, cgi )Java export (graphical tools)GNUplot, Excel, and etc

SCXI-1125Cernox sensor

TMS Control RacksHardware check

Check for sensors, signal lines and connectionsCalibration digitizer offsetCheck long term drift of measurement data

Software checkCheck basic functions of IOCs, OPIs, and Data archiving systemCheck software stability

St bilit h k diti

Pre-Commissioning

Current Source

PXI_8196EPICS/IOC

Compact Field Point

PXI_8196EPICS/IOC

SCXI-1520Strain sensor

SCXI-1520Displacement

sensor

Stability check conditions Total PVs: ~1,300 PVs (10Hz processing, 13,000 events/sec) in two IOCs10 OPIs connectionCA gateway: 1,300 PV connection, 13,000 virtual circuits, 130,000 server events/secChannel archiver: Archive whole channels, every events.

Results of Stability CheckIOCs: worked well during 2 months (no memory leak, no hang-up, less than 10% CPU loads)CA gateway: passed (no hang-up, less than 5% CPU load)Channel Archiver: keep evaluation (less than 30% CPU load, have been crashed once )OPI Application: fixing –up memory leak on graphic widget

Summary and Future PlanSCXI-1125Hall sensor

Cryogenic Monitoring Structural Monitoring

Summary and Future PlanWe have developed the TMS and performed pre-commissioning with room temperature conditions under which the measurements values and system performance were satisfied. The TMS also passed a 2 months aging test and was found to be very stable.

The next step is to implement automatic gain control functions for the Cernox sensors and measurements of the helium properties to prepare for the cool down process and operation.