Virtual Training Laboratory for Primary Impedance Metrology

This article presents the concept and some aspects of the physical implementation of a virtual training laboratory (VTL) in the field of primary impedance metrology. The creation of a VTL provides a novel method of disseminating metrological knowledge and expertise in a practical way and at a low cost. It will expose new users to the live experience of operating a digital impedance bridge thus helping to encourage the uptake of this novel and useful impedance measurement technology. The VTL was developed as part of the EMPIR projects VersICal 17RPT04, A versatile electrical impedance calibration laboratory based on digital impedance bridges, and GIQS 18SIB07, Graphene impedance quantum standard.


I. INTRODUCTION
I NTERNET technologies play an important role in today's remote-controlled measuring systems [1], [2], [3], [4]. The Internet allows one to implement systems so that they can run on both local and wide area networks without the need for any software and hardware modifications. This increases the application capabilities of such systems, allowing them to be controlled remotely over long distances of up to hundreds or thousands of kilometers [5], [6]. These technologies also allow for relatively simple integration of components used in distributed measuring systems. Companies producing modern measuring instruments reinforce this trend by equipping manufactured instruments with Ethernet interfaces or adapting them to work over Wi-Fi networks. Thanks to these advantages, Manuscript  such solutions have spread to the field of remote measurement and control of laboratory and industrial processes [7], [8], and in the remote teaching of measurement techniques [9], [10]. Remote calibration systems for measuring instruments are another type of application [11], [12], [13], [14], [15], [16], [17], [18], [19]. Ensuring security is of the greatest importance when employing Internet technologies for such applications [1], [20], [21], [22]. This article presents some aspects of a virtual training laboratory (VTL) for primary impedance metrology, which was developed as part of the EMPIR projects VersICal 17RPT04, A versatile electrical impedance calibration laboratory based on digital impedance bridges [23], and GIQS 18SIB07, Graphene impedance quantum standard [24], and the idea of which was created before the COVID-19 pandemic. The restrictions on access to laboratories caused by the pandemic further demonstrated the value of remote access to a training laboratory. Although digital impedance bridges are considerably simpler to operate than their classical counterparts, new users will nonetheless require guidance and assistance with certain aspects of their operation. The aim of this task is to overcome these time-consuming difficulties in an efficient and cost-effective way by establishing a VTL. A low-cost and time-effective online training session on the use of digital impedance bridges in a real environment will allow an effective knowledge transfer and the dissemination of measurement good practice in the field of impedance metrology among potential developers of digital impedance bridges and other stakeholders.
The technology used to create the VTL will be useful in the implementation process of new digital bridges at less experienced project partners, in maintaining and servicing of the bridges, as well as in applying software improvements and adapt new bridge components. To achieve an easy implementation process at geographically separated laboratories, a standardized communication between software modules was established. In the future, the results of the work on this task can be used in internet-enabled calibration of impedance standards.
The also employed for the bridge developed at INRIM within the 18SIB07 GIQS project. Because the DSS-2A source operates using network variable technology available in the National Instruments (NI) LabWindows/CVI and LabVIEW environments, this technology was naturally selected for the network communication tasks required in the VTL. These aspects are discussed in more detail in Sections II and III.
The article also presents the results of some experiments to determine the impact of long-distance remote control of the impedance bridge instruments on the execution time of their control commands. This type of information can be useful for developers of remotely controlled measurement systems that are based on the NI network variables.

