An experimental setup with ultrasonic gas analyzers and real time analysis of the composition of a binary gas mixture

This paper describes an automated measuring apparatus with an ultrasonic gas analyzer and realtime analysis of the composition of the gas. The apparatus is designed for preparing binary gas mixtures and making measurements in a wide range of pressures (from 0.8 bara to 15 bara) and temperatures (between -15°C and 80°C). The apparatus was developed to determine the thermophysical properties of fluorocarbon mixtures for potential use in the cooling circuits of several Large Hadron Collider projects at CERN. The design of its control system took into account the safety and reliability of the gas analyzer, and the need to limit the presence of laboratory personnel. The control system was implemented in PVSS-II, the Supervisory, Control and Data Acquisition standard chosen for LHC and its experiments at CERN. The second part of the paper describes the implementation and verification of the algorithm for continuous real-time determination of the composition of the refrigerant mixture. The algorithm is based on minimizing the quadratic norm from the measured data and from the pre-generated look-up tables acquired from the NIST REFPROP software package.


INTRODUCTION
This paper provides an overview of an automated measurement setup that has been developed for precise analyses of the thermophysical properties of binary gas mixtures.The measurement setup is based on a pair of ultrasonic gas analyzers [1,2] that are designed for realtime measurements of the speed of sound in the gas that is under analysis.The analyzer, shown in figure 1, is composed of three main parts; the analyzing chamber, the I/O modules, and the supervisory software.The measurements of the speed of sound, the pressure and the temperature of the analyzed gas are continuously performed in the analyzer chamber by the I/O modules.The supervisory software running on the connected PC then performs a real-time analysis of the gas composition from the measured process variables (speed of sound, pressure, and temperature).The gas analysis is based on the fact that the speed of sound in a binary gas mixture at a known temperature and pressure is a unique function of the molar concentration of the two mixed components.
The development of the measurement setup was motivated by the need for a fast, precise and reliable way to gather a large amount of experimental data that can be used for an improved description of the thermophysical properties of pure gases and binary gas mixtures in wide range of temperatures (from 0.8 bar a to 15 bar a ) and pressures (from -15 °C to 80 °C).The gas samples need to be measured in very stable environmental conditions (stability in the range of ±0.01 °C, and ±2 mbar) and at the same temperature set points (precision within in the range of ±0.1 °C).Data gathered in these conditions enables results obtained in different sets of measurements to be compared easily.Unfortunately, this process is very time-consuming when operated manually.Temperature stabilization of the system on one set point takes over 1 hour.Automation reduces the demand on personnel and allows for uninterrupted measurements.An example of the usage of the measurement setup follows: the apparatus automatically prepares a binary gas mixture of predefined composition, and then varies the temperature in the sonar analyzing chamber according to the set points (measurements over isotherms).The data that is gathered can be used for various applications, e.g. in the future upgrade of the ATLAS silicon tracker, in which the currently-used evaporative coolant (C 3 F 8 ) [3] will be replaced by a C 3 F 8 /C 2 F 6 mixture to provide the silicon substrates with a better safety margin against thermal runaway [4].For this purpose, it will be necessary to have detailed knowledge of the properties of the refrigerant mixture, which can be obtained with our measurements.

MEASUREMENT SETUP
The measurement setup -see figure 2 -is composed of two ultrasonic gas analyzers, a remotely controlled chiller, a PLC unit, pneumatically driven on/off valves, two sources of pure gases, and a supervising computer with a PVSS II [5] supervisory control and data acquisition (SCADA) analyzing software component.The gas mixture for the analysis is created from two available sources (denoted as A and B).The base gas for the analysis is gas A, which is mixed in with gas B. The mixture is prepared in two steps: 1) Fill the gas analyzers with gas A to a certain pressure by opening a manual valve.2) Change the composition of the analyzed gas by adding a predefined amount of gas B by opening the on/off valves governed by the PLC unit.The valves are in a closed control loop with pressures measured in the relevant parts of the instrument.The gas is usually introduced into the analyzers through a buffer to prevent damage to the gas analyzers due to excessively high pressure.The sensors and feedthroughs in the analyzers are designed for gases with pressure up to 15 bar a .The prepared gas mixture is led into a pair of gas analyzers (referred to as Short and Long).The gas mixing process is crucial for the operation of the measurement setup.It is therefore controlled by a PLC unit that can work as a standalone controller with preprogrammed safety limits.This control system structure should protect the gas analyzers from damage in the event of loss of communication with the supervisory computer.
The analyzers differ in the length of their analyzer tubes (Short -~250 mm, Long -~500 mm).This variation in length improves the measurement setup capabilities and precision in certain gases ("fast", and "slow").Both analyzer tubes are equipped with temperature collars connected to the remotely controlled chiller.This enables the system to change the temperature of the analyzed gas volume (from -15 °C to 50 °C).The average temperature in the Short analyzer chamber and in the Long analyzer chamber may differ during the measurement due to the different structure of their temperature collars, due to their different inner volume, and due to heat losses along the pipes.We therefore introduced the following algorithm for the measurements over isotherms: 1) The supervisory computer loads a predefined list of set-points and sets the chiller to the first set point.
2) The average temperature in the Short analyzer chamber is compared with the set point.A new set point is calculated and applied to the chiller if the difference is greater than 0.1°C.This is repeated several times until the temperature is within the desired dead band.3) The system repeats step 2 for the Long gas analyzer and then continues with next set point from the initially loaded list.The data from the measurements gathered by the gas analyzers and the PLC unit is monitored and stored in the supervisory computer.The PLC and all I/O modules are connected to the computer over the serial buses, the CAN bus, the USB/CAN converter, and the set of USB/SERIAL converters.The communication state monitoring, generation of the set points, and measurement setup state analysis are performed by the software control component (SCP).This component was prepared in the PVSS SCADA software as an addition to the analyzing software that is described in next section of this paper.The SCP continuously monitors all process variables.It triggers an alarm in the event of an emergency state (e.g. if communication with the PLC unit is lost), if necessary it takes action (e.g. if it is not possible to reach the temperature set point in 2 hours, a coolant leak is predicted and the chiller is turned off).The appearance of the alarm is also propagated into the operators' graphical interface, and it is also sent to the preset email list.
The states of the measurement setup and the corresponding actions are defined as the finite state machine (FSM).The transition conditions are evaluated sequentially according to their priority.FSM can be parameterized in the prepared graphical interface according to current needs, analyzed gas properties, or changes in the measurement setup itself.

