Adaptive Control of H/N Ratio in Ammonia Production

Many chemical industrial processes, like ammonia production process, are characterized by unpredictable frequent changes in the operating conditions, such as the ones that could be caused by increasing production task, varying quality of materials, changing product mix and/or varying process throughput. In order to keep almost the same behavior in a new operating point, the process automatic control system must be able to cope with frequent changes in the process parameters and structure [1, 2]. Automatic control strategies, such as Feedback Linearizing Control and Internal Model Control, are the approaches for controlling input-output stable nonlinear systems, but their applicability is constrained to the use of an accurate representation of the nonlinear plant under consideration. As the automatic control problems arising in different complex industrial chemical processes are characterized by uncertain environments and nonlinearities, the identification of accurate process models built according to the first principles is a difficult and timeconsuming task. Hence, often an application of complex mathematical models, such as mathematical model for ammonia production process, for off-line optimization, indirect state estimation and/or optimal online control is required. On the other hand, control systems should use mathematical models as simple as possible in order to avoid high computational load and numerical problems. For this reason, this makes the task of high quality control even more complicated [3]. Ammonia synthesis is an important part in ammonia production process, where the ammonia product is formed. The product yield directly depends on the components’ concentrations in gas/steam flow, which are flowing into the synthesis reactor. Catalyst activation and process conditions in synthesis reactor, such as temperature and pressure, also have influence on the product yield. Automatic maintaining the Hydrogen/Nitrogen (H/N) ratio at the desired stoichiometric value of 2.99 in the synthesis loop is an important objective while maximizing ammonia conversion. As the density of natural gas feed varies, so varies the percentage of H2 in the synthesis loop, thereby varying the H/N ratio. H/N ratio control is not straightforward since its dynamics does not follow linear relationship with the independents primarily because of the accumulation of inertial gases in the synthesis loop. Moreover, no direct H/N ratio measurement is available [4]. There are various approaches for high quality chemical, biochemical process control discussed in the literature. Most of them suffer from the already described drawbacks [1]. Therefore, while one is dealing with complex chemical process, it is important to elaborate robust, effective and easy to implement method for chemical process control. The proposed automatic adaptive control system of H/N ratio is based on one of the widespread-used approaches for controlling systems, dynamics of which change with operating conditions – the tuning procedure is called gain scheduling.


Introduction
Many chemical industrial processes, like ammonia production process, are characterized by unpredictable frequent changes in the operating conditions, such as the ones that could be caused by increasing production task, varying quality of materials, changing product mix and/or varying process throughput. In order to keep almost the same behavior in a new operating point, the process automatic control system must be able to cope with frequent changes in the process parameters and structure [1,2].
Automatic control strategies, such as Feedback Linearizing Control and Internal Model Control, are the approaches for controlling input-output stable nonlinear systems, but their applicability is constrained to the use of an accurate representation of the nonlinear plant under consideration. As the automatic control problems arising in different complex industrial chemical processes are characterized by uncertain environments and nonlinearities, the identification of accurate process models built according to the first principles is a difficult and timeconsuming task.
Hence, often an application of complex mathematical models, such as mathematical model for ammonia production process, for off-line optimization, indirect state estimation and/or optimal online control is required. On the other hand, control systems should use mathematical models as simple as possible in order to avoid high computational load and numerical problems. For this reason, this makes the task of high quality control even more complicated [3].
Ammonia synthesis is an important part in ammonia production process, where the ammonia product is formed. The product yield directly depends on the components' concentrations in gas/steam flow, which are flowing into the synthesis reactor. Catalyst activation and process conditions in synthesis reactor, such as temperature and pressure, also have influence on the product yield. Automatic maintaining the Hydrogen/Nitrogen (H/N) ratio at the desired stoichiometric value of 2.99 in the synthesis loop is an important objective while maximizing ammonia conversion. As the density of natural gas feed varies, so varies the percentage of H 2 in the synthesis loop, thereby varying the H/N ratio. H/N ratio control is not straightforward since its dynamics does not follow linear relationship with the independents primarily because of the accumulation of inertial gases in the synthesis loop. Moreover, no direct H/N ratio measurement is available [4].
There are various approaches for high quality chemical, biochemical process control discussed in the literature. Most of them suffer from the already described drawbacks [1]. Therefore, while one is dealing with complex chemical process, it is important to elaborate robust, effective and easy to implement method for chemical process control. The proposed automatic adaptive control system of H/N ratio is based on one of the widespread-used approaches for controlling systems, dynamics of which change with operating conditions -the tuning procedure is called gain scheduling.

