Production control utilizing real time optimization

Method of controlling production of a plant incorporating one or more chemical processes in which products are produced through consumption of raw materials. In accordance with the method, current production rates of the products are computed by semi-empirical process models that are corrected through error corrections of actual production rates to produce corrected models. The production is then optimized using the corrected models to maximize the variable margin gained upon the sale of the products. The optimization yields targets that either directly or at least influence consumption of the raw materials. The raw materials are then introduced into the process or processes in accordance with the targets.

FIELD OF THE INVENTION

The present invention relates to a method of controlling production of products produced by one or more chemical processes that consume raw materials in which targets for process parameters, that are controlled to control the processes, are set by real time optimization. More particularly, the present invention relates to such a method in which semi-empirical process models of the processes are used in the real time optimization.

BACKGROUND OF THE INVENTION

The setting of production targets for various types of production facilities has been effectuated with the use of real time optimization programs that utilize an optimization technology. Such programs or programming is used as a planning aid to determine the production output from the facilities that will optimize production on the basis of the cost of production and the selling price of the products to be produced.

For example, in U.S. Pat. No. 7,092,893, a method of controlling liquid and gaseous production within a number of air separation plants is provided in which gaseous and liquid products are produced and distributed to customers. In an air separation plant, air is separated by compressing the air, cooling the compressed air to a level at or near its dew point and then distilling the air in distillation columns to produce such gaseous products as oxygen and nitrogen and liquid products such as liquid oxygen. Hence, a central cost of production in air separation plants is the electrical power costs that are consumed in compressing the air in producing liquid products. The electrical power costs will vary from plant to plant and will in any case vary based upon the time of day that the electrical power is consumed. Additionally, road shipping costs present another variable that depends upon the location of the production facility and the customer. In order to maximize the profits and to meet customer demands, the particular producing plants are selected to minimize electrical power costs and road shipping costs.

A particularly complex optimization problem concerns the operation of facilities that employ chemical processes, for example, steam methane reforming to produce hydrogen containing products such as a synthesis gas or a further refined hydrogen product as well as export steam that can also be sold as a product. The raw materials that are consumed are natural gas, makeup water to generate the steam and depending upon the plant, electrical power.

The complexity of the optimization results from the number of unit operations that are being conducted in such a plant. For example, part of the natural gas and part of the steam is fed to a steam methane reformer that consumes the natural gas and steam in endothermic steam methane reforming reactions. A remaining part of the natural gas and combustion air are consumed within a radiant heat exchange zone of the steam methane reformer to generate the heat necessary to support the endothermic heating requirements of the steam methane reforming reactions. There is further a complicated network of heat exchangers that are used to generate steam from the makeup water. The resultant synthesis gas can then be sent to a water gas shift reactor to increase the hydrogen content of the synthesis gas and then to a pressure swing adsorption unit to separate the hydrogen into the hydrogen product. A hydrogen containing stream produced from the cryogenic rectification process can be combined with that produced from the water gas shift reactor for separation within the pressure swing adsorption system and the production of the hydrogen product.

Such hydrogen producing plants are directly controlled by setting targets for a control system that in turn controls the process parameters that are relevant to the particular unit operation involved. For example, changing the steam to carbon ratio of the reactants fed to the steam methane reforming process will change the hydrogen content in the synthesis gas. Also, the amount of the synthesis gas sent to the water gas shift reactor will also effect the amount of hydrogen and carbon monoxide to be recovered as products. Typically, the controller can utilize model predictive control techniques to set the control targets to obtain a particular desired plant performance, for example, to produce a specific amount of hydrogen.

In any chemical plant or other production facility, it is desirable to set production targets to obtain the maximum profitability or margin based upon the selling price of the products and the costs of production, for example, electrical power, natural gas and water costs in case of a hydrogen plant. Complicating any calculation of the production products of the products being offered for sale is that the demand for such products will vary resulting in a variable profitability or margin. Contributing to such variability is that the costs of the raw materials can vary. Additionally, many of such production facilities can employ similar processes that produce the same intermediate products, for example, several steam methane reformers that are of different design or capability.

It would therefore appear that the setting of such production targets as inputs to the control system would be amenable to real time optimization techniques that can handle many variables and arrive at an optimization that individually considers movement of each variable. As stated previously, the use of such real time optimization techniques has found applicability as a planning tool. This is due to the fact that models used for the unit operations that calculate process outputs such as the products produced by chemical reactions of raw materials are themselves complex and take a sufficiently long time to converge. As a result the real time optimization cannot be practically utilized for purposes of setting targets for control of the plant. For example, a model of a steam methane reformer typically will model the heat transfer within the radiant section along the length of each of the reformer tubes and will calculate the chemical reaction along the length of the reformer tubes. Such a model can take an hour or more of computational time. A model predictive control system, however, updates targets every minute.

