MCR-86-673 

USER’S MANUAL 

FOR 

NICKEL CADMIUM BATTERY EXPERT SYSTEM 

NAS8-35922 

DEVELOPED FOR 

NASA/MARSHALL SPACE FLIGHT CENTER 

HUNTSVILLE, ALABAMA 

PREPARED BY 

MARTIN MARIETTA CORPORATION 

AEROSPACE DIVISION 

DENVER, COLORADO 

SEPTEMBER 1986 

VERSION 1 

(EASB-CR-179032) GSEES HBBOAL ECB NICKEL 187-2 C470 

CADBIUH EATTEGY E)IEERI SPS3EB (Eartin 

Earietta Aerorpace) 1C p CSCL 1oc 

Unclas 

G3/33 45233 
TABLE OF CONTENTS 

SECTION 1 . SCOPE ...................................... 1 

1.1 Identification ........................ 1 

1.2 Computer System Materials ............. 1 

SECTION 2 . APPLICABLE DOCUMENTS ....................... 1 

SECTION 3 . SYSTEM OPERATION ........................... 1 

3.1 Power On/Off .......................... 1 

3.2 System Initiation ..................... 1 

3.3 General Information ................... 1 

3.4 Operating Procedure ...................- 

3.5 Input/Output .......................... 2 

3.6 Monitor Procedures .................... 5 

3.7 Auxiliary/Off-Line Routines ........... 5 

3 

3.8 Recovery Procedures ................... 6 

3.9 Special Operational Procedures ........ 6 

3.10 Program/System Control ................ 6 

3.11 Security .............................. 6 

3.12 Safety ................................ 6 

3.13 Program Inventory ..................... 6 

ILLUSTRATIONS 

FIGURE 1 . NICBES MENU FLOW DIAGRAM ............... 4 

i 
SECTION 1. SCOPE 

1.1 Identification. 

This is the User Manual for NICBES - Nickel Cadmium Battery Expert 

System. It documents the control for both NICBES subsystems; the Expert 

System and the Data-Handler. 

1.2 Computer System Materials. 

The system configuration for NICBES at Marshall Space Flight Center (.MSFC) 

includes a DEC LSI-11 which sends telemetry to a dedicated IBM-PC AT over 

a RS232 connection. The IBM-PC AT has a hard disk with 2 disk drives. 