II. CONCEPT OF VTL A. Structure and Communications
A block diagram of the VTL structure, illustrating its general idea, is shown in Fig. 1. The key role of the VTL is to drive the reference digital impedance bridge (RDIB) developed at INRIM. A basic overview of the RDIB is provided in Section II-B, and its principle of operation as well as a detailed metrological analysis was described in [25]. Fig. 1 shows the hardware and software relationships that occur in the VTL. Each key hardware component (measuring instrument) of the RDIB, namely the digital sinewave source DSS-2A, the analog multiplexer, and the lock-in amplifier SR830 (the Stanford Research lock-in amplifier acting as null detector in the RDIB), is directly controlled by a dedicated software application (the instrument server), that is, the DSS-2A Server, the AMUX Server, and the SR830 Server, respectively. The DSS-2A source and the analog multiplexer have a hybrid structure-they are a combination of commercial PXI (PCI eXtensions for Instrumentation) modules (Digital Waveform Instrument NI PXI-6541 and Digital I/O Module NI PXI-6509, respectively) with proprietary electronics. The technical details of the DSS-2A source are discussed in Section III, and the analog multiplexer in [26]. Server applications provide the impedance bridge application (the client) with the ability to remotely access the required functionalities of the instruments, irrespective of the distance of the controller with impedance bridge software installed from the bridge itself. Fig. 2 shows the graphical user interface of the impedance bridge software (the client).
The control software for the RDIB, and thus the VTL software, was developed entirely in the NI LabWindows/CVI environment for a number of reasons. First, it is widely used for test and measurement applications and is familiar to the target user group for the VTL. Client applications in the associated environments such as LabVIEW can easily be developed. Second, it provides the most convenient method of interfacing with the various bridge components including the digital sinewave source and analog multiplexer both of which are based on PXI modules. Finally, and most importantly, the environment facilitates the implementation of the network communication tasks central to the VTL.
All network communication tasks are done using the network variable technique. This technique uses the network variable server (NVS) provided by LabWindows/CVI environment and supervised by the standalone application NI Distributed System Manager (DSM). The NVS stores the network variable sets for each RDIB instrument and provides the services needed to operate them. The network variables can be created on the NVS manually by using the DSM or programmatically by LabWindows/CVI applications. Due to the large number of network variables required to control the RDIB (for example, the digital sinewave source alone requires 120 variables), a dedicated application was developed that creates all variables on the NVS. The DSM allows direct editing and monitoring of the network variables which makes debugging the communication process easier. An example of using the DSM to monitor the network variables for a DDS-2A source is shown in Fig. 3. Fig. 4 shows an example of the communication flow for the control of the DSS-2A source amplitude where the three network variables DSS2A_1\Chan1\Amplitude, DSS2A_1\Update-Waveform, and DSS2A_1\Chan1\Amplitude_Status are used to set the amplitude. To facilitate the development of client applications, a driver (set of functions) compliant with the LabWindows/CVI environment standard was developed, which hides the details of network operations from the person creating the client application. As shown in Fig. 4, the operations on network variables are performed using library functions of the LabWindows/CVI environment with the names starting with the acronym CNV. For clarity, the library functions that release resources reserved by the Create type functions have been omitted. The LabWindows/CVI Network Variable Library provides several types of connections to network variables [27], three of which are used by VTL communication services. 1) Writer: to send data to the server using the CNVWrite function, which waits until the data reaches the server. 2) Reader: to call the server to read the data using the CNVRead function, which waits for new data until the wait time has elapsed. 3) Subscriber: the NVS automatically sends new data to the user program, and dedicated callback function is called with the new data. In the presented example, there are the following functions: a) DSS_AmplitudePhaseDataCallback, b) DSS_ControlDataCallback. The callback functions are specific programming functions which are activated in response to events generated by GUI services like mouse clicks or key presses, as well as specific signals from data acquisition (DAQ) cards or communications interfaces. Since it is not possible to send data to the network variable using the standard callback function associated with the subscriber connection (inside this function the CNV Write function cannot be used), a special callback function has been used, the execution of which is delayed by a defined time in relation to the operation of its call.
One of the advantages of the solution presented above is its application flexibility, which allows straightforward adjustment of the RDIB configuration, and thus VTL, to specific user needs, without making any changes to the software. For example, the NVS can be installed on the personal computer (PC) to which the measuring instruments are connected, or on any other PC connected to the computer network. For practical reasons relating to the manual control of the settings of the digital sinewave source and the analog multiplexer via the server GUI, the configuration presented in Fig. 1 is the optimal. That is, in the VTL the measuring instrument servers and DSM are installed on one PC and the client software can be installed on other PC, irrespective of its location. This solution allows also for relatively easy replacement of the hardware bridge components without significant interference in the impedance bridge software and the balancing algorithm.
From the point of view of the remote user of the VTL, the impedance bridge software is installed and run on their local computer, and only has access to the network variables handled by the NVS installed on the computer in the VTL. On the one hand, it allows the laboratory staff to control in real time the settings sent by a remote user to the instruments (RDIB components) for the purposes of bridge configuration of balancing. On the other hand, an advanced user who wants to prepare a new balancing algorithm or modify the existing one, has the option of initial verification of the settings without the need to communicate with the physical components of the RDIB. This functionality goes beyond the basic assumptions of the VTL activity but turned out to be particularly useful during COVID-19, when physical access to the laboratory where RDIB is located was severely limited. During a typical training session, remote support from INRIM researchers is provided using available messaging and video chat services can be used.

