COMPUTER-CONTROLLED BATCH CHEMICAL REACTIONS

Stuart. Bacher, Arnold. Kaufman. Ind. Eng. Chem. , 1970, 62 (1), pp 53–61. DOI: 10.1021/ie50721a009. Publication Date: January 1970. Note: In lieu o...
7 downloads 0 Views 2MB Size
SYMPOSIVM ON FINE CHEMICALS PLANTS

STUART BACHER ARNOLD KAUFMAN

Comnuter- Controlled Batch Chemical Reactions Use of a digital computer to control and sequence a batch chemical reactor is described in detail n 1966, management a t Merck raised a number of

I questions with respect to the control of batch chemical processes. These related to the feasibility of using a digital computer to handle the measurement, control, and sequencing functions required for batch processing and to the ability of such a system to provide precise process documentation, improve product quality and batch reproducibility. If successful, such a system could become a prototype for operating both pilot and production facilities. Pharmaceutical production is characterized by a large number of diverse processes with relatively modest operating budgets for any one process. This is to be contrasted with the petrochemical field where monolithic processes have been placed under computer control since 1958. The economics of applying computers to pharmaceutical processes thus depends to a great extent on the ability to write process control programs easily. A research program to answer these questions was initiated in the fall of 1966. The initial objective was to apply computer control to a model batch process which would be run in standard equipment. Process control programs were to be written in a high level language such as FORTRAN. A Control Data 1700 computer system was selected after careful consideration of vendor capabilities (2). Nearly a year of test operation has shown that fully automatic control of a complex batch process can be obtained with the accompanying benefits of improved reproducibility and product quality. A new process control language (4) which enables chemical engineers to write process control programs easily was also developed.

Figure 1. Chemistry of methyl esterprocess

Process Description

The process selected was the esterification of diacetone ketogulonic acid with methanol and the subsequent in situ rearrangement of the methyl ester to sodium ascorbate (Figure 1). This reaction sequence involves many typical batch and semibatch operations and lends itself readily to feedback control (Figure 2). I n addition the esterification step, which could be run and evaluated independently, required only temperature, pressure, flow,

Figure 2. Operating routines VOL, 6 2 NO. 1

JANUARY 1970

53

3 T4-718C

L PU-c ST-718

@ @!

PU-A

d-h

VR-7184

PU.6,

VR-7180

i Figure 3. Computer-controlledprocessequipment

Figure 4. Computer-operated200-gal batch reactor

and liquid level measurements for control. A detailed operating procedure is given in Appendix 1 (page 61).

Process Equipment and Instrumentation

A glass-lined, double-jacketed reactor with auxiliary feed-tanks and distillate receivers was installed in the Merck Sharp & Dohme Research Laboratories pilot plant (Figure 3). Reactor size was fixed a t 200 gallons primarily so that standard size flow meters could be used with minimum quantities of materials being processed. Figure 4 shows the computer-operated 200-gal batch reactor. A variety of instrument types were installed to permit comparison of performance and programming requirements (Figure 5). All of the valves in the system were provided with limit of travel switches to permit the computer to determine their state. Similarly, all of the pumps in the system were provided with pressure switches. Primarily for reasons of economics and to remain within the then-current state of the art with regard to control valves, electropneumatic, rather than all electric operated, valves of the piston actuator type were installed. For block valves, solenoid actuated pneumatically operated ball valves were selected. The computer directly operates 7 control valves, 46 solenoid operated block valves, and 5 motor contact outputs. Figure 6 contrasts, by means of a simplified piping and instrumentation drawing (P&ID) for a typical operation, the instrumentation required for computer operation with that for manual operation. No information is provided to the computer that is not normally available locally to the chemical operator. On the other hand, obviously, a means of transmitting various signals to and from the computer control room must be provided. 54

INDUSTRIAL AND ENGINEERING C H E M I S T R Y

Figure 5. Analog instrumentation summary

S. Bacher and A . Kaufrnan are staff members of the Chemical Engineering Research and Development Department, M e r c k Sharp and Dohrne Research Laboratories, R a h w a y , N . J . 07065. This paper w a s presented a s p a r t of the Symposium on Fine Chemicals Plants, 7 5 8 t h National ACS Meeting, N e w Y o r k , N . Y., September 7-12, 1969. AUTHORS

