Академический Документы
Профессиональный Документы
Культура Документы
By
Mike Ivanusic
(Student #: 60024981)
An undergraduate thesis
Submitted to
April 9, 2003
2
TABLE OF CONTENTS
ACKNOWLEDGEMENT
NOMENCLATURE
ABSTRACT
LIST OF TABLES AND FIGURES IN THE APPENDIX
INTRODUCTION
SURVEY OF LITERATURE
A) DeltaV/HYSYS integration
B) Tubular Reactor with Gas Recycle Process
C) HDA process description
EXPERIMENTAL DETAILS
PROCEDURES
RESULTS AND DISCUSSION
CONCLUSION
RECOMMENDATIONS FOR FURTHER STUDY
LITERATURE CITED
APPENDIX
GRAPHICAL INTERFACE (added Feb 2004)
ACKNOWLEDGEMENT
I wish to thank Dr. Dusko Posarac for suggesting the undertaking of this thesis. His
continued enthusiasm for the project, along with his guidance, has been excellent.
I wish to thank Norpac Controls, specifically Don Umbach, for his continued support and
interest in the project, and making himself available for my questions. Also, Alden Hagerty of
Norpac for his assistance during the graphical interface implementation.
I wish to thank Guan Tien Tan, the Teaching Assistant for CHBE 474, who helped me get
a start on the HYSYS/DeltaV OPC integration process.
3
NOMENCLATURE
ABSTRACT
INTRODUCTION
BACKGROUND INFORMATION
A. DeltaV/HYSYS integration
The list of features of the DeltaV digital automation system are extensive, and the
vast resources of information for this software are readily available. Of interest is the
OPC communications link, which enables communications between the DeltaV
environment and some other software package. The DeltaV is a powerful and robust
software package designed specifically for industrial applications for the control of
processes.
HYSYS is a simulation process software, and it also has exhaustive amounts of
information available to understand how to use the software. HYSYS simulation aids
the designer in configuration, calculations, and testing. Preliminary estimates can be
made on the size and scope of the process, unit operations, process line connectivity,
and the instrumentation within the process lines.
In the case of a simulated environment, all process instrumentation is assumed to be
in good working order-never the case in a real situation since field units are under
constant scrutiny for breakdowns. However, for the purposes of simulation, the
assumption is that all devices are functioning at peak performance.
2) 2C6H6 ⇔ C12H10 + H2
-Benzene in equilibrium with diphenyl and hydrogen.
-Endothermic (3500 Btu/lb-mol)
-Side reaction, drawing some benzene into the undesirable compound diphenyl
9
EXPERIMENTAL DETAILS
− 90800
r1 = PT PH0.5 (3.7 x10 6 ) exp ;
RT
− 90800 − 90800
r2 = PB2 (9.0 x10 4 ) exp − PD PH (2.6 x10 ) exp
5
RT RT
R=rate in lb-mol/min-ft3
P: Pressure in psia Activation energy constant: R: Rate constant
T: Temperature in Rankin (90800 Btu/lb-mol) in Btu/lb-mol.Rankin
Subscripts B, H, T, and D are benzene, hydrogen, toluene, and diphenyl respectively
During investigation of the initial HYSYS design, it was found that the reactor
volume and condenser had been re-sized. This small table updates the information
reported during the initial Thesis proposal. All other parameters of the design remained
the same (as reported Douglas):
FEHE: 500 ft3, shell Reactor volume: Condenser: 1000 ft3 Separator: 80 ft3
500 ft3 in tubes 4065 ft3
Three things basically affect the pressure in this gas-filled system: fresh feeds,
purge flow, and rate of condensation in the condenser. The flow rates of fresh hydrogen
and of the purge gas stream are very close (484 and 476 lb-mol/hr respectively),
however, purge rate has a direct impact on methane impurity in the gas recycle, so
hydrogen feed controls the pressure.
The power to the compressor is a steady-state fixed value, so the gas circulation rate
through the gas loop is constant. Optimum values for reactor size and recycle flow rate
are determined by balancing the reactor with the energy cost of compression.
12
PROCEDURES
The project involves exploration of two software packages: HYSYS and DeltaV.
The reactor process is implemented in HYSYS to take advantage of the physical and
chemical parameters available to this software. The reactor process is later linked via
OPC to the digital automation system, DeltaV, where the controllers will perform tests
to optimize the response of each control loop (using many of the DeltaV advanced
control features).
Initial OPC testing began with configuration of a simulated stream, similar to the
“toltot” stream in Figure1. Once this “test” stream was successfully built and tested in
HYSYS, the OPC pipelines were configured to enable communications with DeltaV. The
test module was built in DeltaV’s Control Studio under an already working area. When
it was found that successful operation of the communication had been attained, the
entire process design conversion was begun.
DeltaV’s Control Studio is where the module is built, and all the parameters exist-
such as: set points, output and input limits, alarms, control configurations, and the
complete operating conditions. In this window, control blocks (or motors, alarms,
valves, etc.) are imported from the drop down menu list on the right hand side of the
window. The important control parameters, input and output, alarms, and operating
modes are entered on the left hand side of the window. A large picture of Control
Studio is available in the Appendix as Figure dV2.
Figure dV2. Control Studio
13
A new area was created in DeltaV’s Explorer section: HDA. The area represents a
real scenario, where a physical portion of a plant is given a name (such as water
treatment, gas compression, etc.). In this new area, the first controller to be built was
FC1, the control of the toluene feed to the process. This stream had already been
previously successfully modelled, so the same routine could be utilized in this first
controller configuration.
The new controller was built from DeltaV’s extensive library of control modules-
see Figure dV1-DeltaV Explorer window which features Library module templates and
the newly built process area HDA. These modules contain building blocks for: analog
control, monitoring, motors, and valves. For this thesis, only analog control building
blocks were used. Analog control is further divided into: PID, FF, Cascade, fuzzy, and
MPC modules. An appropriate module is loaded into the area, renamed, and then
opened with Control Studio.
14
Every controller’s starting parameters are based on the information pulled from
the HYSYS dynamic simulation. These were entered into the Control Studio parameters
with strict attention being paid to type of action of the controller (either Direct or
Reverse acting), process variable connections and limits of measurement, controlled
variable limits, and correct naming and references-see Figure dV2-typical Control
Studio window featuring the CC controller configuration.
Each controller was entered into the HYSYS DCS interface window-see Figure
H1-Process Variable (PV) imported information. In this window, PV Export sends
information from the HYSYS environment to the DeltaV, and PV Import expects the
control information, which it applies to the process. Although this figure represents the
entire process converted, the interface was actually built one controller at a time.
When the first controller was built, HYSYS enabled the DCS interface, and then
the process was run in dynamic mode, simulating an operating process. HYSYS has the
flexibility of running the process faster or slower than real-time, an advantage that was
used to monitor the process during controller optimization. In certain instances, running
a process too fast caused the process to upset, and running the process too slow would
require long wait times as the process responded to disturbances, updates, or changes.
15
The table shows the results of the many tests that were run on the process in the
deltaV environment.
Table 2. Results of controller optimization table.
Controller 1 2 3 4 5 6 7
Name of controller FC1 LC TCC CC PCR TCR TCQ
HYSYS Control PI P PI P PI PI PI
strategy
dV control strategy PI PID PID Fuzzy PID Fuzzy PID
HYSYS Gain 0.3 2 0.5 2 2 0.5 4
dV Gain 0.3 4 0.5 1.18 4 2.09 0.5
HYSYS Integral 0.5 None 5 none 10 2.5 1.8
dV Integral 0.5 2 5 20.42 12 1.66 40
HYSYS Derivative None None none none none none none
dV Derivative None 1 1 0.44 2 0.21 10
Action Rev. Dir. Dir. Dir. Rev. Rev. Dir.
Eventually a systematic pattern was developed for the testing and optimization
of each controller. As described earlier in the “Procedures”, controller FC1 transfer was
undertaken first because it had successfully been rebuilt in a different area of the DeltaV
Control Studio. Also, this controller has no upstream events, since it is an input stream.
The OPC link is enabled (see Figure dV3 below) by hitting the enable button in the
HYSYS DSC interface window.
16
A small button, similar to a green traffic light, is depressed, thus putting the
design into dynamic operations mode. If the process is operating correctly, the timer
begins to count, and the HYSYS environment is minimized. In DeltaV, the control
module is placed in the on-line mode, and by opening the AutoTune window, the
process response can be followed. A typical AutoTune will look like:
used as an initial starting point, and then the process parameters were changed until
greater stability was reached. It was found that the valve, V3, would experience large
fluctuations, rapidly opening and closing, thus the potential for extreme damage to the
valve. Several PID tests were undertaken in AutoTune, with the final settings displayed
in Table 2. It should be noted that initial PI control was expanded to PID. It was found
that to achieve best response with the control loops, several tests should be taken and
then parameters updated and accepted into the controller. The process was again
allowed to stabilize to see how the response behaved. With each iteration of this process,
superior control would be achieved.
TCC controls the temperature in the separation vessel. It was a logical choice to
proceed with optimization of this controller after LC. Had I attempted optimization of
TCC first, I most likely would have been re-starting HYSYS many times. The product
stream, v3out, is very sensitive to changes in the flow and pressure in SEP. However,
temperature control has less effect on v3out, and furthermore, if the vessel is large, then
temperature takes a long time to adjust to new level. SEP is a mid-sized vessel, and its
temperature does not vary at an alarming pace with upsets, so its optimization was a
logical choice for TCC.
In HYSYS, a valve is implied in the control of the heat duty in the condenser,
Cond. Thus, the feature of controlling the heat duty of the flow was mimicked in
DeltaV. The output scale in DeltaV’s control studio compensated for the simulated valve
by setting the controlled variable as the heat flow. (In HYSYS, the initial control was a
valve with a 0 to 100% open setting). Initially TCC was run at the HYSYS settings, but it
was found that only a one-degree setpoint change caused too much oscillation-solved by
adding derivative action.
Derivative action measures the rate of change of a variable. Because the process
was oscillating, the rate of change (slope) is large. By adding derivative action, it
counters the movement by initiating a slope of opposite value. By varying the settings of
the derivative, and monitoring the response in AutoTune, it was found that adding
derivative control (i.e. rate) of 1 min, stabilized the loop. Derivative is a good addition to
loops with temperature control, since the steadily changing temperature can be
immediately compensated. Derivative setting would be even more important if the
vessel was larger, but the rate setting would be less. Once this change had been made,
the loop stabilized.
Since the vessel, SEP, has another controller, PCR, this was investigated next. The
separator pressure is very sensitive to disturbances. Beginning with the initial settings
from the dynamic state in HYSYS, the process was turned over to the DeltaV
environment. Initial testing on the loop resulted in instability, so derivative action was
added in a attempt to reduce the ramping nature of the valve. Many instances of
backpressure, extreme valve swings, large oscillation in the condenser, and excessive
pressure deviations from setpoint were encountered. This is because the separator is at
the center of many other loops. When the pressure was too high or low, valve V3 would
lock up and the process would shut down. Also, excessive pressure fluctuations would
18
cause the process to freeze. Similarly, when temperature and pressure were changed,
this would also disrupt the process.
To undertake tuning and optimization of this loop, dV’s AutoTune feature was
used. Several tests had to be undertaken in this feature due to the loops instability. As
the process was initialized in HYSYS, and then enabled, DeltaV would begin its attempt
to control the system. Every so often the AutoTune feature was utilized to return some
optimum settings. Using the update feature, the new controller settings were uploaded
to the control strategy parameters back in the Control Studio. After each subsequent
AutoTune, the process was allowed to reach its best state of stability. At this point,
another test was run, returning a new set of controller parameters, which were also
subsequently updated to the controller. Initial commencement of this iterative process
was not met with great response by HYSYS. Because of the interactions back in the
original process, the HDA process would repeatedly freeze if the parameters in the
separator became too excessive. Occasionally, fluctuations in the separator would also
cause other parts of the process to experience difficulties (the aforementioned valve V3,
and the condenser, COND).
After several start-up sequences, each iteration would return a healthier
response. Because of the interactions, the valve, V3, and its controller had to be re-tested
for stability. Although Table 1. shows the final settings, the first run through of tests on
this control loop did not return the listed parameters. It was only after seeing the
separator fluctuations, that it was decided to go back and re-test the valve output, and
adjust the control parameters for tightness. Once this had been achieved, the control of
PCR seemed to be easier. With tighter control on the output product, the separator
gained a bit of ease in controllability. Finally, a start-up test was taken on the control
settings, and the new PCR responded within 10 minutes, bringing the process to set
point with no fluctuations-see Appendix, Figure PCR1, which was also shown earlier.
Upon transfer to DeltaV’s control system, controller CC showed severe
oscillation-see Figure CC1.
Figure CC1.
19
The appendix-Figure CC1 through CC5 shows the various figures, and ultimately
the results of the solutions to controlling this part of the process. Several attempts were
made to tune this loop with conventional PID, but since favourable results were not
being attained, it was decided to investigate the potential of using a special feature of
DeltaV: Fuzzy logic.
Fuzzy logic was primarily invented for use on noisy processes-where controlled
variables and the process variables have large oscillatory tendencies. Three parameters,
dE, error, and output (o/p), work together in a non-linear fashion. Thus the parameters
can more accurately model the fluctuations of a noisy process. Since the parameters can
more closely resemble the process, it was found to be advantageous for controller CC. A
more in-depth description of Fuzzy logic control is in the Appendix addition-Fuzzy
logic: How does it work?
Figure CC1 shows the results of some early testing on the loop. It was determined
that any process optimization, set-point changes, or deviance testing in the process lines
could not be initiated until the loop was properly tuned. The frequent oscillations
evident in PID control began to disappear as the tuning parameters were updated in the
fuzzy environment. Many tests were undertaken to understand the function of varying
each parameter of fuzzy logic (see Appendix addition), and seeing the response. Figure
CC2 and CC3 show how problems still existed even after new parameters were
accepted. The usual cause of this is that other parts of the process were also responding
to variances, so a continual testing and retesting procedure was adopted. After several
AutoTune test procedures, and a couple of re-starts of the process, Figure CC4 shows
the final acceptable settings. Figure CC5 clearly shows that the fuzzy logic control was
the correct choice for control of the process. The result of using this advanced feature of
DeltaV resulted in optimum performance on the loop.
Figure CC4. Fuzzy logic returns decent control.
20
The next two loops each contained lags in their design, to more closely represent
a real process. A lag in a system occurs when there is a time delay in which the system
can respond to a change. Fortunately, DeltaV easily handled this, by having
programmable function blocks that serve as delay units. The only real difficulty was in
trying to understand how to enter the parameters correctly in the function blocks. TCQ
is a temperature control loop on the pre-heating product solution recycle line. It controls
the valve, V11, where the quench liquid from the separator is just about to enter the
mixer, M2, immediately after the plug flow reactor (PFR). Implementation of this loop
was far easier than some of the earlier loops. Again using DeltaV’s AutoTune, along
with changing and updating parameters, the transfer to control in the DeltaV
environment was efficient. Figures TCQ1 and TCQ2 recorded the testing procedures
and graphed the resulting control. Figure TCQ4 shows the block diagram design in
Control Studio.
The final loop presented several challenges. The TCR loop was extremely noisy-
see Figure TCR1.
Figure TCR1. Initial PID attempts at control. Various PID settings were tried and the resulting
display shows the difficulties in obtaining reasonable control.
21
After several trial tests in PID configuration, the interactions in the process were
simply too much for conventional control. The main reason for all the interaction at this
point in the process is that the control of temperature here changes the kinetic
expressions, which in turn alter the production of benzene. This alteration in the
temperature in the furnace produces either more or less benzene, which requires that
the purge line, at valve V4, also changes at a rapid rate. Included in this part of the
process is the difficulty of the temperature signal delay. The temperature is measured at
the input to the plug flow reactor, but by the time the heat stream can make
compensations in the furnace, the temperature has appreciably been altered.
Due to the noise in the system, it was decided to once again utilize the fuzzy logic
option available in DeltaV. The lag block module in Control Studio was used to module
the time delay. The controlled variable is qfur, the heat to the furnace. TCR incorporated
all the new techniques that had been utilized up to this point-it would have been
difficult had the attempt been made to first try to control this section of the plant.
Several PID tests were undertaken in TCR, but none returned optimal control.
Figure TCR1 shows the results of several PID parameter trials. This Figure shows the
large oscillations and the difficulty that was experienced in trying to control the process.
Figure TCR2 shows the initial transfer into the fuzzy logic environment. It is evident
that the fuzzy logic control algorithms smoothed out the transitions. With experience
gained from previous control attempts in fuzzy, and with DeltaV’s AutoTune feature,
the process was under control after only a few iterations of the AutoTune feature. Figure
TCR3 shows the final results of the optimization process. Figure TCR4 shows the
Control Studio module. The lead/lag block is above the fuzzy logic control module,
FLC. At this point, the entire process has been updated to control by the DeltaV
environment.
A sensitivity test was taken on the TCR/CC controller configurations. It was
identified earlier that the furnace temperature affected the rate of the reaction, and
hence the residual amount of methane in the stream, v4out. Two recently generated
AutoTune windows follow this page: Figure CC_TCR1 and Figure CC_TCR2. The first
figure displays set point changes from 1250 to 1200 to 1150 and then back up to
1200°F. The spike in the diagram is the controlled variable, qfur, as it responds to a 50°F
set point change. Because of the fuzzy logic control, the process variable slowly moves
to the new set point with no oscillation-a very desirable result. In practice, it may be
difficult to achieve such a large demand on the heat duty line, qfur. Still, the control of
the upset is excellent.
It was expected that the response of CC would also be adequate, but there was
much more volatility, with the process variable requiring more time to return to setpoint
and with more oscillation. CC had previously been identified as a troublesome loop
because the control is on the methane fraction in this purge line. These two loops were
identified as being the most interactive of several combinations.
22
Figure CC_TCR1. Process response due to interaction. Setpoint of furnace changed from
1250 to 1200 to 1150 to 1200°F.
A test such as this is one of many that could be undertaken in the plant to view
the response of the system. For instance, it may be desired to not have the TCR
controlled variable, qfur, spike as much as it did in Figure CC_TCR1. If this was the
case, then one could go back and perform tests to change the control parameters to
23
optimize the control of the heat input. Also, if the desire for larger heat production has
been identified, one could go back to HYSYS and modify the heat supply. Similarly, the
CC could also be retested, as was previously done for even tighter control. As it stands,
the response to the setpoint by the CC controller was acceptable, with a decaying
oscillatory response. Also, the response returned to setpoint within one oscillation. One
other alternative that could be investigated is whether a larger valve would be of benefit
to the purge stream. A large valve would be beneficial if the process was desired to be
run at a higher operating temperature, producing more benzene. This large valve could
be implemented in HYSYS and more testing undertaken.
An optimization study was done. As in the previous discussion, it is known that
the temperature of the furnace affects the reaction rates, and hence the benzene
production.
It can be seen what the effect of raising the furnace temperature would be on the
production of benzene. With DeltaV in control of the process, these tests took place with
no upsets. From a purely production standpoint, even though benzene production is
increased with increased furnace temperature, other undesirable conditions surfaced.
Diphenyl production continues to increase as furnace temperature increases, causing the
undesirable condition of more stringent distillation of the product stream. An increase
in temperature from 1200 to 1250°F only increased the production of benzene slightly,
but Diphenyl production increased from 4.5% to 6.5%. As a consequence of this
increased heat demand, the stream, qfur, to the furnace increased to 31.3e6 Btu/hr from
7.03 e6 for a 100°F increase. Also, the condenser before the separator is now removing
37.7e6 Btu/hr as compared to a previous value of 13.4e6 Btu/hr. So the trade-off of
increased production of benzene is increased energy costs. Also, with Diphenyl
production increasing, this causes more strain on the downstream unit operations.
Several such analysis tests could further be performed on other parts of the
process to see if more benefit would be gained in another area. Test after test could be
performed, depending on economic factors, to find the optimum operating conditions.
However, control of the process, as was the objective of this thesis has been achieved
through the integration of the HYSYS/DeltaV environments using the OPC
communications links.
24
CONCLUSION
There are three main areas for further research: the HDA process, DeltaV, and
HYSYS.
The book by James M. Douglas, “Conceptual design of chemical processes”, has
extensive strategies and insight into optimizing every part of the hydrodealklyation of
Toluene. For example, the reactor temperature is a critical part of the design. From
Douglas it is known that temperatures above 1300°F cause a significant amount of
hydrocracking. At temperatures below 1150°F, the reaction rates become too slow.
Some time was spent learning how to use HYSYS, but possibly some optimization could
have been done by using some of the suggestions in Douglas, and trying to implement
the ideas in HYSYS. The only drawback is that HYSYS requires many hours of study to
make processes work properly. Indeed, much of the early part of this thesis was spent
understanding how HYSYS works. HYSYS, however, is a powerful tool, which delivers
valuable information.
The DeltaV digital automation system is a very large integrated software
package. In this thesis, some optimization of the design was obtained by
communications via OPC to HYSYS, but several other techniques are yet to be explored
in DeltaV. A great deal of computing power is needed to run the HYSYS program;
therefore, the graphics could be rebuilt in the DeltaV. The entire process could be rebuilt
with completely different graphics. (Note: a graphical interface was later added)
DeltaV can be configured solely for operate interface. These operator interfaces
present plant operators with faceplates showing the controller, and the ability to change
setpoints, or investigate other important information about the process-see Figure
TCQ3. In the DeltaV Operate window, no parameter changes can be made.
But much more important is the controls available through DeltaV, of which only
a few where used in this thesis. Of particular note, is the MPC control on the SEP
section, where this control might have been advantageous.
Further study could contain an economic analysis to see if the feasibility of
continued production is warranted.
LITERATURE CITED
Figure CC4. Fuzzy logic begins to return decent control. AutoTune process test at 17:03.
Process was run at 2, .25, .25 from an initial wide open valve. Process came up to a stable
oscillation. Tests run at 17:03 results in test process returning recommended scaling parameters.
The final test process (the test process can be seen on the bottom left hand part of the screen,
which tests for ultimate gain, period, dead time, process gain, and time constant). The
recommended scaling settings are updated to the controller and then uploaded in Control Studio.
35
Figure TCQ2. Completed testing on TCQ loop, with final testing parameters accepted.
38