As will be discussed, the present invention provides a method of controlling the plant operations in which variable margin is optimized by real time optimization techniques that utilize semi-empirical process models in connection with such techniques that make practical the setting of target for control of a plant by real time optimization.

SUMMARY OF THE INVENTION

The present invention provides a method of controlling the operation of a plant that produces products through processes, including a chemical reaction process, to optimize production of products produced by the plant in response to a variable demand.

In accordance with the method, predicted current production rates of products and predicted consumption rates of raw materials used in the production of the products are determined. These production rates and the consumption rates are determined with the use of models that include semi-empirical process models operating on the basis of mass balances, energy balances and pressure balances and including adjustable modeling parameters that influence predicted current production rates and predicted consumption rates.

At least one of the semi-empirical process models contain a chemical process model of at least one chemical reaction. The mass balances for the chemical process model are a function of the mass balances of each of the chemical species taking part in the at least one chemical reaction. The mass balances are based upon an extent of reaction of the at least one chemical reaction and at least one equilibrium expression derived from an outlet pressure of the reactor and at least one equilibrium constant. The at least one equilibrium constant is in turn a function the difference between the outlet temperature and an approach to at least one equilibrium temperature. The adjustable modeling parameters for the chemical process model comprise the approach to the at least one equilibrium temperature and an assumed pressure drop within the reactor.

Errors are determined between the predicted current production rates and actual current production rates and the errors are applied to the semi-empirical process models by adjusting the adjustable modeling parameters such that the predicted and actual current production rates are about equal and therefore, the semi-empirical process models become corrected semi-empirical process models.

Production of the products is optimized through real time optimization utilizing the corrected semi-empirical process models to yield targets for process parameters that at least influence the production of the products and the consumption rates of the raw materials. The optimization is conducted on a basis of cost of the raw materials and selling price of the products and the production being optimized such that the variable demand is met and such that a variable margin gained upon sale of the products is maximized. The processes conducted within the plant are controlled in accordance with the targets.

The products can include a hydrogen containing product and export steam. In such case the processes include steam methane reforming conducted within a steam methane reformer to produce a synthesis gas containing hydrogen for the hydrogen containing product and indirect heat exchange conducted within heat exchangers to produce steam to be consumed in the steam methane reformer and export steam made up of steam not consumed by the steam methane reformer. The raw materials comprise a hydrocarbon containing stream and water used in production of the hydrogen containing product and the export steam. The semi-empirical process models include a steam methane reformer model and heat exchanger models.

The steam methane reformer model has a process side and a furnace side. The furnace side incorporates the chemical process model to model production of the synthesis gas stream. The at least one chemical reaction therefore comprises chemical reactions occurring within the steam methane reformer that include an endothermic reaction of the steam and hydrocarbons composed of part of the hydrocarbon containing stream. The furnace side models production of a heated flue gas and heat to support the endothermic reaction by combustion of an air stream and a fuel composed at least in part of a remaining part of the hydrocarbon containing stream. This is modeled on the basis of a completion of the reaction between the air stream and the fuel and without an assumed pressure drop.

The heat exchanger models model heat exchange operations between the heated flue gas and the synthesis gas. The adjustable process parameters also include an assumed loss of the heat from the steam methane reformer, heat transfer coefficients between the process side and the furnace side of the steam methane reformer model and within the heat exchangers. The targets for the process parameters also include a steam to carbon ratio of the steam methane reforming reactions, synthesis gas temperature of the synthesis gas and combustion air flow of the air.

Although the hydrogen containing product can constitute the synthesis gas, it can also be a purified hydrogen stream produced by subjecting the synthesis gas stream to a water gas shift reaction to produce a shifted stream and a pressure swing adsorption process to produce the purified hydrogen stream and a waste fuel stream. In such case, the fuel is also composed of the waste fuel stream and the chemical process model employed in the process side of the steam methane reformer model is one of two chemical process models. The other of the two chemical process models is a water gas shift reactor model to model the production of the shifted stream through reaction of carbon monoxide and water contained in the synthesis gas stream.

Where the product is the purified hydrogen stream, the models also include a splitter model of the pressure swing adsorption process utilizing a percentile of hydrogen separation from the shifted stream, the percentile varying with flow rate of the shifted stream. The assumed heat losses of the adjustable process parameters also include a loss of heat from the water gas shift reactor. The heat exchanger models also model the indirect heat exchange within a feed gas heater and a feed water heater between the hydrocarbon containing stream and the water, respectively, and the shifted gas stream.

As can be appreciated from the above discussion, the bottleneck involved in applying real time optimization to set control parameters of a plant employing a chemical process is overcome by modeling the chemical process in a simplified form that can be solved in the time allotted for execution of the control system.

DETAILED DESCRIPTION

With reference toFIG. 1, a hydrogen plant1is illustrated that is controlled in accordance with the present invention. It is understood this is for purposes of illustration as the present invention is not limited to a particular type of production facility, but rather has application to any facility in which one or more chemical reactions is carried out that uses an equilibrium expression for modeling purposes. For example, the present invention has application to a methanol plant.