Figure 6. Typicalpiping and instrumentation

Figure 7. Control Data 7700 process control computer system

The Computer System

A Control Data 1700 computer system, with the configuration shown in Figure 7 was purchased. The 1700 is a medium-sized stored program digital computer suitable for on-line process control applications (Figure 8). I t operates with a fixed-length 16-bit data and instruction word, and has a magnetic core memory with a maximum capacity of some 32,000 words. Storage cycle time is 1.1 psec. I n terms of its capabilities, the 1700 computer system is similar to IBM’s 1800 system . and General Electric’s 4020 system. I n addition, the Merck system contains a 1.5 million word mass storage unit and the conventional computer peripheral equipment; paper tape reader and punch, teletypewriter, and card reader (Figure 9). The Process-Computer Interface

The process-computer interface provides the means for the computer to obtain information regarding the state of the process and to change that state by transmitting instructions via analog outputs to position control valves and digital outputs to operate block valves and motors. There is a basic difference in the way digital and analog signals are handled. Digital input signals usually require only a change in logic level (i.e., voltage) to be scanned directly. Analog signals must be converted to a proportionate number of digital counts. Since converters are expensive they are almost always shared among a number of inputs. Thus, the interface includes signal conditioners, a n analog/digital converter, and a multiplexer to switch these signals one a t a time into the computer (Figure 10). Signal outputs from the computer are handled in a similar manner. T h a t is, digital or contact outputs

Figure 8. Control Data 7700computer

VOL. 6 2

NO.

1

JANUARY 1970

55

T A B L E I.

PROCESS INPUT-OUTPUT SUMMARY

Inputs

Analog Thermocouple

Digital Limit switches Pressure switches Level switches Remote/local switches Motor starter feedback

11

87 9 4

5 5

i n outputs

Analog Control valves Digital Solenoid valves Motors

Figure 9. Computer peripherals

Figure 70. Analog input interface

which are used to operate solenoids and motor starters are output directly with only a change in logic level required. Analog outputs to control valves must be converted from counts to a proportionate analog signal (current or voltage). The high speed device which performs this conversion is also shared among a number of outputs. This is somewhat unusual as digital to analog converters are simpler and less expensive than their analog to digital counterparts and separate devices are often used for each analog output (i.e., control valve). O u r pilot plant interface utilizes a high speed, high resolution converter shared among a number of outputs. Each output channel, however, has its own highly stable sample and hold amplifier which maintains valve position between successive outputs. This system has proved to be highly satisfactory. 56

I N D U S T R I A L A N D E N G I N E E R I N G CHEMISTRY

7 46 5 51

Table I summarizes the type and number of process inputs and outputs which are connected to the computer control system. ’To achieve satisfactory computer control, the process information acquired by the computer must be essentially noise-free. Much of this electrical noise can be eliminated by careful design of the process-computer interface. I n addition, the computer manufacturer’s recommended wiring practices should be adhered to. In general, including a computer in a process control installation does not require noise reduction beyond that required for electronic instrumentation (6). Common practices include the .use of individually shielded twisted wire pairs for low level analog signals, grounding of cables at only one point, and separation of signal and power cables (7). Process noise, such as might occur with flowmeters in lines containing pulsating pumps, is most often handled by programming techniques such as signal averaging or “smoothing” (5). Handling Process Data