B. Reference Digital Impedance Bridge
An electronic fully-digital impedance bridge is a device that compares at a specified frequency f an impedance ratio Z 1 /Z 2 to a voltage phasor ratio U 1 /U 2 generated by two output channels of a polyphase electronic digital signal source, while realizing the proper impedance definition by means of auxiliary output channels. The structure of the RDIB developed at INRIM was described in [25] and [26] and it realizes the four-terminal-pair impedance definition [28]. Principles, calculations, and uncertainty estimation of the measurement process are comprehensively described in [25] and [26]. Here we give only general overview of the measurement process to understand the crucial interactions between hardware and software. Its physical implementation is shown in Fig. 5.
The basic measurement relationship Z 1 /Z 2 = −U 1 /U 2 holds when the bridge is balanced, that is, when a synchronous detector (a lock-in amplifier), referenced at the same frequency f , reads zero voltage at all specified detection ports of the bridge network.
With respect to traditional transformer-ratio bridges [29] which can compare only like impedances (e.g., R : R or C : C comparisons), a fully digital bridge whose source channels can be independently adjusted in magnitude and phase can also compare impedances with arbitrary complex ratios [30].
The RDIB, whose core element is the digital sinewave source described in Section III-A, achieves impedance ratio uncertainties in the 10 −6 −10 −5 range at around 1 kHz, for impedance magnitudes from 1 to 1 M and impedance magnitude ratios from 1:1 to 1:5, but can also operate over the full frequency range of the DSS-2A from 20 Hz to 20 kHz with possibly higher uncertainty. These specifications and operating frequency and parameters are suitable for the realization of inductance and capacitance scales in National Metrology Institutes (NMIs) for most of the Calibration and Measurement Capabilities [31] of interest. A detailed uncertainty budget for the bridge in the realization of inductance and capacitance scales is reported in [26].

C. Training Session Strategy
Before starting the training session, the remote user must download the VTL operation manual and the INRIM Impedance Bridge Client Software 1 (see Fig. 2) and install it on a computer with the MS Windows operating system. Thereafter, the training session is performed according to the procedure outlined below.
1) The remote user determines the date of the training session with the staff of the VTL. 2) On the set date, the user must log in to INRIM virtual private network (INRIM VPN) and then through the bridge client software gets access to the network variables installed on the virtual lab computer.
3) The remote user will receive instructions from the session trainer regarding the initial settings of the impedance bridge and its balancing process. 4) The session trainer will help the remote user to interpret the measurement results and make a summary of the entire training session.

