Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Thermocouple System Calibration with NI LabVIEW and Mathcad

15 ratings | 3.33 out of 5
Print | PDF

Overview

This document illustrates how users can combine NI LabVIEW and National Instruments data acquisition hardware with MathsoftTM Mathcad®. LabVIEW is a revolutionary graphical development environment with built-in functionality for data acquisition, instrument control, and measurement analysis. Mathsoft is the only provider of calculation and documentation software that enables design engineers to work within the common language of engineering: applied mathematics. Mathsoft’s flagship product line, Mathcad, includes a self-documenting technology, complete with publishing capabilities, and establishes a framework for creating, sharing and reusing engineering calculations.

Engineers and scientists use LabVIEW to create automated test procedures, acquire data from the actual physical system or prototype, and perform high-level analysis and signal processing algorithms. LabVIEW is very intuitive for engineers and scientists because they can define their applications through diagrams that closely resemble flow charts. However, they frequently have the need to see and interactively manipulate the mathematical algorithms used to achieve certain results. With Mathcad, users can interactively perform complex calculations, such as parametric data fitting, numerical and symbolic differentiation, integration, signal analysis, and present on a document all the calculations performed as well as the intermediate and final results.

Combined with the straightforward experimental setup and system integration provided by LabVIEW and National Instruments data acquisition hardware, engineers from all disciplines can quickly and easily prototype systems, analyze data, and communicate their calculations into a company knowledge base for future use. The following case study shows one such example, where LabVIEW and Mathcad together create a powerful solution.

Case Study: Thermocouple Calibration

Thermocouples measure temperature indirectly by measuring the voltage produced across dissimilar metals when there is a temperature gradient present at the junction. Converting any measured voltage to a temperature requires calibration of the thermocouple. Typically, thermocouples are calibrated using standard reference tables of coefficients published by NIST (see link below), which fit a piece-wise polynomial curve to the standard ITS-90 reference temperatures (see link below).

There are several problems with the temperature conversions obtained in this manner. First, the curve describing the voltage-to-temperature data is highly nonlinear, and is, perhaps, better fit with a more complicated fit function. The calibrations published by NIST are piece-wise for this reason, so you must know which temperature range you will measure before you can choose a set of calibration parameters. Next, the NIST data only represents the calibration of the thermocouple wires themselves, not any extended cabling, gradient thermal effects, time-dependent degradation, or other sources of error.

Mathcad and LabVIEW offer a straightforward solution to this problem. For any new thermocouple installation, users can use LabVIEW and National Instruments data acquisition boards to measure several reference temperatures, for example, the boiling point of Nitrogen, the freezing point of water, and the boiling point of water, to name a few. A table containing these measured calibration values can be fed to Mathcad and fit with a rational polynomial function, which is a quotient of two polynomials and provides a more accurate and adaptable fit to this particular type of data. The rational polynomial function fit, which LabVIEW can adjust depending on the number of desired numerator and denominator terms, returns a set of fit coefficients. LabVIEW would then store these coefficients, and begin to take data from the actual thermocouple experiment. When LabVIEW acquires these measured voltages, they are returned to Mathcad, once again through the LabVIEW interface, for a calculation of the measured temperature using the previously calculated calibration coefficients.


Figure 1.

Calibration can be repeated as needed as the system ages, environmental changes take place, etc., and previous calibration constants can be stored for long-term measurement comparison. LabVIEW functions as the integration point for the measurement system and the data analysis capabilities in Mathcad. This is just one example of the way these software products can function in concert.

LabVIEW also offers curve fitting algorithms that users can implement in their automated test code. However, in applications where it is important to document the calculations and the calibration procedures for tracing purposes, Mathcad’s interactive "whiteboard" interface provides the perfect solution. By combining the connectivity between these two products, the data acquisition and in-line analysis capabilities of LabVIEW, and the advanced interactive mathematical and data analysis capabilities of Mathcad, scientists and engineers can build customized solutions for their specific needs.
See Also:
ITS-90 Thermocouple Database
ITS-90 Thermocouple Reference Temperatures

Related Links:
See how LabVIEW integrates with other design tools.
NI Temperature Measurement Solutions
15 ratings | 3.33 out of 5
Print | PDF

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).