The system uses the standard Control Data 1700 online control programs for scanning process variables and for direct digital control. The analog input acquisition system reads process variables into the computer on a cyclical basis, converts the digital count input into meaningful engineering units, and alarms whenever a variable is not within predetermined operating limits. I n addition, error checking is performed on the input signal to determine if the signal is within the range of the transmitter and to determine if the transmitter is functioning properly (e.g., circuit is not open). Standard routines may be used to convert digital counts to engineering units when the variable can be expressed as a simple function of the input signal (Figure

rn

Instrument

Equation

-

Linear

Liquid level, pressure, pH, etc.

Y

Square Root

DIP flowmeter

Y* A

Polynomial

Thermocouple

Y * A3X

Where x

AoX + B ,

T +

Ag X 2 + A l x + A.

is the input signal

A,---A3,

B are constants

Figure 7 7. Standard conversion routines

11). Derivation of the required conversion constants for a linear relationship between variable and signal is shown in Figure 12. However, the unique capability of the computer to obtain process data lies in utilizing its arithmetic and logic capability in the programming of customized, and therefore nonstandard, conversions. Such routines, which may have as input more than one physically measurable variable, are called ‘ccomposed”or calculated points. The system installed in our pilot plant scans 32 physically measurable variables and computes a n additional 43 composed points from the process data thus obtained. Composed points are used for automatic on-line calibration of instruments (Figure 13). Recalibrating instruments in this manner is faster, more reliable, and less costly than removing the transmitter to the instrument shop for recalibration. Other composed points are used to integrate flow rates with time to obtain total volume (Figure 14). Still other composed points provide data regarding average temperature, material balances, and heat of reaction. T h e control computer can act upon the data obtained by the analog input system. Programs replace the familiar analog controller (9). The converted input signal is compared against a programmed set point and the resultant difference is used in a three-mode feedback equation (Figure 15) to compute an output which will directly adjust a control valve so as to bring the process variable back to the desired value. I n addition, the control program can check the calculated output against predetermined limits (maximum or minimum valve travel). Using only control equations, direct, cascade, or ratio control can be achieved. Limits can be set on the high and low value of the set point. Neither the human operator nor the cascade control function can exceed these limits. Process conditions can then cause the set point of the secondary control loop (the loop being cascaded to) to reach, but not exceed, the limit. The set point will then display no reset windup; that is, it will return to the control region as soon as the error reverses.

SPECIFIC EQUATION

-

PSlG = 2.5 ma 25 GENERAL EQUATION y=Ama-B

ps

WHEREA8BARE 0 TWO DESCRIPTIVE WORDS (DW’S) FOR THE ANALOG POINT

10

50

ma

Figure 12. Transmitter conversion equations

Figure 13. Composed point calculations

Figure 74. More on composedpoints

The control program also alarms whenever the controlled variable is not within predetermined limits or the absolute value of the error difference exceeds a predetermined value. Our experience with the quality of direct digital control has been excellent. Digital control has proved to be very satisfactory both during transient and steady-state operations. T h e digital controller has also been very easy to tune. VOL 6 2

NO.

1

JANUARY 1 9 7 0

57

Figure 75. DDC incremental algorithm 3-mode feedback control

Computer-Operator Interface

The computer-operator interface provides the means for the process engineer and the chemical operator to initiate process operation, to obtain information about the current process state, to critically observe selected process variables, to respond to unforeseen mechanical failures, and to manually operate process equipment for calibration runs, testing, and emergency backup. Figure 16 shows the physical layout of the process operator’s console. I n essence, the console consists of two typewriters, two trend recorders, a digital display, the demand console, and a manual panelboard. The operating console serves as the communication link between operator and computer. A number of socalled “demand functions’’ are provided to permit almost instantaneous access to process data and selected programs. The demand functions utilized in the current system are shown in Figure 17. A distinction between actions that can be initiated by the process engineer (supervisor) and the chemical operator is made by having certain critical demand functions subject to the operation of a key switch. The functions allocated to the engineer or supervisor involve, for the most part, the ability to modify programs. Those allocated to the operator aliow the display or entry of process data. As the table shows, the demand functions represent a most powerful communication tool. These coupled with the flexibility of the trend recorders and digital display give an excellent “feel” for the operation of the process. I t is worth reiterating that information regarding any variable in the system (measured or computed) can be immediately displayed or recorded with any desired range and offset. T h e operating console also includes a series of alarm annunciators, a n automatic/manual selector, and a failsafe button. 58

I N D U S T R I A L A N D E N G I N E E R I N G CHEMISTRY

The manual operating panel permits operation of all on-off devices (solenoid valves and motors) via push buttons and of control valves via analog output stations (Figure 18). The latter permits direct observation of variable and valve position and positioning of the control valve. No analog backup is provided nor has it been required in our operations to date. The two typewriters are used for recording logging and alarm messages, respectively, and each unit automatically accepts both types of message if the other is not operating correctly. The logging capability is an important feature of the system. Logs are used to provide precise documentation for each batch. Records of the time a t which key sequence operations were initiated and terminated and the value of critical variables over the duration of the operation may be obtained. I n addition, status logs, giving information regarding the current state of the process may be obtained upon demand. A record of all alarm conditions detected by the system is also kept (Figure 19). Alarms are printed in red and give information regarding the time, the process variable, the type of alarm, and the alarmed value.

