Main program The Flametracker program consisted of a main program and two major subroutines. The features of the main program include loading of DAS-800 function libraries, a main menu for accessing major subroutines, error trapping, and game port event trapping. The major subroutines were flametracking and data visualization. The error trapping prevents the program from crashing if an error occurs, and prints the error to the screen.
Flametracking subroutine All of the mechanisms of digital control are implemented in the flametracking sub program. The controller operates on the principle that if the temperature of a point in front of the flame can be maintained constant, then the upward velocity of the fuel sample is equal to the downward velocity of the flame. This fixed temperature is referred to as the reference temperature, and the point where this temperature was located is called the reference coordinate. The thermocouple voltage that corresponds to the reference temperature is called the reference voltage. This thermocouple is called the tracking thermocouple. The upward velocity of the fuel is equal to the angular velocity of the motor multiplied by the pitch of the lead screw.
In the first part of this subroutine information from the user is requested. This input consists of fuel type, reference voltage, control coefficients, and data storage information. The type of fuel, PMMA or cellulose, is used to determine the ignition time. The reference voltage determines how far the tracking thermocouple will be positioned in front of the flame. The control coefficients, K, Ti and Td, are used in transfer function. For each of these parameters a default value is offered. The user is given the option to save velocity and voltage data to a file. After a file name is entered, a text input screen appears, allowing text input of information about the experiment. Entry of a blank line ends the input mode.
At this point the program displays the message "Use the Toggle Switch to Position the Fuel. Press 'S' to Start Experiment." The program uses event trapping to detect the position of a toggle switch, located on the test stand, which is connected to a game port on the computer. The program then sends the appropriate velocity command to the AX indexer. This allows the experimenter to adjust the starting position of the fuel sample holder.
After the user presses 'S', the program sends a command the AX indexer that powers the ignition circuit for a specified ignition time, thus igniting the downward spreading flame.
At this point in the program the message "Waiting for Flame" is displayed on the screen. By calling the appropriate DAS-800 library function, the voltage from the tracking thermocouple is read. As the flame approaches the tracking thermocouple its voltage increases. Once this voltage reaches the reference voltage, the tracking control loop begins.
First the voltage of the tracking thermocouple is measured. Then the voltage difference between the measured voltage and the reference voltage is calculated. This is the voltage error term and is denoted VE(k). The terms VE(k-1) and VE(k-2) are stored in the computers memory. The transfer function is then applied to update the motor velocity. The program then sends the new velocity command to the AX indexer. The elapsed time, velocity, and thermocouple voltage are then written to the specified file, and the program returns to the beginning of the loop. The loop ends when the user presses the space bar, and main menu is redisplayed.
A real time plot of sample velocity, and tracking thermocouple voltage is shown in two different windows on the computer screen. In addition the control coefficients K, Ti, and Td can be toggled up and down using the keyboard. This graphical interface allows for greater understanding of how the coefficients affect the response of the system.
There are several other parameters that play an important role in the tracking efficiency. The update frequency is the frequency at which new velocity commands are sent to the motor. This value is maximized for smoother data and more accurate derivatives. The update frequency is limited by computer speed, data acquisition speed, and the speed at which the motor indexer can process commands from the computer. The setup used in this work operates at approximately 40 Hertz.
To insure an accurate voltage reading at each iteration, a number of voltages are read and then averaged. More samples per iteration would eliminate noise from the voltage input, but would slow the update frequency. A value of 50 samples per iteration was selected for the experiments.
Data visualization subroutine The other major subroutine is data visualization. Upon entry of this option from the main menu the data visualization menu is displayed. The options listed in the data visualization menu are, read a text file, delete a file, move a file, list files in a directory and graph data. The first option displays the contents of a file containing a description of the experiment, control parameters, average spread rate, average voltage error, sample frequency, and reference voltage. The graph data option plots velocity and voltage versus time on separate graphs over a specified time segment.
Overview The Flameprobe program was designed to take temperature measurements in the region around a flame, made stationary using the Flametracker program. A QuickBasic 4.5 program was created to perform this task. The name of the program was probe40.exe. The program was designed to run on any IBM PC compatible computer in a DOS environment. The major components of this program included manual positioning of the thermocouple probe arm, automatic positioning and temperature measurements at the nodes of a specified rectangular grid, surface temperature measurements, and data visualization of the temperature field.
Main program In the main program the DAS-800 function libraries were loaded, and a main menu was displayed for accessing the subroutines. Thermocouple voltage to temperature conversion data tables were located at the end of the main program.
Manual positioning subroutine The program required exact positioning of the thermocouple to its starting point, directly above the tracking thermocouple and resting on the surface of the fuel sample. This was accomplished using a joystick and linear motion assembly. The joystick was connected to a game card on the computer's motherboard. The program first prompted the user for the velocity of the probe arm. Then the position of the joystick and the status of the top and side joystick buttons was read by the program. The program then sent the appropriate velocity commands to the motor indexers. The probe arm moves in the direction of the joystick at the specified velocity. The velocity is increased by holding down the top joystick button, and decreased by holding down the side joystick button.
Gas-phase temperature field measurement subroutine Once the position of the thermocouple was set, and the Flametracker program was properly tracking the flame, the gas phase temperature field could be measured. First the grid size and spacing were defined. The user was prompted for the total distance in the vertical and horizontal directions, as well as the number of points that temperature measurements were to be taken in each direction. Next the user was prompted for the starting vertical position. This option was included so that the temperature data acquisition could be broken into several experiments if necessary. Next the program prompted the user for the time at each point, the thermocouple type, and the EXP-16 channel. The time at each point determined how long the probe thermocouple remained at each point acquiring data. The thermocouple type determined which data conversion table the program used to calculate the temperature. The EXP-16 channel was the channel to which the probe thermocouple was connected.
Next the user was given the option to save the data to a file. The program then opened a file with the user defined file name and directory. The message "Press Enter to Start", was then displayed on the screen. Once the enter key was pressed the data acquisition began.
First the program sent a command to the vertical motor indexer, which moved the probe arm to the starting point. At each data point temperature measurements were taken at a rate of 45 samples per second, for a specified amount of time defined by the user. After the data was taken and stored in an array, the average temperature, standard deviation, and maximum deviation were calculated. Once these values and position coordinates were written to the data file, the thermocouple was moved to the next position. After waiting one second to allow for the response time of the thermocouple and motor, the next temperature readings were taken.
The first data point position was at the surface of the fuel. The probe then moved away from the fuel taking measurements at points in a horizontal line. After the horizontal points were finished the probe moved up to the next vertical position and then moved back towards the fuel surface. This sweeping pattern was continued until all the measurements were completed.
A real time plot of temperature versus time was displayed on the screen. This was used to help the user estimate if enough time was being spent at each point to get an accurate reading.
Surface temperature measurement subroutine The surface temperature measurement subroutine was used to acquire data from a thermocouple embedded in the surface of the fuel. Upon entry of this option from the main menu, the user was prompted for the thermocouple type, the EXP-16 channel, and data file information. The enter key was used to initiate the data acquisition. Surface temperature readings were taken at a rate of 18 (Hz). The elapsed time, surface temperature, and keyboard input character were written to the specified data file. The keyboard input character was used to mark the time at which the surface thermocouple reaches the reference coordinate.
Data visualization subroutine To quickly observe the temperature field data, two data visualization sub-programs were included. The first was a temperature density plot. Each point was represented with a rectangle having the color that matches a certain temperature range. Since only fifteen colors could be represented with an EGA monitor, this was the maximum number of temperature ranges available.
The second data visualization sub-program was a contour plot of the temperature field data. The contours were found by shelling out to a Fortran program, which created a new data file with information about the contours. The contours were then drawn on the screen using the QuickBasic program. The advantages of the contour plot were that exact contours could be specified and it was easy to read. The advantage of the density plot was that the location of the data points could be seen.
The same file manipulation options described for the Flametracker program are offered in this program.