Scientific Computing with Graphical System Design
Introduction
The term “scientific computing,” or “computational science” [1], has been used for many years to define the use of computers (software and hardware) for solving problems related to science and engineering, usually involving experimental or applied research, modeling, and simulation. In a simplistic definition, it refers to the use of computers in solving scientific problems. Scientific computing applications usually follow a three-step process: data acquisition, data analysis, and data visualization/presentation.
Figure 1. Virtual Instrumentation Model
This three-step approach has been one of the pillars of the NI virtual instrumentation model (Figure 1) since its original conceptualization in the early '80s, and has been expanded into a more comprehensive model known as graphical system design (Figure 2). In this new model, the focus is to accelerate the research and development cycle, delivering mathematical models to embedded real-time computers faster and easier. This design-flow acceleration is achieved by using NI LabVIEW software and its G programming language as a common system-level design tool for all the different phases in the design-to-deployment flow.
Figure 2. Graphical System Design Model
In reality, the virtual instrumentation model is applied in each of the three phases of the graphical system design model because data acquisition, analysis, and presentation functions are used in the design, prototyping, and deployment phases (Figure 3).
Figure 3. Graphical System Design and Virtual Instrumentation
How It Works
Design (Model): In the design phase, the researcher develops a mathematical model of the system, including sensors, actuators, plants, and controllers, and simulates them under a variety of initial conditions and constraints. The researcher uses different numerical methods, with the objective of validating the performance of the model and optimizing it.
Figure 4. The Design Phase of the Graphical System Design Model
In this phase, researchers can acquire reference data from files or databases and incorporate it into the model. A “virtual plant/process” is created, which can be used later for hardware-in-the-loop (HIL) tests. Results from the simulation process are saved for post-analysis and visualization and can be used to introduce changes into the model. This is usually a software-centric process, with a strong focus on numerical methods/analysis and mathematics. However, for complex or computationally intensive models, high-performance computing (HPC) using grid computers, standard computers with graphical processing units (GPUs), and multicore computers is a key factor. In those cases, the hardware has an important impact on the performance of the model solution and simulation. Multicore-ready software tools are scarce, but LabVIEW is multicore-aware. It provides the user with a powerful yet easy-to-use programming language that can take advantage of multicore processors and parallel programming.
Prototype (Lab): If experimental validation of the model is required, researchers develop and test a prototype in the laboratory. Signal processing and analysis as well as visualization can be implemented online while data is being measured and acquired, or while the process is being controlled. The “virtual plant/process” defined in the previous phase can be used for HIL tests. The experimental results obtained in this phase can be used to modify and optimize the original model, which in turn may require additional experiments. Data captured can also be used for system identification and parameter estimation. Usually, this experimental (prototyping) phase is executed on standard PCs or PXI computers, using PCI/PXI data acquisition devices or external measuring devices connected to a PC via USB, Ethernet, GPIB, or serial ports.
Figure 5. The Prototyping Phase of the Graphical System Design Model
This process is usually more software/hardware-centric because sensors, actuators, data acquisition devices, controllers, and the controlled/analyzed plant, itself, are all key elements in the experimental setup. Real-time operating systems (RTOSs) can be used when deterministic performance or higher reliability is required. Also, multicore-based computers can be used when higher computational performance is needed. Field-programmable gate arrays (FPGAs), digital signal processors (DSPs), and GPU processors can be used with the multicore main CPU, allowing LabVIEW to execute critical computations in specialized processors. For example, sets of 2D or 3D differential equations can be solved in real time, or large sets of matrices can be processed at high speed and in real time using parallel programming in multicore computers while sharing part of the signal processing load with an FPGA or a GPU. Data is shared between the multicore processors and an FPGA via DMA first-in-first-out memory buffers (FIFOs). Finally, technical data mining algorithms can be implemented by combining LabVIEW with NI DIAdem, an excellent tool for managing, analyzing, and reporting technical data collected during data acquisition and/or generated during the modeling, simulation, or analysis phases.
Deployment (Field): Finally, the model (controller, analyzer, or both) is deployed in the field or lab using either a PC (desktop, server, or industrial) or PXI, or it can be downloaded to a dedicated embedded controller such as CompactRIO, which usually operates as a stand-alone node and in real-time (deterministic) mode. When using the LabVIEW Real-Time Module, symmetric multiprocessing (SMP) techniques can be easily applied. For large systems, with high-channel counts or involving modular instruments such as scopes, digital multimeters (DMMs), RF vector signal analyzers, and dynamic signal acquisition (DSA) devices, the PXI platform is more appropriate. The transition from the prototyping phase to the deployment phase can be very fast and efficient because the same set of tools used for prototyping can, in most cases, be applied to the final deployment of the system in the field.
Figure 6. The Deployment Phase of the Graphical System Design Model
In many cases, the system is deployed as a headless system (no monitors or interfaces to the user), executing the analysis/control algorithms in real time as a dedicated device. If on-the-field graphical user interfaces (GUIs) or operator interfaces (OIs) are needed, the LabVIEW Touch-Panel Module and industrial-grade monitors with touch-sensitive screens can be used locally. Remotely, data can be shared and visualized via Ethernet with applications developed using LabVIEW and the LabVIEW Datalogging and Supervisory Control Module running on one or more PCs distributed in a network.
Related Links
Scientific Computing with NI LabVIEW
Scripting Languages and NI LabVIEW