Figure 76. Process operator’s console

Figure 77. Demand functions

Figure 18. Manual backup panel

Batch Sequencing

The “Batch Sequencer,” a FORTRAN program, is in reality the operating procedure used to sequentially carry out the required process steps (Appendix 1). It is completely analogous to the batch sheet used in manual operations. A typical sequence step is as follows :

“ l i .

-

.

.

.

Step 9 When 81 gallons have been distilled, rapidly add 98 gallons of methanol. A sequencer statement for the above step is as follows: CALL TRNSFR (DISVOL, GE, 81.0, INTTER, 133, SEG5, 4,TRNDAT) DATA T R N D A T (1)/50.0/, T R N D A T (4)/98.0/ T h e above code would result in the following: When the distillate volume (DISVOL) reaches 81 gallons, initiate the TRNSFR subroutine using action list 133. The process being run has the identifier, SEG5. The data stored in the array TRNDAT, specify the control valve opening (yo) and the volume to be charged (GAL). Upon sensing the transfer of this required volume, the TRNSFR operation terminates. The physical order in which valves, motors, etc., are operated to accomplish the desired action is described by action lists which are AUTRAN programs ( 4 ) .

Figure 79. Alarm typewriter

VOL. 6 2

NO.

1

JANUARY 1970

59

AUTRAN is a n acronym for Automatic Utility TRANslator which permits programming of process control instructions in engineering terminology. This compiler was developed by Merck & Co., Inc., in collaboration with Control Data Corporation. A typical AUTRAN statement is OPEN (VALV1) C O N F I R M The execution of this statement causes valve 1 to open and instructs the computer that feedback from the limit switches confirming the action is required. I n summary then, simple programming techniques have been developed which permit chemical engineers to program the batch sheet and the computer to execute these programs as an operator would using the previously written action lists. Operating Results

T h e performance of our computer-controlled Pilot Plant reactor system has exceeded our initial expectations. The reproducibility obtained in operating the sodium ascorbate process was il .2y0for yield and f0.4% for quality. In addition, the average yield and product quality attained under computer control has equaled the best performance previously obtained with manual operation. Several process changes were required during startup. These changes ranged in complexity from substituting one instrument for another as a control element to a complete change of control strategy in the difficult alkaline rearrangement of the methyl ester. The latter involved a combination of feed-forward and feedback control of pH. The use of the available compilers (FORTRAN, AUTRAN) permitted these changes to be made rapidly, Further, these changes were implemented solely by the chemical engineers working on the project. Automated process systems must possess a very high degree of reliability if the promise of their initial justification is to be fulfilled. I n addition, the system should not be so complex that excessive time is required to repair minor breakdowns. For this reason, our experience indicates that it is wise to utilize standard, well-proven hardware wherever possible, and unless there is great depth of in-house experience, that computer system maintenance be handled by the computer manufacturer. An important aspect of our project is the continuing assessment of the comparative reliability of computer system, process instrumentation, and plant equipment. Typical results are given in Table 11. The system is operational for eight hours a day, five days a week. T h e availability or uptime is not a measure of the absolute reliability of the system, but is rather a function of both reliability and maintainability. Our experience indicates that the reliability of the computer hardware is of the same order as process instrumentation and plant equipment. Our major difficulties have been with the bulk memory unit and the 60

I N D U S T R I A L A N D E N G I N E E R I N G CHEMISTRY

typewriters. These problems are not uncommon and their solution by the computer manufacturers appears promising ( 3 ) . The reliability of the commercially available electronic process instruments presents no difficulty in their application to computer control. This is especially true of the more recently introduced measuring devices (e.g., magnetic, turbine flow meters). The accuracy of process instrumentation can, however, stand improvement. An installed flowmeter, for example, is seldom more accurate than =k2%. Since the numeric accuracy of the computer is markedly higher, there is a disparity which may adversely affect process control and data acquisition. What Conclusions Can Be Drawn