In hydrogen plant1, a natural gas stream10is preheated in a heat exchanger44that serves to cool a shifted gas stream42from a water gas shift reactor (“HTS”)40. As would be understood by those skilled in the art, natural gas stream10would be pretreated by addition of some of the hydrogen product to a hydrotreater to convert the sulfur species present in the natural gas to hydrogen sulfide that would be removed by an adsorbent bed containing zinc oxide. At the same time, a feed water stream12is also preheated in a heat exchanger46to further cool shifted gas stream42. Feed water stream12is then divided into first and second subsidiary feed water streams14and16. Second subsidiary feed water stream16is further heated in a heat exchanger70connected with the convective section of steam methane reformer30and is yet, again further heated to form a saturated steam stream18within heat exchanger68that also is associated with the convective section of steam methane reformer30. Saturated steam stream18is divided into a process steam stream20and a remaining superheated steam stream22.

Process steam stream20is combined with natural gas stream10to form a mixed feed stream24that is heated within heat exchanger66also associated with the convective section of steam methane reformer30. The heated mixed feed stream25is then introduced into reformer tubes26contained in a radiant heat exchange section28of steam methane reformer30. Reformer tubes26are filled with catalyst, usually composed of nickel compounds. The catalyst promotes the conversion of the natural gas-steam mixture to a hydrogen and carbon monoxide containing gas known in the art as synthesis gas. Gas temperatures within the steam methane reformer range from about 900° F. to about 1700° F.

The synthesis gas exits steam methane reformer30as a synthesis gas stream32. Synthesis gas stream32is cooled in heat exchanger34against second subsidiary feed water stream14to produce a further saturated steam stream36that is combined with superheated steam stream22to produce export steam stream38. Export steam stream38can be sold to a facility at which hydrogen plant1is located and as such constitutes a product stream. The demand for such product stream is elastic in that as much as can be produced can be sold.

It is to be noted that synthesis gas stream32could be the product that is sold that would have a variable demand. However, as will be discussed, in the exemplary embodiment hydrogen is the end product for sale. In this regard, synthesis gas stream32after passage through heat exchanger34is at a temperature suitable for conducting a water gas shift reaction within water gas shift reactor40where carbon monoxide and steam are reacted to produce more hydrogen. The shift conversion reaction is slightly exothermic and such units normally operate at temperatures ranging from about 400° F. to about 900° F. The shifted stream42, leaving the water gas shift reactor40can have a temperature of up to about 800° F. and is introduced into heat exchanger44to preheat the natural gas stream10, then to heat exchanger46to preheat feed water stream12. Shifted stream42is then further cooled in a water-cooled heat exchanger48fed with a cooling water stream50to produce a crude hydrogen stream52. Not shown in the drawing are various knock-out drums used to remove condensed water.

Crude hydrogen stream52is introduced into a pressure swing adsorption unit54. The pressure swing adsorption unit54produces a hydrogen product stream56at purities ranging from about 99% to about 99.999% based on the system design. The hydrogen recovery can typically range from about 75% to about 95%. The hydrogen product stream56constitutes another product produced by hydrogen plant1for sale to the facility and outside the facility. The demand for such product is variable. For example, when the hydrogen plant is located in a refinery, the hydrogen product stream56can be sold both within the refinery and elsewhere in accordance with the demand therefore.

The unrecovered hydrogen and any carbon monoxide, methane, water vapor, and nitrogen present in crude hydrogen stream52are purged from the pressure swing adsorption unit as tail gas or waste fuel stream58. Waste fuel stream58is used in connection with a natural gas fuel stream60that constitutes part of the natural gas consumed by hydrogen plant1; the other part of the natural gas being used as a reactant by way of natural gas stream10. The fuel is combusted within a burner system63firing into the radiant heat exchange zone28of steam methane reformer30to supply heat to support the endothermic steam methane reforming reactions occurring within steam methane reformer tubes26. The combustion of such fuel is supported by air which as an air stream62is preheated in a heat exchanger80and fed to the burner system63.

The combustion produces a flue gas stream64that is discharged from radiant heat exchange zone28, at temperatures ranging from about 1600° F. to about 2000° F. and enters the convection section of steam methane reformer30where the contained sensible heat is used to preheat the mixed feed as well as produce and to superheat steam. For such purposes, flue gas stream64passes sequentially through heat exchanger66to heat the mixed feed stream24, heat exchanger68to superheat second subsidiary steam stream16, heat exchanger70to heat second subsidiary boiler feed water stream16, and heat exchanger80to preheat air stream62. The resultant cooled flue gas stream64is then discharged to a flue stack where it is vented to the atmosphere, normally at temperatures in excess of about 260° F.

