microPID (μPID) is a computer program for real-time proportional + integral + derivative (PID) control of a translation stage in a Fourier-transform ultraviolet spectrometer. μPID implements a PID control loop over a position profile at sampling rate of 8 kHz (sampling period 125 μs). The software runs in a stripped-down Linux operating system on a VersaModule Eurocard (VME) computer operating in real-time priority queue using an embedded controller, a 16-bit digital-to-analog converter (D/A) board, and a laser-positioning board (LPB).

μPID consists of three main parts: (1) VME device-driver routines, (2) software that administers a custom protocol for serial communication with a control computer, and (3) a loop section that obtains the current position from an LPB-driver routine, calculates the ideal position from the profile, and calculates a new voltage command by use of an embedded PID routine — all within each sampling period. The voltage command is sent to the D/A board to control the stage. μPID uses special kernel headers to obtain microsecond timing resolution. Inasmuch as μPID implements a single-threaded process and all other processes are disabled, the Linux operating system acts as a soft real-time system.

This program was written by Vahag Karayan, Stanley Sander, and Richard Cageao of Caltech for NASA's Jet Propulsion Laboratory.

This software is available for commercial licensing. Please contact Karina Edmonds of the California Institute of Technology at (626) 395-2322. Refer to NPO-41107.



This Brief includes a Technical Support Package (TSP).
Document cover
Soft Real-Time PID Control on a VME Computer

(reference NPO-41107) is currently available for download from the TSP library.

Don't have an account?



Magazine cover
NASA Tech Briefs Magazine

This article first appeared in the September, 2007 issue of NASA Tech Briefs Magazine (Vol. 31 No. 9).

Read more articles from the archives here.


Overview

The document outlines the technical details and features of a software application known as "High Frequency Soft Real-Time PID Control on VME," developed by NASA's Jet Propulsion Laboratory (JPL). This software, referred to as microPID or uPID, is specifically designed for the Fourier Transform Ultraviolet Spectrometer (FTUVS) and is responsible for controlling the speed of a frictionless stage using an interferometer as an encoder.

The uPID software operates on a stripped-down Linux operating system on a VME platform, utilizing real-time priority to ensure precise control. It runs a PID (Proportional-Integral-Derivative) loop at a high frequency of 8KHz, with each loop iteration completing in 125 microseconds. This soft real-time system allows for some flexibility in meeting the timing constraints, permitting violations of the 125 microsecond deadline as long as they occur less than 0.25% of the time and do not exceed a maximum of 1 millisecond.

The software consists of three main components: VME Device Driver Routines, Serial Communication, and the Critical Real-Time (RT) loop. The VME driver routines are implemented as procedures that utilize memory-mapped I/O to communicate with the Agilent 10897A Laser Positioning Board (LPB) and the VMIVME-4116 Digital-to-Analog (DtoA) board. A custom serial communication protocol is also established to facilitate communication with a control computer, which sends coefficients and limits to the uPID when it is not executing the critical RT section of the code.

The critical RT loop is responsible for obtaining the current position from the LPB driver routine, calculating the ideal position based on a predefined profile, and determining the appropriate output voltage using the embedded PID routine. This voltage is then sent to the DtoA board to control the movement of the interferometer's mirror stage.

To enhance the timing precision of the system, embedded systems programming techniques are employed, including the use of special kernel headers for microsecond timing resolution and modifying the process priority to a real-time queue. The software operates as a single-threaded process, with other system processes disabled, allowing the full Linux OS to function effectively as a soft real-time system.

Overall, the document provides a comprehensive overview of the uPID software's architecture, functionality, and its application in advanced aerospace technology.