The greatest immediate advantage of computer control lies in the fact that process reproducibility is of an order higher than at present because the sequence of operations and the time interval between these operations are not subject to human variation. Programmable devices other than digital computers can be used to accomplish automated sequencing. However, the digital computer has the unique capability of gathering and storing data faster and with greater capacity than other known devices. These data are available for immediate (on-line) reduction to significant results as well as for later (off-line) detailed examination. The computer programs for a particular sequence can be saved in their original form and are thus available for

TABLE II. PILOT PLANT SYSTEM AVAILABILITY Computer hardware

% Aaailabilitya Mainframe Disk memory Card reader Typewriters Process interface Operator interface

97.2 95.3 97.8 95.0 98.3 99.8

Process instrumentation

Temperature Flow Pressure Level Plant equipment Piping, valves, fittings Vessels Pumps Motor drives a

Based on total operating hours.

100.0 97.8 99.8 100.0

96.4 100.0 98.5 99.6

operating the process at any time in the future, eliminating dependence on human memory for essential but unrecognized details. The computer permits processes to be operated unsupervised with a greater degree of confidence than can processes operated currently with supervision. For example, the response to a number of possible emergency or other unusual situations can be carefully preplanned using the best minds available. Should the need arise, the emergency response can be correctly and more rapidly applied than possible under other modes of operation. Lastly, processes can be remotely operated under computer control with no loss of “feel” since, in addition to conventional indicators and recorders, the computer can be interrogated for a status log giving the concise yet complete current state of the process. “Milestone” logs recording the time when important operations in the process were begun and completed are also produced. Speculations with Regard to the Future

T h e work carried out thus far has given us some insight into what can be foreseen for computer-controlled batch pilot plants as the chemical engineer learns more about control computer capabilities and as computer systems become more specifically tailored for batch process operations and easier to apply. From a n economic standpoint, the process control computer must be able to handle multiple processes simultaneously. Present technology makes this an achievable objective. T h e inclusion of mathematical models in the control strategy to optimize the process is regarded by all as a laudable objective. Precise models for transient processes are not easy to come by. I t is possible, however,

to use other methods (such as variable manipulation by statistical techniques [EVOP], analysis of process response to random disturbances) to improve process performance (8). The digital computer makes the application of these techniques feasible. A major function of any pilot plant is to develop data for scale-up to plant operation. Where both the pilot and final plants are computer controlled, we foresee the direct use of pilot plant process programs in the production area, thus assuring facile startup and accurate transfer of data. Finally, although considerably beyond the present technology, it is possible to speculate, based on the impetus provided by work on “self-learning control systems’’ in the aerospace field (7) and on the present methods of programming numerically controlled machine tools and robot manipulators which duplicate human limb movements, that having once monitored the manual operation of a process, the computer will automatically generate a sequencing program which can reproduce and retain for future use the original demonstration. REFERENCES (1) P. N. Budzilovich, Electrical Noise: Its Nature, Causes, Solutions, Contr. Eng., May 1969, p 74. (2) V. V. Dobrohotoff el ai., When User and Vendor Collaborate, Contr. Eng., January 1969, p 124. (3) M . French, Rotating Disks and Drums Set Peripheral Memories Spinning, Electronm, 42, May 26, 1969, p 96. (4) T. G. Gas ar, V. V. Dobrohotoff, New Process Language Uses English Terms, Contr. Eng., 8ctober 1968, p 118. (5) K. W. Goff, A Systematic Approach to DDC Design, ISA J.,16, (12) 44 (1966). (6) B. E. Klipec, Reducing Electric Noise in Instrument Circuits “IEEE Transactions on Industry and General Applications,” Vol. IGA-3, Nd. 2, March/April 1967. (7) J. M. Mendel Survey of Learning Control Systems for Space Vehicle Applications, Proceediigs Joint Automatic Control Conference, Univ. of Washington, Seattle, Wash., August 1966. (8) B. J . Williams and D. W. Clarke, Plant Modeling from p.r.b.s. Experiments, Control, 12, 856 (1968). (9) G . V. Woodly Standard Software Blocks Ease DDC System Design, Inrtrurncnt Technol., 15, (4),’p 57 (1968).

VOL. 6 2 NO.

1

JANUARY 1970

61