In any such plant, there are plant operational parameters that will at least influence the consumption of the raw materials and the rate at which products will be produced and hence, the margin or profit. This margin or profit can be a variable margin in that the demand for the products can change as well as the cost of the raw materials, for example, natural gas. As to the operational parameters, the following can be adjusted: steam to carbon ratio, through adjusting the flows of natural gas stream10and process steam stream20; temperature of synthesis gas stream32exiting steam methane reformer30and the flow rate of combustion air62. The oxygen concentration in flue gas stream64is a known constraint on the adjustment of the operation parameters.

Increasing the steam to carbon ratio will increase the production of hydrogen, reduce the production of export steam stream38as more steam will be used in the reforming reactions, increase natural gas used for fuel in fuel stream60and decrease excess oxygen in the flue gas stream64. Increasing the flow rate of the natural gas stream10will increase the production of hydrogen, increase the amount of natural gas fuel stream60and decrease the excess oxygen in the flue gas stream64. A decrease in such flow rate will have the opposite effect. As to the temperature of the synthesis gas stream32, an increase in temperature will increase the hydrogen production rate in that there is a higher overall methane conversion, increase the export steam stream38available for sale, increase natural gas fuel stream60and decrease in the excess oxygen in the flue gas stream64. A decrease will have the opposite effect. Increasing the flow rate of the combustion air stream62will increase the export steam stream38available for sale, increase natural gas fuel stream60and increase excess oxygen in the flue gas stream64. Decreases in any of these quantities will have direct opposite effects.

Pertinent control features for hydrogen plant1that are necessary to control operational aspects of the plant, such as are discussed above, are controlled by a control system that incorporates real time optimization to optimize the variable margin by optimizing the consumption of the raw materials and the production of the products for sale. The raw materials of hydrogen plant are the feed water stream12, the natural gas stream10, the natural gas fuel stream60, electricity for a draft fan223to control the flow of combustion air stream62and feed water stream12. In an embodiment of the present invention the electricity consumed by the draft fan223and the feed water stream12could be neglected. The products are the hydrogen product stream60and the export steam stream38.

Turning to the control system, the hydrogen plant1is controlled by a primary control system200that receives data on flow rates of the various streams, generally designated by arrowhead202and that generates control signals, generally designated by arrowhead204, to control the flows in the plant as well as temperatures, pressures and concentration of various streams. Not shown in this illustration for purposes of simplicity are the electrical connections between primary control system200and the remotely activated control valves and various sensors such as flowmeters, gas chromatographs, pressure transducers and temperature transducers. Set points for lower level proportional integral differential controller that operationally control the plant, for example, flow rates of the feed water stream12, the natural gas stream10, the natural gas fuel stream60and oxygen concentration of the flue gas stream64are controlled by a model predictive controller206that are fed as data, generally indicated by arrowhead208, into primary control system200. The model predictive controller206is reactive to flows and etc. that are fed as an input210into model predictive controller206from the primary control system200. As well known in the art, in model predictive control, unit step response models are utilized to predict an open loop response and necessary control actions to minimize the difference between a predicted response and the targets for the operational parameters that in turn control the production of the products and consumption of the raw materials.

The targets for the operational parameters, for example, the steam to carbon ratio, that are used by the model predictive controller206in setting the set point discussed above, are generated by a real time optimization program212in accordance with the present invention. Real time optimization program212receives data214from the primary control system200and that constitutes some of the data202and then generates targets216that are fed as an input to model predictive controller206.

As indicated above, a target for the process parameter of the steam to carbon ratio is set by the real time optimization program210by setting both a target for the steam to carbon ratio and a target for the flow of natural gas stream10. The model predictive control system206, then sets a set point for process steam stream20to in turn control the steam to carbon ratio. For such control purposes, a valve218is provided to control the flow of natural gas stream10and a valve220is used to control the flow of the process steam stream20. For example, increasing the flow of steam stream20will increase such ratio. The actual control for valves218and220, as well as other valves is by proportional differential control provided by the primary control system200that in turn produces the control signals204to operate the valves. Another possible control mentioned above is to increase or decrease the flow of natural gas stream10by way of valve218.

The outlet temperature of steam methane reformer30, another target, for the process parameters, is controlled by controlling the temperature of the synthesis gas stream32. The point of control is the flow rate of natural gas fuel stream60by way of a valve222. Allied with such control is the control of combustion air stream62. This is done by controlling the opening of louvers associated with a known draft fan223in the convective section of the steam methane reformer30by control signal204. These points of control are “allied” or at least related by a constraint of the oxygen level in the flue gas stream64. This is sensed by an oxygen concentration sensor224that is fed as part of the input202into the primary control system, as part of the input210into the model predictive controller216and as part of the input214into the real time optimization program. The pressure of waste fuel stream58is also controlled by a control valve226and its composition is sensed by a gas chromatograph228. All of these control points for hydrogen plant1are conventional and well known in the art.