A. Digital Sinewave Source
The fundamental component of the RDIB is the sevenchannel digital sinewave source DSS-2A. Polyphase digital sinewave sources used in precise impedance bridges in the area of primary impedance metrology can be divided into two groups. The first includes sources based on commercial DAQ cards implemented in PXI and PCI systems [32], [33]. The limitations of their metrological possibilities in comparing impedance standards result, among others, from insufficient resolution of digital-to-analog converters used in them or unsuitably large temperature coefficients of their gain and offset. The advantage of these type of sources is that their software is implemented on a PC platform, often using programming environments dedicated to the PC platform. This facilitates the process of debugging programs and making further improvements. The second group of sources is based on constructions developed entirely by their authors [34], [35]. The advantage in this case is the possibility to make an optimal selection of digital-to-analog converters and other analog elements having a significant impact on the metrological properties of the source. Moreover, it allows the system structure to be tailored to the specific application. A certain disadvantage in this case is their closed nature in terms of hardware and software, which may be a problem in their 1 The INRIM impedance bridge client software is developed under the programming environment LabWindows/CVI from National Instruments and the source code is available at https://github.com/INRIM/BClient. dissemination to the users in NMIs and institutions dealing with the calibration of measuring instruments. It also limits the ability to simply extend the functional capabilities of the source itself or the measurement system in which the source is used. The sources included in the first group do not have these drawbacks. The multitude of commercial modules available in the PXI and PXIe standards enables the relatively simple creation of measuring systems with the required functionality, as well as their subsequent development. An important factor in this case is also the ability to provide remote comprehensive support for the end user.
The design of the DDS-2A source uses a different approach to the above-mentioned solutions and uses the advantages of sources from both groups described above. Its system structure can be described as hybrid, i.e., one part of it consists of commonly available commercial modules in the PXI standard, and the other part of a dedicated proprietary solution optimized for the use of a source in digital impedance bridges. It should be mentioned that its application possibilities are not limited only to impedance measurements. For example, such a solution can be used in ac power calibrators with the ability to generate polyharmonic waveforms. A detailed description of the DSS-2A source is presented below, in which important technical aspects are presented.
The structure of the DSS-2A source is shown in Fig. 6, where for readability only two channels are shown. The source is made up of the four autonomous units: PC with dedicated software, polyphase digital analog signal processing (DASP), polyphase numerically controlled oscillator (NCO), and multioutput power supply (not shown in Fig. 6). The DASP unit contains DACs, high-performance low-pass filters (LPFs) and precise output buffers. The physical appearance of DSS-2A units and their placement in the RDIB are shown in Fig. 5.
The polyphase NCO is based on PXI components: chassis and PXI modules. The key element of the NCO unit is the digital waveform generator NI PXI-6541, which is distinguished by a large memory for storing digital words representing samples of sinusoidal signals and necessary control signals for the DACs. It also supports a dedicated script language to control the process of digital signal generation in real time. The available memory (32 × 8 Mbit/channel) is logically divided into two blocks, one containing the current samples of the generated signals, and the other which can be used to upload new samples without interrupting the generation process.
Each analog channel of the DASP unit contains two 18-bit multiplying DACs (MDAC1 and MDAC2 housed in one chip LTC2758 from Analog Devices) with external current-tovoltage converters (I -V ), which are cascaded in the case of the DSS-2A. The first one is responsible for reproducing the sinusoidal waveform based on digital samples stored in the NCO memory, and the second acts as a digitally controlled resistance voltage divider. This allows for the comparison of impedances with ratios different from 1:1 with the full resolution of the DAC responsible for reproducing the sinusoidal waveform. In addition, the MDAC1 can work with one of the three gains: 0.5, 1, and 2, and the second MDAC2 with The LPF and output buffer stages provide the required levels of SFDR and load current of the DSS-2A output signals, respectively. The LFP is Sallen-Key topology third order filter with unity gain and a cutoff frequency of 40 kHz. The unity gain output buffer was created as a composite amplifier consisting of four parallel connected same type operational amplifiers, which were experimentally selected due to their real offset parameters.
The frequency range of the sinewave signals at the DSS-2A output is from 20 Hz to 20 kHz and results from its basic intended use-that is, the digital full automated impedance bridges for comparisons of the impedance standards in the acoustic band.
The DSS-2A can operate in various hardware configurations, based on an embedded PC in the form of a PXI module or an external PC connected to the NCO unit by two dedicated controllers connected with a fiber optic cable. In the first case, when connected to the embedded PC with a keyboard and a monitor, the DSS-2A can work as a standalone device. In Fig. 6, the PXI system performing the NCO function presents an example configuration in which only the PXI6541 module is necessary. It is possible to use in the NCO the timing and synchronization module NI PXI-6653, which provides the source of the reference 10-MHz clock signal with an initial inaccuracy of ±3.2 × 10 −9 and long-term instability of ±80 × 10 −9 /year. Based on this signal, it is possible to generate an NCO reference clock signal from 1 Hz to 80 MHz with a resolution of better than 1 μHz. The frequency of the source outputs can be changed by changing the number of samples per period and/or by changing the frequency of the reference clock signal. The default frequency of the reference clock signal is 20 MHz, which translates into the frequency with which samples are sent to MDAC1 (500 kHz) and simultaneously into the number of samples from which the one period of the sinewave signal is created. For a frequency of 20 Hz, it is 25 000 samples, and for a frequency of 20 kHz Selected test results of the DSS-2A which are of particular importance from the point of view of its application in the impedance bridge are presented below. The focus was on the spectral properties as well as time stability of the amplitude voltage ratio and phase difference of two output signals.
The stability of the amplitude voltage ratio and phase difference were determined with the measuring system shown in Fig. 7. The system consists of the DSS-2A source (the two-voltage source represents the two selected channels of 7-channel DSS-2A), the seven-decade inductive voltage divider (IVD) Eaton M-1011A, and the lock-in amplifier SR830.
The output voltages of the tested DSS-2A can be written in phasor form as The complex voltage ratio is expressed by where k U and φ represent, respectively, the magnitude and phase of complex voltage ratio. The aim of the experiment is to determine the relative changes of the magnitude of voltage ratio δk U (δk U = k U /k U ) and the changes of the phase ϕ by measuring in-phase and quadrature components of U D voltage. The voltages shown in Fig. 7 fulfill the equation where k is the ratio of the IVD. When the circuit in Fig. 7 is balanced (ϕ 2 = 0, ϕ 3 = , and U D ≈ 0), it can then be assumed that the instability of the voltage ratio will change U D by For k = 0.5, the relative instability of the magnitude and phase of the voltage ratio can be expressed by the equations The measured stability of the amplitude ratio and the phase difference for the two selected channels over a one-hour period are shown in Fig. 8. Studies of the spectral properties of the output signals of DSS-2A were performed as shown in Fig. 9 by using a virtual spectrum analyzer based on the PXI Sound and Vibration Module NI-4461 and LabWindows/CVI application made by the authors. The measurement results of Spurious-Free Dynamic Range (SFDR) for channel no-1 are shown in Table I. The measurements were made for various frequencies and loads, in the range of 1.5 V and the amplitude setting of 1.414 V (1 VRMS). In such systems, the SFDR value is primarily influenced by the second harmonic, therefore the output buffer design has been optimized in this respect. The effectiveness of the applied solution is confirmed by the measurement results, based on which it can be concluded that the impact of the load on the SFDR value is practically negligible.
Another key parameter of the digital sinewave source when used for impedance comparisons with ratios not equal to unity is the linearity of the amplitude setting. This aspect is presented in detail in [25].

