\documentclass[11pt,twoside]{article}  % Leave intact
\usepackage{adassconf}

\begin{document}   % Leave intact
\paperID{P9-9}
%%%% ID=P9-9

\title{The Engineering Measurement System: \\
A Crucial Component of the Precision Telescope Control System at the Green Bank Telescope}
\titlemark{The GBT Engineering Measurement System}

\author{Paul R. Marganian, Kim Constantikes, Ram\`on Creager}
\affil{National Radio Astronomy Observatory, Green Bank, WV 24944, USA}
\contact{Paul Marganian}
\email{pmargani@nrao.edu}
\paindex{Marganian, P.}
\aindex{Constantikes, K.}
\aindex{Creager, R.}
\authormark{Marganian, Constantikes, Creager}

\keywords{EMS, NRAO, GBT, frequency}

\begin{abstract}
The Engineering Measurement System (EMS) is a software package whose role is to provide a prototyping environment to experiment with a variety of different measurement and processing strategies.  Its basic design provides a signal-flow graph user interface, which in turn interfaces with several off-the-shelf software components.
\end{abstract}


\section{Introduction}
The \htmladdnormallinkfoot{National Radio Astronomy Observatory}{http://www.nrao.edu} has undertaken an ambitious project that is intended to control our 100m primary Gregorian telescope, the \htmladdnormallinkfoot{Green Bank Telescope (GBT)}{http://www.gb.nrao.edu}, at frequencies up to 115 Ghz.  The Precision Telescope Control System (PTCS) is being developed in order to make the improvements to telescope monitor and control that are necessary for high frequency observations described in 'The GBT Precision Telescope Control System' (Constantikes 2004).  A key component of the PTCS is the Engineering Measurement System (EMS), a software package whose role is to provide a prototyping environment to experiment with a variety of different measurement and processing strategies (Figure~\ref{P9-9:fig:EMS_EMS}).  The EMS implements algorithms as signal flow graphs, uses Matlab for standard algorithms and visualization, and uses ODBC (Open Database Connectivity) and databases for organizing pertinent data.  We will present an overview of the EMS system, along with its results as to date, as well as its possible future applications.
\begin{figure}
\epsscale{.90}
\plotone{P9-9-f1.eps}
\caption{Demonstration of the EMS performing multilateration experiment} \label{P9-9:fig:EMS_EMS}
\end{figure}

\section{Paradigm}

The EMS paradigm consists of a signal-flow graph environment, in which data is visually processed in the graph.  All other components which either provide data or and/or process data communicate with this signal-flow graph.  The signal-flow graph environment maintains state through connections to data-bases, and through global variables initialized upon start-up of the graph.    

\section{Components}
	
The EMS consists of several different interacting components.

\subsection{WiT: for Workflow management}
WiT is a visual programming tool targeted at the image processing community.  Algorithms are created by dragging and dropping icons that represent operations onto a workspace to create executable block diagrams called 'igraphs'.  Links between the icons direct data from one icon to the next. WiT provides a DLL interface to allow users to create custom operation icons

\subsection{Matlab: for Computation and Visualization}
Matlab is a powerful integrated mathematical computation and visualization tool.  It is an ideal environment for developing mathematical algorithms.  Key features include: numerical computational tools, graphics for visualization and data analysis, interactive development, and application interfaces, such as COM and DLLs.

\subsection{Open Database Connectivity (ODBC): for Data Organization} 
ODBC is an Application Programming Interface that allows a programmer to abstract a program from a database.  	ODBC can be used to insert data into and query data from mySQL and/or Access databases.

\subsection{Metrology: for data acquisition from the GBT Laser Rangefinders}
	Laser Rangefinders are tools used in the attempt to measure the GBT's exact shape and position.  GBT software provides a TCP server for acquiring Laser Rangefinder data.  This TCP server can provide live or pre-recorded data.

\subsection{GBT Monitor and Control}
	The GBT Monitor and Control system is responsible, among other things, for sending commands to the GBT's various sub-systems, and for retrieving pertinent data.  The full services of the GBT Monitor and Control system are available to clients from a SOAP server.

\section{Component Integration}

\subsection{EMS Application Architecture}
WiT is used as the central component in this architecture, and provides most of the user interface.  The user triggers Matlab computations, ODBC inserts/queries, Metrology data acquisition, directly through the WiT application. An exception to this is the interaction between Matlab and the Monitor and Control
system (see below).  In addition, some processes must be started separately from WiT (such as the Metrology TCP servers).  

%\begin{figure}
%\epsscale{.60}
%\plotone{Arch.eps}
%\caption{TBD \label{P9-9:fig:EMS_ARCH}}
%\end{figure}

\subsection{WiT Glyphs}
As stated above, WiT is the central component to the EMS.  Therefore, it is of crucial importance that WiT can interface with other applications. WiT provides a DLL interface to allow users to create custom operation icons.  Any third party software that contains a C-Interface can be called from WiT.  We have created three types of WiT icons that facilitate the Wit Interfaces with Matlab, ODBC libraries, and Metrology software.

\subsection{Matlab Interfaces}
The WiT/Matlab interface has facilitated the creation of the EMS as a visual algorithm building machine with state of the art computational and visualization capabilities.  The Matlab engine library allows programmers to call the Matlab Computational Engine from C programs (in this case, a Wit icon).  This library communicates with separate Matlab processes via a Component Object Model (COM) interface.  The library allows users to open and a close a Matlab engine, insert and extract data, and perform commands (computations and/or visualizations).  Data is translated between WiT and Matlab data forms using an intermediate data representation.  Matlab can also interface with the GBT Monitor and Control system using a SOAP java client and XML parser, allowing Matlab to interact directly with the GBT, and pipe data back up into WiT.

\section{Algorithm Development}
The EMS provides a powerful and diverse algorithm development environment.  Experiment re-configurations is compile and install free.  Algorithm testing can be in real time, taking in live data through the Metrology interface or the Matlab/Monitor and Control interface, or can be accomplished after-the-fact, using the ODBC interface.  Results from experiments are viewable immediately.  And no software developer support is needed. 

%\begin{figure}
%\epsscale{.60}
%\plotone{Algo.eps}
%\caption{TBD \label{P9-9:fig:EMS_ADP}}
%\end{figure}

\section{Application and Results}
The development of the EMS has provided GBT scientists and engineers with a rapid algorithm development tool.  The EMS has provided solutions to several problems.  Figure~\ref{P9-9:fig:EMS_EMS} is an example of multilateration using Laser Rangefinders.  In this example, the signal-flow graph initializes global variables, then moves on to extract data from the Laser Rangefinders.  This data is then piped down to Matlab, where it is processed and visualizations are produced.  In the later stages of the igraph, results are piped down into a mySQL database.

\section{Future Developments}
As algorithms are developed further using the EMS, entire WiT igraphs will be converted to stand-alone Matlab Applications, callable from a WiT icon, to provide faster and more stable execution.  In addition, mature algorithms will be implemented into the PTCS, and standalone EMS components may be used for trials directly in the Monitor and Control system.

\section{Summary}

The Engineering Measurement System has been successfully developed as an algorithm development application by leveraging and interfacing several different off-the-shelf software components.  It has proven to be an effective tool in the effort at high-frequency observations with the Green Bank Telescope.

\acknowledgments

We would like to thank Joe Poon for his help with WiT.

\begin{references}
\reference Constantikes, K.\ 2004, \adassxiii, \paperref{O9-1}
\end{references}

\end{document}