As will be discussed in detail, the real time optimization contemplated by the present invention and indicated as real time optimization program212allows targets for controlled process parameters to be set in a manner in which variable margin gained upon the sale of the products of hydrogen plant1, namely, export steam and hydrogen will be optimized. It is termed “variable” in that costs and sales prices can vary over time. The calculation is done on a unit time basis since all of the flows of the products and raw materials are being measured that way. In the end, the determination of the real time optimization program is that of the variable margin on a dollar per unit time basis.

One of the key features of the present invention are process models, for example, a process model of the steam methane reforming reaction occurring within steam methane reformer30. These process models are used to predict the interactions between the optimization variables and the constraints and objective function. These process models are key in that they allow the integration of the real time optimization program212with the model predictive control system206or other less advanced control system. In this regard, the present invention contemplates real time optimization used in conjunction with manual control and implementation and as such as a planning tool. However, in order to allow any practical implementation of a real time process optimization process or program, modeling must be done to allow for the execution of the program in a practical amount of time for changes to the operation of the plant to be effected.

In accordance with the present invention, the process models used can be said to be formulated on the basis of a semi-rigorous approach in that they are detailed enough to capture the major non-linear interactions in the system, but can still be solved in a reasonable amount of time thus allowing optimization to take place at a reasonable pace. For example, fully rigorous models of the steam methane reformer30that would consider such second order effects as the temperature distribution along reformer tubes26would take over an hour of computational time and thus, not be useful in interacting with the control system of plant1, namely the primary control system200and the model predictive controller206. In addition to the models used, adjustable parameters are incorporated into the process models to enable models to be updated to better match plant data. By using this semi-rigorous approach with model updating, the hydrogen plant1is able to be optimized more frequently and to respond faster to changes in customer demands and economics then one would expect from a standard utility plant optimizer. The models are limited by a number of constraints that include: limits on the optimization of the variables, physical equipment limitations (i.e. power usage, valve positions, etc.), customer demand constraints and reality limits (i.e. flows, compositions, etc. must be positive) which can also be captured.

With reference toFIG. 2, the process models utilized in the steam methane reformer30are illustrated. These process models are models of the chemical processes occurring within the radiant heat exchange section28of steam methane reformer20and as such has a process side to model the chemical process occurring within reformer tubes26or in other words the steam methane reforming reaction. The furnace side models the combustion reaction between the fuel provided by the natural gas fuel stream60and the waste fuel stream58and air provided by combustion air stream62. The system is modeled as two lumped reaction systems (i.e. no spatial gradients) with heat being transferred between the two systems. The steam-methane reforming reaction system can be described by the following two reactions:
CH4+H2OCO+3H2
CH4+2H2OCO2+4H2

In the model shown inFIG. 2, equilibrium expressions are used to describe the reactions as opposed to a fully dynamic model. The model utilizes simultaneous equations of mass balance, pressure balance and energy balance that are solved by an iterative approach. The three equations are as follows:
Nip=Nif+ΣVinεj(Mass Balance)
Pout=Pin+ΔP(Pressure Balance)
0=Hf−Hprod−ΔHr+Qr(Energy Balance)
In these equations, N is the number of moles, V is a stoichiometric coefficient, c are the extent of reactions calculated from the equilibrium expressions, P is the pressure, ΔP is an assumed pressure drop, ΔHris the heat of reaction and Qris the heat transmitted from the furnace side of the model.

As a first step, the composition of natural gas reactant feed stream10is determined. This determination can be obtained from the utility supplying the natural gas or from a gas chromatograph sampling port provided for such purpose. The flow rate of the natural gas reactant feed stream10is then measured by flowmeter300and the flow rate of the process steam stream20is measured by flowmeter302. This sets the number of moles of each component of the reaction occurring on the process side that is given in the model as Nif. The pressure of the mixed feed stream25is measured by a pressure transducer304to set Pin. The temperature of the mixed feed stream25is also measured by a temperature transducer306. At this point, the temperature, pressure and composition of the mixed feed stream25is known and as such, the enthalpy Hincan be calculated from an equation of state thermodynamic model based upon experimental data and very well known in the art. Numerous examples and sources of such models exist. There also exists a control temperature at the outlet of the process side or the reformer tubes26that is a control target obtained from the model predictive control system206. The equilibrium constants are a strict function of temperature and are set equal to values obtained at an approach to equilibrium temperature. Equilibrium expressions are defined for each of the reaction equations and are based upon the partial pressure of each component in the synthesis gas stream64. The partial pressure for each component is equal to Pout, known from the pressure balance, times a quotient of the number of moles of each component divided by the total number of moles of the product. This is done for each equation of the chemical reaction, for example CH4+H2O⇄CO+3H2. The unknown is εj. The mass balance and equilibrium expressions are solved for ε and from this, Nipfor each component are known.