ANALYSIS SOFTWARE
The analysis software component was developped for online analysis of the data measured by the sonar gas analyzers.Its main functions are: 1) Determine the speed of sound and the concentration of the molar vapor mixture; 2) Control the sonar electronics and retrieve data -start the communication cycle, listen to the electronics broadcasts; 3) Perform communication control -analyze the communication, detect and recover errors; 4) Monitor the environment (pressure, temperature) and detect unstable conditions; 5) Visualize via a Graphical User Interface (GUI); 6) Archive all process variables into a local and/or remote data base.The analysis software is composed of three main processes, the structure of which is depicted in figure 3.These are the communication cycle, the calculation cycle, and real-time analysis.These processes are handled by PVSS as individual threads (e.g.there are two PVSS communication threads with unique identification numbers in cases when two sonar gas analyzers are used), but the operational system merges all threads into just two independent processes (threads within OS with a unique Process Identification Number PID).This implementation was selected to optimize the CPU usage and the cycle performance of the computer.The communication cycle (CC), started by a functional PVSS script registered as a PVSS control manager, is responsible for gathering data from the Sonar electronics, exchanging data with the I/O units, and communicating any detected error.The communication with the electronics runs over a serial bus in half-duplex mode at 9600 bits/s, even parity.The communication protocol is custom planned with a client-server communication model.The sonar electronics either broadcasts the measured transition times or sends them as a reply on request.In normal mode of operation the CC periodically acquires messages from the electronics in a procedure that can be decomposed into a number of steps: 1) Request the electronics to send the measured transition time; 2) Wait while the electronics acquires the required data from memory and sends it as a reply; 3) Filter the received data, and then store the timestamped transition time in the database.All requests that are sent must be confirmed by the electronics within 100 ms by a message in the proper format, or the communication cycle triggers a communication alarm.The alarm may be used by the external PVSS process e.g. for FSM actions.The calculation cycle runs synchronously with the communication cycle and performs automated data preprocessing with two main goals: 1) Eliminate the readings from malfunctioning sensors.
This filter uses majority logic (e.g. if the reading from the temperature sensor differs by more than a predefined value, the sensor is marked as "bad" and it is excluded from further usage).2) Reduce potential jumpiness of the readings, which may be caused by the resolution of the A/D converters or by an external source of noise.This procedure is based on calculating the running averages and excluding readings that differ from the running average by more than a preset threshold.3) Calculate the speed of sound from the transition time.This can be done from one transition time, or from two transition times measured in two directions to improve precision.The sound velocity c can also be inferred from the two transit times (named t up , and t down ) via: c = L/2 * ((t up + t down )/ t up* t down ), (1) where c is speed of sound, L is distance between the ultrasonic transducers, and t up ,and t down are transition times.Real-time gas analysis is a process that "predicts" the composition of the analyzed gas from the values obtained from the calculation cycle.The process uses running averages of the speed of sound, pressure and temperature (c, T, and p), and the look-up table.The look-up table data is compiled in advance from the measurement from the predictions of the adapted equation of state (e.g.NIST REFPROP BWR [6]).The table contains entries of c, T, p, and the molar composition of the gas to be analyzed.The granularity of the table and the region of the state space that is covered is to be selected as a prudent compromise between precision of real-time predictions and speed of real-time predictions.The table length should not exceed 500,000 entries to avoid potential problems during the calculation (data overflow, etc.)The precision of the real-time predictions also depends on the algorithm that is used.The software component allows a choice among several options that vary in accuracy and also in CPU usage.The best results for precision were achieved by an algorithm based on calculating the quadratic norm n i for each entry in the look up

Fig. 2 .
Fig. 2. Schematic view of the main components of the measurement setup.

Fig. 3 .
Fig. 3. Analysis component architecture for handling two gas analyzers, their graphical user interfaces and data archiving organization under a PVSS project.