Both ARITY PROLOG - Version 4.1 (25610 and MICROSOFT C (256K) need to be 

installed on the IBM-PC AT according to the specifications of the 

respective installation manuals. Both have been purchased by MSFC. ARITY 

PROLOG is setup under the root in a directory called PROLOG (Path: 

C:\PROLOG). The NICBES directory will contain all the PROLOG programs 

necessary to run the Expert System. MICROSOFT C is setup under root with 

all the 'C' programs for the Data-Handler in the directory called USR 

(Path: C: \USR). The IBM operating system, DOS, is assumed to be 

installed under the root in a directory called DOS (Path: C:\DOS). In 

addition the Star-SD-15 printer is linked to the IBM-PC AT for hardcopy 

capability. 

SECTION 2. APPLICABLE DOCUMENTS 

Program Maintenance Manual for NICBES - October 1986 

ARITY PROLOG Manuals 

MICROSOFT C Manuals 

__ IBM-PC AT Manuals 

, 

SECTION 3. SYSTEM OPERATION 

3.1 Power On/Off. 

Follow the standard procedures for turning the IBM-PC AT on/off as 

directed in the IBM Installation and Setup Manual. 

3.2 System Initiation. 

Before running NICBES, the RS232 connection must be in place with correct 

'mode' setting on the IBM-PC AT (mode = com1;96,n,8,1). This command is 

placed in the AUTOEXEC.BAT file along with other system settings including 

path settings for ARITY PROLOG and MICROSOFT C. The CONFIG.SYS file is 

defined with filesz15, buffers=20. Refer to Section 3.4 for initiation 

of the Data-Handler and the Expert System. 

3.3 General Information. Soft rebooting the IBM-PC AT is done by simply 

depressing the Ctrl, Alt and Del keyes simultaneously. Hard boot is 

accomplished by turning the power off, waiting 10 seconds, and then 

turning the power back on. 

1 
3.4 Operating Procedure. 

Having configured the IBM-PC AT as described above, you are ready to run 

NTCBES. The system operates in two modes. 

First, the Data-Handler captures the telemety from the DEC LSI-11 every 

one minute for 12 or more orbits where each orbit lasts 96 minutes. This 

lengthy process is required to build the historical data files for the 

Expert System. To start the Data-Handler go to C:\USR. Then enter 'data 

dhl <CR>' where data-dhl is the name of the Data-Handler's executable. 

Check to make sure the DEC LSI 11 is sending telemetry. The Data-Handler 

will synchronize with the incoming data. Messages will appear on the 

screen after every completed orbit. Error messages, as no communication 

or consecutive incomplete telemetry runs being received will also be 

printed to the screen. These conditions, as well as fault alarms, cause 

the Data-Handler to automatically exit after the appropriate data files 

are writ ten. If no one is available to monitor the displays, enter '"P' 

and all screen messages will also be written to the printer. To stop this 

process, simply enter "'P' again. This will give you a log of the 

Data-Handler's actions. Do not terminate the process until at least 12 

orbits have been recorded. To stop the Data-Handler enter 'nC <CR>'. It 

will take a few seconds to finsh at which time you will be returned to 

DOS. 

The second mode of operation is the Expert System. As soon as the data 

files have been created by the Data-Handler the Expert System is ready for 

execution. First go to the NICBES directory. Then enter 'api<:CR,'. A11 

the PROLOG programs (start.prg, faultd.prg, status.prg, advice.prg, 

showpak.prg, grafpak.prg) as well as the current .data files (curf(N!.dat, 

N = 1 to 3) and fault.dat, are loaded by the initiation program called 

'prolog.ini'. This program also starts the Expert System with the command 

'begin. ' . When the Expert System stops, all the data files are 

automaticallyt deleted from this directory. Data file archiving is the 

responsibility of the user, see Section 3.7 for futher information on this 

topic. The Expert System will begin either with Fault Diagnosis or with 

the Main Menu depending on the fault flag. Except for Fault Diagnosis, 

the user interface, made up of menus, drives the system. The user can 

traverse the Expert System by inputing selections to menus in the format 

of an item number or a yes/no response, followed by a <CR>. After 

quitting NICBES, you will be returned to DOS. 

3.5 Input/Output. 

There are no Login/Logoff or password procedures. After booting the 

'IBM-PC AT, you are ready to begin. The only user input after starting the 

Data-Bandler is the termination of the process after at least i2 orbits 

have been recorded by entering 'hC' . Input to the Data-Handler is in 

the form of telemetry from the HST Testbed as described above. 

2 
r 

The Expert System in turn utilizes the output files from the Data-Handler 

as its input. There is also user input in the form of menu selections. 

The Expert System can return fault diagnosis, status of the batteries 

(1-6), advice on battery (1-6) condition (1-3), and plots (1-12) of 

battery (1-6) parameters. Which screens will be seen depends on the 

choices selected by the user, except for the fault diagnosis which is 

available only when the fault flag = 1, and is activated automatically. 

See Figure 1 for the Menu Flow Diagram. 

Let us go through a typical session with the Expert System. First, if 

there is a fault, a Fault Diagnosis header will be written to the screen. 

Each condition checked, as well as the resulting evaluations, make up the 

Fault Diagnostic Report. If the user wishes more information or if there 

was no anamoly detected, the Main Menu will appear as follows: 

NICBES MAIN MENU 

1. PLOTS AND GRAPHS 

2. BATTERY STATUS 

3. ADVICE OF RECONDITIONING, WORKLOAD AND CHARGE 

4. QUIT NICBES 

ENTER CHOICE (e.g. 1<CR> ): 

Selection 4 will return you to DOS. Choices 1 - 3 will next prompt you 

for a battery number 1 - 6. You can go through each Expert System Module 

with each battey. Header information is printed for each module so that 

you always know where you are in NICBES. 

Plots and Graphs will gives you a choice of 12 plots to view. Again you 

can generate as many as you want for a given battery. 

GRAPHICS MENU FOR BATTERY N 

1--Battery Voltage at EOD for last 12 orbits 

2--Battery Voltage at high in-charge for last 12 orbits 

3--Recharge ratio for last 12 orbits 

4--Cell Voltages at EOD; high, low, average for last 12 orbits 

5--Cell Voltages at high in-charge; high, low, avg, last 12 orbits 

6--Cell Voltages at EOD for latest orbit 

7--Cell Voltages at high in-charge for latest orbit 

8--Average Battery Temperature for latest orbit, each 2 min 

9--Average Battery Temperature for last 12 ,orbits 

10-Cell Pressures at EOC and EOD for latest orbit 

11-Time on Trickle Charge for last 12 orbits 

12-Battery Current during reconditioning, 1 orbit, each 2 min 

13-Quit for Another Battery Selection 

14-Quit to Main Menu 

ENTER CHOICE (e.g. 1<CR> ): 0 

3 
"XES MENU FLOW DIAGRAM 

1. DECISION SUPPORT 

2. BATERY STATUS 

3. BATTERY ADVICE 

4. QUIT NICBES 

-~ 

! 

r BATTERY SELECTION (1 - 61 

t 

BATTERY 

ST&TUS 

1 1. ANOTHER I 

BATTERY 

SELECTION 

2. QUIT TO 

MAIN MENU 

i 

BATTERY 

ADVICE 

1. RECDND. 

2. CHARGE 

3. WORKLOAD 

4. ANOTHER 1 BATTERY 

SELECTION 

MAIN MENU 

5. QUITTD 

t 

DECl SI ON I SUPPORT 1 

1. - 12. PLOTS 

13. ANOTHER 1 

BATTERY I 

SELECTION 1 

14. QUITTO I 

MAIN MENU; 

I 

FIGURE 1 

4 
Battery Status will give the status of the selected battery. It checks 

battery temperatures, workload, charging, and divergence using averages of 

orbital data. Status Report consists of the condition being checked and 

the results of status analysis. The user can then opt to either select 

another battery or return to the Main Menu. 

Advice section uses trend analysis to go into further detail on what the 

condition of the battery is and what preventive action should be taken. 

BATTERY ADVICE MENU FOR BATTERY N 

1. RECONDITION BATTERY? 

2. CHANGE CHARGING REGIME? 

3. CHANGE WORKLOAD? 

4. QUIT FOR ANOTHER BATTERY SELECTION 

5. QUIT TO MAIN MENU 

ENTER CHOICE (e.g. 1<CR> ): 

3.6 Monitor Procedures. 

The Data-Handler can be monitored by checking the messages printed to the 

screen at the completion of each orbit. The message will list the orbit 

number for the completed orbit and the number of orbits processed so far. 

The process will terminate automatically if telemetry fails to cross over 

the RS232, an anomaly is detected or a shutdown signal is received. 

The Expert System operates interactively and reflects the current state. 

3.7 Auxillary/Off-Line Routines. 

Although there are no programs as such, you may want to make use of some 

system aids. For instance, to get a hard copy of the Data-Handler log, 

enter ’“P’ prior to initiation. You will then get a print out of each 

message written on the screen. To switch off this option, re-enter ’“P’. 

To get a hardcopy of any of the Expert System screens, hit the shift key 

and the PrtSc key after the report or plot has been displayed on the 

terminal. This utilizes the DOS GRAPHICS program. 

Any or all data files can be printed using the DOS print command with the 

name of the file. Using the ’*’ will give you more flexibility, as ’print 

showf*.dat’ prints all the show files. 

It is advisable to archive data files for later reference. Make a 

directory under root, as ’mkdir data’ (Path: C:\DATA). In this data 

directory make other subdirectories, a new one for each set of data files 

you want to save. Then copy the latest set of data files into this 

directory using the date created as a reference point. There is a 

data.bat command file available which will do this task for you. Simply 0 enter ’data date’ where date is in the format mm-dd-yy. 

5 
. 

. 

3.8 Recovery Procedures. 

In the Data-Handler, system hang-up can only be treated by re-booting and 

starting over. 

In the Expert System if you do get hung, enter ’“C’ to get back to 

PROLOG. When you see the prompt you can either type ’begin.<CR>’ to 

start the Expert System again or ’halt.<CR>’ to leave PROLOG and return 

to DOS. ARITY PROLOG supports trace and spy facilities to aid in any 

debugging. 

3.9 Special Operational Procedures. 

The Data-Handler and the Expert System can not execute at the same time 

due to IBM’s single tasking limitation. In addition to effectively run 

the Expert System, a full set of data files is required. 

3.10 Program/System Control. 

The user has access to all the source code and can make whatever changes 

deemed necessary. Consult the System Maintence Manual first and always 

make backups of the file prior to editing. Working knowledge of both ’Cy 

and Prolog is required. Document all changes. Regular backups should be 

a part of the maintenance schedule. 

3.11 Security. 

There are no security requirements. 

3.12 Safety. 

There are no safety procedures applicable. 

3.13 Program Inventory. 

Data-Handler Programs (all written in ’C’): 

datacl.bat - essentially the Makefile for the Data-Handler, it compiles 

data,hdl.c and links all needed object files. 

hst.h - Header file to setup global structures, matrices and arrays, data 

definitions, and include file names. 

data-dh1.c - Main driver which calls other routines. 

data-dhl.exe - Executable for the Data-Handler. 

read-data.c - Reads incoming telemetry (header, battery data, solar panel 

array and bus data). 

 process.^ - Processes telemetry (sums, averages, ziinimua~s and maximuas). 

write.c - Writes processed data to output files at appropriate times. 

6 
Expert System ProFrams (all written in PROLOG): 

prolog.ini - Automatically consulted by PROLOG when Expert System is 

initiated. It loads all needed PROLOG programs, copies all 

data files to the NICBES directory, consults current data 

files and fault.dat, and then starts the Expert System. 

start.prg - Main driver. Calls all other routines. 

Implements User Interface in the form of menus. 

faultd.prg - Fault Diagnosis. 

status.prg - Gives status of selected battery. 

advice.prg - Gives advice on reconditioning, workload and/or charging 

of selected battery. 

showpak.prg - Draws any of 12 plots for selected battery. 

grafpak.prg - Manipulates graphics primitives for showpak.prg 

utility.prg - Miscellaneous Prolog predicates for use by other modules. 

Data Files: 

fault.dat - Contains a fault flag = 1 if there was a fault 

curfl.dat - Contains the current orbit number and 

= 0 if no fault was detected. 

3 reconditioning flag for each battery = 1 for reconditioning 

= 0 no reconditioning. 

curf2.dat - Contains Phase (charge or discharge) 

D ay-mi n 

Current from 13 SPAS (Solar Panel Array) 

Voltage from 3.Busses 

Average Temperature from each battery (6) 

curf3.dat - Contains Battery Cell Voltages (23 for each of 6 batteries) 

showfl.dat (6x12) - File contains battery voltage taken at EOD per orbit 

for last 12 orbits. 

showf2.dat (6x12) - File contains the battery voltage at high in-charge 

per orbit for the last 12 orbits. There are 23 cells per battery. 

a showf3.dat (6x12) - File contains the recharge ratio = AHO/AHI per orbit 

for 12 orbits. 

7 
showf4. dat (6x36) - File tains ell voltages at EOD, with the high 

value, low value and average of all values, in this order per orbit for 

the last 12 orbits. So a row contains 12 high values, 12 low values and 

then 12 average values. 

showf5. dat (6x36) - File contains cell voltages at high-charge; high, low 

and average of all values, in this order, per orbit for last 12 orbits. 

Each row contains 12 high values, 12 low values and the 12 average values. 

showf6.dat (6x23) - File contains 23 cell voltages at EOD for each 

battery, from the latest orbit. 

showf7.dat (6x23) - File contains 23 cell voltages at high-charge for the 

latest orbit. 

showf8.dat (6x48) - File contains the average of the six temperature 

sensors (degrees c> per battery, at two minute intervals 

(lmin,3min, ... 95min) over the latest orbit. 

showf9.dat (6x12) - File contains the average battery temperatures per 

orbit for the last 12 orbits. This is the average of the temperature 

averages in showf8. 

showfl0.dat (6x46) - File contains the 23 cell pressures taken at EOC and 

then the 23 cell pressures taken at EOD for each battery in the.last full 

orbit. 

showfll.dat (6x12) - File contains the time on trickle charge for each 

battery per orbit for the last 12 orbits. 

showfl2.dat (6x49) - File contains battery current during reconditioning, 

at 2-minute intervals, for last reconditioning of each battery. It is 

recorded every 2 minutes, only when battery reconditioning flag is 1 and 

only for one orbit. Column 1 contains the orbit number for which 

reconditioning is occurring. The file contains zeroes until a battery is 

reconditioned. 

showfl3.dat - File contains AH0 summed over discharge phase per orbit for 

last 12 orbits. 

8