The next equation is the energy balance. Since the composition of the product is known from Nip, the control temperature is set and the Poutis known, the Hproductcan be determined in the same manner as the Hfeed. The heat of reaction is also known in that ΔHris equal to the flow of the product, given the total number of moles of each constituent of the product is known, multiplied by the heat of formation of the product less the number of moles of the feed less the heat of formation of the feed. From this Qris known.

The furnace side model is solved for Qrin a similar manner to that of the process side model to obtain a value of Qrthat is equal to that determined in the process side model. The equations that govern this model are as follows:
Qr=UAΔTln
Qr=Hair+Hfuel−Hfluegas−HΔcombustion−Qloss
Nip=Nif+ΣVinεj
In the equations “U” is an assumed heat transfer coefficient, “A” is the area of heat transfer and ΔTln, is the log mean temperature difference. The enthalpies are the enthalpy of air “Hair”, the enthalpy of the fuel “Hfuel”, the enthalpy of the flue gas “Hfluegas”, the heat of combustion “ΔHcombustion” and assumed heat loss, “Qloss”. The third equation is the mass balance equation discussed above with respect to the process side model with the components of the reaction being the fuel and air.

In solving this model, the flow rate and temperature of combustion air stream62is measured by a flow meter308and temperature sensor310upon its entry into combustion system63. The air is assumed to be at atmospheric pressure. Also measured is the flow rate of waste fuel stream58by flow meter312along with its composition by gas chromatograph228. The composition of natural gas fuel stream60is the same as that of natural gas reactant fuel stream10and is determined in a like manner. The flow rate of the natural gas fuel stream60is also measured by a flow meter314. Both the natural gas fuel stream60and the waste fuel stream58are assumed to have ambient temperature. Since the reactions are assumed to go to completion, “εj” in the mass balance is also known.

An initial guess for the fuel flow of the natural gas fuel stream10is made by initially using the current value of the fuel flow as determined by flowmeter314and subsequent calculated values derived from the process models and from previous calculations and then based upon the equation of mass balance, an estimate of the flue gas composition can be made. The enthalpies are calculated on the assumption that the temperature is the furnace temperature for such calculation and the same is sensed by sensing the temperature of the flue gas stream64by a temperature transducer316. From the Qrdetermined from the process side model, the mean temperature difference “ΔTln” can be determined. The heat of combustion “ΔHcombustion” can then be calculated and Qlossis assumed. The energy balance error can then be determined from the energy balance equation. The flow rate of natural gas fuel stream60can then be adjusted until the error is essentially zero.

The model is then adjusted. In order to do this the composition of synthesis gas stream64is measured by a gas chromatograph318. This value is compared to the predicted value to obtain an error. The approach temperature in the model is then adjusted of each reaction and then the model is resolved to minimize the least squared error. On the furnace side, the temperature of flue gas stream64is measured by temperature transducer316and the flow rate of natural gas fuel stream60is measured by a flow meter314. The heat transfer coefficient and Qlossare then adjusted so that a minimum error on the measurement of the temperature of the flue gas stream64versus the prediction and the flow rate of the natural gas fuel stream60is obtained versus the calculated value. The foregoing models are then corrected models that can be used in the real time optimization calculations.

The water gas shift reactor40is modeled in the same way as the process side of the reformer with the exception of the heat balance. The relevant equation for the water gas shift reaction is as follows:
CO+H2OCO2+H2
Since the shift reaction is exothermic there is no need to transfer any heat to the process for the reaction to occur. Therefore the unit is normally run adiabatically and the only heat transferred to/from the process is heat that is lost to the atmosphere. The same forms of the mass balance and pressure drop equations that were used for the reformer is used here. The energy balance now takes the form:
0=Hfeed−Hprod−ΔHr−Qlost
The term Qlostin the above balance can be determined using the difference between the temperature in the reactor and the ambient temperature. In this regard, a temperature transducer (measured by temperature of shifted stream42) to determine reactor temperature and ambient temperature is sensed by an ambient temperature transducer now shown is used for such purpose. Once again a set of simultaneous non-linear equations is generated to determine the composition and temperature of the exit stream given the fully qualified (flow, temp, pressure, composition) inlet stream.

The composition of the synthesis gas stream32is known from gas chromatograph318. The flow rate of such stream is measured from flowmeter320. This sets the number of moles of each component of the reaction occurring within water gas shift reactor40that is set forth as Nif. Additionally, the pressure of the synthesis gas stream32is also measured by a pressure transducer322. The temperature of the synthesis gas stream as it enters water gas shift reactor40is measured by a temperature transducer324. Since the temperature, pressure and composition of the synthesis gas stream32is known, the enthalpy Hincan be calculated from an equation of state thermodynamic model, well known in the art. The temperature of the shifted stream42is derived from temperature transducer325. The equilibrium constants are set equal to values obtained at an approach to equilibrium temperature and equilibrium expressions are defined for each of the equations that are based upon the partial pressure of each component in the shifted stream42. The partial pressure for each component is again based upon Pout, known from the pressure balance, the number of moles of each component divided by the number of moles of the product. The unknown is εj. The mass balance and equilibrium expressions are solved for e and from this, Nipfor each component are known.