B. Instrument Servers
The instrument servers, one for each remotely controlled instrument included in the RDIB (see Fig. 1), provide together  with the NVS the computer network connection between the RDIB instruments using different hardware interfaces, such as IEEE (GPIB), PXI, and so on, and the impedance bridge client. To exchange data between the bridge client application and the instrument servers the network variable technique is applied. Each instrument server has its own graphical user interface which allows the instruments to be also operated in manual mode. This feature is especially useful for instruments without a hardware user interface, e.g., for PXI-based instruments (see Fig. 10), during the commissioning of the impedance bridge.  Each instrument server uses a separate set of network variables, the number, and nature of which are individually tailored to the specific instrument and the functions performed by them in the reference impedance bridge. Such set of network variables can be treated as a general application interface available in remote mode for client applications. The principle of operation and the advantages of network variables in the integration of measuring instruments used in distributed measurement systems are discussed in a wider scope in [7].

IV. COMMUNICATION PERFORMANCE TEST AND RESULTS
Determining the impact of communication performance on the process of remote control of the digital impedance bridge components requires a series of tests to eliminate or significantly reduce factors that do have a direct impact on communication performance. The entire testing procedure consists of three configurations of software and hardware location (see Fig. 11), in which the delay times of the execution of the sequence of the DSS-2A control commands are determined, during the remote control of the amplitude and phase settings. The sequence of control commands for amplitude and phase, respectively, is as follows [see Fig. 12(a)]: sending the amplitude or phase setting for the selected source channel, sending the command to perform the amplitude/phase setting (calculating a new set of samples of the generated waveform and sending them to the NCO memory), reading a status of a new setting value.
To determine the command execution time (CET) during remote control, a special software application has been developed [see Fig. 12(b)], which captures the key features of the communication timing sequences.
The complete CET determination procedure for each of the three configurations consists of 11 amplitude setting sequences in the range from 0 to 1 V with a step of 0.1 V and 11 phase setting sequences in the range 0 to π with a step of 0.1 π. Each sequence was repeated for all seven channels of DDS-2A source, which gives a total of 154 results, with the one exception where the series consists of 77 results.