Mathematical model of the process
The general structure of the process reflects several distinct ammonia production phases, i.e. secondary reforming, shift conversion, CO 2 removal, methanation, and ammonia synthesis. Mathematical model of ammonia production is based on the mass balances equations for the components derived from chemical equilibriums [5][6][7][8][9][10]. The dynamic mass balance equation of the following type for each component was created and numerically solved where r N -absolute reaction rate. Absolute chemical reaction rates of the chemical processes were created using artificial neuron networks (ANNs), and their parameters were identified using sensitivity equations technique [6]. The model training and validation results of ANN is described in literature [7].
The model was identified with respect to the http://dx.doi.org/10.5755/j01.eee.115.9.756 experimental data provided by ammonia plant (AB "Achema"). The measured values are influenced by the disturbances and errors in the control systems and equipment, also by the procedures of the measurement unit conversion (e. g., conversion from [v/v %] to [mol/l]).

Automatic adaptive control system
Structure of the proposed automatic adaptive control system is presented in Fig. 1. Adaptive transfer function is updated at each sampling time using observation data of the process state, disturbances and control variables. The dynamic parameters K pr and T pr are recalculated at each sampling time t k .
PI controller is an adaptive controller for the control of H/N ratio. The control purpose is to maintain R (H/N) ratio between independent (d) and manipulated (y) variables and the equation is the following: where C H2 is H 2 concentration [mol/l], and C N2 -N 2 concentration [mol/l]. Therefore, the set point consists of measured H 2 concentration value multiplied by a constant value (see Fig. 1).
The control system is based on a gain scheduling adaptation method. This approach is effective, when process dynamics changes in accordance with system operating conditions. Chemical processes have a lot of disturbances, and for this reason, the approach is suitable for creation of effective control system with the different process modes.
For tuning rules, the IMC (Internal Model Control) control method was used. Nonlinear control is particularly important in the process industries, because chemical processes are generally nonlinear. Besides, the chemical reaction rates are identified using ANNs that additionally add nonlinearities to the model. Most recent nonlinear controller design methods are based on state feedback. However, they cannot be applied for many process control problems where the complete state information is not available [8,9]. Control system was created using a process simulator. Design of an adaptive control system could consist of the following design steps: 1. Choose the process variables for systems state description; 2. Create working point of local systems; 3. Perform experiments with systems and their analysis; 4. Approximate the experiment response curves; 5. Choose tuning method; 6. Create tuning function dependence for continuous regulator; 7. Test the system. The main disturbances were identified in accordance with the investigation results, obtained from the process model simulator. They are as follows:  The first-order transfer function with time delay was used for approximation of the experimental response curves. The identification of transfer function parameters was made using numerical approach. An objective for the parameter identification procedure is to minimize the sum of squared deviations For the parameter identification the Evolutionary programming technique algorithm was used. Evolutionary programming technique is one of many popular stochastic optimization algorithms. The optimization function is formulated as follows where x = [x1,…,xn] T is a vector of model parameters and J is root mean square error of the model. Internal Model Control (IMC) [9] has been extensively used in the process industries. The main obstacle to implement the nonlinear IMC approach is the inversion of the process, which is either difficult or impossible for general nonlinear processes. One approach is to factorize the process into minimum phase and non-minimum phase subsystems [9], and to invert the minimum phase part of the process. However, the factorization for a general nonlinear process [9] is often hard to implement. Taking into account the above considerations, the Internal Model Control method was applied. The tuning rules of PI controller for set point tracking are as follows: 2 pr pr where, In order to ensure the effective adaptation of regulator the adjustment of continuous regulator is implemented. A polynomial was identified using least square approach for the system:

Simulation results
The simulation results show that the proposed adaptive control system has obvious advantages as compared to the classic control system. Response to the set point changes (the 10 th and 160 th process sec.) and to the flow impulse change (the 360 th process sec.) is shown in Fig. 2. The impulse is the main gas/steam flow to the ammonia production process, and it was changed from 50000 l/s to 80000 l/s. The evolution of K r and T i values during the process control using the adaptive control system and the standard control system is shown in Fig. 3. The changing of controller tuning parameters additionally improves the control quality in the adaptive control system, because the values of K r and T i are adapted to the process variation, i.e. disturbances, and to the set point changes although the K r and T i of the standard control system are constants. A PI regulator was used in the standard control system. Also, IMC tuning rules were used for the standard regulator.

Conclusions
In this paper, it was shown how to implement an automatic adaptive control system on a complex ammonia production process model. The simulation results (see Fig.  2) demonstrate robust and effective control for H/N ratio. The standard control system does not deliver the desirable results for the model under consideration, although the better control quality was achieved by means of the proposed automatic adaptive control system. Also, the performance of simulation of control system for ammonia production process demonstrates fast adaptation of the controller to a time-changing set point or disturbance and shows a noticeable improvement as compared to the standard control system.