The model is then adjusted. In order to do this the composition of shifted stream42is measured by a gas chromatograph326. This value is compared to the predicted value to obtain an error. The approach temperature in the model is then adjusted of each reaction and then the model is resolved to minimize the least squared error.

The pressure swing adsorption unit54is designed to separate all of the impurities from the crude hydrogen feed stream52to generate the product hydrogen stream56and the waste fuel stream58which is returned to the burner unit63as part of the fuel. A pressure swing adsorption system is a very complex unit with cyclic steady state operation. A detailed model would require a significant number of dynamic equations and an extremely long solution time. Therefore, the approach taken is preferably to simply model the unit as a mass splitter in which the hydrogen product stream56is assumed to be pure and calculated from a simple recovery expression:
FH2=RecH2*Fin*xinH2
where FH2is the flow of product hydrogen, Finis the inlet flow rate, xinH2is the composition of H2in the crude hydrogen stream52, and RecH2is the recovery of hydrogen in the pressure swing adsorption unit54that constitutes the adjustable parameter for correcting this particular. The recovery of hydrogen in the pressure swing adsorption unit54can be determined either as a fixed value or a function of any of the conditions of the inlet stream. The flow and composition of the waste stream is then determined by whatever remains. For example, RecH2is adjusted as a quadratic function of the flow of crude hydrogen stream52that can be set forth as A+B*Flow+C*Flow^2 where A,B,C are predetermined constants based on plant data and the flow would be measured by a flowmeter330.

The heat exchangers for heat recovery, for example heat exchangers66,68,70and80as well as the heat exchangers34,44,46, and48associated with the water gas shift reactor40are modeled by a simple energy balance with a pressure drop expression for each side.FIG. 3shows the generic exchanger used to develop the model. The equations used to describe this model are:
Hcin−Hcout=(Hhin−Hhout)=U*A*ΔTln
Pcout=Pcin−ΔPc
Phout=Phin−ΔPh
where H is the enthalpy of the cold (c) or hot (h) inlet (in) and outlet (out) streams. U is the heat transfer coefficient (the adjustable parameter), A is the area for heat exchange, ΔTlnis the log mean temperature difference between the two streams, P is the pressure of the cold (c) or hot (h) inlet (in) and outlet (out) streams and ΔP is the pressure drop on the cold (c) or hot (h) side that constitute further adjustable parameters in the model. These represent a set of simultaneous non-linear equations for each heat exchanger unit which can then be solved using any standard algorithm and linked together to form the entire heat recovery section.

For example, the solution of the process model for heat exchanger44would proceed as follows. The flow of natural gas stream10is known by virtue of flowmeter300. Additionally, the composition of natural gas stream10is also known. The temperature is assumed to be ambient. The pressure can be measured by a pressure transducer or such pressure can be provided from the utility supplying the natural gas. Using these values the enthalpy of natural gas stream, namely Hcinis determined from a known thermodynamic model. The flow, composition, pressure and temperature of shifted stream42is also known through the measurements outlined above and its enthalpy Hhincan also be calculated from the thermodynamic model. The pressure of natural gas stream10and shifted stream42are then measured upon their exit from heat exchanger44by pressure transducers327and328, respectively. The flows and compositions of these streams upon their exit from heat exchanger44are assumed to be unchanged by their passage through the heat exchanger44. The final two unknowns are the temperatures of the natural gas stream10and the shifted stream42upon their discharge from heat exchanger44that are determined by simultaneously solving the non-linear energy balance equations for the model. As can be appreciated, heat exchangers34,46,48,66,68,70,80would be modeled in the same fashion with appropriate temperature and pressure transducers and gas chromatographs provided as necessary to quantify the characteristics of the streams.

In general the real time optimization system consists of three separate calculation procedures (or processes) all of which are run in parallel. The first runs the process models at current conditions, predicts various outputs, and compares those values to the plant data, for example, the actual composition, temperature, pressure and flow rates of the streams discussed above that are computed by the models (the “base model”). The second process uses current plant data to update various parameters in the model (“parameter updating”). The final process takes those updated parameters with current plant and economic information and determines the optimal values for the targets of the process parameters, for example, steam to carbon ratio, the temperature of the synthesis gas stream32and the flow rate of combustion air62(the “optimization process”). The logical sequence of this and the process models, such as have been discussed above, are a matter of routine programming techniques that can be effected in a real time optimization program such as AMS SUITE: REAL TIME OPTIMIZER software obtained from Emerson Process Management of 12603 SW Freeway, Suite 100 Stafford, Tex. 77477, United States of America.