A. First Configuration
In configuration 1 [see Fig. 11(a)], all programs: NI NVS, DDS-2A server, and testing software were installed on the

B. Second Configuration
In the second configuration [see Fig. 11(b)], the testing software was installed on the computer located in a different room from the rest of the system. In this case, the influence of the local computer network (LAN) on the command executing time for DSS-2A source in remote work mode was tested. The results, shown in the group Second Configuration of Table II, are similar in nature to those obtained for the system in the first configuration. Here, we can observe a slight impact of  LAN on the CET values. Like the previous case, the test was performed for two systems at INRIM and UZG.

C. Third Configuration
The system in the third configuration [see Fig. 11(c)] corresponds strictly to the idea of a VTL. It allows the effectiveness of remote control of the impedance bridge instruments over long distance to be assessed. In the case of CET determination, the testing software was installed on computers at NSAI, CMI, and UZG (see Fig. 13). In this way, selected members of the project consortium could verify the impact of the internet connection on the remote-control process of the DSS-2A source. Tests were also carried out using computers placed in private homes, located at about 7 km from INRIM (case 1) and 10 km from UZG (case 2). In a few cases, the dispersion of CET results was so significant that they are presented in the form of histograms in Figs. 14 and 15 with defined intervals of 0, 5 s. In Table II (group Third Configuration), the average value refers to the most advantageous case, i.e., the results within the first-time interval. Comparing the results obtained for UZG and P.H.2, one can clearly observe the impact of poor internet connection quality on the CET value. In the case of P.H.2 (dedicated wireless link, dozens of users), the tests were performed at different times of the day (see Fig. 15).

V. CONCLUSION
The area of internet-enabled metrology has been intensively explored for many years and many related teaching and operational applications have been created using many different network techniques have been used over the years, some of them have become obsolete. For example, nowadays cloudbased solutions are very popular. However, for a certain class of applications, this can be either too costly or too complicated. As mentioned earlier in the article, one of the advantages of the applied solution is the use of one programming environment and one programming language to perform all programming tasks, which facilitates the maintenance and further development of the RDIB and the VTL by interested users. Regardless of the technologies used, there are common problems with performance and security communication tasks. The article presents the concept and method of implementation of a VTL for impedance metrology, which is based on the network variable technique. While the network variable technique is well known, despite its many advantages, it is not widely used in this area. The method of using network variables presented in the article may provide the basis for the implementation of similar measurement systems in which remote control plays a significant role, especially when it concerns long distances. In the case of the reference impedance bridge which provides the basis of the VTL where the complex balancing algorithm is performed in real time, delays in transmitting settings and receiving results may affect the way the training session is conducted. Test results for delay times in communication tasks that may occur in real conditions have been presented for different set-ups of the VTL. While the measured transmission delays were found to increase substantially with distance, their magnitudes were not such as to impede the remote operation of the bridge since they were considerably less than other delays due to settling times and auto-ranging of the null detector (lock-in amplifier) which arise in the balancing procedure.
It should also be noted that the application possibilities of the solution presented in the article go beyond the training tasks. It opens the possibility of remote comparisons of impedance standards performed in National Metrology Institutes, or the provision of remote calibration services of measuring instruments.