Q&A: NI LabVIEW 2009 Simplifies Real-Time Math. Dr. James Truchard, National
Instruments president, CEO and co-founder, discusses the challenges for ...
Q&A: NI LabVIEW 2009 Simplifies Real-Time Math Dr. James Truchard, National Instruments president, CEO and co-founder, discusses the challenges for real-time math and how NI LabVIEW graphical system design software simplifies the design for deployed mathematics.
Q: What is real-time math? Dr. Truchard: Whether in a cell phone, a traffic light controller or an industrial machine stamping out widgets, the brains of today’s embedded systems involve advanced mathematics to perform a signal processing or control function. In many cases, it is the domain expert in signal processing or control who is involved in the design of the math algorithms that define how the embedded system operates. Moving these algorithms from the design environment on the desktop PC into the embedded system processor so that it can process the I/O and meet the real-time requirements of the device is where the complexity begins, and an acceptable answer requires not only the numerical precision of the outcome but also the execution of that outcome in a deterministic amount of time. Consider the cases of medical devices or wind turbine control, where both the result and the time to result are critical components of the outcome. Meeting these difficult application challenges requires real-time math, an input to the design process where the initial implementation of an algorithm can be used through the deployment onto embedded hardware with deterministic requirements.
Q: How does real-time math relate to algorithm engineering? Dr. Truchard: The traditional design process often separates the tasks associated with design and prototyping. It’s common for one set of developers to apply theory, create simulations and develop algorithms, and then deliver the results to a separate group that must translate the theoretical design into practical implementation. This transformation of ideas and equations to prototypes and embedded hardware can be very tedious and often requires multiple software tools. As engineers strive for shorter time to market, new tools and processes must be developed to speed and simplify this process. Algorithm engineering is a new approach to design that encourages the use of real-world I/O, often in the prototyping stage, to achieve a better design. Revolving around one software tool that must provide an easy path to deployment on prototyping platforms, algorithm engineering employs an iterative process where the same code is used throughout the design process. LabVIEW simplifies algorithm engineering through the many models of computation available, such as simulations, statecharts and textual math. By incorporating these different approaches into one integrated environment, LabVIEW empowers developers to combine the strengths of different models, without sacrificing the benefits of a single-environment implementation. Realtime math is the mathematical input in this design process that allows deployment to embedded hardware without abandoning the original implementation.
Q: Why is real-time math challenging with traditional design tools? Dr. Truchard: Traditional design approaches often require developers to abandon not only the prototyping platform when they reach the final deployment phase but also their developed code, resulting in additional development. Low-level programming languages, such as C and C++, have been used for years and share a common syntax familiar to programmers. However, the lack of “built-in” signal processing libraries that are
portable from platform to platform, or hardware target to hardware target, requires these algorithms to be integrated from a third party or developed from scratch, which is both error-prone and time-consuming. In addition, the underlying textual syntax of the language may not intuitively map well to the numeric algorithms being expressed. In contrast to low-level languages, generic math software packages, such as Scilab, The MathWorks Inc., MATLAB® software, MapleSoft and Mathematica, use high-level abstract languages intended for mathematical exploration. However, deployment can prove difficult because the transition from the implementation language to hardware is not direct. This transition is often a multi-step process, involving not only the burden of intermediate languages and additional tools but also an additional process to verify that the deployed code is equivalent to the initial implementation.
Q: What makes LabVIEW the ideal choice for real-time math? Dr. Truchard: LabVIEW simplifies the development and deployment of real-time math through several inherent strengths. The multiple models of computation available with LabVIEW provide the flexibility for developers to choose one or more models to best suit their application needs. While a mathematical equation is best represented in textual language, configuring acquisition parameters for hardware is easily accomplished in a configuration window. With more than 1,000 built-in functions for signal processing, analysis, math and control, LabVIEW delivers several levels of abstraction for algorithm development. The GUI in LabVIEW allows developers to interact with algorithms and explore mathematical concepts by visualizing the effect that varying a certain parameter’s value introduces into their applications without the additional effort of rewriting code. LabVIEW also offers a seamless interface to take measurements from sensors across multiple form factors, including USB, PCI Express, PXI and Wi-Fi. LabVIEW applications can be deployed to a wide range of targets such as low-profile embedded targets like NI Single-Board RIO and ARM processors to highperformance real-time operating systems with embedded field-programmable gate arrays (FPGAs) like NI CompactRIO. LabVIEW also simplifies the challenge of real-time math through its inherent multithreaded nature, so developers can take advantage of hardware with multiple cores to maximize their performance.
Q: How does the LabVIEW MathScript RT Module further enable real-time math? Dr. Truchard: Although deploying the custom .m files to embedded hardware has been a challenge for traditional tools, the new LabVIEW MathScript RT Module adds this functionality to LabVIEW. With this new module, LabVIEW developers can deploy their custom .m files to all NI real-time platforms as easily as a native LabVIEW VI. The LabVIEW MathScript RT Module enforces strict typing on the .m file language within the context of the LabVIEW graphical environment for efficient data type propagation throughout the underlying code. Doing so ensures that LabVIEW efficiently compiles the text-based MathScript code and optimizes the .m file language for real-time constraints in embedded hardware. The LabVIEW MathScript RT Module offers a simpler path to embedded hardware for developers familiar with the .m file syntax while maintaining the ease of use and hardware integration of the LabVIEW graphical development platform. ©2009 National Instruments. All rights reserved. CompactRIO, LabVIEW, National Instruments, NI and ni.com are trademarks of National Instruments. Other product and company names listed are trademarks or trade names of their respective companies. MATLAB® is a registered trademark of The MathWorks, Inc.
11500 N Mopac Expwy • Austin, TX 78759-3504 USA • Tel: (800) 433 3488 • Fax: (800) 683 9300 •
[email protected] • ni.com