MAXIMIZING PROCESS PRODUCTION RATES USING PERMANENT CONSTRAINTS

Abstract: The present invention optimizes the relationship of variables associated with a process having inputs and outputs such that the process has controlled variables, manipulated variables, associated variables and disturbance variables, to maximize production rates. The method of optimizing the relationship includes the steps of prioritizing errors associated with the controlled variables, optimizing controlled variable deviations from their setpoints over a predetermined future time horizon based upon manipulated variable differential moves, suppressing errors associated with the future controlled variable while penalizing moves having large manipulated variable movement for balancing the reduction of future control error against large manipulated variable movement, weighting the manipulated variables for reducing deviation of the manipulated variable from a predetermined target value set artificially high so as to allow preferential movement with respect to some manipulated variables over other manipulated variables, and applying a constraint deviation variable to effectuate deviations outside allowable bounds.

Description: MAXIMIZING PROCESS PRODUCTION RATES USING PERMANENT CONSTRAINTS FIELD OF THE INVENTION The present invention relates to a method and apparatus for optimizing the relationship of variables associated with a process for maximizing production rates. More particularly, the present invention relates to a dynamic control method employing a predictive control algorithm that is capable of handling multiple inputs and/or outputs and constraints on manipulated variables and/or other variables associated with the process. BACKGROUND OF THE INVENTION Processes can be controlled more precisely to give more uniform and higher quality products by the application of automatic control principles. Insofar as the application of automatic control permits plant operation, as close as feasible, to plant design constraints, and reduces manpower costs and the costs of off- specification product, economic return of invested capital can be increased. Prior to the development of computer computational power, feedback control units used sensors to measure an output variable, variable ratio or the like. The measurements could then be used to adjust the input variable according to a standard control equation, i. e., a transfer function depending on the process. However, the nature of feedback control requires undesirable process deviations to have potentially occurred prior to taking corrective action. The introduction of fast, efficient computers into process control methodology now permits the implementation of master units receiving a multitude of different types of interdependent process inputs of multiple interdependent process units for which an optimized output can be imposed. Such master control units can achieve a significant degree of feedforward (i. e., predictive) control in very complicated processes since even a complex process control equation can be rapidly solved. Feedforward control becomes important in the optimization of the process since the controller action can be initiated based upon a prediction of where the outputs (i. e., the controlled variables) are headed. The optimization engine can also efficiently deal with process constraints which are only indirectly influenced if at all by manipulated variables so that the best output signals are tendered for the current conditions. Individual low hierarchy controllers manipulating a single input for control of a single output cannot produce a synthesis of the overall picture. Heretofore, controlling the process associated with a plant has been the purview of the experienced human operator. In a complicated process the appropriate action or actions may not be readily apparent or may not be taken as quickly as desired for optimum operation. Further, the human controller must develop "comfort levels" of operation based on experience and rules of thumb. Comfort levels can vary drastically between different human controllers and can be a significant distance from optimum capability or constraints of the equipment. Such comfort level of operation is necessary to account for the limitations of human data processing. U. S. Patent 4,349,869 to Prett et al. describes a method for controlling and optimizing the operation of a series of interdependent processes in a plant environment where manipulation of a constrained process input variable is used to achieve feedforward/feedback control of a process output variable. In the method synthesis, input variables are subjected to measured perturbations and the dynamic effects on the outputs are noted for prediction of the future response of the processes during on-line operation. Grosdidier et al., FCC Unit Reactor-Regenerator Control, 1992 American Control Conference Proceedings, Paper No. WA4, pp. 117- 121 , describes a multivariable control strategy which was implemented on a fluidized bed catalytic converter (FCC) unit in a European refinery. The FCC unit is said to be a prime candidate for advanced process control due to its complex process behavior and because of the conflict between its operating constraints and its economic objectives. Of concern in the present invention is to control a process having inputs and outputs and having controlled variables, manipulated variables, associated variables and disturbance variables. Also, it is of concern in the present invention to optimize the relationships of variables in connection with the process having inputs and outputs related to the controlled variables, manipulated variables, associated variables and disturbance variables. It is, therefore, a feature of the present invention to provide a method for controlling the inputs and outputs of a process having controlled variables, manipulated variables, associated variables and disturbance variables. It is, also, a feature of the present invention to optimize the relationship of controlled variables, manipulated variables, associated variables and disturbance variables in operative association with inputs and outputs of the process. A feature of the , present invention is to provide a model predictive control algorithm that is capable of handling multiple inputs and/or outputs. 6 reduction of future control error against large manipulated variable movement. The method comprises the steps of weighting at least one manipulated variable for reducing deviation of the manipulated variable from a target value set artificially high to allow preferential movement with respect to some manipulated variables over other manipulated variables, and applying a constraint deviation variable to effectuate deviations outside allowable bounds. Preferably, the method of the present invention comprises a model predictive controller having a control routine for determining differential moves of manipulated variables based on one or more controlled variables, one or more associated variables, one or more disturbance variables, and a permanent constraint target set at an artificially high value. More particularly, the method of the present invention provides that the control routine is adapted to solve the objective function: Min J = Jcv + Jλ + Jpc + Jd wherein Min J is a least square value comprising the sum of Jcv, Jλ, Jpc and Jd; such that Jcv = CVwate τ (A x - e) τ CVwate(A x - e) wherein Jcv is the sum of a weighted squares of deviations in the controlled variables from respective setpoints over a future time horizon, CVwate is a vector of factors for weighting control variable errors relative to each other, A is a matrix of transfer function coefficients relating the controlled variables to the manipulated variables, x is a vector of the differential moves of the manipulated variables and e is a vector of errors between the controlled variables and respective setpoints; Still another feature of the present invention is to provide the automatic control of ammonia plants by monitoring and controlling equipment and operating constraints. Still further, another feature of the invention is to maximize production strategies employed in ammonia plants such that typically applied comfort zones can be reduced to minimum levels. Additional features and advantages of the invention will be set forth in part in the description which follows, and in part will become apparent from the description, or may be learned by practice of the invention. The features and advantages of the invention may be realized by means of the combinations and steps pointed out in the appended claims. SUMMARY OF THE INVENTION To achieve the objects, features and advantages, in accordance with the purpose of the invention as embodied and broadly described herein, a method for controlling the inputs and outputs of a process having controlled variables, manipulated variables, associated variables and disturbance variables is provided. The present invention provides a method for optimizing the relationship of variables associated with a process having inputs and outputs. The process has controlled variables, manipulated variables, associated variables and disturbance variables with at least one controlled variable weighted relative to other controlled variables so as to prioritize errors associated with the controlled variables such that controlled variable deviations are optimized with respect to associated setpoints over a predetermined future time horizon based upon manipulated variable differential moves with at least one future controlled variable being penalized for large manipulated variable movement for balancing the reduction of future control error against large manipulated variable movement. The method comprises the steps of weighting at least one manipulated variable for reducing deviation of the manipulated variable from a target value set artificially high to allow preferential movement with respect to some manipulated variables over other manipulated variables, and applying a constraint deviation variable to effectuate deviations outside allowable bounds. Preferably, the method of the present invention comprises a model predictive controller having a control routine for determining differential moves of manipulated variables based on one or more controlled variables, one or more associated variables, one or more disturbance variables, and a permanent constraint target set at an artificially high value. More particularly, the method of the present invention provides that the control routine is adapted to solve the objective function: Min J = Jcv + Jλ + Jpc + Jd wherein Min J is a least square value comprising the sum of Jcv, Jλ, Jpc and Jd; such that Jcv = CVwate τ (A x - e) τ CVwate(A x - e) wherein Jcv is the sum of a weighted squares of deviations in the controlled variables from respective setpoints over a future time horizon, CVwate is a vector of factors for weighting control variable errors relative to each other, A is a matrix of transfer function coefficients relating the controlled variables to the manipulated variables, x is a vector of the differential moves of the manipulated variables and e is a vector of errors between the controlled variables and respective setpoints; such that wherein Jλ is the sum of weighted squares of the differential moves of the manipulated variables and λ is a vector of move suppression factors for penalizing excessively large differential moves of the manipulated variables; such that Jpc = PCwatefPCtrαt - MVstpt) T (PCtrot - MVstpt) wherein Jpc is the sum of the weighted squares of the deviations of the manipulated variables from the permanent constraint target values, PCwate is a vector of factors for specifying how tightly the permanent constraints are enforced, PCtrαt is a vector of the permanent constraint targets, and MVstpt is a vector of the manipulated variable setpoints; such that Jd = (d T AVcost T )(A cost d) wherein Jd is the sum of the weighted squares of the deviations in constraint functions outside their allowable bounds, d is a vector of constraint deviation variables, and AVcost is a vector of relative constraint weights; wherein the objective function is subject to the limits: 0 < Vmnmov < |x| < Vmxmov wherein Vmnmov is a vector of minimum differential moves of the manipulated variables and Vmxmov is a vector of maximum differential moves of the manipulated variables; and 10 compressor; and a model predictive controller comprising a control routine for determining differential moves of manipulated variables comprising flow rates of the hydrocarbon and compressed air stream feeds, based on a controlled variable comprising a ratio of nitrogen to hydrogen at an inlet to the ammonia converter, associated variables selected from pressure in the compressed air stream and speed of the process air compressor, disturbance variables selected from ambient air temperature and hydrogen content in the hydrogen recycle stream, and a permanent constraint target comprising an artificially high hydrocarbon feed flow rate. More particularly, the control routine is adapted to solve the objective function: wherein Min J, Jcv, J , Jpc and Jd are defined above, and the vector PCtrαt includes at least one artificially high value such that Jpc is nonzero. In still another embodiment, the present invention provides a method for controlling an ammonia plant comprising using a model predictive controller to determine differential moves of manipulated variables and control at least one variable subject to associated variables and disturbance variables, and effecting the differential moves. The ammonia plant to be controlled generally comprises a process air compressor for forming a compressed air stream; hydrocarbon, steam and compressed air stream feeds to a reformer for producing a raw syngas stream; means for removing CO2 and residual oxygen compounds from the raw syngas stream to produce a synthesis gas feed stream essentially free of oxygen compounds; a syngas compressor for compressing the synthesis gas feed stream applying a constraint deviation variable to effectuate deviations outside allowable bounds. The step of optimizing controlled variable deviations can include calculating the sum of the squares of the deviations of the controlled variables with the independent variable being the differential moves of the manipulated variable or, alternately, identifying a preferred move suppression by locating the beginning of an asymptotic decrease of the move sizes prior to a rapid increase in the errors associated with the controlled variable or, alternately, setting upper, lower and incrementing values for a move of the controlled variable or determining detailed output including controlled variable-disturbance variable, controlled variable error, associated variable-disturbance variable, feedforward contributions, manipulated variable moves and manipulated variable setpoint projections. In yet another embodiment, the present invention provides an ammonia plant comprising a process air compressor for forming a compressed air stream; hydrocarbon, steam and compressed air stream feeds to a reformer for producing a raw syngas stream; means for removing CO2 and residual oxygen compounds from the raw syngas stream to produce a synthesis gas feed stream essentially free of oxygen compounds; a syngas compressor for compressing the synthesis gas feed stream into a synthesis loop comprising in series an ammonia converter for converting nitrogen and hydrogen to ammonia, a refrigeration system for condensing an ammonia product stream, and a recycle line for recirculating unreacted synthesis gas from the refrigeration system to the syngas compressor; a hydrogen recovery unit for recovering a hydrogen recycle stream from a purge stream from the synthesis loop recycle line for recycle to the syngas compressor; and a model predictive controller comprising a control routine for determining differential moves of manipulated variables comprising flow rates of the hydrocarbon and compressed air stream feeds, based on a controlled variable comprising a ratio of nitrogen to hydrogen at an inlet to the ammonia converter, associated variables selected from pressure in the compressed air stream and speed of the process air compressor, disturbance variables selected from ambient air temperature and hydrogen content in the hydrogen recycle stream, and a permanent constraint target comprising an artificially high hydrocarbon feed flow rate. More particularly, the control routine is adapted to solve the objective function: Min J = Jcv + Jλ + Jpc + Jd wherein Min J, Jcv, Jλ , Jpc and Jd are defined above, and the vector PCtrαt includes at least one artificially high value such that Jpc is nonzero. In still another embodiment, the present invention provides a method for controlling an ammonia plant comprising using a model predictive controller to determine differential moves of manipulated variables and control at least one variable subject to associated variables and disturbance variables, and effecting the differential moves. The ammonia plant to be controlled generally comprises a process air compressor for forming a compressed air stream; hydrocarbon, steam and compressed air stream feeds to a reformer for producing a raw syngas stream; means for removing CO2 and residual oxygen compounds from the raw syngas stream to produce a synthesis gas feed stream essentially free of oxygen compounds; a syngas compressor for compressing the synthesis gas feed stream into a synthesis loop comprising in series an ammonia converter for converting nitrogen and hydrogen to ammonia, a refrigeration system for condensing an ammonia product stream, and a recycle line for recirculating unreacted synthesis gas from the refrigeration system to the syngas compressor; and a hydrogen recovery unit for recovering a hydrogen recycle stream from a purge stream from the synthesis loop recycle line for recycle to the syngas compressor. Particularly, the improvement of the present invention comprises solving the objective function: Min J = Jcv + Jλ + Jpc + Jd wherein Min J, Jcv, Jλ, JPC and JD are as described above. Yet still further, the present invention provides a process for making ammonia comprising the steps of: compressing air in a compressor to form a stream of compressed air; feeding steam, a hydrocarbon stream and the compressed air stream to a reformer to produce a raw syngas stream; removing CO2 and residual oxygen compounds from the raw syngas stream to produce a syngas feed stream essentially free of oxygen compounds; compressing the syngas feed stream, a recycle syngas stream and a hydrogen recycle stream into a synthesis loop; converting nitrogen and hydrogen in the synthesis loop to ammonia; refrigerating reaction products from the conversion step to form an ammonia product stream and the recycle syngas stream; purging a portion of the recycle syngas stream to a hydrocarbon recovery unit to form the hydrogen recycle stream; and determining differential moves for manipulating feed rates for the hydrocarbon and compressed air streams by solving the objective function: Min J = Jcv + Jλ + Jpc + Jd 14 FIG. 18 is a graph illustrating the fuel gas flow versus the sample time for a production rate controller of the present invention as applied to an FCCU. FIG. 19 is a graph illustrating the waste gas compressor suction pressure controller output versus the sample time associated with a production rate controller of the present invention as applied to an FCCU. FIG. 20 is a graph illustrating the riser outlet temperature controller output versus the sample time for a production rate controller of the present invention as applied to an FCCU. FIG. 21 is a graph illustrating the regeneration catalyst slide valve (SV) differential pressure versus the sample time associated with a production rate controller of the present invention as applied to an FCCU. FIG. 22 is a graph illustrating the spent catalyst slide valve (SV) differential pressure versus the sample time associated with a production rate controller of the present invention as applied to an FCCU. The above general description and the following detailed description are merely illustrative of the generic invention, and additional modes, advantages, and particulars of this invention will be readily suggested to those skilled in the art without departing from the spirit and scope of the invention. DETAILED DESCRIPTION OF THE INVENTION Reference will now be made in detail to the present preferred embodiments of the invention as described in the accompanying drawings. FIGS. 9(a) - 9(d) compare multiple graphs illustrating the molar hydrogen-to-nitrogen (H/N) ratio, feed flow, air flow and air flow constraint variables associated with active constraints as practiced by the present invention. FIG. 10 is a graph illustrating the hot gas oil flow rate versus the sample time for the production rate controller of the present invention as applied to a fluidized catalytic cracking unit (FCCU). FIG. 11 is a graph illustrating the cold gas and recycle oil flow versus the sample time for the production rate controller as applied to an FCCU. FIG. 12 is a graph illustrating the flue gas oxygen concentration versus the sample time for a production rate controller of the present invention as applied to an FCCU. FIG. 13 is a graph illustrating the combustion air flow versus the sample time for the production rate controller of the present as applied to an FCCU. FIG. 14 is a graph illustrating the feed preheat temperature versus the sample time for a production rate controller of the present invention as applied to an FCCU. FIG. 15 is a graph illustrating the riser outlet temperature versus the sample time associated with a production rate controller of the present invention as applied to an FCCU. FIG. 16 is a graph illustrating the recycle oil controller output versus the sample time for a production rate controller of the present invention as applied to an FCCU. FIG. 17 is a graph illustrating the regeneration bed temperature versus the sample time associated with a production rate controller of the present invention as applied to an FCCU. FIG. 18 is a graph illustrating the fuel gas flow versus the sample time for a production rate controller of the present invention as applied to an FCCU. FIG. 19 is a graph illustrating the waste gas compressor suction pressure controller output versus the sample time associated with a production rate controller of the present invention as applied to an FCCU. FIG. 20 is a graph illustrating the riser outlet temperature controller output versus the sample time for a production rate controller of the present invention as applied to an FCCU. FIG. 21 is a graph illustrating the regeneration catalyst slide valve (SV) differential pressure versus the sample time associated with a production rate controller of the present invention as applied to an FCCU. FIG. 22 is a graph illustrating the spent catalyst slide valve (SV) differential pressure versus the sample time associated with a production rate controller of the present invention as applied to an FCCU. The above general description and the following detailed description are merely illustrative of the generic invention, and additional modes, advantages, and particulars of this invention will be readily suggested to those skilled in the art without departing from the spirit and scope of the invention. DETAILED DESCRIPTION OF THE INVENTION Reference will now be made in detail to the present preferred embodiments of the invention as described in the accompanying drawings. FIG. 1 is a flow diagram illustrating the general application of the present invention to a dynamic ammonia control (DAC) system, an application of the present invention in association with an ammonia plant. The DAC package includes multiple advanced process control (APC) applications. Particularly, the advanced process control applications associated with the present invention are the model predictive control (MPC) technology. The model predictive control is illustrated in FIG. 2 as being applied to the ammonia production rate control (PR) subsystem, the converter control (CC) subsystem and the hydrogen-nitrogen ratio (H/N) subsystem. The model predictive control (MPC) algorithm handles multiple inputs and/or outputs, further, the MPC can apply specific constraints to different variables. Also, the MPC performs feedforward disturbance rejection associated with operating the plant. The MPC uses a control algorithm that applies a dynamic model in the solution of a control problem. Thus, the application of the MPC of the present invention is extremely capable of controlling a plant having long settling times, dead times, complex dynamics or complex process interactions. The dynamic model used with the present invention, as illustrated in FIG. 1 is derived from data taken in actual plant experiments. The application of the present invention provides that the MPC will be a supervisory controller. Thus, the final output of the model predictive control algorithm is one or more setpoints for controlling lower level hardware in the plant. For example, the supervisor in the dynamic ammonia control (DAC) package as illustrated in FIG. 1 would manipulate the setpoint of a flow controller (FC). Also, by way of example, without limitation, the supervisor 18 problem. A specific control interval is set such that the MPC will start over at any predetermined interval. The MPC of the present invention can be described in terms of objective function. FIG. 3 is a flow diagram that illustrates the objective function associated with the model predictive control of the present invention. The controlled variable errors are prioritized. The controlled variable deviations from associated setpoints are optimized over a future time horizon. The manipulated variable differential moves are used in the optimization. Thereafter, manipulated variable moves are suppressed. The suppression is used for balancing the reduction of future control error against large manipulated variable movement. Generally, the suppression provides that large manipulated variable movement is penalized. Depending on the situation, preferential movement is allowed with respect to some manipulated variables over other manipulated variables. The preferential movement is accomplished by weighing manipulated variables for reducing deviation from a predetermined target value. Lastly, the constraint deviation variable is applied to allow deviations outside set bounds. The application of the deviation variable is achieved by implementing "hard" or "soft" weights by applying relative constraints weights. The MPC algorithm as illustrated in FIG. 3 can be described in equation form as follows: Min J = Jcv + Jλ + Jpc + Jd wherein Min J, Jcv, JΛ , Jpc and Jd are as previously defined. The first term (Jcv) of the equation describing the objective function is used to minimize the sum of the squares of the deviations in the control variables. The sum of the squares of the deviations is determined PC's are preferably set artificially high for the controller to attain to the extent possible. The above definitions will be utilized throughout the discussion of the present invention. FIG. 2 is a flow diagram illustrating a simplistic outline of one example of the MPC program as adopted for use in FIG. 1 with the production rate controller, the converter controller and the N/H ratio controller associated with the dynamic ammonia control package. Simply stated the MPC reads the process variables from the database. The process variables are validated. Using information from the dynamic model, controlled variables are predicted. The predicted control variables are associated with variable time horizons. The control problem definition is used so that the control/move optimization problem can be formulated. Thereafter the control/move optimization problem is solved. The presently preferred embodiment of the MPC solves the control formulation problem using a commercially available non-linear optimization engine. The non-linear optimization engine preferably used in the present embodiment is the so-called GRG2 software from Optimal Methods, Inc. by L. Lasdon at the University of Texas-Austin and A. Warren at Cleveland State University, although other commercially available optimization engines could also be suitably employed. The GRG2 software uses a feasible- path, successive linear programming technique. The linear programming technique used by the GRG2 software is known as generalized reduced gradients. After the optimization problem is solved, the resulting control action is implemented. Thus, hardware controllers associated with the plant are adjusted or changed based upon the information received from the solution of the optimization problem. A specific control interval is set such that the MPC will start over at any predetermined interval. The MPC of the present invention can be described in terms of objective function. FIG. 3 is a flow diagram that illustrates the objective function associated with the model predictive control of the present invention. The controlled variable errors are prioritized. The controlled variable deviations from associated setpoints are optimized over a future time horizon. The manipulated variable differential moves are used in the optimization. Thereafter, manipulated variable moves are suppressed. The suppression is used for balancing the reduction of future control error against large manipulated variable movement. Generally, the suppression provides that large manipulated variable movement is penalized. Depending on the situation, preferential movement is allowed with respect to some manipulated variables over other manipulated variables. The preferential movement is accomplished by weighing manipulated variables for reducing deviation from a predetermined target value. Lastly, the constraint deviation variable is applied to allow deviations outside set bounds. The application of the deviation variable is achieved by implementing "hard" or "soft" weights by applying relative constraints weights. The MPC algorithm as illustrated in FIG. 3 can be described in equation form as follows: Min J = Jcv + Jλ + Jpc + Jd wherein Min J, Jcv, JA , Jpc and Jd are as previously defined. The first term (Jcv) of the equation describing the objective function is used to minimize the sum of the squares of the deviations in the control variables. The sum of the squares of the deviations is determined based upon the setpoint of the controlled variables over a projected future time horizon. The independent variables for optimizing the sum of the squares of the deviations are the differential moves of the manipulated variables, x. The CVwate factors are used in a multiple controlled variable problem. The CVwate factors are used to weigh controlled variable errors relative to each other. The second term (Jλ) of the equation for the objective function of the MPC of the present invention is used to penalize excessively large movement of the manipulated variables. The move suppression factors λ are used for controller tuning to balance the reduction of future control error against large manipulated variable movement. The third term (Jpc) of the equation for the objective function of the MPC represents the use of permanent constraint targets for selected manipulated variables. When using permanent constraint targets, the optimization is penalized for any deviation of those manipulated variables from their individual permanent constraint targets. This allows for preferential treatment in moving some manipulated variables over other manipulated variables. Generally, a manipulated variable with a permanent constraint will stay at its target value until all other degrees of freedom are used. When setting at least one permanent constraint target artificially high in accordance with the present invention, the third term will never be zero and the MPC will constantly attempt to attain the impossible target. In this manner the establishment of the high PC target for maximizing process capacity is effected by, for example, setting the desired feed rate target beyond maximum capacity. The PCwate factor specifies how tightly the optimization must enforce the permanent constraint. It should be noted that a heavily weighted permanent constraint will stay as close as possible to its target until considerable control error occurs. Thus, selecting a PCwate factor usually requires a compromise between holding the permanent constraint as closely as possible its target, on the one hand, and not allowing the control variable to move away from its target, on the other. The fourth term (Jd) of the objective function of the MPC equation uses a constraint deviation variable (d). The constraint deviation variable is used to handle constraint function deviations outside normal allowable bounds. The objective function serves several purposes. First, the objective function allows the use of the constraint deviation variables as a degree of freedom to ensure the feasibility of the solution with respect to highly constrained problems. At the same time, the objective function will penalize for the use of non-zero constraint deviation variables. Lastly, the objective function allows the use of relative constraint weights (AVcost) to implement the concept of "hard" and "soft" constraints. FIG. 4 illustrates the preferred embodiment of plant testing for the present invention. It can be appreciated by those skilled in the art that many and numerous testing procedures are readily available. The presently preferred embodiment of plant testing is provided without limiting the scope of the invention. As previously stated, the application of the MPC requires the use of a dynamic model associated with the process to be controlled. The dynamic model used in the present embodiment of the invention takes the form of a vector of step response coefficients. The vector of step response coefficients is generally obtained by performing plant tests on the process. For example, one such test commonly employed in the art is known as the pseudo-random binary noise test (PRBN). Generally, the PRBN adds a randomly generated signal of specific size or amplitude to the manipulated variable setpoint, and to the disturbance variable, if possible. The dynamic responses due to the movements in the manipulated variable are recorded. Based upon the dynamic responses, the dynamic model is generated. FIGS. 4 and 5 illustrate the plant testing using the pseudo-random binary noise test (PRBN). FIG. 5 is a flow diagram illustrating in further detail, aspects of the plant testing using PRBN. Examples of typical manipulated variables to be perturbed in an ammonia plant are the feed gas to the primary reformer, potential hydrogen target and the air flow to the secondary reformer. These variables are associated with the H/N ratio controller illustrated in FIG. 1. Also, for the converter controller illustrated in FIG. 1 , manipulated variables to be perturbed might include the coldshot setpoint and the intercooler inlet setpoint as well as quench flows and bypass setpoints depending on the type of ammonia converter. If possible, disturbance variables should be perturbed as well. For the H/N ratio controller, disturbance variables to be perturbed might include, for example, hydrogen recovery unit-low pressure (HRU LP) product hydrogen fraction and hydrogen recovery unit-high pressure (HRU HP) product hydrogen fraction. For the converter controller, the H/N ratio and the primary feed gas rate are the disturbance variables, which can be perturbed directly. The response variables are the variables whose responses, due to the perturbation are collected and analyzed. As examples of response variables in the, H/N ratio controller, the controlled variable is the H/N ratio and the associated variable is the speed of the compressor. The disturbance variable for the speed of the compressor is normally the ambient air temperature. Similarly for the converter controller response variables, the controlled variables might, for example, be the bed inlet temperatures and the associated variable might be the converter effluent temperature, again depending on the type of ammonia converter. The determination of the perturbation amplitude size is important so that the process responses can be readily detected. It has been found that there is advantage to having the first and last PRBN moves with an amplitude size smaller than the intermediate PRBN moves, for example one-half the intermediate amplitude. The sample interval is typically defined in seconds for both H/N ratio and converter control applications. The sample interval can be limited, for example, by the mass spectrometer analysis cycle time, typically two minutes. Also, the sample interval is generally, at a minimum, the same period of time as the execution length of the MPC program. The perturbation frequency is usually expressed in samples per second, for example, typically ten to fourteen for the H/N ratio controller, and typically eight to twelve for the converter controller. It is important to note that the perturbation frequency can not be less than the process dead times. The duration ' of the test depends on the PRBN register length, typically a minimum of three and a maximum of eleven. FIG. 6 illustrates a functional logic diagram for the MPC of the present invention. The initialization control problem and definition and tuning are first addressed. The control problem in tuning information is provided in association with the database information. From the combined information, a controlled variable calculation and associated variable predictions are made. The calculation of the controlled variable and the associated variable predictions are based upon changes in the manipulated variable and the disturbance variable. The control problem is formulated as an optimization problem. The optimization problem is solved. The optimal solution is implemented. The data from the optimal solution is inputted, as an update, to the database. The next execution is initiated after a predetermined hibernation period. When the data is received from the database, the new input information is included. FIG. 7 illustrates a schematic flow diagram of an ammonia production rate control apparatus used in a typical ammonia plant. A hydrocarbon stream such as methane or another hydrocarbon is introduced through line 10 for feed to a reforming stage 12 with steam from a steam feed line 14. A flow control apparatus 16 as is well known in the art controls the flowrate of the hydrocarbon feed. Flowrate of the hydrocarbon stream 10 comprises one of the two manipulated variables inputted into the MPC. In the reforming stage 12, hydrogen for ammonia synthesis is produced as the product of hydrocarbon oxidation in the presence of air introduced through line 20. The incoming air also supplies nitrogen required for ammonia synthesis. The air stream 20 is compressed by an air compressor 22. Thus, it can be seen that air flowrate is the second of the two manipulated variables in the process to be controlled by the MPC affecting both the quantity of hydrogen produced in the reforming stage 12 and the H/N ratio of an ammonia syngas. Air flowrate is conventionally adjusted by changing the speed of the compressor 22 using a speed controller 24. Since the air compressor output is typically a quantity fixed by plant design, the speed limitation of the compressor 22 is a system constraint or associated variable in the MPC. The typical reforming stage 12 includes in series primary reformer 13, secondary reformer 18, high temperature shift reactor 26 and low temperature shift reactor 28, but other configurations of the reforming stage 12 are sometimes used and can also be operated according to the principles of the present invention. Effluent from the primary reformer 13 undergoes additional oxidation in the secondary reformer 18 to which the air stream 20 is also supplied. Raw ammonia syngas effluent from the secondary reformer 18 is directed to the shift reactors 26, 28 wherein carbon monoxide produced by reforming is converted in the presence of steam to carbon dioxide and additional hydrogen. Next, a Cθ2-rich effluent thus produced is treated, such as, for example, in a CO2 removal apparatus 30 and a methanation reactor 32, and/or cryogenically (not shown), to reduce concentration of CO2 and other oxygen compounds to acceptable levels and produce a purified ammonia syngas stream 34. Oxygen compounds in the syngas can act as a catalyst poison, thus, syngas CO2 concentration comprises a second constraint variable in the MPC. The purified syngas stream 34 forms makeup syngas for feed to an ammonia synthesis loop 36. The makeup syngas is compressed to the pressure of the synthesis loop 36 in a multi-stage compressor 38. Conventionally, makeup syngas is combined with a recycle syngas stream 39 and a hydrogen stream 40 recovered from a synthesis loop purge stream 41 in a hydrocarbon recovery unit (HRU) 42 to form a compressed syngas stream 44 for feed to an ammonia converter 46. The compressed syngas stream 44 has a desired ratio of H2 to N2 which thus comprises the control variable of the MPC. Ammonia is recovered from an effluent stream 48 from the ammonia converter 46 in an ammonia recovery unit 50 conventionally employing a liquid refrigerant. Additional process constraint variables in the MPC include the speed of the syngas compressor 38, the speed of a refrigeration compressor (not shown) and the pressure of the ammonia converter 46. The MPC also has inputs for one or more constraint/control variable disturbances including, for example, ambient air temperature, H 2 flow produced by the HRU 42, inerts level in the synthesis loop purge stream 40, and the ratio of hot to cold ammonia recovered in the ammonia recovery unit 50. As can be appreciated by those skilled in the art, the ammonia production control application of the present invention, as illustrated in FIG. 7, is only one of many control applications available for the present invention. FIG. 8 is a graph illustrating the performance of H/N model predictive control with respect to constraint control. FIG. 8 is actual data of H/N control using the MPC of the present invention. In FIG. 8, the air compressor turbine ring pressure was the constraint variable and the ambient air temperature was the disturbance variable. The performance of the MPC controller during a forty eight hour period of operation is illustrated. The corresponding sequence of events are readily apparent. In section 1 , the control variable H/N ratio is held at its setpoint while holding the turbine ring pressure slightly below the constraint of 330 psig. In section 2, when the ring pressure violation was predicted due to a rapid increase in ambient air temperature (not shown), the controller reduced the air flow to maintain the ring pressure at its constraint. The H/N ratio was allowed to drift from the setpoint. The H/N ratio drifting away from its setpoint caused a reduction in feed gas. The reduction in the feed gas ensured that the ratio did not drift too far. The degree of excursion of the H/N ratio is a subjective tuning compromise. The compromise is based on how much feed gas is reduced trying to maintain the setpoint. In the illustrated example, it was initially decided to hold the feed as high as possible, but it was subsequently decided to manipulate the feed more aggressively to better control the ratio. This example is a simple MPC tuning change. In section 3 of FIG. 8, the ambient air temperature dropped at the end of the day (not shown). After the ambient air temperature dropped, the controller increased the air flow, restoring the H/N ratio to its target. Also. ^ the feed gas was restored to its original value. It is important to note that the ring pressure was maintained at its constraint during this period of time. In section 4 of FIG. 8, the ring pressure is no longer an active constraint, and both the H/N ratio and the feed gas rate are permitted to return to their targets. The example of FIG. 8 illustrates the capability of the MPC as an effective constraint controller. The controller reduced air flow to prevent a predicted violation of the ring pressure constraint as ambient air temperature rose. It later increased air flow as ambient air temperature cooled off. In the interim, the MPC minimized both the excursion of the controlled variable, H/N, from its target and the extent to which the feed was cut to achieve that target. The actual balance between these opposing issues is a MPC tuning perimeter. In FIGS. 9(a)-(d), there is shown similar data for the performance of H/N MPC to that of FIG. 8, but in addition to the H/N ratio and target (FIG. 9(a)), potential hydrogen (PH) and the PH permanent constraint (PC) target (FIG. 9(b)), air flow (FIG. 9(c)) and air compressor turbine ring pressure and limit (FIG. 9(d)), there is also shown the feed gas flow rate (FIG. 9(b)) and the ambient air temperature (FIG. 9(d)). For the first nine hours, the H/N ratio set point in the simulation is 2.98, and then 3.0 for the remainder of the simulation periods (see FIG. 9(a)). For the first 6-7 hours of the simulation, the air temperature stays relatively low. While the ambient air temperature is low, the upper pressure limit on the air compressor is not an active constraint and the PH flow is controlled toward the PH target to maximize ammonia production, i. e., the PH target is the active constraint. When the air temperature begins to rise to 87°F, the ring pressure increases toward its upper limit. In response, the MPC reduces the air flow and feed gas flow rates while maintaining the H/N ratio close to the H/N target. When the air temperature fluctuates between 80°F and 87°F, the MPC adjusts the air and feed gas flows accordingly to maintain the compressor ring pressure below its constraint limit. At the end of the simulation, the air flow and feed gas flow are increased as the constraint to maximize production becomes more active and the air compressor ring pressure becomes an inactive constraint. Attached as Appendix I is a print-out of databases and related files used with the MPC for a typical ammonia plant simulation according to the principles of the present invention. in FIGS. 10-22, the MPC controller was applied to a fluidized catalytic cracking unit (FCCU) simulation based on the modeling data of Grosdidier et al. The manipulated, control and associated variables in the FCCU process are tabulated in Tables 1 and 2. The control objective was similar to that in the prior example, that is, to maximize feed to the unit while controlling a process variable at its setpoint and feed to the unit while controlling a process variable at its setpoint and simultaneously honoring a number of process constraints. With respect to FIGS. 10-22, the control objective was to maximize feed gas (MV2 and MV3) while maintaining the oxygen concentration in the flue gas at its setpoint and the riser outlet temperature at its desired target. The controller must also observe all the limits specified for the manipulated variables and the associated variables. TABLE 1 : FCCU MANIPULATED VARIABLES TABLE 2: FCCU CONTROL AND ASSOCIATED VARIABLES The results are vividly illustrated in FIGS. 10-22. Additional advantages and modification will readily occur to those skilled in the art. The invention in its broader aspects is therefore not limited to the specific details, representative apparatus, and the illustrative examples shown and described herein. Accordingly, the departures may be made from the details without departing from the spirit or scope of the disclosed general inventive concept. Production Rate Controller 30 Simulation Conditions The objective of this paper is to document the simulation conditions used the Production Rate (PR) controller simulation for ammonia plant. The models used in the simulation were obtained partly from models identified from actual process data and partly from assumed models. The PR controller has 1 controlled variable (CV), 2 associated or constraint variables (AV), 2 manipulated variables (MV) and 2 disturbance variables (DV). Table 1 and 2 described these variables and their limits. Table 1: PR Controller Manipulated and Disturbance Variables Description Tagname Limit Values Control Objective Air Flow MV1 1550 - 1880 MSCFH Potential Hydrogen Flow MV2 1475 - 1575 MSCFH Desired target HRU HP H2 Fraction DV1 Ambient Air Temperature DV2 Table 3 list the transfer function models used in the PR controller simulation. The models are described in z-transform (discrete models) with B as the backward shift operator. The time delay are in sample time, which in this case is two minutes. All the models in Table 3 with the exceptions of the AV2 column were developed from actual plant test. The models in AV2 column were assumed to have the same dynamic as CV1 column with different steady state gain. Production Rate Controller Simulation Conditions Table 3: PR Controller Simulation Models Attached in the following pages are hardcopy of three files used in the simulation. The first file (OK ASCII.DAT) is the PR controller configuration file. It also contains the tuning values usecfin the simulation. The second file (OK CTRL.DAT) contains the simulation initial conditions. The third file (PR_COEFFS.DAT) Is the controller models file. PR - ASCI I DOB PRODUCTION RATE CONTROLLER DEVELOPMENT COMMENT: Revised for Production Rate Control ler Control problem de inition CV1: HN RATIO AT CNVTR MV1: 103-J AIR FLOW DV1: HRU HP PROD H2 FRAC AV1: 103- T RING PRESS AV1-DV1: AMBIENT AIR TEMP AV2-DV2: HRU HP PROD H2 FRAC AV1-DV2 AND AV2-OV1 ARE ZERO This data Is used by both PR JPDATE and ID_BINUPD. If any control formulation or model changes are made, ID_BINUPD must be re-ππ. If only tiring or weight factors are revised, only PRJJPDATE need be run to make the changes effective. Actual data must start on line 20 of this file (ie- 19 header/comment lines). Fields are fixed width. Values may be placed anywhere In the designated field. LINE 1-5 DATA FIELDS |< COMMENTS. 1 120!< Time between executions of KMOC (in seconds) 2 1!< Number of Control Variables (CV) 3 106| i |<PTID for PV of each Control Variable 4 105! | |<PTID for target SP of each Control Variable 5 i ! PTID for CV TRANS error diagnostics (0 is ok) 6 ! |<PTID for CV PREDicted value dlag (0 Is ok) 7 Manipulated variables (MV) 8 | !<PTID for PV of Manipulated Variables 9 | ,'<PTID for Manipulated Variable setpoints (SP) 10 | ,'<PTID for Manipulated Variable SP readbacks 11 ! !<Dlgltal PTID for MV Control Loop status 12 i |«Dlgltal PTID for MV Constraint Indicator (0 Is ok) 13 CV Disturbances (DV) 14 | |<PTID for CV Disturbance variables 15 Associated Variables (AV) 16 i |<PTID for Associated Variables 17 ! |<PTID for AV TRANS error diagnostics (0 Is ok) 18 | J<PTID for AV PREDicted value dlag (0 Is ok) 19 ! ! Olgltal PTID for AV Constraint Indicator (0 is ok) 20 AV Disturbances (D7-AV) 21 |<PTID for AV Disturbance variables 22 9 !< Number of CV response projections (NPROJ) 23 10|< Nunbør of CV Moves to be checked for limit violations (NCK) Number of time extended periods for control var (» periods - 1) (-1 If mused, zero Is not valid) Sample time (In unit samples) betwee/i time extended prds (>- « to check -1) (1.0 If nunber not used) 25 17.0 ! 1.0 ! 1.0 1.0 1.0 (unused SCALE factor) 26 1 a i i i ■ ' ■ " I I I 1 CV projected error weights (GRATIO) (gratlo is squared 27 i .B I i I I MV constraint equation weights (WATE) 28 1.00 ! 1.00 i i ! MV permanent constraint (PC) target ptlds (TARGET.PTID) 29 Digital PTID for PC constraint Indicator (0 Is ok) ' 30 76! Tolerance for PC constraint Indicator checking (0.0 if line 30 Is 0) 31 ! i 0.50 ! ! i !< MV permanent constraint weights (PCWATE) (pcwate is squared) 32 i 0.0 ! 0.01 ! ! I l< Each Manlp Variable Maximum move size (VMXMOV) 33 ! 3.00 i 1.50 j i Each Manlp Variable Minimum move size (VMNMOV) (may be 0.0) 34 ! 0.00 ! 0.0 i 35 S0i< Number of AV response projections (NAVINC) 38 ! 5J< Nunber of AV projections to be checked for bound violation (NAVCHK) First AV constraint-checked projection (NAVFST) ended periods for JSSOC var (« periods - 1) (-1 If uiused, zero is not valId) 38 -1! -1! -1! -1! -1|< Time (In inIt samples) between AV time extended prds (>- « to check -1) (1.0 is number not used) 39 1.0 ! 1.0 ! 1.0 ! 1.0 ! 1.0 AV constraint equa ion weights (AVWT) U .1.0 AV Constrained Allowable Deviation in eng. unit (0.0 hardbound) (AVCAD) 41 1.0 ! 5.0 ! ! MV move suppression tuning weights (5UPM0V) (supmov is squared) 42 0.07 ! 0.15 i ! i MV Lower constraint bound (LOLIM) 43 1550.0 ! 1475.0 I ! { MV Upper constraint bound (HI IM) 44 1880.0 j 1575.0 ! i ! AV Lower constraint bound (AVMIN) 45 100.0 ! 10000.0 j ! ! AV Upper constraint boind (AVMAX) 46 330.0 ! 11500.0 i j i 47 0j< Is Rotation effect In KMOC to be Included ? 0=no 1-yes Rotational factors for each Control /arlablβ 48 I I I I I I I I GRG2 Parameters (see GRG manual for de inition) FPINIT FPNEHT FPSTOP PH1EPS NNSTOP 49 1.0d-2 !1.0d-4 !1.0d-4 !0.0d0 J3 LIMSER XORDER GORDER 50 10000 !100000.0 !100.0 !< INITIALIZATION SCREEN Var. 1 Var.2 Var. 3 Var. 4 Var. 5 35 /ID: CV1-MV1 PTID: 13 /NAME: HN VS AIR TO SEC REFORMER (FIC-3) 1 0.000000E+00 2 0. 3 0. 4 0. 5 -0.361000E-03 6 -0.710448E-03 7 -0.104871E-02 8 -0.137615E-02 9 -0.169312E-02 10 -0.199994E-02 11 -0.229694E-02 12 -0.258444E-02 13 -0.286274E-02 14 -0.313213E-02 15 -0.339290E-02 16 -0.364533E-02 17 -0.388968E-02 18 -0.412621E-02 19 -0.435517E-02 20 -0.457680E-02 21 -0.479135E-02 22 -0.499902E-02 23 -0.520005E-02 24 -0.539465E-02 25 -0.558302E-02 26 -0.576537E-02 27 -0.594188E-02 28 -0.611274E-02 29 -0.627813E-02 30 -0.643823E-02 31 -0.659320E-02 32 -0.674322E-02 33 -0.688844E-02 34 -0.702901E-02 35 -0.716508E-02 36 -0.729680E-02 37 -0.742430E-02 38 -0.754772E-02 39 -0.766720E-02 -0.778285E-02 41 -0.789480E-02 42 -0.800316E-02 43 -0.810806E-02 44 -0.820960E-02 45 -0.830790E-02 46 -0.840304E-02. 47 -0.849515E-02 48 -0.858430E-02 49 -0.867060E-02 50 -0.875415E-02 51 -0.883501E-02 52 -0.891329E-02 53 -0.898907E-02 54 -0.906242E-02 55 -0.913342E-02 36 /NAME: HN VS. POTENTIAL HYDROGEN TARGET 0.195636E-01 0 7 0.204115E-01 0.212324E-01 0.220269E-01 0.227961E-01 0.235406E-01 0.242613E-01 0.249589E-01 0.256342E-01 0.262879E-01 0.269207E-01 0.275333E-01 0.281262E-01 0.287002E-01 0.292558E-01 0.297936E-01 0.303142E-01 0.308181E-01 0.313059E-01 0.317782E-01 0.322353E-01 0.326777E-01 0.331060E-01 0.335206E-01 0.339220E-01 0.343105E-01 0.346865E-01 0.350506E-01 0.354030E-01 0.357441E-01 0.360743E-01 0.363939E-01 0.367033E-01 0.370028E-01 0.372927E-01 0.375733E-01 0.378450E-01 0.381079E-01 0.383625E-01 0.386089E-01 0.388474E-01 0.390783E-01 0.393018E-01 0.395181E-01 0.397275E-01 0.399303E-01 0.401265E-01 0.403164E-01 0.405003E-01 0.406783E-01 0.408506E-01 0.410174E-01 0.411788E-01 0.413351E-01 0.414864E-01 0.416328E-01 0.417746E-01 0.435957E-01 0.446434E-01 0.452461E-01 38 13 /NAME: RING PRESSURE VS AIR TO SEC REFORMER 0.359739 0.360012 40 0.360209 0.360350 0.360452 0.360526 0.360578 0.360617 0.360644 0.360664 0.360678 0.360688 0.360695 0.360701 0.360705 0.360707 0.360709 0.360711 0.360712 0.360712 0.360713 0.360713 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 0.360714 41 : 08 /NAME: RING PRESSURE VS. POTENTIAL HYDROGEN TARGET 42 ID: 15 /NAME: RING PRESSURE VS. AKBIENT AIR TO 101-J 43 76 0.617538 44 77 0.617541 78 0.617543 79 0.617545 80 0.617547 81 0.617556 82 0.617557 83 0.617557 84 0.617557 85 0.617557 86 0.617557 87 0.617557 88 0.617557 89 0.617557 90 0.617557 /ID: AV1-DV2 /PTID: /NAME: RING PRESSURE VS. HRU HP H2 FRACTION 1 0 2 0. 3 0.000000 4 0.000000 5 0.000000 6 0.000000 7 0.E 8 0. 9 0.000000 10 0.000000 11 0.0 12 0. 13 0.000000 14 0.000000 15 0, 16 0. 17 0.000000 18 0.0 19 0. 20 0. 21 0. 22 0.000000 23 0. 2 Ø.B 25 0.000000 26 0.000000 27 0.000000 28 0.000000 29 0. 30 0. 31 0.0 32 0. 33 0. 34 0. 35 0. 36 0.000000 37 0. 38 0. 39 0. 40 0.000000 41 0. 42 0. 43 0.000000 45 /NAME: 103-J SPEED VS AIR TO SEC REFORMER (FIC-3) 46 47 /NAME: 103-J SPEED VS. POTENTIAL HYDROGEN TARGET 48 /NAME: 103-J SPEED VS. AλBIENT AIR TEWERATURE ω o) σ) θ ) σ) θ ) θ > θ ) ϋ i t _n ϋ i t _π _n ϋ i w ϋi ϋ i tn i» J * Λ A i». - σi ui Λ ω w - ca ω co ^ cn ϋi Λ. w KJ -' Ci ω co -si OT ϋi Λ ω r - Q ω -~ co co ui ^ ω .. w .. -' Gi c —o oϊ ' si c ca cs G3 t a ^ ca ca sι t a t θ 63 ca ca ta ca G 3 ca ta ca ta cs ts ts cs ts co ta ca ta ca to ca ca ca ca ca ca G3 ta ^ t9 B B B B B B B B B B B EI B B B B B B B B B B B S B B B B B B B B B B B B B B B B B B ts Ii3 lcg_l Qi Bss Bts Bsa Bts Is_l SS Bs Bi Bss Bis Bi Bi Is-3s Bs B I9 B B G-I S B B B B I_a i9 B B B B B B B B B B B B B B B B B B B B S B B B B B B B BB Bi Bi BGs ciaa Bs sSl sB sB sB sB Bs sS Bs Bs Bs Bs Bs Bs sB Csa s B sB stQ » S E3 s l_l § S S3 S3 IS3 § E3 § Q G3 S S3 S S S « § S Ba S S s S E3 CS tS IS l a S B B S B B B B B B B B B B B B B B S B B B B B B B B B B B B B B S Q B S B B B B B 50 /NAME: 103-J SPEED VS. HRU HP H2 FRACTION €6 0.202866E+02 37 0.202866E+02 38 0.202866E+02 39 0.202866E+02 40 0.202866E+02 1 0.202866E+02 2 0.202866E+02 3 0.202866E+02 4 0.202866E+02 5 0.202866E+02 6 0.202866E+02 7 0.202866E+02 8 0.202866E+02 0.232SS6E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.2B286SE+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202865E+02 0.202866E+02 0.202866E+02 0.20285SE+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 0.202866E+02 '