In the base model process, the validity of the site model is determined by comparing the output of the models with the true process characteristics. With reference toFIG. 4, the steps involved in this calculation begin with reading the current values for process inputs and outputs from the plant information system into the real time optimization system212. For example, for the steam methane reformer model, the process inputs would be natural gas composition, the flow rate of natural gas stream10, the temperature and pressure of the mixed feed stream25, the temperature and flow of the air stream62, the flow and composition of waste fuel stream58and the temperature of flue gas stream64to solve the model in the manner outlined above. In the illustration, this would be the data generally indicated by arrowhead214. This data includes the current values of the updated adjustable parameters that were determined from a previous run, for example, the approach to equilibrium temperature. The process outputs from this steam methane reformer model would be the pressure, temperature and composition of the synthesis gas stream32and the flow of the natural gas fuel stream60. The input values are then set into the process models and the process models are then run to determine the process output values. An error is then calculated between the model predicted values and the current plant measurements and the values of the model predication and the error are then written into the plant information system which can be a FOXBORO I/A series Distributed Control System obtained from the FOXBORO business unit of Invensys Process Systems of 33 Commercial Street, Foxboro, Mass. 02035, United States of America. This process is repeated from the initial data reading step at a predefined interval, generally less than two minutes.

With reference toFIG. 5, an adjustable parameter updating process is conducted to update the process model to match current plant conditions and thereby form a corrected process model or more accurately models that can be used by the real time optimization program. It is the feedback mechanism in this overall control system. The steps in this calculation begin with reading the current values for the process inputs and outputs from the plant information system into the real time optimization system212. For the steam methane reformer model, these inputs and outputs have been discussed above. Also included are the current values of the adjustable parameters that are to be updated. The values of the inputs and outputs in the real time optimization system212, generally indicated by arrowheads214and216, are stored with a rolling data file that preferably contains up to thirty of such data sets. In this regard, the last thirty values are stored since the updating takes place using multiple sets of data and not just the current values. Using at least the most recent of saved data sets, the parameters in the process models are then adjusted as described above such that the overall model error is minimized. This is accomplished by finding the parameter values that would minimize a weighted sum of squared errors. The values of the updated parameters are then written to a file contained in the plant information system. This process is repeated at predefined interval, preferably five minutes.

The optimization process can then be conducted to actually determine the targets that will be sent to the model predictive controller206that will set the flow rates and etc. that will be sent via data208to the primary control system200. The goal of the present invention is to maximize the variable margin, therefore both the cost of raw materials and the revenue from the sale of products are calculated as follows:
Total Cost=ΣFi*Ci
Total Sales=ΣPi*pi
Where Fiis the flow of a raw material with associated cost Ciand Piis the flow of a given product with associated price pi. The cost and prices in these expressions can either be a fixed value, a function of the flow of the given material, a function of an index value (such as the cost of natural gas) or any combination thereof. In this regard, the economic model for an index value might be a look-up table incorporated into the program. Also it is possible to include a product purchased from a third party, for example, hydrogen. Again, the saleable products are hydrogen and the export steam.

In the optimization process, there are inputs and constraints to the process that must be met for both operational and contract purposes. For example the natural gas composition of natural gas stream10and natural gas fuel stream60are process inputs that will not be adjusted. The pressure of export steam stream38, the pressure of hydrogen product stream56are constraints. In addition, the flow rate of the hydrogen product stream must at least be equal to current customer demand, another constraint. The temperature of flue gas stream32at its discharge from steam methane reformer30and the temperature of the mixed feed gas stream25must be above a minimum temperature, yet further constraints. The amount of excess oxygen in the flue gas stream64and the natural gas flow of natural gas stream10and natural gas stream60must be above minimum values, also constraints.

The process inputs and outputs, economic costs and sales prices and constraints are optimized in accordance with the logic flow shown inFIG. 7. Under this flow, current values for the process inputs, targets for the process parameters, known in the art as the optimization variables, process constraints, and updated parameters are recorded. The process inputs, updated parameter values, and current values of the optimization variables are introduced into the process models that are run to calculate the predictions of the constraint values. A “bias” is applied to each of the constraints. This value is defined as the “prediction”-“measurement”. These biases account for plant/model mismatch in the optimization process. The bias are applied to the calculated values derived from the process models in an additive fashion so that the constraints are met. The values of the optimization are then calculated using the process models that minimize the total objective function limited by the given limits on the biased constraints. The objective function is defined as the (negative) variable margin for the facility. Practically, in real time optimization, this takes place by moving each variable in turn and determining the effect on the other variables. This is done until a maximum in the variable margin is computed. At this point, the final values of the optimization variables, namely, the targets for the process parameters, for example, the steam to carbon ratio, are written into the plant information system and used as targets by model predictive controller206. The model predictive controller206then sets the flow rates of natural gas and steam that are written to the individual controllers to be implemented on the plant. This flow or process is repeated at a predefined interval, preferably, every five minutes.

While the present invention has been described with reference to a preferred embodiment, as will occur to those skilled in the art, numerous addition, omissions can be made without departing from the spirit and scope of the present invention as defined in the presently appended claims.