Claims: CLAIMS: 1. A method for optimizing the relationship of variables associated with a process having inputs and outputs, the process having controlled variables, manipulated variables, associated variables and disturbance variables with at least one controlled variable weighted relative to other controlled variables so as to prioritize errors associated with the controlled variables such that controlled variable deviations are optimized with respect to associated setpoints over a predetermined future time horizon based upon manipulated variable differential moves with at least one future controlled variable being penalized for large manipulated variable movement for balancing the reduction of future control error against large manipulated variable movement, the method comprising the steps of: (a) weighting at least one manipulated variable for reducing deviation of the manipulated variable from a target value set artificially high to allow preferential movement with respect to some manipulated variables over other manipulated variables; and (b) applying a constraint deviation variable to effectuate deviations outside allowable bounds. 2. The method for optimizing the relationship of variables associated with a process as defined in claim 1 further comprising employing a model predictive controller comprising a control routine for determining differential moves of manipulated variables based on a controlled variable, one or more associated variables, one or more disturbance variables, and a permanent constraint target set at an artificially high value. The method for optimizing the relationship of variables associated with a process as defined in claim 2 wherein the control routine is adapted to solve the objective function: Min J = Jcv + JΛ + Jpc + Jd wherein Min J is a least square value comprising the sum of Jcv, J , Jpc and Jd; such that Jcv = CVwate τ (A x - e) τ CVwate(A x - e) wherein Jcv is the sum of a weighted squares of deviations in the controlled variables from respective setpoints over a future time horizon, CVwate is a vector of factors for weighting control variable errors relative to each other, A is a matrix of transfer function coefficients relating the controlled variables to the manipulated variables, x is a vector of the differential moves of the manipulated variables and e is a vector of errors between the controlled variables and their respective setpoints; such that J = x T λ T λ x wherein Jλ is the sum of weighted squares of the differential moves of the manipulated variables and λ is a vector of move suppression factors for penalizing excessively large differential moves of the manipulated variables; such that Jpc = PCwatefPCtrqt - MVstPti T (PCtrqt - MVstpt) wherein Jpc is the sum of the weighted squares of the deviations of the manipulated variables from the permanent constraint target values, PCwate is a vector of factors for specifying how tightly the permanent constraints are enforced, PCtrgt is a vector of the permanent constraint targets, and MVstpt is a vector of the manipulated variable setpoints; such that Jd = (d T AVcost T )(AVcost d) wherein Jd is the sum of the weighted squares of the deviations in constraint functions outside their allowable bounds, d is a vector of constraint deviation variables, and AVcost is a vector of relative constraint weights; wherein the objective function is subject to the limits: 0 < Vmnmov < |x| < Vmxmov wherein Vmnmov is a vector of minimum differential moves of the manipulated variables and Vmxmov is a vector of maximum differential moves of the manipulated variables; and r 1 i r i j MVIwbds I x j j MVhibds j AVIwbds AVhibds wherein MVIwbds are vector elements comprising lower bounds of the manipulated variables, AVIwbds are vector elements comprising lower bounds of the associated variables, C is a matrix of transfer function coefficients relating the manipulated and associated variables to the disturbance variables, MVhibds are vector elements comprising upper bounds of the manipulated variables and AVhibds are vector elements comprising upper bounds of the associated variables. 4. A method for optimizing the relationship of variables associated with a process having inputs and outputs, the process having controlled variables, manipulated variables, associated variables and disturbance variables, the method comprising the steps of: (a) weighting errors associated with at least one controlled variable relative to other controlled variables so as to prioritize errors associated with the controlled variables; (b) optimizing controlled variable deviations from associated setpoints over a predetermined future time horizon based upon manipulated variable differential moves; (c) suppressing errors associated with at least one future controlled variable by penalizing for large manipulated variable movement for balancing the reduction of future control error against large manipulated variable movement; (d) weighting at least one manipulated variable for reducing deviation of the manipulated variable from a permanent constraint so as to allow preferential movement with respect to some manipulated variables over other manipulated variables; and (e) applying a constraint deviation variable to effectuate associated variable deviations outside allowable bounds. 5. The method for optimizing the relationship of variables associated with a process as defined in claim 4 wherein the step of optimizing controlled variable deviations comprises calculating the sum of the squares of the deviations of the calculating the sum of the squares of the deviations of the controlled variables with the independent variable being the differential moves of the manipulated variable. 6. The method for optimizing the relationship of variables associated with a process as defined in claim 4 wherein the step of optimizing controlled variable deviations comprises calculating the least squares of the deviations of the controlled variables such that the independent variable includes the differential movement of the manipulated variable. 7. The method for optimizing the relationship of variables associated with a process as defined in claim 4 wherein the step of suppressing errors comprises identifying a preferred move suppression by locating the beginning of an asymptotic decrease of the move sizes prior to a rapid increase in the errors associated with the controlled variable. 8. The method for controlling the inputs and the outputs of a process as defined in claim 4 wherein the step of suppressing errors comprises setting upper, lower and incrementing values for a move of the controlled variable. 9. The method for controlling the inputs and the outputs of a process as defined in claim 4 wherein the step of error suppression comprises suppressing the errors until a steady state is reached for ensuring that the sum of the errors and the sum of the moves have been properly calculated. 10. The method for controlling the inputs and the outputs of a process as defined in claim 4 wherein the step of error suppression comprises determining detailed output including controlled variable-disturbance variable, controlled variable error, associated variable-disturbance variable, feedforward contributions, manipulated variable moves and manipulated variable setpoint projections. 11. The method for controlling the inputs and the outputs of a process having controlled variables, manipulated variables, associated variables and disturbance variables as defined in claim 4 further comprising the steps of: (a) testing the process to determine operating outputs associated with operating inputs; (b) modeling the process outputs to acquire model response coefficients associating the operating inputs and the operating outputs; (c) applying a suppression analysis for determining an initial move suppression tuning parameter associated with at least one manipulated variable associated with the operating inputs and the operating outputs such that the suppression analysis effectuates setpoint changes and disturbance changes; (d) applying a control routine for simulating the tuning parameters during setpoint changes, disturbance changes and constrained control situations for determining updated outputs and updated inputs; and (e) evaluating the updated outputs and updated inputs for providing supervisory control of the process. 12. The method for controlling the inputs and the outputs of a process as defined in claim 11 wherein the step of testing the process comprises: (a) identifying relevant manipulated variables to be perturbed; (b) identifying relevant disturbance variables to be perturbed; (c) identifying one or more response variables to be collected and analyzed based upon the perturbation of the identified manipulated variables and disturbance variables; (d) determining the amplitude of the perturbation to be sufficiently large such that the responses of the process are detectable; (e) determining an appropriate sample interval; (f) determining an appropriate perturbation frequency; (g) determining an appropriate duration of the test; (h) performing a pseudo-random binary noise test on the process based upon the identified manipulated variables and disturbance variables. 13. The method for controlling the inputs and the outputs of a process as defined in claim 11 wherein the step of applying a suppression analysis comprises calculating the sum of the errors associated with the controlled variable and the sum of the moves associated with the manipulated variable for determining a set of move suppression values for each manipulated variable. 14. The method for controlling the inputs and the outputs of a process as defined in claim 11 wherein the step of applying a suppression analysis comprises increasing the move suppression to effect decreases in the move sizes of the tuning parameter. 15. The method for controlling the inputs and the outputs of a process as defined in claim 11 wherein the step of applying a suppression analysis comprises identifying a preferred move suppression by locating the beginning of an asymptotic decrease of the move sizes prior to a rapid increase in the errors associated with the controlled variable. 16. The method for controlling the inputs and the outputs of a process as defined in claim 11 wherein the step of applying a suppression analysis comprises setting upper, lower and incrementing values for the move suppression parameter. 17. The method for controlling the inputs and the outputs of a process as defined in claim 11 wherein the step of applying a suppression analysis comprises applying the suppression analysis until a steady state is reached for ensuring that the sum of the errors and the sum of the moves have been properly calculated. 18. The method for controlling the inputs and the outputs of a process as defined in claim 11 wherein the step of applying a suppression analysis comprises determining detailed output including controlled variable error, feedforward contributions, manipulated variable moves, manipulated variable setpoint projections, controlled variable-disturbance variables and associated variable-disturbance variables. 19. An ammonia plant, comprising: a process air compressor for forming a compressed air stream; hydrocarbon, steam and compressed air stream feeds to a reformer for producing a raw syngas stream; a means for removing CO2 and residual oxygen compounds from the raw syngas stream to produce a synthesis gas feed stream essentially free of oxygen compounds; a syngas compressor for compressing the synthesis gas feed stream into a synthesis loop comprising in series an ammonia converter for converting nitrogen and hydrogen to ammonia, a refrigeration system for condensing an ammonia product stream, and a recycle line for recirculating unreacted synthesis gas from the refrigeration system to the syngas compressor; a hydrogen recovery unit for recovering a hydrogen recycle stream from a purge stream from the synthesis loop recycle line for recycle to the syngas compressor; and a model predictive controller comprising a control routine for determining differential moves of manipulated variables comprising flow rates of the hydrocarbon and compressed air stream feeds, based on a controlled variable comprising a ratio of nitrogen to hydrogen at an inlet to the ammonia converter, associated variables selected from pressure in the compressed air stream and speed of the process air compressor, disturbance variables selected from ambient air temperature and hydrogen content in the hydrogen recycle stream, and a permanent constraint target comprising an artificially high hydrocarbon feed flow rate. 20. The plant of claim 19, wherein the control routine is adapted to solve the objective function: Min J = Jcv + λ + Jpc + Jd wherein Min J is a least square value comprising the sum of Jcv, J , Jpc and Jd; Jcv = CVwate τ (A x - e) τ CVwate(A x - e) wherein Jcv is the sum of a weighted squares of deviations in the controlled variables from respective setpoints over a future time horizon, CVwate is a vector of factors for weighting control variable errors relative to each other, A is a matrix of transfer function coefficients relating the controlled variables to the manipulated variables, x is a vector of the differential moves of the manipulated variables and e is a vector of errors between the controlled variables and respective setpoints; JA = x T λ T λ x wherein Jλ is the sum of weighted squares of the differential moves of the manipulated variables and λ is a vector of move suppression factors for penalizing excessively large differential moves of the manipulated variables; Jpc = PCwatefPCtrgt - MVstpt) T (PCtrgt - MVstptt wherein Jpc is the sum of the weighted squares of the deviations of the manipulated variables from the permanent constraint target values, PCwate is a vector of factors for specifying how tightly the permanent constraints are enforced, PCtrqt is a vector of the permanent constraint targets, and MVstpt is a vector of the manipulated variable setpoints; Jd = (d T AVcost T )(Aycost d) wherein Jd is the sum of the weighted squares of the deviations in constraint functions outside their allowable bounds, d is a vector of constraint deviation variables, and AVcost is a vector of relative constraint weights; wherein the objective function is subject to the limits: 0 < Vmnmov < |x| < Vmxmov wherein Vmnmov is a vector of minimum differential moves of the manipulated variables and Vmxmov is a vector of maximum differential moves of the manipulated variables; and r 1 r ι j MVIwbds I I I j MVhibds j < C AVIwbds AVhibds wherein MVIwbds are vector elements comprising lower bounds of the manipulated variables, AVIwbds are vector elements comprising lower bounds of the associated variables, C is a matrix of transfer function coefficients relating the manipulated and associated variables to the disturbance variables, MVhibds are vector elements comprising upper bounds of the manipulated variables and AVhibds are vector elements comprising upper bounds of the associated variables. 21. The plant of claim 20, wherein PCtrqt includes at least one artificially high value such that Jpc is nonzero. 22. In a method for controlling an ammonia plant comprising using a model predictive controller to determine differential moves of manipulated variables and control at least one variable subject to associated variables and disturbance variables, and effecting the differential moves, wherein the ammonia plant comprises: (a) a process air compressor for forming a compressed air stream; (b) hydrocarbon, steam and compressed air stream feeds to a reformer for producing a raw syngas stream; (c) a means for removing CO2 and residual oxygen compounds from the raw syngas stream to produce a synthesis gas feed stream essentially free of oxygen compounds; (d) a syngas compressor for compressing the synthesis gas feed stream into a synthesis loop comprising in series an ammonia converter for converting nitrogen and hydrogen to ammonia, a refrigeration system for condensing an ammonia product stream, and a recycle line for recirculating unreacted synthesis gas from the refrigeration system to the syngas compressor; and (e) a hydrogen recovery unit for recovering a hydrogen recycle stream from a purge stream from the synthesis loop recycle line for recycle to the syngas compressor; the improvement comprising solving the objective function: Min J = Jcv + Jλ + Jpc + Jd wherein Min J is the least square value comprising the sum of Jcv, Sλ, Jpc and Jd; Jcv = CVwate T (A x - e) τ CVwate(A x - e) wherein Jcv is the sum of the weighted squares of deviations in the controlled variables from their respective setpoints over a future time horizon, wherein the controlled variables include at least a ratio of nitrogen to hydrogen at an inlet to the ammonia converter, CVwate is a vector of factors for weighting control variable errors relative to each other, A is a matrix of transfer function coefficients relating controlled variables to manipulated variables, wherein the manipulated variables include at least flow rates of the hydrocarbon and compressed air stream feeds to the reformer, x is a vector of differential moves of the manipulated variables and e is a vector of errors between the controlled variables and their respective setpoints; JΛ = x T λ T λ x wherein JΛ is the sum of the weighted squares of the differential moves of the manipulated variables and λ is a vector of move suppression factors for penalizing excessively large differential moves of the manipulated variables; JPC = PCwatefPCtrot - MVstPt) T (PCtrqt - MVstpt) wherein Jpc is the sum of the weighted squares of the deviations of the manipulated variables from a permanent constraint target value, PCwate is a vector of factors for specifying how tightly the permanent constraints are enforced, PCtrqt is a vector of permanent constraint targets, including at least an artificially high flow rate of hydrocarbon to the reformer and MVstpt is a vector of manipulated variable setpoints; Jd = (d T AVcost T )(AVcost d) wherein Jd is the sum of the weighted squares of deviations in constraint functions outside allowable bounds, d is a vector of constraint deviation variables, and AVcost is a vector of relative constraint weights; wherein the objective function is subject to the limits: 0 < Vmnmov < |x| < Vmxmov wherein Vmnmov is a vector of the minimum differential moves of the manipulated variables and Vmxmov is a vector of the maximum differential moves of the manipulated variables; and r 1 r 1 r i j MVIwbds I I x I j MVhibds | < C AVIwbds AVhibds wherein MVIwbds are vector elements comprising lower bounds of the manipulated variables, AVIwbds are vector elements comprising lower bounds of the associated variables, C is a matrix of transfer function coefficients relating the manipulated and associated variables to the disturbance variables, MVhibds are vector elements comprising upper bounds of the manipulated variables and AVhibds are vector elements comprising upper bounds of the associated variables. 23. A process for making ammonia, comprising the steps of: (a) compressing air in a compressor to form a stream of compressed air; (b) feeding steam, a hydrocarbon stream and the compressed air stream to a reformer to produce a raw syngas stream; (c) removing CO2 and residual oxygen compounds from the raw syngas stream to produce a syngas feed stream essentially free of oxygen compounds; (d) compressing the syngas feed stream, a recycle syngas stream and a hydrogen recycle stream into a synthesis loop; (e) converting nitrogen and hydrogen in the synthesis loop to ammonia; (f) refrigerating reaction products from step (e) to form an ammonia product stream and the recycle syngas stream; (g) purging a portion of the recycle syngas stream to a hydrogen recovery unit to form the hydrogen recycle stream; and (h) determining differential moves for manipulating feed rates for the hydrocarbon and compressed air streams in step (b) by solving the objective function: Min J = Jcv + Jλ + Jpc + Jd wherein Min J is the least square value comprising the sum of Jcv, J λ, Jpc and Jd; Jcv = CVwate T (A x - e) τ CVwatefA x - e) wherein Jcv is the sum of the weighted squares of deviations in controlled variables from their respective setpoints over a future time horizon, wherein the controlled variable includes at least a ratio of nitrogen to hydrogen in step (e), CVwate is a vector of factors for weighting control variable errors relative to each other, A is a matrix of transfer function coefficients relating controlled variables to manipulated variables, wherein the manipulated variables include the feed rates of the hydrocarbon and compressed air streams in step (b), x is a vector of differential moves of the manipulated variables and e is a vector of errors between the controlled variables and their respective setpoints; JΛ = x τ λ T λ x wherein J A is the sum of the weighted squares of the differential moves of the manipulated variables and λ is a vector of move suppression factors for penalizing excessively large differential moves of the manipulated variables; Jpc = PCwatefPCtrqt - MVstPt) T (PCtrqt - MVstpt) wherein Jpc is the sum of the weighted squares of deviations of the manipulated variables from a permanent constraint target value, PCwate is a vector of factors for specifying how tightly the permanent constraints are enforced, PCtrqt is a vector of permanent constraint targets including at least an artificially high flow rate of the hydrocarbon feed in step (b), and MVstpt is a vector of manipulated variable setpoints; Jd = (d T AVcost T )(AVcost d) wherein Jd is the sum of the weighted squares of deviations in constraint functions outside allowable bounds, d is a vector of constraint deviation variables, and AVcost is a vector of relative constraint weights; wherein the objective function is subject to the limits: 0 < Vmnmov < |x| < Vmxmov wherein Vmnmov is a vector of minimum differential moves of the manipulated variables and Vmxmov is a vector of maximum differential moves of the manipulated variables; and r ι r i r I j MVIwbds I I x j j MVhibds j AVIwbds ' AVhibds wherein MVIwbds are vector elements comprising lower bounds of the manipulated variables, AVIwbds are vector elements comprising lower bounds of the associated variables, C is a matrix of transfer function coefficients relating the manipulated and associated variables to the disturbance variables, MVhibds are vector elements comprising upper bounds of the manipulated variables and AVhibds are vector elements comprising upper bounds of the associated variables.

Inventors: LIM KIAN YAP, MCNALLY HENRY BARNETTE III, STEWART WILLIAM BELL JR, LIM, KIAN, YAP, MCNALLY, HENRY, BARNETTE, III, STEWART, WILLIAM, BELL, JR.
Applicants: KELLOGG M W CO, THE M.W. KELLOGG COMPANY
Application year: 1995
Main classification: G05B13
IPC codes: C01C1, G05B13