SOLUTIONS MANUAL For Introduction to Process Control, 3rd Edition
By J. A. Romagnoli & A. Palazoglu (2020)
1
SECTION I (Introduction)
2
I.1. What is the significance of James Watt’s flyball governor from the viewpoint of automatic control? Solution: James Watt’s flyball governor was developed to control the speed of the steam engine. This is achieved by adjusting the supply of steam. The governor consists of a vertical spindle (A) driven by the engine. Two heavy brass or iron balls (C) are pinned to the head of the spindle. These balls or their arms (B) are connected to a sliding piece (E) on the spindle by rods (D). This sliding piece engages a lever (F) as it moves up and down the spindle, depending on the speed of the engine. The lever closes or opens the throttle valve to vary the supply of steam. At a steady speed of the engine, the balls maintain a certain fixed distance from the spindle and thus keep the supply of the steam constant. If the speed of engine increases, the balls fly away from the spindle and move the lever to close the throttle-valve, reduces the supply of steam and slows down the engine. If the speed goes below the steady level, the balls come closed to the spindle and open up the valve to increase the supply of steam thus increasing the speed of engine. This is an inherently stable closed loop control system. Speed of the engine (output variable) is measured by the distance of the balls from the spindle and control action is taken by adjusting the steam supply (manipulated variable). See Figure I.S1. B A
C
D E
F
FIGURE I.S1 James Watt’s flyball governor.
I.2. Two liquids are mixed together in a tank and the product is removed through an exit stream at the bottom of the tank. We know that changes in the feed stream flow rates can cause the tank to overflow or completely drain, and this is undesirable. Is it possible to modify the design of the tank to avoid instability? How? Solution: 3
Yes, it is possible. One possibility is shown in Fig. I.S2. A B
C
FIGURE I.S2 Level control using an overflow weir.
If the flow rates of A or B or both increase, the level increases and the mixture C exits from the top. If the flow rate decreases, the liquid level increases until it flows out through the exit (does not drain the tank). The outflow design is referred to as an “overflow weir.” I.3. Neutralization of the pH of acidic effluents is a very important problem in wastewater treatment processes. Figure I.1 depicts such a process:
FIGURE I.1 A pH neutralization process.
The incoming stream contains mixed acids with varying buffering characteristics and a standard base stream is available for neutralization. Define all the relevant variables for the process as required. 1. State the control objective(s) for this process. 2. What are the possible controlled variables, manipulated variables, and disturbances? 3. Suggest a feedback and a feedforward control strategy for this process and show 4
ScholarFriend.com
them schematically. Solution: Primary control objective is to maintain a neural (pH=7) exit stream in the presence of disturbances associated with the wastewater stream. A secondary objective would be to maintain a constant level in the tank despite changes in the feed flow rate. In accordance with the control objectives, we need to measure the exit stream pH and the tank level. For this purpose, we use a pH meter and a differential pressure transmitter, respectively. We can manipulate the base stream flow rate as well as the exit stream flow rate. Inlet flow rate is most likely a disturbance. Primary disturbance would be the pH of the wastewater stream. A feedback strategy would measure the exit pH and manipulate the base flow rate. A feedforward strategy would measure the inlet flow rate and adjust the exit flow rate. I.4. Frying is one step of an integrated potato chip manufacture line that includes a sequence of operations: cleaning, peeling, slicing, washing, frying, seasoning and packaging 1. During frying, starch is gelatinized, water content of the slice is reduced, and absorbing the cooking oil enhances texture and flavor of the chip. For a continuous fryer shown in Figure I.2, draw an input/output diagram, and state all possible control objectives. Classify the output variables, the manipulated variables and the disturbances for this process. Suggest a possible feedback control loop and justify its role with respect to the control objectives.
FIGURE I.2 Schematic of frying operation for potato chips.
Solution: The variables of interest are shown in Fig. I.S3.
M. Nikolaou, Computer-Aided Process Engineering in the Snack Food Industry,” Fifth Int. Conference on Chemical Process Control, Eds. J.C. Kantor, C.E. Garcia and B. Carnahan, AIChE Symposium Series, Vol. 93 (1997).
1
5
ScholarFriend.com
FIGURE I.S3 Block diagram of the frying process.
The control objectives would be most likely tied with the quality of the product. There may be other objectives related to production volume, and overall energy and oil consumption. The quality objectives are:
achieve an optimal moisture content
maintain acceptable oil content
have desired brown color
The output variables would be related to these objectives, and we should be able to measure the moisture and oil content of chips leaving the fryer. We might be able to quantify the “brownness” of the chips as well. The manipulated variables are the oil circulation rate, oil temperature, submerger and conveyor speeds. The disturbances would be the moisture content of slices, and the variation of the feed rate. A possible feedback control mechanism would be to measure the moisture content of the chips and adjust the oil temperature. I.5. To effectively remove volatile organic compounds (VOCs) and hazardous air pollutant emissions, one can use a membrane separation process. This is a viable process when the air stream contains relatively high concentration (10,000 ppm) of vapors. A schematic of this process is sketched in Figure I.3.
FIGURE I.3 Schematic of a membrane separation process.
The VOC-contaminated air stream is first compressed to about 45—200 psig and the 6
ScholarFriend.com
compressed mixture is sent to the condenser where the organic vapor condenses and is recovered for reuse. The noncondensed air stream (typically 1% organics) proceeds to the membrane unit. To induce selective permeability of the gases, a pressure difference is created across the membrane by a vacuum pump. Organic vapors are enriched on the permeate side and returned upstream. Cleaned gas is vented to atmosphere. For this process, 1. State all relevant control objectives and indicate which the primary one is. Identify all possible disturbances. 2. Identify all controlled variables (outputs) and the available manipulated variables (inputs). 3. Suggest a feedback controller and a feedforward controller to satisfy a control objective identified in (1). Solution: The primary objective has to be associated with the quality of the vent stream that would be subject to air emissions standards. Other objectives may be related to individual unit operations. Primary Control Objective: Maintain acceptable levels of VOC emissions in the vent gas despite variations in the upstream units and the air supply. Secondary Control Objectives: Maintain the desired outlet pressure for the compressor. Maintain the desired outlet temperature for the condenser. Disturbances: VOC composition of the feed gas. Flow rate of the feed gas. Output Variables: As dictated by the control objectives, we need to measure VOC composition of the vent gas, as well as the outlet pressure of the compressor and the outlet temperature of the condenser. Input Variables: Vacuum pump speed/flow rate, compressor power, cooling medium flow rate. A feedback strategy would be to measure the VOC content of the vent gas and adjust the differential pressure across the membrane by the vacuum pump. A feedforward strategy would be to measure the feed gas flow rate and adjust the compressor power to maintain constant pressure for the compressor outlet stream. I.6. The activated sludge process is the most widely used biological system in wastewater treatment. The process consists of an aeration tank and a settler/clarifier. Wastewater containing some polluting organic substrate (measured by its biochemical oxygen demand, BOD) is fed to the aeration basin (operates like a stirred tank reactor) where the sludge consisting of various microorganisms grows with the consumption of organic substrate (pollutant) and oxygen (supplied as air), thus removing the BOD. The sludge is then passed 7
ScholarFriend.com
to the clarifier where it is settled and a part of it is recycled back to the aeration basin. A schematic is given in Figure I.4.
FIGURE I.4 Schematic of an activated sludge process.
For this process, 1. State all relevant control objectives and indicate which the primary one is. Identify all possible disturbances. 2. Identify controlled variables (outputs) and the available manipulated variables (inputs). 3. Suggest a feedback controller to satisfy a control objective identified in (1), and draw it schematically. Solution: The process is aimed at cleaning the wastewater stream from its organic pollutant. The organic content of the stream is measured (quantified) by BOD. Therefore, the primary control objective is: To maintain the BOD content of the effluent stream below regulatory limits in the presence of disturbances. Possible disturbances include the hydraulic load (wastewater amount) and the concentration of organics (BOD) of the wastewater stream. Other control objectives may be related to economics (minimizing energy consumption). Ideally, one would need to be able to measure the effluent BOD (output). Available manipulated variables (that would influence the BOD) would be the aeration rate and the recycle rate. A feedback strategy would be to measure the effluent BOD and manipulate the recycle rate of the sludge. I.7. Solution crystallization is a type of crystallization where there is a solid (solute) separated from a liquid (solvent). A way of achieving this is by cooling the solution to achieve the supersaturation levels that force the solid out of the solution by way of nucleation and growth of crystals. Solution supersaturation is the driving force in any crystallization process and has been recognized as a key variable. Manipulation of the solution supersaturation directly influences nucleation and growth kinetics, which 8
ScholarFriend.com
consequently affect the attributes of the crystal product. The size of the crystals formed (actually, one ends up with a large number of different particle sizes) is heavily dependent on the cooling regime. Usually, the downstream processing of the crystal product dictates the objective of the crystallization. For instance, a large crystal size may be demanded where filtration is a post-crystallization operation. Consider the crystallization of ammonia sulphate from an aqueous solution as shown in Figure I.5. A cooling medium provides the necessary heat transfer through the jacket around the vessel. For this process, 1. State the control objective. Are there any disturbances? 2. Identify the controlled variable (output) and the available manipulated variable (input). 3. Suggest a feedback controller to satisfy the control objective identified in (1), and draw it schematically. 4. What would be a good strategy to obtain optimum crystal properties?
FIGURE I.5 The sketch of cooling crystallization of ammonia sulfate.
Solution: The key control objective is the particle size distribution of the crystals. The quality attributes of the product substance depend on the size distribution of the particles. In general, one prefers a narrow size distribution, which means many particles having the same size. Another objective is to have particles with a large size. These properties cannot be directly measured but it is known that these properties depend on how the solution temperature changes (cooling regime) which can be measured. Therefore, solution temperature is the controlled variable for cooling crystallization. 9
ScholarFriend.com
The only available manipulated variable is the flow rate of the cooling medium. The disturbances could be associated with the properties of the cooling medium (e.g. its temperature) as well as the properties of the initial solution charged into the vessel (e.g. impurity concentration). A possible feedback scheme is shown in Figure I.S4.
FIGURE I.S4 The feedback control scheme for the crystallizer.
Since the crystal properties depend on cooling regime, one can come up with an optimal cooling policy (temperature trajectory) and the associated control strategy that would result in large size particles with a narrow distribution. I.8. A tank is used to accommodate the difference between the supply (single inlet flow) and demand (single outlet flow) of cooling water as sketched in Figure I.6. It is known that the inlet and outlet flows are subject to magnitude variations according to the power consumption of the pump and the resistance of the valve in the pipeline. A team of process engineers is assigned the task to develop a control strategy for the system in Figure I.6. 1. Assume that a control valve is installed in the inlet line, but not in the outlet line: •
Classify all the process variables from a control point of view.
•
Develop two possible control strategies for the system under study, and sketch these configurations for documentation purposes.
2. Alternatively, assume that a control valve is installed in the outlet line, but not in the inlet line: •
Classify all the process variables from a control point of view.
•
Develop two possible control strategies for the system under study and 10
ScholarFriend.com
sketch these configurations for documentation purposes.
FIGURE I.6 The surge tank for cooling water.
Solution: In the tank, there are two input variables: M 0 , the mass flow rate at the inlet; and M , the mass flow rate at the outlet. If M were an output variable, it would result as a consequence of the physical and chemical transformations within the process. However, M actually drives the behavior of the process, it is a cause; and therefore, it is an input variable. Since M and M are input variables, they could be further classified as manipulated variables 0
and disturbances. We see that a control valve is installed in the inlet line, therefore M 0 is a manipulated variable. On the other hand, the valve in the outlet line is probably just an isolation valve, and therefore M is a disturbance. There is no information on the
installation of (flow) measuring devices, thus we presume there is no flowmeter in this line, and therefore M is an unmeasured disturbance.
In the system under study, there is one output variable, h . Furthermore, we know that output variables could be measured or unmeasured. Since there is no information on the instrumentation of the tank, we presume there is no level measurement device in it, and therefore h is unmeasured. For the tank, the most obvious control objective is to keep the level of the tank within certain upper and lower bounds, so that the tank doesn’t spill or run empty. Keeping the level within certain bounds could be better expressed as maintaining the level at a certain (nominal) target, or set-point, let’s say, 50 %. We could agree on this being the most important control objective for the pumped tank. However, wouldn’t it be more important, for instance, to keep a constant outlet flow of the tank, so that processes downstream this tank do not suffer from variations in flow rates which could occur downstream of it? We
11
ScholarFriend.com
leave this question for discussion, and meanwhile, we agree that our control objective is maintaining the level at a target value. The most simple and straightforward control configuration is feedback control. So, if we had a chance measure the output process variable h by installing a level measuring device in the pumped-tank, and we were able to pair this measurement with the manipulated process variable M 0 (since there is already installed a control valve in this pipeline) via an appropriate control algorithm, we would be in position to implement a feedback control strategy for level control in the process under study. This is sketched in Figure I.S5. M 0
LC
LT M
FIGURE I.S5 Feedback configuration for surge tank.
An alternative control configuration to feedback is feedforward control. This strategy is based on feeding-forward information on a disturbance process variable, which will negatively impact the control objective, and forcing the process according to a control action that results from predicting the impact of the disturbance on the output process variable. M 0
LC FT
M
FIGURE I.S6 Feedforward configuration for surge tank.
12
ScholarFriend.com
Consequently, if we had a chance measure the disturbance process variable M by installing a flowmeter in the outlet stream line, and we were able to pair this measurement with the manipulated process variable M 0 via an appropriate control algorithm, we would be in a position to implement a feedforward control strategy for level control in the process under study. This is sketched in Figure I.S6. I.9. A fired heater (furnace) is used to heat a process stream containing an intermediate product that will be sent to a downstream reactor. It is not only important to maintain a constant outlet temperature but also to keep the furnace temperature below a certain critical value for safety reasons (metallurgical limits of the furnace tubes). A simple schematic representation is shown in Figure I.7.
FIGURE I.7 Schematic of a furnace.
1. What is the control objective for this process? 2. Identify all external disturbances that could affect the operation of the furnace. 3. Identify all manipulated variables for the control of this unit in the presence of disturbances. 4. Construct a feedback control configuration and a feedforward control configuration that would satisfy the control objectives in the presence of disturbances. Solution: The control objective is to maintain constant temperature of the heated process stream at the desired operating point in the presence of disturbances and safety limits.
13
ScholarFriend.com
External disturbances: Fuel flow rate and its heating value (function of composition), inlet process stream flow rate and temperature. Manipulated variables: fuel flow rate, inlet stream flow rate. A feedback configuration would measure the outlet process stream temperature and adjust the fuel flow rate. A feedforward configuration would measure the inlet process stream flow rate and again, adjust the fuel flow rate. I.10 Consider a deethanizer column as shown in Figure I.8 which is part of a gas fractionation plant. The plant consists of an ensemble of three sequential separation units (a deethanizer, a depropanizer and a debutanizer). As an operational objective for the deethanizer, it is expected that the unit produces as much propane as possible. This is achieved by minimizing the amount of propane extracted from the top of the column (distillate), while satisfying a constraint on the amount of impurity in the bottom of the column (bottoms). Such a constraint is quantified by the maximum amount of ethane lost from the bottoms; the operational threshold is estimated to be less than 2%. For this column: 1. Identify the main components both in the distillate and bottoms streams. 2. State all relevant control objectives and indicate which the primary one is. Identify all possible disturbances. 3. Identify all controlled variables (outputs) and the available manipulated variables (inputs). 4. Suggest possible control loops, which would allow the process to operate satisfactorily in the presence of disturbances.
14
ScholarFriend.com
FIGURE I.8 Schematic of the deethanizer.
Solution: The feed contains a mixture of: methane, ethane, propane, butane and higher molecular weight components. The main function of the deethanizer is to separate the light components form the heavier ones. In the ideal case we should have: •
Top of the column (distillate): methane and ethane
•
Bottom of the column: propane, butane and higher
However, in a practical situation will be impossible to achieve such a separation, thus, small amount of propane will then be in the top product (distillate) and small amounts of ethane will be in the bottom product. We should keep in mind that since propane is a valuable product we should try to minimize the amount or propane we are losing at the top of the column. However in trying to do so, we may get higher impurities of ethane in the bottom. Thus the optimal control and operation of the column tries to find a trade-off to this problem. The primary control objectives are for this problem to control the amount of impurities of ethane in the bottom and minimizing the amount of propane in the distillate. As secondary objectives, we should also control the levels both in the condenser and the reboiler drums. Furthermore, we can see that there is possibility to control the feed temperature using the available pre-heater already in place. In terms of the classification of the process variables, we have (Figure I.S7):
15
ScholarFriend.com
FIGURE I.S7 Variable classification for the deethanizer.
Possible Manipulated Variables: Reflux flow rate, steam flow rate, cooling water flow rate, distillate flow rate and bottom flow rate, bypass flow rate to condenser, steam flow rate to preheater. Disturbances: Feed flow rate, feed composition and feed temperature; cooling water conditions and steam conditions. Measured Outputs: Tray as well as condenser and reboiler temperatures, reboiler and condenser levels, column pressure Unmeasured Outputs: Tray as well as distillate and bottom compositions. Note: Since we can use the pre-heater to control the inlet column temperature then this temperature becomes a measured output. Possible control loops are: •
Temperature at the top of the column by manipulating the reflux flow. Possibly in cascade with a flow controller.
•
Temperature in the bottom of the column by manipulating the reboiler duty (amount of steam) possibly in cascade with a flow controller.
These two controllers will take care of the primary objectives (composition of propane at the top and composition of ethane at the bottom). Additional loops would include: •
Reboiler level by manipulating the bottom flow (possible in cascade with a flow controller)
•
Condensate drum by manipulating the bypass flow to the condenser
•
Pressure by manipulating the distillate flow 16
ScholarFriend.com
•
Inlet temperature by manipulating the amount heat in the pre-heater (steam flow). Possible in cascade with the flow controller.
I.11. An oil stream is heated as it passes through two well-mixed tanks in series. Heat is supplied in the first tank through a heating coil. The volumes of both tanks are assumed to be constant. For this system: 1. Draw a schematic diagram of the process. 2. State the control objective and all possible disturbances. 3. Identify the controlled variable (output) and the available manipulated variable (input), 4. Suggest a possible control loop which would allow the process to operate satisfactorily in the presence of disturbances. Solution: Figure I.S8 shows the process schematic
FIGURE I.S8 Process schematic.
•
In this problem the state variables are T1 ,T2 . Assuming they are measured, then they are also the output (measured) variables.
•
Possible time-varying inputs are the heat input (Q) and the oil flow rate (F) as well as the inlet temperature (Tin).
•
To control the temperature of the second tank we will use Q so this is a manipulated input. F is a possible disturbance as well as the inlet temperature (Tin). In this specific case, Tin is assumed to be constant
17
ScholarFriend.com
•
A possible control loop will involve measuring tank 2 temperature (T2) and manipulating the amount of heat in the first tank (Q) in a feedback control scheme
I.12 The Roman Instrumentation and Control Company (RICCo) is invited to bid on a heating system for the renovation of the existing one. The heating system will consist of an open warm-water cycle (stream 1 – which will be heated by stream 2 in the vertical tube heat exchanger and then circulated through the radiators inside, heating the building) and a closed hot-water cycle (stream 2 – which is heated by condensing steam in a shell-and tube heat exchanger and which, in turn, heats stream 1 in the vertical heat exchanger). Other groups of RICCo engineers are responsible for designing and installing the actual heating system, while your group is responsible for designing the control system. A small test facility is set up to simulate the system, test various control strategies, etc. The apparatus (Figure I.9) consists of a horizontal shell-and-tube heat exchanger where circulating hot water (stream 2) is heated by condensing steam, and a vertical tube double-pipe heat exchanger where stream 2 (in the inner tube) heats municipal water (stream 1) flowing through the annulus of the vertical heat exchanger to the drain.
FIGURE I.9 The heating system flow sheet.
For this test facility: 18
ScholarFriend.com
1. Identify all relevant control objectives and indicate which the primary one is. State all possible disturbances. 2. Identify all controlled variables (outputs) and the available manipulated variables (inputs), 3. Suggest possible control loops which would allow the process to operate steadily in the presence of disturbances Solution: From the problem definition, it is clear that the primary control objective will be to maintain a certain (target) temperature on the outlet stream 2 temperature form the vertical tube heat exchanger. A secondary objective would be to adjust the inlet temperature by manipulating the amount of steam in the horizontal heat exchanger. In terms of the classification of the process variables we have (Figure I.S9):
FIGURE I.S9 Schematic of variable classification for the heating system.
Possible Manipulated Variables: Flow rate of stream 1, Steam rate, flow rate of stream 2. Disturbances: Stream 2 inlet temperature, steam conditions, inlet temperature of stream 1 Measured Outputs: All temperatures Unmeasured Outputs: does not apply. Note: Inlet temperature of stream 2 could either be a disturbance or an output controlled variable if secondary control loop implemented. 19
ScholarFriend.com
Possible control loops: •
Temperature of the outlet of stream 2 by manipulating the flow rate of stream 1 (cooling fluid). Possible in cascade with a flow controller.
•
Inlet temperature of stream 2 by manipulating the steam rate in the shell and tube heat exchanger.
I.13 Reverse Osmosis (RO) is gaining significant attention for its potential as an effective desalination technology2 for seawater. The recent improvements in the pre-treatment processes, newly developed membranes and efficiency of the pumping equipment led to large reductions in water production costs for both brackish water and seawater plants. In the process schematic shown Figure I.10, the feed water is chemically and mechanically treated first to minimize deposition of fine particles and scaling compounds. Next, subject to salinity of the feed water, the feed water stream is pressurized as it enters the membrane module where the fresh water passes through the membrane and most dissolved salts are rejected by the membrane and concentrate in the reject brine stream. The high-pressure energy of the reject brine stream is recovered by the turbine. In the final step, the pH of the product water is adjusted to neutrality.
FIGURE I.10 Reverse osmosis process.
For this process, 1. Identify all relevant control objectives and indicate which are related to quality specifications. State possible disturbances. 2. Identify controlled variables (outputs) and the available manipulated variables (inputs). 3. Suggest a feedback controller(s) to satisfy the key quality control objective(s) identified in (1), and provide a schematic drawing of the loop(s). Solution: 20
ScholarFriend.com
There are several possible control objectives but the primary one should be related to the product quality. Thus, this objective can be stated as, To maintain desired level of pH and fine particles, and scaling compounds like Ca and Mg, by manipulating addition of chemicals, in the presence of disturbances in the intake salinity and flow rate. The output variables would be related to control quality, thus they could be product pH (also pH of feed pretreatment step) and particle content. One can also consider membrane exit flow and concentration as outputs to be controlled. The manipulated variables could be the flow rates of chemicals added as well as the feed water pressure and reject brine flow rate. The disturbances would be associated with the intake seawater in terms of its salinity, dissolved salt content and flow rate. Possible set of control loops are shown in the diagram in Figure I.S10.
FIGURE I.S10 Control loops for the reverse osmosis process.
I.14 Diabetes affects 25.8 million people, 8.3% of the U.S. population3. Type 1 diabetes is a chronic illness where the body does not produce insulin, a hormone that regulates blood sugar (glucose) levels. When the body cannot convert sugars and starches into energy through normal metabolic pathways, glucose levels in blood and urine increase to possibly fatal levels. People with this disease manage their glucose levels by typically taking glucose measurements 3-4 times a day using the “finger prick” method and then administering insulin injections subcutaneously. This is a painful experience and often unreliable due to the amount and type of insulin delivered. Recent research has focused on the development of implantable technologies where a closed-loop control system can be used to deliver precise insulin levels when needed. For this problem, 1. State formally the control problem by identifying the controlled and manipulated variables. What are the disturbances? 2. Perform a literature search to determine the latest control approaches to address 21
ScholarFriend.com
this problem. Discuss at least two such approaches in terms of their benefits and their shortcomings. 3. What are the key issues and obstacles to the development of an implantable unit? Solution: The control problem is to maintain blood sugar levels around a target value by insulin injections in the presence of disturbances such as meals. The key measured variable, of course is the blood sugar level. And the manipulated variable is the insulin flow rate (injection). There have been a number of studies on the control insulin. Two such papers are cited below: Dua, P, Doyle III, F.J., and Pistikopoulos, E.F., Model-Based Blood Glucose Control for Type 1 Diabetes via Parametric Programming, IEEE Trans. Biomed. Engg., 53, 1478, 2006. Harvey, R.A., Wang, Y., Grosman, B., Percival, M.W., Bevier, W., Finan, D.A., Zisser, H., Seborg, D.E., Jovanovic, L., Doyle III, F.J., and Dassau, E., Quest for the Artifical Pancreas, Combining Technology with Treatment, IEEE Engineering in Medicine and Biology Magazine, 29, 53, 2010. See those papers for a broad discussion of all relevant issues. I.15 A Kamyr digester is used to extract the lignin out of wood chips through a chemical reaction with an aqueous solution of sodium hydroxide and hydrosulfide (white liquor). The resulting pulp with the desired lignin content is further processed in the paper mill and used to make various grades of paper. The schematic of a typical unit is given in Figure I.11. The wood chips are first mixed with the white liquor in the Impregnation Vessel and then sent to the digester. The digester has three cooking zones where the temperature is maintained at the design conditions. There are various locations where additional white liquor is introduced and also extracted from the unit as black liquor. The pulp product is often characterized by its Kappa # which defines the extent of the reaction that removes the lignin and leaves the cellulosic material.
22
ScholarFriend.com
FIGURE I.11 Kamyr digester process.
For this system: 1. Identify the control objective(s). State all possible disturbances. 2. Identify the controlled variable(s) (output) and the available manipulated variable(s) (input). 3. Draw a block diagram with input and output variables explicitly shown. 4. Suggest possible feedback and feedforward control loops, which would allow the process to operate steadily in the presence of disturbances. Solution: The primary control problem is to maintain the desired Kappa # at the digester outlet by possibly manipulating heating zone temperatures in the presence of disturbances in the feed chip properties such as moisture content. There may be disturbances associated with the feed flow rates as well as the quality (composition) of the liquor. Secondary control objectives may involve digester holdup (residence time) which can be controlled by pulp exit flow rate. One would aim to measure the Kappa # as well as zone temperatures and white liquor flow rate and the black liquor flow rates removed between heating zones.
23
ScholarFriend.com
A significant disturbance arrives when the chip quality changes between hard wood and soft wood. That change would require shifting the operating conditions so that the desired Kappa # is still maintained. The key feedback control loop would involve measuring the Kappa # and manipulating all or some of the zone temperatures (single output multiple input). A feedforward controller could measure incoming chip moisture content and adjust white liquor flow rate. I.16 An irreversible exothermic reaction (𝐴𝐴 → 𝐵𝐵) takes place in a Continuous Stirred Tank Reactor (CSTR). The reactor schematic given in Figure I.12 shows that a cooling jacket is used to provide the mechanism for energy removal from the reactor. The schematic indicates the flow, temperature and concentration variables along with the subscripts A, 0, and j, indicating the reactant, the initial feed and the jacket. For this system, 1. Identify the control objective(s). State all possible disturbances. 2. Identify the controlled variable(s) (output) and the available manipulated variable(s) (input). 3. Draw a block diagram with input and output variables explicitly shown. 4. Suggest possible feedback and feedforward control loops that would allow the process to operate steadily in the presence of disturbances.
FIGURE I.12 Schematic of a non-isothermal CSTR.
Solution: Process control is necessary to achieve the desired product concentration and maintain the temperature values in the face of disturbances, caused by concentration set-point change or sudden temperature increase of cooling water. 24
ScholarFriend.com
Consequently the control objectives are to control the product concentration and temperature in the face of a disturbance such as a partial loss of cooling tower function. For this system, each variable is identified as either a manipulated variable, disturbance or an output, as shown in Figure I.S11. The manipulated variables are the feed flow rate and the coolant flow rate. The possible disturbances are the feed concentration, feed temperature, and the coolant temperature, and the output variables are the product concentration, reactor temperature, and jacket temperature. •
Possible Manipulated Variables: Coolant flow rate and feed flow rate.
•
Disturbances: Feed temperature and concentration, cooling inlet temperature.
•
Measured Outputs: Reactor temperature and reactor concentration. We may want to measure also the cooling temperature for more advanced control implementation
FIGURE I.S11 Classification of variables.
Possible control configuration: Feedback control of temperature and concentration using coolant flowrate and feed flowrate as manipulated variables (Figure I.S12).
FIGURE I.S12 Control configuration for the CSTR.
25
ScholarFriend.com
SECTION II (Modeling for Control)
26
ScholarFriend.com
II.1 Consider a continuous blending process where the water is mixed with slurry to give slurry the desired consistency (Figure II.1). The streams are mixed in a constant volume (V) blending tank, and the mass fraction of the solids in the inlet slurry stream is given as xs, with a volumetric flow rate of qs. Since xs and qs vary, the water make-up mass flow rate w is adjusted to compensate for these variations. Develop a model for this blender that can be used to predict the dynamic behavior of the mass fraction of solids in the exit stream xe for changes in xs, qs, or w. What is the number of degrees of freedom for this process?
FIGURE II.1 Schematic of the blending process.
Solution: Let us assume that we have perfect mixing and no volume changes due to mixing. Water stream is considered to be pure water and ρt is the density of solid. The mass flow rates of each stream are designated by w and the volumetric rates are by q. Then, by definition, we have the following,
w s = ρsq s ρs =
ws x s w s (1 − x s ) w s + ρ ρt ρe =
=
1 x s (1 − x s ) + ρ ρt
1 x e (1 − x e ) + ρ ρt
The total mass balance yields the following equation, d (ρ e V ) = ws + w − we dt
And since the volume is constant, we have, 27
ScholarFriend.com
V
d (ρ e ) = ws + w − we dt
A component balance on the solids will give, d ( x e ρ e V) = w sxs − w e xe dt
Or, V
d(x e ) d (ρ e ) = −V + w sxs − w e xe = −xe (w s + w − w e ) + w sxs − w e xe dt dt
This equation along with the definitions of the densities, forms the model of this process to help predict the variations in the mass fraction of solids in the exit slurry as a function of other process variables. For a degree of freedom analysis, we have, •
Constants: V, ρ, ρt
•
Number of Equations: 4 (one mass balance + one component balance + two algebraic relations)
•
Number of variables: ρs, ρe, w, we, ws, xe, xs
The number of degrees of freedom is 3. Note that one usually needs to specify the upstream solids content (density or solids fraction) and the flow rate as well as the water flow rate to fully define the system. II.2. A binary mixture at its saturation point is fed to a single-stage flash unit (Figure II.2), where the mixture is heated at an unknown rate (Q). The feed flow rate and feed mole fractions are known and may vary with time. Assume that x represents the mole fraction of the more volatile component (e.g., xf is the mole fraction of the more volatile component in the feed stream) and the molar heat of vaporization is the same for both components. Flow rate is given in moles per unit time. H represents the molar liquid holdup.
28
ScholarFriend.com
FIGURE II.2 Schematic of a flash unit.
1. Derive the modeling equations for this system. State your assumptions clearly and explicitly. 2. Derive the transfer function between the overhead mole fraction of the more volatile component and its feed mole fraction. (Hint: Assume constant molar holdup.) Solution: The control volume is the flash tank. We make the following assumptions: •
Negligible vapor holdup in the unit
•
Constant stage temperature and pressure
•
No heat loss to surroundings
•
Negligible heat transfer resistance for transfer of Q.
The equilibrium relationship is given by:
x D = K (T , P) x B where is K the equilibrium constant For the energy balance, the quantity of interest is:
Total Energy = U + K + P Here, U, K, P represent the internal, kinetic and potential energies of the system, respectively. Assuming thermal equilibrium between the vapor and the liquid streams, we can also neglect the energy balance on the vapor phase. Since the liquid in the tank can be considered stationary 29
ScholarFriend.com
dK dP = = 0 and dt dt
⇒
dE dU = dt dt
For liquid systems, one can assume that dU dH ≅ dt dt
H denotes the total enthalpy of the liquid in the tank (vapor holdup neglected). Furthermore, H = Hc p , B ,av (T − Tref )
Where: cp,B,av : average molar heat capacity of the liquid in the tank Tref : reference temperature where the specific enthalpy of the liquid is assumed to be zero. The average molar heat capacities of the liquid streams can be expressed as:
c p , F ,av = x F c p , A + ( 1 − x F ) c p ,C c p , B ,av = x B c p , A + ( 1 − x B ) c p ,C Total energy balance can be formulated as:
[Accumulation of total energy] = [Input of total energy] − [Output of total energy] time
Or
[
d Hc p , B ,av (T − Tref ) dt
] = Fc
time [Energy supplied by steam] + time
time
p , F , av (Tin − Tref ) − Bc p , B , av (T − Tref ) − D[c p , D , av (T − Tref ) + λ ] + Q
where λ is the molar heat of vaporization, and Tin = T . At steady-state, this reduces to,
Q = Dλ Overall material balance yields,
d (H M ) = MF −MD −MB dt where HM is the mass holdup of the unit and Mi are the mass flow rates. We can express the mass flow rate as, for example: M F = MW A Fx F + MWC F (1 − x F ) = F [MWC + x F ( MW A − MWC )] 30
ScholarFriend.com
This results in the following material balance (molar balance) expression: d ( H [MWC + x B ( MW A − MWC )]) = F [MWC + x F ( MW A − MWC )] dt − B[MWC + x B ( MW A − MWC )]
− D[MWC + x D ( MW A − MWC )]
The component balance for component A yields,
d ( Hx B MW A ) = Fx F MW A − Bx B MW A − Dx D MW A dt d ( Hx B ) = Fx F − Bx B − Dx D dt II.3. An oil stream is heated as it passes through two well-mixed tanks in series (Exercise I.11). Assuming constant physical properties, develop the nonlinear state-space model for this process to predict the time evolution of the temperatures in both tanks. State your assumptions clearly and explicitly. Solution: In this problem the state variables are T1 ,T2 . Possible time-varying inputs are the heat input and the oil flow rate. Since the volumes are assumed constant we only need to perform an energy balance around each tank Total energy balance can be formulated as:
[Accumulation of total energy ] = [Input of total energy ] − [Output of total energy ] time
time
[Energy supplied by the coil ] +
time
time
E = U + KE + PE , where U is the internal energy, KE is the kinetic energy and PE is the potential energy. Since the tank is not moving, dKE dPE = =0. dt dt
Thus dE dU , = dt dt
and for liquid systems, 31
ScholarFriend.com
dU dH T = dt dt where, HT is the total enthalpy of material in the tank. H may be written as,
ρAhC p (T − Tref ) where Tref : is the reference temperature. The energy balance for Tank 1 may be written as:
d (ρV1C p (T1 − Tref )) dt
= ρFC p (Tin − Tref ) − ρFC p (T1 − Tref ) + Q
Assuming Tref = 0, we will have:
V1
Q d (T1 ) = FTin − FT1 + dt ρC p
Q dT1 F = (Tin − T1 ) + dt V1 ρC pV1 Similarly for Tank 2 we have
dT2 F (T1 − T2 ) = dt V2 Thus the set of equations representing the dynamics of the temperatures in the tanks is given by d (T1 ) F Q = Tin − FT1 + ρC pV1 dt V1 d (T2 ) F (T1 − T2 ) = dt V2
The equations are ‘slightly’ nonlinear due to the multiplication between the flow rate and the temperatures. Rearranging and taking the Taylor series expansion, dT1 F Q = (Tin − T1 ) + = f 1 ( F , T1 , Q ) ρc pV1 dt V1 F Q ≈ (Tin − T1 ) + + a1 ( F − Fs ) + a 2 (T1 − T1s ) + a 3 (Q − Q s ) ρc pV1 V1 ss dT2 F = (T1 − T2 ) = f 2 ( F , T1 , T2 ) dt V2 F ≈ (T1 − T2 ) + b1 ( F − Fs ) + b2 (T1 − T1s ) + b3 (T2 − T2 s ) V 2 ss
32
ScholarFriend.com
We can see that the constant coefficients are given as: a1 =
− Fs (T − T1s ) ∂f 1 ∂f ∂f 1 = in ; a2 = 1 = ; a3 = 1 = ∂F ss ∂T1 ss ∂Q ss ρc pV1 V1 V1
b1 =
− Fs F (T − T2 s ) ∂f 2 ∂f ∂f = 1s = ; b2 = 2 = s ; b3 = 2 ∂F ss ∂T1 ss V2 ∂T2 ss V2 V2
By subtracting the steady-state equation and defining deviation variables (like F = F − Fs ), we obtain the following equations: dT1 = a1 F + a 2 T1 + a 3Q dt dT2 = b1 F + b2 T1 + b3T2 dt II.4. Consider the stirred-tank heater shown in Figure II.3. The steam is injected directly in the liquid. A1 is the cross sectional area of the tank. Assume that the effluent flow rate is proportional to the liquid static pressure that causes its flow. 1. Identify the state variables of the system. 2. Determine what balances you should perform. 3. Develop the state model that describes the dynamic behavior of the system.
33
ScholarFriend.com
FIGURE II.3 Stirred tank heater.
Solution: a) State Variables: h , T2 b) Total mass and energy balance. Total mass balance accumulation input output = − time time time d ( ρAh ) = ρF1 − ρF2 + Q dt
At constant density:
A
dh Q = F1 − F2 + dt ρ
Equation 1
Total energy balance accumulation input output = − time time time
E = U + KE + PE , where U is the internal energy, KE is the kinetic energy and PE is the potential energy. Since the tank is stationary, dKE dPE = =0. dt dt
Thus dE dU , = dt dt 34
ScholarFriend.com
and for liquid systems,
dU dH T = dt dt where, HT is the total enthalpy of material in the tank. Total mass in the tank is
ρV = ρAh . H may be written as,
ρAhC p (T − Tref ) where Tref : is the reference temperature. The input of total energy into the tank is:
ρF1 H 1 + ∆H where, ∆H is the heat supplied by 40 psi steam per unit volume. The output of total energy from the tank is: ρF2 H 2 . The energy balance may be written as:
d (ρVC p (T2 − Tref )) dt
= ρF1C p (T1 − Tref ) − ρF2 C p (T2 − Tref ) + ∆H
Substituting for ρV = ρAh , we get
d (ρAhC p (T2 − Tref )) dt
= ρF1C p (T1 − Tref ) − ρF2 C p (T2 − Tref ) + ∆H
Assuming Tref = 0, we will have:
A
∆H d (hT2 ) = F1T1 − F2T2 + dt ρC p
A
d (hT2 ) dT dh = Ah 2 + AT2 dt dt dt
Using the product rule:
Substituting this into the above equation, we get: Ah
dT2 ∆H dh = F1T1 − F2T2 + − AT2 dt ρC p dt
dh in the above equation. Therefore, the energy dt balance results in the following equation:
From Equation 1, we have the term A
Ah
dT2 ∆H Q = F1T1 − F2T2 + − T2 F1 − F2 + ρC p ρ dt 35
ScholarFriend.com
Simplifying results in the following equation: Ah
dT2 Q ∆H = F1T1 − F1T2 + − T2 dt ρC p ρ
Equation 2
II.5. Most separation processes in the chemical industry consist of a sequence of stages. For example, sulfur dioxide present in combustion gas may be removed by the use of a liquid absorbent (such as dimethylalanine) in a multistage absorber. Consider the threestage absorber displayed in Figure II.4.
FIGURE II.4 Schematic of a three-stage absorber.
This process is modeled through the following equations 2:
2
Seborg, D.E, T.F. Edgar. D.A. Mellichamp, Process Dynamics and Control, Wiley 36
ScholarFriend.com
dx1 = K ( y f − b) − (1 + S ) x1 + x 2 dt dx τ 2 = Sx1 − (1 + S ) x 2 + x3 dt dx τ 3 = Sx 2 − (1 + S ) x3 + x f dt
τ
H is the liquid holdup in each stage and assumed to be constant, and x and y represent liquid and vapor compositions, respectively. Also, τ = H / L is the liquid residence time, S = aG / L is the stripping factor and K = G / L is the gas-to-liquid ratio. a and b are constants. a. How many variables are there? How many equations (relationships)? What is the degree of freedom? b. Is this system underdetermined or overdetermined? Why? c. What additional relationships, if necessary, can you suggest to reduce the degrees of freedom to zero? Solution: All relevant symbols are given below: a , b, H (Constants) x1 , x 2 , x3 , x f , y1 , y 2 , y 3 , y f , S , K , G , L,τ (13 variables)
Here we also included the gas phase compositions (of SO2) although they do not appear explicitly in the modeling equations. We have three equations that result from the application of the component balances in each stage and three defining equations for three variables (given in the problem statement). One can also write the following equilibrium relationships that must be satisfied at each stage: xi = f i ( y i )
i = 1,2,3
With these, we have a total of nine equations. The degree of freedom analysis yields: F = 13 − 9 = 4
This is an underdetermined system. To fully define the system and have a feasible control problem, we need to remove four degrees of freedom. We can do that by the following specifications: 1. The SO2 content of the liquid feed should be zero (there is no reason why dimethylalanine should contain any SO2). x f = 0
37
ScholarFriend.com
2. The feed gas composition y f can be considered as a disturbance as it would be defined by the operation of upstream units. 3. Similarly, the flow rate of the gas stream may be a considered as a disturbance because the operation of upstream units (furnaces) may vary. 4. A control problem can be defined. One can suggest a feedback control mechanism that would measure the SO2 composition in the gas phase, y 3 , and according to the specified target, y 3, t arg et , manipulate the flow rate of the liquid, L.
That establishes a
relationship through the feedback mechanism as follows: L = f ( y3 )
Hence, we now have one specification, two disturbances, and a feedback mechanism, resulting in four new relationships, thereby reducing the degrees of freedom to zero. II.6. Consider a liquid chromatography for the separation of a mixture containing N components. Assuming that the process is isothermal, and there are no radial concentration gradients, the following governing equations for solute j in the mobile phase and on the adsorbent can be obtained: u0
∂c j ∂z
+ εt
∂c j ∂t
+ (1 − ε )
∂q j ∂t
= εD L
∂ 2c j ∂z 2
∂q j
N q = k a , j c j q m , j 1 − ∑ i − k d , j q j ∂t i =1 q m,i
In this model, c is the concentration of solute in the mobile phase, and q is the adsorbate concentration. Also, u 0 is the superficial velocity, ε and ε t are column void fraction and total void fraction respectively, D L is the axial dispersion coefficient, q m is the maximum adsorbate concentration, and k a , j and k d , j are the adsorption and desorption rate constants for solute j respectively. 1. How would you classify this system of equations? Why? 2. How many variables are there? How many equations (relationships)? What is the number of degrees of freedom? 3. Is this system underdetermined or overdetermined? Why? 4. What additional relationships, if necessary, can you suggest to reduce the degrees of freedom to zero?
38
ScholarFriend.com
Solution: a. This model should be classified as a nonlinear, distributed model. Distributed models provide relationships for state variables as functions of both space and time, whereas a non-distributed (lumped) model will only depend on time. It is also nonlinear as one can see the terms involving multiplication of state variables. b. For N components, we have c j and q j as the state variables. One can also consider the velocity u 0 to be a variable as the throughput for the chromatography column may change. Then, we have the following parameters: k a , j , k d , j , q m, j , ε , ε t , DL
This yields 5N+4 variables. We have 2N equations. The degrees of freedom at this point are:
F = (5 N + 4) − 2 N = 3 N + 4 Can we come up with more relationships? Following assumptions are appropriate: •
Void fractions ( ε , ε t ) are constant.
•
Maximum adsorbate concentration q m, j is a constant.
This yields N + 2 additional relationships. The adsorption and desorption rate constants can vary with time during the chromatographic process. They can also be related to the intrinsic adsorption/desorption rate constants (Lin et al., Ind. & Eng. Chem. Research, 1998). We will assume that they can be expressed as:
k d , j = f (k d , j , q m, j , c0,i ,.....) k a , j = f (k a , j , q m, j , c0,i ,.....) This yields 2N more relationships. Finally, the dispersion coefficient can be expressed as: d p u0 DL
= 0.2 + 0.011 Re 0.48
In summary, we have
F = (3 N + 4) − ( N + 2) − 2 N − 1 = 1 Thus, the degree of freedom is one. a. The system is underdetermined because F = 1 > 0 . b. What we, as process control engineers, would do is to use a controller to affect one variable by manipulating another variable, thus providing one additional relationship and reducing F to 0. For example, it might be advantageous to control the exit 39
ScholarFriend.com
concentration of one of the species by manipulating the velocity (or the flow through) u 0 . The feedback yields one additional relationship between two variables, thus reducing the degrees of freedom to zero. II.7. Consider the distillation process discussed in Chapter 4 (see Figure 4.9). 1. How many variables are there in this model? How many equations (relationships) exist? What is the degree of freedom? 2. Is this system underdetermined or overdetermined? Why? 3. What additional relationships, if necessary, can one suggest to reduce the degrees of freedom to zero? Solution: Variables: mi ; Li ; xi ; yi ;V ; B, D; F ; z F ; R Thus, we have 4N+6 variables and α is a parameter to be specified. Equations: 2N differential equations and 2N algebraic equations →4N Equations Degrees of freedom DOF=6 System is underdetermined since DOF>0 We need to specify some variables and/or define possible control loops to reduce the DOF to zero. Feed conditions F and zF are specified from conditions elsewhere in the plant (disturbances) this reduces the degrees of freedom to 4. We can define the following control loops which will add additional relationships among the variables: •
Distillate flow rate (D) can be adjusted to control the level of the condenser drum
•
Bottom flow rate (B) can be adjusted to control the level of the reboiler
•
Reboiler heat duty can be adjusted to control the amount of vapor in the system
•
Reflux flow rate can be adjusted to control the composition on the top of the column
This will reduce the degrees of freedom (DOF) to zero.
40
ScholarFriend.com
II.8. For the single-stage flash unit introduced earlier in Exercise II.2, derive the transfer function between the overhead mole fraction of the more volatile component and its feed mole fraction. Solution: We assumed constant molar holdup, hence, we have the following component balance:
H
d ( xB ) = Fx F − Bx B − Dx D dt
Using the equilibrium relationship (and also the fact that T and P are constant), we have:
x D = Kx B This results in, B H d ( xD ) = Fx F − x D − Dx D K K dt B = Fx F − + D x D K
In standard form
H d (xD ) B = Fx F − + D x D K dt K B + KD = Fx F − xD K H d (xD ) KF xF − xD = B + KD dt B + KD
τ where τ
d (xD ) + x D = kx F dt
KF H . and k = B + KD B + KD
This is a linear equation (as all flows are constant now). Defining deviation variables,
x D = x D − x D,s x F = x F − x F ,s And taking Laplace transform and rearranging, we have the following transfer function:
τsx D ( s ) + x D ( s ) = kx F ( s ) x D (s) =
k x F (s) τs + 1 41
ScholarFriend.com
x (s) k g (s) = D = x F ( s ) τs + 1 where we have
τ
H KF and k = B + KD B + KD
II.9. A liquid-phase isothermal reaction takes place in a continuous stirred-tank reactor (CSTR). The reaction is first-order,
A→ B
r = kC A
We assume that the vessel has a constant volume, operates isothermally (constant temperature) and is well mixed. For this system: 1. Derive the process transfer function between the outlet (tank) concentration and the feed concentration of component A. 2. Obtain the time evolution of the concentration as function of the feed concentration and the process parameters. Hint: use partial fraction expansion. 3. For the design and operating parameters,
F0 = 0.1 mol/m 3 ,
V = 2 m3 ,
C A0 = 0.1 mol/m 3 , k = 0.050 1/min and ∆C A0 = 1 mol/m 3 , calculate the outlet
concentration when t = V / (F + Vk ) and when t = 40 min . Solution:
From Example 4.5, the state equation for our reactor that provides the time evolution of the reactant composition is given as
dC A F F = C A0 − C A − kC A dt V V Rewriting dC A F F + + k C A = C A0 V dt V F V dC A + CA = C A0 F + Vk F + Vk dt dC A τ + C A = kC A0 dt
42
ScholarFriend.com
Note that k in the last equation is the steady-state gain. Defining deviation variables and taking Laplace transform to both sides of the equation
τsC A ( s) + C A ( s ) = kC A0 ( s ) (τs + +1)C A ( s ) = kC A0 ( s ) C A ( s ) = C A − C As and C A0 = C A0 - C A0s Finally, C A (s) k = g (s) = C A0 ( s ) (τs + +1)
where: τ =
F0 V and k = . F0 + Vα F0 + Vα
To obtain the time domain solution, we use partial fraction technique C A0 ( s ) =
M ∆C A0 = s s
C A (s) =
k M (τs + +1) s
A B 1 = + (τs + 1) s s (τs + 1 s=0
1 =A (1)
s As Bs = + =A (τs + 1) s s (τs + 1
s=-1/τ
A(τs + 1) B(τs + 1) (τs + 1) + =B = (τs + 1) s s (τs + 1
1 = −τ = B − 1/τ
1 A τ B = kM − C A ( s ) = kM + s (τs + 1) s (τs + 1) Inverting (using Table of Laplace functions)
e −t / τ = kM 1 − e −t / τ C A (t ) = kM 1 − τ τ
(
)
Substituting
C A (t ) = C As +
F0 ∆C A0 1 − e −t / τ F0 + Vα
(
)
For the conditions:
F = 0.1m 3 /min V = 2m 3 C A0 = 0.8mol/m 3 α = 0.050 1/min ∆C A0 = 1 mol/m 3 First we need to find the steady-state value for the concentration CAs. 43
ScholarFriend.com
τ
dC A + C A = kC A0 dt
At steady-state C As = kC A0 s =
0.1 0.8 = 0.4 0.1 + 2 0.05
Substituting for this value C A (t ) = 0.4 +
0.1 1 1 − e −t / τ 0.1 + 2 0.05
(
(
C A (t ) = 0.4 + 0.5 1 − e −t / τ
For t=τ
)
)
C A (t ) = 0.4 + 0.5 (1 - 0.3679) = 0.7161
τ=
2 V = = 10 F + Vk 0.1 + 2 0.05
)
(
(
C A (t ) = 0.4 + 0.5 1 − e − t / 10 = 0.4 + 0.5 1 − e −40 / 10
)
= 0.4 + 0.5(1 − 0.0183) = 0.4 + 0.498 = 0.8908
For t=40 min
Figure II.S1 illustrates a plot of the concentration as function of time. 1
0.9
0.8
0.7
0.6
0.5
0.4
0
10
20
30
40
50
60
FIGURE II.S1 Concentration response as function of time.
II.10. Consider the same liquid-phase, isothermal, continuous stirred-tank reactor as in Exercise II.9 where the component balance can also be expressed in terms of the product concentration. 44
ScholarFriend.com
1. Derive the process transfer function between the outlet (tank) concentration for component B (product) and the feed concentration of component A. 2. Obtain the time evolution of the concentration as a function of the feed concentration and the process parameters and compare your results with those of Exercise II.9. 3. Assuming the same design and operating conditions as before what is the value of the concentration when t = V / (F + Vk ) and t = 40 min ? Solution: Balance on CB
dC B F = − C B + kC A dt V dC B F + C B = kC A dt V Fk V dC CA B + CB = V F dt dC τ 1 B + C B = k1 C A dt
where k1 is the new steady-state gain.
τ 1 sC B + C B = k1C A (τ 1 s + 1)C B = k1C A CB k1 = C A (τ 1 s + 1)
τ1 =
V F
k1 =
Fk V
C A (s) k = C A0 ( s ) (τs + +1) Thus,
C B C A (s) k1 k = C A C A0 ( s ) (τs + +1) (τ 1 s + 1) CB kk1 = C A0 ( s ) (τs + +1)(τ 1 s + 1)
45
ScholarFriend.com
C A0 ( s ) =
C B ( s) =
M ∆C A0 = s s
kk1 M (τs + +1)(τ 1 s + 1) s
Inverting using the Laplace Table, τ1 τ2 e −t / τ 1 − e −t / τ 2 C B (t ) = kk1 M 1 + τ 2 −τ1 τ 2 −τ1 1 = kk1 M 1 + τ 1e −t / τ1 − τ 2 e −t / τ 2 τ 2 −τ1
(
C B (t ) =
)
1 F F τ 1e −t / τ1 − τ 2 e −t / τ 2 ∆C A0 1 + ( F + Vk ) Vk τ 2 −τ1
(
)
F = 0.1m 3 /min V = 2m 3 C A0 = 0.8mol/m 3 α = 0.050 1/min ∆C A0 = 1 mol/m 3
2 V = = 10 F + Vk 0.1 + 2 0.05 2 V = 20 τ1 = = F 0.1
τ=
C B (t ) =
(
0.1 0.1 1 10e −t / 10 − 20e −t / 20 1 + (0.1 + 2 0.05) (2 0.05) 20 − 10
)
(
(
= 0.5 1 + 0.1 10e −t / 10 − 20e −t / 20
))
Steady-state value
C Bs = kC As CAs=0.4 then C Bs =
0.1 F C As = 0.4 = 0.4 2 0.05 Vk
For t=τ
(
(
))
(
(
))
C B (t ) = 0.4 + 0.5 1 + 0.1 10e −10 / 10 − 20e −10 / 20 = 0.4774 For t=40 C B (t ) = 0.4 + 0.5 1 + 0.1 10e −40 / 10 − 20e −40 / 20 = 0.7738
46
ScholarFriend.com
1
CA
0.9
0.8 CB 0.7
0.6
0.5
0.4
0
20
40
60
80
100
120
FIGURE II.S2 Plot of the concentrations as a function of time.
II.11. Consider the same liquid-phase isothermal continuous stirred-tank reactor as in Exercise II.9 but now the reaction is second-order,
A→ B
r = kC A2
1. Obtain a linear state-space model for this system. 2. Derive the process transfer function between the outlet (tank) concentration and the feed concentration of component A. 3. Compare the characteristic parameters with those of Exercise II.9 and discuss. Solution: From Example 4.5, the state equation for our reactor that provides the time evolution of the reactant composition is given as
dC A F F = C A0 − C A − kC A2 dt V V We have to linearize, 2 ) + (2VkC As )(C A − C As ) VkC A2 = (VkC As
Substituting
V
dC A 2 = F (C A0 − C A ) − (VkC As ) + (2VkC As )(C A − C As ) dt
At steady-state, 47
ScholarFriend.com
2 0 = F (C A0 s − C As ) − VkC As
Subtracting
V
dC A = F [(C A0 − C A ) − (C A0 s − C As )] + (2VkC As )(C A − C As ) dt V V
dC A = F (C A0 − C A ) + (2VkC As )C A dt
[
]
dC A = FC A0 − FC A + (2VkC As )C A dt = FC A0 − [F + (2VkC As )]C A
dC A V F + CA = C A0 F + 2VkC As dt F + 2VkC As
dC A + C A = kC A0 dt
τ where:
τ=
V F and k = F + 2VkC As F + 2VkC As
and the definition of the steady-state gain should be clear. Taking Laplace transform of both sides of the equation
τsC A ( s) + C A ( s) = kC A0 ( s) (τs + +1)C A ( s ) = kC A0 ( s ) Finally,
C A (s) k = g (s) = C A0 ( s ) (τs + +1) To obtain the time domain solution, we use partial fraction technique C A0 ( s ) =
M ∆C A0 = s s
C A (s) =
k M (τs + +1) s
A 1 B = + (τs + 1) s s (τs + 1 s=0
s As Bs = + =A (τs + 1) s s (τs + 1
1 =A (1)
48
ScholarFriend.com
s=-1/
(τs + 1) A(τs + 1) B(τs + 1) = + =B (τs + 1) s (τs + 1 s
1 = −τ = B − 1/τ
A 1 τ B = kM − C A ( s ) = kM + s (τs + 1) s (τs + 1) Inverting (using Table of Laplace functions),
e −t / τ = kM 1 − e −t / τ C A (t ) = kM 1 − τ τ
(
)
Substituting
C A (t ) = C As +
F ∆C A0 1 − e −t / τ F + 2VkC As
(
)
For the conditions:
F = 0.1m 3 /min V = 2m 3 C A0 = 0.8mol/m 3 α = 0.050 1/min ∆C A0 = 1 mol/m 3 First we need to find the steady-state value for the concentration CAs. At steady-state, F F C A0 − C A − kC A2 V V 2 0 = FC A0 s − FC As − kVC As 0=
2 0 = 0.08 − 0.1C As − 0.1C As
Roots are -1.5247 and 0.5247, Thus CAs=0.5247 since the other root is negative. Substituting this value C A (t ) = 0.5247 +
0.1 1 − e −t / τ 0.1 + 2 2 0.05 0.5247
(
(
C A (t ) = 0.5247 + 0.4879 1 − e −t / τ
)
)
II.12. Consider the same liquid-phase isothermal, continuous, stirred-tank reactor as in Exercise II.11 and now allow for the possibility that the vessel volume may also change. The reaction is still second-order and the outlet flow rate depends linearly on the liquid volume in the tank. 1. What are the state variable(s), input variable(s) and output variable(s)? Obtain a linear state-space model for this system.
49
ScholarFriend.com
2. Derive the process transfer function between the outlet (tank) concentration of component A and the feed flow rate. 3. What are the poles and zeros of this transfer function? Solution: The model equations are given as:
dC F0 = (C 0 − C ) − kC 2 dt V dV = F0 − F = F0 − βV dt Here C is the tank concentration, V is the tank volume, F is the flow rate, and the subscript 0 refers to inlet conditions. k and β are constants. The state variables are composition C and volume V. Input variables would be inlet concentration and inlet flow rate. The output variables would depend on control objectives. We would typically be interested in maintaining a constant yield in the reactor (hence constant outlet composition) and constant level (or volume) to ensure constant residence time. Outputs can be the outlet composition and the volume (the state variables). The first equation (component balance) can be classified as nonlinear, hence requiring the application of Taylor expansion. The second equation (total mass balance) is already in linear form.
dC F0 (C 0 − C ) − kC 2 = f1 ( F0 , C 0 , V , C ) = dt V dV = F0 − F = F0 − βV = f 2 ( F0 , C 0 , V , C ) dt The Taylor expansion of the first equation yields: ∂f ∂f dC ≅ f1 ( F0, s , C 0, s , Vs , C s ) + 1 (C 0 − C 0, s ) + 1 ( F0 − F0, s ) ∂C 0 F ,C ,V ,C ∂Fin F ,C ,V ,C dt 0,s
0,s
s
0,s
s
∂f1 ∂f (C − C s ) + 1 (V − Vs ) ∂C F0 , s ,C0 , s ,Vs ,Cs ∂V F0 , s ,C0 , s ,Vs ,Cs
The derivatives can be calculated as follows:
F0, s ∂f 1 = =a ∂C 0 F ,C ,V ,C Vs 0,s
0,s
s
s
50
ScholarFriend.com
0,s
s
s
C 0, s − C s ∂f 1 = =b ∂F0 F ,C ,V ,C Vs 0,s
0,s
s
s
F ∂f1 = − 0, s − 2kCs = c ∂C F0 ,s ,C 0 ,s ,Vs ,C s Vs F (C − Cs ) ∂f1 = − 0, s 0, s2 =d Vs ∂V F0 ,s ,C 0 ,s ,Vs ,C s The first equation becomes dC ≅ f1 ( F0, s , C0, s ,Vs , Cs ) + a (C0 − C0, s ) + b( F0 − F0, s ) + c(C − Cs ) + d (V − Vs ) dt
By
defining
deviation
variables
like
C = C − Cs ,
and
recognizing
that
0 = f1 ( F0, s , C0, s ,Vs , Cs ) , we have,
dC = aC0 + bF0 + cC + dV dt The second equation can also be manipulated by subtracting the steady-state equation, dV = F0 − β V − (F0, s − β Vs ) = (F0 − F0, s ) − β (V − Vs ) dt
And by defining deviation variables,
dV = F0 − βV dt To define the state-space model, define x1 = C , x2 = V , u1 = C0 , u2 = F0 , y1 = x1 , y2 = x2 . This leads to x1 c d x1 a b u1 x = 0 − β x + 0 1 u 2 2 2 y 1 0 x1 y = 1 = y 2 0 1 x 2
Taking the Laplace transform of both linear equations, we get, sC ( s ) = aC0 ( s ) + bF0 ( s ) + cC ( s ) + dV ( s ) sV ( s ) = F0 ( s ) − βV ( s )
We need to find the transfer function,
51
ScholarFriend.com
C (s) = g (s) F0 ( s ) From the second equation,
V (s) =
1 F0 ( s ) s+β
Substitute in the first equation,
sC ( s) = aC0 ( s) + bF0 ( s ) + cC ( s ) + d
1 F0 ( s ) s+β
Collecting terms,
C ( s) =
1 a b d C0 ( s ) + F0 ( s ) + F0 ( s ) s−c s−c s−c s+β
C (s) =
a d 1 C0 ( s ) + b+ F0 ( s ) s−c s−c s + β
g ( s) =
1 d bs + bβ + d b+ = s−c s + β ( s − c )( s + β )
Hence,
The poles and zeros come from the roots of the following polynomials:
bs + bβ + d = 0 and
( s − c)( s + β ) = 0
II.13. A bioreactor is represented by the following model that uses the Monod kinetics:
dx1 = ( µ − D) x1 dt dx2 = (4 − x2 ) D − 2.5µx1 dt Here x1 is the biomass concentration, x2 is the substrate concentration, and D is the dilution rate. The specific growth rate µ depends on the substrate concentration as follows:
µ=
0.53 x2 0.12 + x2
52
ScholarFriend.com
In this system, we are interested in controlling the biomass concentration using the dilution rate, at the steady-state defined by, x1s = 1.4523, x2 s = 0.3692, Ds = 0.4 . 1. Obtain a linear state-space model for this system. 2. Derive the process transfer function for this system. 3. What is the order of this process? Solution: We start with the following expansion, ∂f dx1 = ( µ − D) x1 = f1 ( x1 , x2 , D) ≅ f1 ( x1s , x2 s , Ds ) + 1 ( x1 − x1s ) + ∂x1 ss dt +
∂f1 ∂f ( x 2 − x 2 s ) + + 1 ( D − Ds ) ∂x2 ss ∂D ss
∂f dx2 = (4 − x2 ) D − 2.5µx1 = f 2 ( x1 , x2 , D) ≅ f 2 ( x1s , x2 s , Ds ) + 2 ( x1 − x1s ) + ∂x1 ss dt +
∂f ∂f 2 ( x 2 − x 2 s ) + + 2 ( D − Ds ) ∂D ss ∂x2 ss
The derivative terms can be calculated as follows,
a11 =
0.53 x2 ∂f1 = − D = 0 ∂x1 ss 0.12 + x2 ss
a12 =
0.53 x1 (0.12 + x2 ) − 0.53 x1 x2 ∂f1 = = 0.3866 ∂x2 ss (0.12 + x2 ) 2 ss
b1 =
∂f1 = [− x1 ]ss = −1.4523 ∂D ss
a21 =
2.5(0.53 x2 ) ∂f 2 = − = −1 ∂x1 ss 0.12 + x2 ss
a22 =
2.5 x1 (0.53(0.12 + x2 ) − 0.53 x2 ) ∂f 2 = − 0.4 + = −1.3649 ∂x2 ss (0.12 + x2 ) 2 ss
b2 =
∂f 2 = [4 − x2 ]ss = 3.6308 ∂D ss
This yields the following state space form of the model, after defining the deviation variables: 53
ScholarFriend.com
x1 = x1 − x1s , x2 = x2 − x2 s , u = D − Ds
x 0 0.3866 x1 − 1.4523 x = 1 = + u = Ax + bu x 2 − 1 − 1.36 x2 3.6308 x y = [1 0] 1 = cx x2 To obtain the transfer function model, we need to take Laplace transform of the linear model, sx1 ( s ) = a11 x1 ( s ) + a12 x2 ( s ) + b1u ( s ) = a12 x2 ( s ) + b1u ( s ) sx2 ( s ) = a21 x1 ( s ) + a22 x2 ( s ) + b2u ( s ) Solve the second equation for x2 ( s ) and replace in the second,
x2 ( s ) =
a21 x1 ( s ) b2u ( s ) + s − a22 s − a22
sx1 ( s ) =
a12 a21 x1 ( s ) a12b2u ( s ) + + b1u ( s ) s − a22 s − a22
Now, we have to collect the terms for the transfer function, and recognize that
y ( s ) = x1 ( s ) , b s + (b2 a12 − b1a22 ) y(s) = g (s) = 1 2 u (s) s − a22 s − a12 a21 This is a second-order system. II.14. A process model is given:
d 2x dx + a + x =1 2 dt dt with the initial conditions, x(0) = x' (0) = 0 . 1. Using Laplace transformation, find the solutions of this model when a = 1 and a = 3. 2. Plot the solution x(t ) on one graph and discuss the effect of the parameter a on the solution. Solution: Taking the Laplace transform of this expression yields 54
ScholarFriend.com
s 2 X ( s ) + asX ( s ) + X ( s ) = X ( s )( s 2 + as + 1) =
1 s
1 s
And,
X (s) =
1 s ( s + as + 1) 2
When a = 1 , using the quadratic formula for the second order polynomial, we have the complex roots,
1 3 s=− ± j 2 2 Thus, the Partial Fraction Expansion will look like: X ( s) =
1 A B C = + + 1 3 1 3 s 1 3 1 3 s + + s + − s s + + j s + − j j j 2 2 2 2 2 2 2 2
Multiplying both sides by s and evaluating the expression at s = 0 , A=
1 =1 1 3 1 3 0 + + j 0 + − j 2 2 2 2
1 3 j , and evaluating the expression at this root, we Multiplying both sides by s + − 2 2 have,
1 3 B=− − j 2 6 And similarly,
1 3 C=− + j 2 6 Thus, we have,
55
ScholarFriend.com
1 3 1 3 3 1 j j j − − + − 1 1 2 6 2 6 6 2 X (s) = + + = + − + .... s 1 3 1 3 s 1 3 1 3 s + + s + + j s + − j j s + + j 2 2 2 2 2 2 2 2 −
From the Laplace Transform tables, we observe that,
p = pe − r L−1 s r + Thus, we have 1 1 3 − − + j 1 2 2 −1 2 L = −2e s + 1 + 3 j 2 2
We also note the identity, e (C1 +C2 j )t = e C1t (cos C 2 t + j sin C 2 t )
By completing the inverse transform, this results in,
3 3 3 x(t ) = 1 + 2e −t / 2 − 0.5 cos t− t sin 2 6 2 The case with a = 3 can be done in a similar manner. The result will be: x(t ) = 1 + 0.17e −2.62t − 1.17e −0.38t
Figure II.S3 shows the behavior of x(t) as a function of time for both cases. Note the oscillatory response when a = 1 (blue line).
56
ScholarFriend.com
1.4 1.2 1 0.8 0.6 0.4 0.2 0 0
2
4
6
8
10
12
14
16
18
20
FIGURE II.S3 Plot of x(t) for the cases in Exercise II.14.
II.15. For the process discussed earlier in Exercises I.11 and II.3, where an oil stream is heated as it passes through two well-mixed tanks in series and assuming constant physical properties, develop the transfer functions between the second tank temperature (output), T2 , and the heat input (manipulated variable), Q and the flow rate (disturbance), F . T0 can be assumed as constant (what if it is not?). Solution: The equations are ‘slightly’ nonlinear due to the multiplication between the flow rate and the temperatures. Rearranging and taking the Taylor series expansion,
Q dT1 F = f1 ( F , T1 , Q) = (T0 − T1 ) + dt V1 ρc pV1 F Q ≈ (T0 − T1 ) + + a ( F − Fs ) + a2 (T1 − T1s ) + a3 (Q − Qs ) ρc pV1 ss 1 V1 dT2 F = (T1 − T2 ) = f 2 ( F , T1 , T2 ) dt V2 F ≈ (T1 − T2 ) + b1 ( F − Fs ) + b2 (T1 − T1s ) + b3 (T2 − T2 s ) V2 ss We can see that the constant coefficients are given as: a1 =
∂f1 (T − T ) ∂f − Fs ∂f 1 = 0 1 s ; a2 = 1 = ; a3 = 1 = ∂F ss V1 ∂T1 ss V1 ∂Q ss ρc pV1
b1 =
∂f 2 (T − T2 s ) ∂f F ∂f − Fs = 1s ; b2 = 2 = s ; b3 = 2 = ∂F ss V2 ∂T1 ss V2 ∂T2 ss V2 57
ScholarFriend.com
By subtracting the steady-state equation and defining deviation variables (like F = F − Fs ), we obtain the following equations: dT1 = a1F + a2T1 + a3Q dt dT2 = b1F + b2T1 + b3T2 dt Taking the Laplace transformation,
sT1 ( s ) = a1F ( s ) + a2T1 ( s ) + a3Q ( s ) sT2 ( s ) = b1F ( s ) + b2T1 ( s ) + b3T2 ( s ) and rearranging,
T1 ( s ) =
a1 a F ( s) + 3 Q ( s) s − a2 s − a2
T2 ( s ) =
b b1 F ( s ) + 2 T1 ( s ) s − b3 s − b3
Replacing the first equation into the second equation and rearranging again,
T2 ( s ) =
b1 b a a F ( s) + 2 1 F ( s) + 3 Q ( s) s − b3 s − a2 s − b3 s − a2
T2 ( s ) =
b1 a1 b2 a3 Q ( s) 1 + F ( s) + s − b3 s − a2 s − b3 s − a2
The transfer functions can now be identified, T2 ( s ) = gTF F ( s ) + gTQQ ( s ) b s − a2b1 + a1b1 a3b2 T2 ( s ) = 1 F (s) + Q (s) (s − b3 )(s − a2 ) (s − b3 )(s − a2 )
II.16. A continuous pre-fermenter shown in Figure II.5 is used as the first stage of cheese manufacture2.
58
ScholarFriend.com
FIGURE II.5 Continuous pre-fermenter.
The pre-fermenter is supplied by skim milk (substrate) and the cheese starter (cells) and operated at 300C. The pH of the acidified skim milk is measured using a pH sensor. In Figure II.6, X f , S f and Pf denote the cell concentration, the lactose concentration and the lactic acid concentration in the feed stream, respectively. Since the flow rate of the cheese starter is very small compared to the skim milk flow rate, the lactose concentration in the feed is neglected. This process is modeled using the following mass balance equations:
dX = − F3 X + µ max XV dt dS V = F1S f − F3 S − σ max XV dt dP V = − F3 P + π max XV dt V
The following definitions are also given:
µ max = σ max
µ 0 [H + ]
[ ] [ ] σ [H ] = K + [H ] + [H ] / K π [H ] = K + [H ] + [H ] / K 0
H3
π max
2
K H1 + H + + H + / K H 2 + 2
+
0
H5
+
+
H4
+
+ 2
H6
Here, µ max , σ max , π max are the maximum specific growth rate, the maximum specific lactose consumption rate and the maximum specific production rate, respectively. The
59
ScholarFriend.com
dependency between the pH and the lactic acid concentration is expressed through the following correlation:
[ ]
− log10 H + = pH = 6.701 − 0.9564 P + 0.2050 P 2 − 0.02134 P 3
The dilution rate is defined as F3 / V , and F2 / F3 is the seed feed rate. Operating and design parameters are given in Table II.2. 1. What are the steady-state operating conditions for this process? How many of them correspond to non-trivial operation? (Hint: The steady-state can be considered as dependent on pH) 2. Linearize the model equations around a steady-state point determined above. 3. Comment on the stability of the system around this steady-state. Solution: Recognizing that the inlet flow rate needs to equal the outlet flow rate to maintain constant volume, we have, F1 = F3 The dilution rate is defined as: D=
F3 V
This yields the following rephrased model equations:
dX = ( µ max − D) X dt dS = D( S f − S ) − σ max X dt dP = − DP + π max X dt The steady condition can be obtained from this equation by setting the differential terms to zero. In this case, the steady-state conditions can be gleaned from a visual inspection of these equations. The first steady-state would be the trivial (wash-out) solution with: X s = 0; S s = S f ; Ps = 0
The second steady-state condition can be obtained by observing that the first equation would vanish when µ max = D . The steady-state condition then is dependent on the value of D and what the fermenter pH is. We can set up a MATLAB program that would calculate the steady-state conditions as a function of pH. In fact, we can develop a plot of D vs pH. For a given value of pH, we 60
ScholarFriend.com
can obtain the steady-state values of the variables X, S and P along with D. Here is the program that calculates the steady-state at a pH of 6. %Steady-states for the prefermentor - Exercise II.16 %initial guesses x0(1)=0.3; %this is X x0(2)=45; %this is S x0(3)=1.5; %this is P x0(4)=0.36; %this is D %Calculation of steady-state x = fsolve(@prefermenterfun,x0,optimset('Display','iter'));
function F = prefermenterfun(x) H=1e-6; Sf=50.3; Xf=5.4; Pf=5.9; mu0=0.51; pi0=3.35; sigma0=6.02; kh1=9.0e-08; kh2=6.85e-06; kh3=1.5e-07; kh4=3.91e-06; kh5=4.88e-08; kh6=4.2e-06; mu=mu0*H/(kh1+H+H^2/kh2); sigma=sigma0*H/(kh3+H+H^2/kh4); pi=pi0*H/(kh5+H+H^2/kh6); F1=(mu-x(4))*x(1); F2=x(4)*(Sf-x(2))-sigma*x(1); F3=-x(4)*x(3)+pi*x(1); F4=6.701-0.9564*x(3)+0.2050*x(3)^2-0.02134*x(3)^3+log10(H); F=[F1 F2 F3 F4]; 61
ScholarFriend.com
return
This generates Xs=0.1404; Ss=48.8432; Ps=0.8856
and Ds=0.4126
One can do this calculation for a range of pH values from 5.5 to 6.7. This yields the plot in Figure II.S4. It shows that for a large range of pH values there are two values of the dilution rate thus creating multiple steady-states. Thus, the conclusion would be that there are a maximum of three steady-states (including the wash-out). 0.43 0.42 0.41 0.4
D
0.39 0.38 0.37 0.36 0.35 0.34 5.4
5.6
5.8
6
6.2 pH
6.4
6.6
6.8
7
FIGURE II.S4 Plot of D vs pH.
The linearization can be performed around one of these states (select a pH value) and would result in the following equation:
X µ max − D 0 µ max X X −D − σ max X S S = − σ max P π max 0 − D + π max X P Here the state matrix is evaluated at the steady-state values and the bar notation indicates differentials with respect to P (through H+). Of course, since we can ignore the wash-out, and recognizing D = µ max , the equation can be rephrased as:
X 0 S = − σ max P π max
µ max X X −D − σ max X S 0 − D + π max X P 0
62
ScholarFriend.com
The stability can be inferred from the eigenvalues of the state matrix. We can write the characteristic equation as, −λ det A − λI = − σ max π max
µ max X −D−λ − σ max X 0 − D + π max X − λ 0
See the paper by Funahashi and Nakamura (2007) for further discussion. II.17. A process is modeled by the following equations: 2
dx1 = −2 x1 + exp(− x1 ) − 3u1 x 2 dt dx 2 2 x1 = − x2 + + 4u 2 dt 1 + x2
The control objectives dictate the following output equations: y1 = x1 y 2 = x2
1. Find the four transfer functions relating the outputs (y1, y2) to the inputs (u1, u2). 2. Solve the equations with the conditions, u1(t) = 1, u2(t) = 1, y1(0) = 0, and y2(0) = 0. 3. Plot the output responses. What is the steady-state reached by the outputs? Solution: We start by linearizing the nonlinear equations, recognizing that we have two state variables and two inputs in the state equations. The first equation yields:
dx1 = f1 ( x1 , x2 , u1 , u 2 ) dt ≅ f1 (x1s , x2 s , u1s , u 2 s ) +
∂f ∂f1 ( x2 − x2 s ) + ( x1 − x1s ) + 1 ∂x2 x , x ,u ,u ∂x1 x , x ,u ,u 1s
+
2s
2s
1s
1s
2s
1s
2s
∂f ∂f1 (u 2 − u 2 s ) (u1 − u1s ) + 1 ∂u 2 x , x ,u ,u ∂u1 x , x ,u ,u 1s
2s
1s
2s
1s
2s
1s
2s
This can be put into the form, dx1 = a11 ( x1 − x1s ) + a12 ( x 2 − x 2 s ) + b11 (u1 − u1s ) + b12 (u 2 − u 2 s ) dt
63
ScholarFriend.com
Also recognizing the fact that f1 ( x1s , x2 s , u1s , u2 s ) = 0 from the steady-state condition. Note that the coefficients are given as follows: a11 =
∂f1 = [− 1 − 0.5 exp( x1s )] ∂x1 s.s.
a12 =
∂f1 = [− 1.5u1s ] ∂x2 s.s.
b11 =
∂f1 = [− 1.5 x2 s ] ∂u1 s.s.
b12 =
∂f1 =0 ∂u 2 s.s.
One can derive the coefficients of the second equation follows: a 21 =
2 ∂f 2 = ∂x1 s. s. 1 + x2 s
a 22 =
( 2 x1s ) − 2(1 + x2 s ) ∂f 2 = − 1 + ∂x2 s. s. (1 + x2 s ) 2
b21 =
∂f 2 =0 ∂u1 s. s.
b22 =
∂f 2 =4 ∂u2 s. s.
dx2 = f 2 ( x1 , x2 , u1 , u2 ) also as dt
We define the deviation variables: x1 = x1 − x1s ; x2 = x2 − x2 s ; u1 = u1 − u1s ; u2 = u2 − u2 s . This results in the following linear equations: dx1 = a11 x1 + a12 x2 + b11u1 dt dx 2 = a 21 x1 + a 22 x2 + b22 u2 dt
If we take the Laplace transform of both equations, we have: sx1 ( s ) = a11 x1 ( s ) + a12 x2 ( s ) + b11u1 ( s ) sx2 ( s ) = a 21 x1 ( s ) + a 22 x2 ( s ) + b22 u2 ( s ) 64
ScholarFriend.com
Note that y1 ( s ) = x1 ( s ); y 2 ( s ) = x2 ( s ) . Rearranging, and making the substitutions, a12 b y 2 ( s ) + 11 u1 ( s ) s − a11 s − a11 a 21 b22 y2 ( s) = y1 ( s ) + u2 ( s ) s − a 22 s − a 22
y1 ( s ) =
and making the substitutions, y1 ( s ) =
a12 a 21 b b y1 ( s ) + 22 u2 ( s ) + 11 u1 ( s ) s − a11 s − a 22 s − a 22 s − a11
y2 ( s) =
a 21 a12 b b y 2 ( s ) + 11 u1 ( s ) + 22 u2 ( s ) s − a 22 s − a11 s − a11 s − a 22
Collecting the terms, we end up with the following transfer functions, y1 ( s ) b11 ( s − a 22 ) = u1 ( s ) ( s − a11 )( s − a 22 ) − a12 a 21 y1 ( s ) b22 a12 = u2 ( s ) ( s − a11 )( s − a 22 ) − a12 a 21 y2 ( s) b11a 21 = u1 ( s ) ( s − a11 )( s − a 22 ) − a12 a 21 y2 ( s) b22 ( s − a11 ) = u2 ( s ) ( s − a11 )( s − a 22 ) − a12 a 21
Here are the two files needed to solve the problem in MATLAB. _______________ %File odehmwk.m %solution of a set of ODEs clear all dt=0.1; t=[0:dt:10]; x0=[0;0]; [T Y] = ode45('odeeq',[0 10], x0); plot (T,Y);
________________ %File odeeq.m 65
ScholarFriend.com
%ODEs function
dy=odeeq(t,y)
u1=1; u2=1; dy=[0.5*(-2*y(1)-3*u1*y(2)+exp(-y(1))) -y(2)+2*y(1)/(1+y(2))+4*u2]; return
____________
The plot obtained is given in Figure II.S5 (x1 is becoming negative and x2 is increasing): 4
3
2
1
0
-1
-2
0
2
4
6
8
10
FIGURE II.S5 Time response for x1 and x2.
The steady state values can be obtained by simply typing the following on the command line (Last entries of the matrix Y): » whos Name
Size
Bytes Class
T
89x1
712 double array
Y
89x2
1424 double array
dt
1x1
8 double array
t
1x101
808 double array
x0
2x1
16 double array
Grand total is 371 elements using 2968 bytes » Y(89,1) 66
ScholarFriend.com
ans = -1.7727 » Y(89,2) ans = 3.1444 The Simulink block diagram is shown in Figure II.S6.
-1
1
Gain
s Integrator
eu
Scope -1.773
0.5
Math Function
1.5
Gain1 Product
Display
Gain2
1 U1 1
4
1
U2
Gain3
s Integrator1
Scope1 3.144
1
2
u Math Function1
Product1
Display1 Constant
Gain4
1
FIGURE II.S6 Schematic of the model implemented in Simulink.
II.18. Consider the state-space model
x = Ax + Bu ; y = Cx with 0 − 2 1 0 A = − 3 0 3 ; B = 3; C = [1 0 0] − 1 0 − 3 1
Determine the eigenvalues of the state matrix. Also, find the transfer function model for this system. Report the poles and zeros of this transfer function. Obtain the response of this 67
ScholarFriend.com
model to a step change in the input. Solution: We need to define the matrix A first and then issue the eig command in MATLAB: » A=[-2 1 0;-3 0 3;-1 0 -3] A= -2
1
0
-3
0
3
-1
0
-3
» eig(A) ans = -0.8054 + 1.7006i -0.8054 - 1.7006i -3.3892 To find the transfer function model we can use the following sequence (after defining B and C also): » [num,den]=ss2tf(A,B,C,0); » g=tf(num,den) Transfer function: 3 s + 12 g(s) =
---------------------s^3 + 5 s^2 + 9 s + 12
The poles and zeros can be obtained in various ways. Here is one: » pole(g) ans = -3.3892 -0.8054 + 1.7006i -0.8054 - 1.7006i » zero(g) ans = -4.0000 68
ScholarFriend.com
Note that the eigenvalues and the poles are the same. Here is the command for obtaining the step response and the resulting output response plot in Figure II.S7: » step(g) Step Response From: U(1)
1.4
1.2
To: Y(1)
Amplitude
1
0.8
0.6
0.4
0.2
0
0
1.4
2.8
4.2
5.6
7
Time (sec.)
FIGURE II.S7 Step response of the output variable.
II.19. A state-space model is given as
0 x1 7 x1 − 2.405 x = 0.833 − 2.238 x + − 1.117 u 2 2 x y = [0 1] 1 x2 Find the transfer function g (s ) where y ( s ) = g ( s )u ( s ) . Determine the poles and zeros. Solution: There are various methods to obtain the transfer function for this system. By taking Laplace transform of each equation, we obtain: sx1 ( s ) = −2.405 x1 ( s ) + 7u ( s ) sx 2 ( s ) = 0.833 x1 ( s ) − 2.238 x 2 ( s ) − 1.117u ( s ) The output equation yields,
y(s) = x2 (s) By rearranging the state equations and solving for x 2 ( s ) ,
69
ScholarFriend.com
x2 (s) =
1 − 1.117 s + 3.145 s + 2.405 ( s + 2.238)
Thus,
y(s) =
− 1.117 s + 3.145 u (s) ( s + 2.238)( s + 2.405)
We have the following poles and zeros: z1 = +2.8156 p1 = −2.238 p 2 = −2.405 We can also obtain the transfer function thorough the following expression (that can be easily derived using the Laplace transform rules):
(
)
y(s) = g ( s ) = C sI − A −1 B u (s) where I is the identity matrix. Another way is to use MATLAB with the following commands: » A=[-2.405 0;0.833 -2.238]; » B=[7;-1.117]; » C=[0 1]; » D=0; » [num,den]=ss2tf(A,B,C,D); » g=tf(num,den) Transfer function: -1.117 s + 3.145 g(s) = --------------------s^2 + 4.643 s + 5.382 II.20. A chemical reactor has been operating at steady-state for a long time with the feed flow rate kept constant at 3.5 m3/min. To handle a projected increase in upstream capacity, the operator decides to increase the feed flow rate suddenly by 10%, resulting in a change in the outlet stream composition recorded in Table II.2. Using the process reaction curve method, obtain an empirical transfer function model for this process. 70
ScholarFriend.com
Table II.2: Composition data in response to a change in flow rate. Time (min)
Change (gmol/m3)
Time (min)
Change (gmol/m3)
0
0
1.6
0.35
0.2
0
1.8
0.5
0.4
0
2
0.55
0.6
0.02
3
0.7
0.8
0.1
4
0.9
1
0.15
5
0.95
1.2
0.2
6
1
1.4
0.3
8
1
Solution: The transfer function model that will be used in this method is given by: g (s) =
k −t D s e τs + 1
The parameter K can be determined from the steady-state information: k=
1 ∆y = 2.86 = ∆u 0.35
One can use either the graphical method or the method that uses the output variable solution. If you are using the equation-based method, you have to recognize the fact that the Example 6.1 is for a specific input (unit step change) only, and in this problem the change is 0.35 m3/min. The latter gives:
t − tD 1 t kM − y ln =− t+ D =− τ τ τ kM Select two points on the graph:
t = 1.4; y = 0.3 t = 3; y = 0.7 We have the following equations:
71
ScholarFriend.com
− 0.357 = −
1.4
t + D
τ τ 3 t − 1.2 = − + D τ τ They result in:
τ = 1.9 min; t D = 0.38 min So the transfer function is: g (s) =
2.86 −0.38 s e 1.9 s + 1
Graphically, one can show the result in Figure II.S8. 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
0
1
2
3
4
5
6
7
8
FIGURE II.S8 Plot of the composition data as in Table II.2.
Note that this method yields, t D = 0.5 min;τ = 3.2 − 0.5 = 2.7 min . The discrepancy results from the uncertainties built into each method. II.21. An experiment is performed on a shell-and-tube heat exchanger that heats a process stream with medium-pressure steam. In the experiment, the steam valve is opened an additional 5% in a stepwise manner. The resulting temperature response of the process outlet stream is given in Figure II.6. Determine the process model parameters using the reaction curve method, and estimate the inaccuracies due to the data and calculation methods as discussed in Chapter 6.
72
ScholarFriend.com
FIGURE II.6 Temperature response of the outlet process stream.
Solution: Using the Process Reaction Curve Method, we first identify the constant k by considering the ultimate value of the temperature and the magnitude of the input change,
k=
100 C = 2 0C / % 5%
Then, we draw an estimated tangent to the inflection point of the response and two points on the graph are noted as shown below (Figure II.S9).
FIGURE II.S9 Illustration of the graphical approach. 73
ScholarFriend.com
This yields the following estimates of the other parameters:
τ + tD = 6 τ =5 tD = 1 The transfer function representing the response of the process stream temperature with respect to the steam flow rate, then, looks like,
g (s) =
2e − s 5s + 1
II.22. For the vertical tube double-pipe heat exchanger in Exercise I.12, a set of open-loop experiments are carried out to study the system dynamics. The data can be downloaded from the book web page (see Preface) and consists of: •
Outlet temperature of the vertical tube heat exchanger (stream 2) under variations of the flow rate of stream 1 (manipulated variable).
•
Outlet temperature of the vertical tube heat exchanger (stream 2) under variations of the flow rate of stream 2 (disturbance).
•
Outlet temperature of the vertical tube heat exchanger (stream 2) under variations of the feed temperature (stream 2) (disturbance).
The data are normalized as follows: •
Flow rate % = (actual flow rate - 0)/7800*100 (7800 is the span range on the DCS)
•
Temperature % = (actual temperature-32)/(212-32)*100
For this system: 1. Obtain the process transfer functions between the inputs (manipulated variable, disturbance) and the outlet temperature. 2. Try alternative model structures and discuss the results. Solution: Changes in flow rate F602 Using the complete data file for all changes in the input variable we obtain the following fit (Figure II.S10)
74
ScholarFriend.com
Process Variable
56.5 56.0 55.5 55.0
Controller Output
54.5 56 54 52 50 48 46 44 0
5
10
15
20 Time, Sec
25
30
35
40
Figure II.S10 Model fit to the data.
The corresponding transfer function is given by (using nonlinear regression)
g p (s) =
T 602( s ) 0.138e −0.1s = F 602( s ) (1.99 s + 1)
However, if we use only the first portion of the data, corresponding to the first step test up to time 20 seconds), we obtain a fit as illustrated in Figure II.S11.
FIGURE II.S11 Model fit to the data.
The corresponding transfer function is given by
g p (s) =
T 602( s ) 0.173e −0.1s = F 602( s ) (3.01s + 1)
Using the middle portion of the data we have (Figure II.S12)
75
ScholarFriend.com
FIGURE II.S12 Model fit to the data.
g p (s) =
T 602( s ) 0.14e −0.213s = F 602( s ) (1.25s + 1)
Similar studies can be performed using the other two portions of the data to analyze the variability of the process dynamic against positive and negative changes as well as the magnitude of the step. The differences are due to the nonlinear characteristics of the process. We can also appreciate that the transfer function obtained using the whole data set provides some kind of average for the systems dynamics when dealing with positive and negative changes and should be used for control design purposes. Using as a test a second order plus delay model (SOPTD) we obtain (Figure II.S13)
FIGURE II.S13 Model fit to the data.
g p (s) =
T 602( s ) 0.135e −0.1s = F 602( s ) (2.009 s + 1)(0.0083s + 1)
76
ScholarFriend.com
However, the addition of complexity into the model does not add accuracy into the prediction thus a FOPTD model will be used for further processing. Also notice that tone of the time constants is very small compared to the other meaning that a first order plus delay model is a good choice for the process. Changes in flow rate F601 Assuming a FOPTD model we obtain the fit as shown in Figure II.S14.
FIGURE II.S14 Model fit to the data.
This response clearly is not appropriate for the system’s dynamics. Selecting a second order model plus delay and lead element and after some manual adjustment of the model parameters, we have he fit shown in Figure II.S15.
FIGURE II.S15 Model fit to the data.
g d1 (s) =
T 602( s ) − 0.0572(−2.5s + 1)e −0.2752 s = F 601( s ) (3.693s + 1)(0.0296)
which provides a more proper representation of the process dynamics and more importantly allows us to match the inverse response behavior of the process. Changes in the inlet process stream temperature (T601) 77
ScholarFriend.com
We have for the overall fitting (using the whole data set), Figure II.S16.
FIGURE II.S16 Model fit to the data.
g d 2 (s) =
0.3996e −0.1s (4.43s + 1)
Using the first portion of the data we obtain the fit as shown in Figure II.S17.
FIGURE II.S17 Model fit to the data.
With
g d 2 (s) =
T 602( s ) 0.133e −0.15 s = (3.35s + 1) T 601( s )
Using the middle portion of the data we have a fit a shown in Figure II.S18.
78
ScholarFriend.com
FIGURE II.S18 Model fit to the data.
g d 2 (s) =
T 602( s ) 0.2874e −0.1s = T 602( s ) (2.466 s + 1)
The best model in this case is an average between the last two cases, that is
g d 2 (s) =
T 602( s ) 0.20e −0.12 s = T 601( s ) (3.0 s + 1)
Thus finally the model for the VTHX unit is given as follows
T 602( s ) =
0.138e −0.1s (−0.0572)(−2.54 s + 1)e −0.2752 s F 602( s ) + F 601( s ) (1.99 s + 1) (3.693s + 1)(0.0296 s + 1) +
0.20e −0.12 s T 601( s ) (3.0 s + 1)
Final verdict on model selection: For the manipulated variable changes, a simple FOPDT model is enough. For the disturbances in inlet process stream flow rate, to be able to represent the more complex dynamics involved, a first-order model with a lead and a delay term is necessary. This is the only model to be able to represent the inverse response behavior. Why these types of response for a disturbance change? We have two effects acting together in opposite ways and at different time scales. One is a convective effect because the change of the amount of total flow coming into the heat exchanger and the other is a thermal effect since the temperature of the incoming feed has changed. The convective effect is immediate (incompressible fluid) and acts in the first instance, and the thermal effect takes some time to have an impact on the system (the time for the change to travel through the heat exchanger).
79
ScholarFriend.com
II.23. Bioreactors are used to produce a variety of pharmaceuticals, and food products. A simple bioreactor model involves biomass and substrate. The biomass consists of cells that consume the substrate. Following material balance equations are derived for a bioreactor 3,
dx1 = ( µ − D) x1 dt dx 2 µx = D( x2 f − x2 ) − 1 dt Y In this model, D is the dilution rate, x1 is the biomass concentration, x2 is the substrate concentration, x2f is the feed concentration of the substrate and Y is the yield with Y = 0.4. The specific growth rate µ for a system with substrate inhibition is expressed as,
µ=
µ max x2
k m + x2 + k1 x22
The constants are given as km = 0.12 g/L; k1 = 0.4545 L/g; μmax = 0.53 h−1. The steady-state values of the input and the state variables are Ds = 0.3 h−1; x1s = 1.5302; x2s = 0.1745; x2fs=4.0 g/L. Perform a simulation of this process using the MATLAB®/Simulink® platform. By introducing small-step changes in the dilution rate, observe the biomass response. Solution: The Simulink block diagram for the bioreactor model is given in Figure II.S19.
3
Bequette, B.W., Process Dynamics: Modeling, Analysis and Simulation, Prentice Hall (1998). 80
ScholarFriend.com
D
X1
D to Workspace
x1 to Workspace
0.3
1 s
D
(mu-D)x1
dx1/dt
Biomass
0.12 f(u) mu
km
0.4
0.53
Y
mumax 0.4545 k1
1 s D(x2f-x2)
dx2/dt
Substrate
4
X2
x2f
x2 to Workspace f(u) mu*x1/Y 30
time Clock
Save Time
Time
FIGURE II.S19 Simulink diagram for bioreactor model.
Staring from an initial condition of x10 = x 20 = 1.0 , the biomass and substrate response for
D = 0.3 is given in Figure II.S20.
81
ScholarFriend.com
1.6
1.4
1.2
1
0.8
0.6
0.4
0.2
0
0
5
10
15 Time
20
25
30
FIGURE II.S20 The response of biomass (solid) and substrate (dashed) from an initial condition of x10 = x 20 = 1.0 .
Figure II.S21 shows the response of the biomass concentration for a series of step changes in the dilution rate. We will use the first half of this response data for modeling and the second half for validation.
82
ScholarFriend.com
1.6
1.4
1.2
1
0.8
0.6
0.4
0.2
0
0
20
40
60
80
100 Time
120
140
160
180
200
FIGURE II.S21 Set of step changes in dilution rate results in this biomass response.
We will show the results for a first-order and a second-order model. Following are the forms of the model: First-order: y (i + 1) = −a1 y (i ) + b1u (i ) Second-order: y (i + 1) = − a1 y (i ) − a 2 y (i − 1) + b1u (i ) + b2 u (i − 1) The parameter matrix is formed and calculated as follows for the second-order model,
φ (i + 1) = [− y (i) − y (i − 1) u (i) u (i − 1)] θ = [a1 a 2 b1 b2 ]T The parameters obtained using the LS algorithm are: First-order: a1 = −0.4443; b1 = −0.1157 Second-order: a1 = −1.0817; a 2 = 0.1167; b1 = −0.1673; b2 = 0.1584 The results of the validation and cross-validation simulations are shown in Figures II.S22 and II.S23. There is general agreement but the models perform poorly in predicting the steady-states. This is most likely due to the nonlinear nature of the actual process.
83
ScholarFriend.com
0.04
0.03
0.02
0.01
0
-0.01
-0.02
-0.03
0
10
20
30
40
50 Time
60
70
80
90
100
60
70
80
90
100
(a) 0.04
0.03
0.02
0.01
0
-0.01
-0.02
-0.03
0
10
20
30
40
50 Time
(b) FIGURE II.S22 Validation of first-order model (a) and second-order model (b), actual data (red), model prediction (blue).
84
ScholarFriend.com
0.06 0.05 0.04 0.03 0.02 0.01 0 -0.01 -0.02 -0.03 -0.04
0
10
20
30
40
50 Time
60
70
80
90
100
60
70
80
90
100
(a) 0.06
0.04
0.02
0
-0.02
-0.04
-0.06
0
10
20
30
40
50 Time
(b) FIGURE II.S23 Cross-validation of first-order model (a) and second-order model (b), actual data (red), model prediction (blue).
85
ScholarFriend.com
SECTION III (Process Analysis)
86
ScholarFriend.com
III.1. Investigate each of the transfer functions below for BIBO stability and asymptotic stability. a.
g (s) =
k (τs + 1)( s 2 + ω 2 )
b.
g (s) =
k ( s + 4 s + 3)
c.
g (s) =
k ( s + 1) s ( s 2 + 4s + 3)
2
Solution: We find the roots and of the pole polynomial and judge stability accordingly.
g (s) =
k (τs + 1)( s 2 + ω 2 )
The roots of the pole polynomial are:
s1 = −1 / τ
s 2,3 = ±ωj The pure imaginary roots indicate that the system is BIBO stable but not asymptotically stable. Unit step-response will oscillate continuously
g (s) =
k ( s + 4s + 3) 2
The roots are located at:
s1 = −1 s 2 = −3 Both are real and negative, implying BIBO stability and asymptotic stability.
g (s) =
k ( s + 1) s ( s 2 + 4s + 3)
The roots are located at:
s1 = −1 s 2 = −3 s3 = 0
87
ScholarFriend.com
There are two poles real and negative and one at the origin. First note that the pole at –1 will cancel with the zero in the numerator, but this does not create a problem since it is a “stable” pole. The pole at the origin indicates conditional BIBO stability, since the system response to such bounded inputs as steps is unbounded, while the response to rectangular pulses is bounded. . III.2. A process is described by two first-order systems in parallel, g (s) =
−2 1 + 3s + 1 s + 1
The input signal is described by the following transfer function: u (s) =
1 s −1
Is this a bounded input? Is the system output bounded? Why? Discuss the implications of this behavior. Solution: The input
u (s) =
unbounded input.
1 s −1
corresponds to u (t ) = et which grows with time and it is an
The given transfer function can be simplified to
g ( s) =
1 −2 s −1 + = 3s + 1 s + 1 ( s + 1)(3s + 1)
Then, the output is given by
y ( s ) = g ( s )u ( s ) =
1 1 s −1 = (3s + 1)( s + 1) s − 1 (3s + 1)( s + 1)
which has poles at s=-1 and s=-3. Therefore the system is stable. From this system behavior, we can conclude that it is not always necessary that the output should be unbounded if the input is unbounded. This phenomenon occurs due to the cancellation of the input pole with the process zero. Although this appears to lead to a stable system, one has to recognize that models are always imperfect and exact cancellations seldom occur in practice. One has to be cautious when canceling “unstable” poles. III.3. Find the poles of and classify the following processes as being stable (asymptotically or critically), or unstable,
88
ScholarFriend.com
1 (3s + 1)( s + 1) 1 g 2 ( s) = (3s + s )( s + 2) 1 g 3 ( s) = 3 3s + s 2 + s + 1 1 g 4 ( s) = 4 3 s + 4s + 4s 2 + 2s + 1
g1 ( s ) =
Explain your decisions. Solution: The roots of each denominator polynomial are given as follows, along with their classification: p1 ( s ) = (3s + 1)( s + 1); s1,2 = −1 / 3,−1 : two negative real roots, thus asymptotically stable.
p 2 ( s ) = (3s 2 + s )( s + 2); s1,2,3 = 0,−1 / 3,−2 : two negative real roots plus one root at the origin, thus critically stable.
p 3 ( s ) = 3s 3 + s 2 + s + 1; s1,2,3 = −0.635,0.1508 ± 0.706 j : one negative real root and two complex conjugate roots with positive real parts, thus unstable.
p 4 ( s ) = s 4 + 4 s 3 + 4 s 2 + 2 s + 1; s1,2,3,4 = −1,−2.77,−0.1154 ± 0.5897 j : two negative real roots and two complex conjugate roots with negative real parts, thus asymptotically stable. III.4. Use the Routh’s criterion to evaluate the stability of a process with the following characteristic equation:
p( s ) = 4 s 3 + 2 s 2 + s + 1 Solution: The following Routh Array is constructed: s3
4
1
s2
2
1
s1
-1
s0
3
89
ScholarFriend.com
The marked column indicates two sign changes, hence two unstable roots (poles). III.5. A system is being studied for stability and its characteristic equation is given as follows: p( s ) = 5s + 1 + 2ke −2 s 1. Apply the Routh’s criterion to this problem. What can you conclude about the system when k = 4. 2. Determine the range of k that would maintain stability. Is this a guaranteed result? Solution: The presence of the time delay prevents the direct application of the Routh’s criterion. We need to approximate the time delay using a rational expansion. The first-order Pade approximation is used:
e −2s ≅
1− s 1+ s
5s + 1 + 2k
1− s =0 1+ s
The characteristic equation is,
Rearranging, 5s 2 + (6 − 2k ) s + (1 + 2k ) = 0 The Routh Array is: 5
1+2k
6-2k
0
1+2k The system would be considered unstable when k = 4 . One can see that stability is guaranteed for the Pade Approximation, when
− 0.5 < k < 3 Noted that this is an approximation and other tests need to be conducted for a more accurate range. III.6. A process has the following transfer function:
90
ScholarFriend.com
g (s) =
4(as + 1) (5s + 1)( s + 1))
For the following values of the parameter a, •
a = 10
•
a=2
•
a = 0 .5
•
a = −1
compute the responses for a step-change of magnitude 0.5 and plot in a single figure. What conclusions can you draw concerning the zero location? Is the location of the pole corresponding to τ 2 = 5 important? Solution: Note that the zero is located at:
z = 1/ a Using the following Matlab m-file, TF=30; a=10; n=[2*a 2]; d=[conv([5 1],[1 1])]; g=tf(n,d); step(g,TF); hold on a=2; n=[4*a 4]; g=tf(n,d); step(g,TF); hold on a=0.5; n=[4*a 4]; g=tf(n,d); step(g,TF); 91
ScholarFriend.com
hold on a=-1; n=[4*a 4]; g=tf(n,d); step(g,TF); We can generate Figure III.S1: 3.5 3
a=10 2.5 2 1.5 1 0.5
a=2 a=0.5
a=-1
0 -0.5 0
5
10
15
20
25
30
FIGURE III.S1 Step response for different values of the parameter
We can observe that if the zero is small (a is large), the response exhibits an overshoot. For smaller but positive values of a, the response is initially in the direction of the ultimate steady-state. For negative values of a, the response shows the inverse (wrong-way) behavior. The locations of the poles (as long as they are stable) do not play a critical role in changing the qualitative response characteristics. III.7. For each of the processes with transfer functions given below, (1) identify the poles and zeros of the transfer function, as well as the process gain and (2) sketch the response to a unit-step input change, clearly showing the key response characteristics.
92
ScholarFriend.com
♦
g (s) =
5 10 − 0.1s + 1 0.04 s + 1
♦
g (s) =
10 5 − 0.2 s + 1 0.3s + 1
Solution: For the first one, we have
g ( s) =
10 − 0.1s + 5 5 10(0.04 s + 1) − 5(0.1s + 1) − = = 0.1s + 1 0.04 s + 1 (0.1s + 1)(0.04 s + 1) (0.1s + 1)(0.04 s + 1)
This one has a zero at 50 and two poles at -10 and -25. We have two stable poles and a zero on the RHP. The sketch of the unit step response should indicate the presence of the wrong way behavior, the overdamped response and the final steady-state at 5 (Figure III.S2). Step Response From: U(1)
5
4
To: Y(1)
Amplitude
3
2
1
0
-1
0
0.1
0.2
0.3
0.4
0.5
0.6
Time (sec.)
FIGURE III.S2 Unit step response.
For the second one, we have
g ( s) =
10 5 10(0.3s + 1) − 5(0.2 s + 1) 2s + 5 = − = 0.2 s + 1 0.3s + 1 (0.2 s + 1)(0.3s + 1) (0.2 s + 1)(0.3s + 1)
This one has a zero at –2.5 and two poles at -5 and –3.33. We have two stable poles and a zero on the LHP. The sketch of the unit step response yields the following (Figure III.S3):
93
ScholarFriend.com
Step Response From: U(1)
6
5
To: Y(1)
Amplitude
4
3
2
1
0
0
0.5
1
1.5
Time (sec.)
FIGURE III.S3 Unit step response.
Note that the response exceeds the ultimate value of the response first and then settles at 5. Is this overshoot? III.8. A second-order process is represented by the transfer function,
y(s) 1 = 2 u ( s) 4s + s + 2 Introduce a step change of magnitude 5 into the system and find, (1) % overshoot, (2) decay ratio, (3) maximum value of y(t), (4) ultimate value of y(t), (5) rise time, and (6) period of oscillation. Solution: Write the transfer function in the standard form and find the factors τ and ξ . 1 y(s) k 1 2 = 2 = = 2 2 u ( s ) 4 s + s + 2 2 s 2 + 1 s + 1 τ s + 2ξτs + 1 2
Hence τ= 1.414 sec and ξ = 0.177. Therefore, this is an underdamped system.
Overshoot = exp(−
πξ 1−ξ 2
) = 0.5684
DecayRatio = (Overshoot ) 2 = 0.323 2πτ sec = 9.02 Period of Oscillation(T ) = cycle 1−ξ 2 The ultimate value is calculated using final value theorem.
94
ScholarFriend.com
yultimate = lim ( sy ( s )) = lim ( sg ( s )u ( s )) = lim ( s →0
5s
s →0 ( 4 s 2 + s + 2) s
s →0
) = 2.5
Maximum value is ymax imum = (1 + overshoot ) yultimate = 3.92 Rise time can be found either by iterating y(t) expression or by visual inspection from a response plot.
τ rise = 2.44 sec III.9. A time-delay element is basically a distributed system. One approximate way to get the dynamics of distributed systems is to lump them into a number of perfectly mixed sections. Prove that a series of N mixed tanks is equivalent to a pure time delay as N tends to infinity. (Hint: Keep the volume of the total system constant as more and more sections are used). Solution: For one capacity, the differential equation can be written as: V
dx1 = Fx0 − Fx1 dt
By rearranging and taking the Laplace transform, we obtain the transfer function:
x1 ( s ) 1 = x0 ( s ) τs + 1 where τ = V / F . For two capacities, one would have: 2
1 1 x2 ( s ) = = 2 x0 ( s ) τ τ 1 s + s + 1 2 2 If we generalize to N capacities, xN ( s ) 1 = N x0 ( s ) τ N s + 1
We want to show that
95
ScholarFriend.com
1 = e −τs lim N N →∞ τ s + 1 N
Or, N τ lim s + 1 = eτs N →∞ N
Expanding the deadtime in infinite series:
(τs ) 2 (τs )3 e = 1 + (τs ) + + + ..... 2! 3! τs
Now we need to show that N τ (τs) 2 (τs)3 + + .... lim s + 1 = 1 + (τs ) + N →∞ N 2! 3!
(Courtesy of Professor B. Higgins using Mathematica). Define the function: f = (a + x) N
The binomial series is: f = a N + Na N −1 x +
Now, let a = 1 , and x =
τs N
N ( N − 1) N − 2 2 N ( N − 1)( N − 2) N − 3 3 a x + .... a x + 3! 2!
, then we have
N ( N − 1)(τs ) 2 N ( N − 1)( N − 2)(τs )3 f = 1 + τs + + + ..... N 2 2! N 3 3! This leads to
f = 1 + τs +
1 α (τs )3 (τs ) 2 (τs )3 (τs ) 2 + 1 2 + .... + + .... + − 2! 3! N 3! N 2!
Now, if one takes the limit as N goes to infinity, the terms in the brackets vanish, leaving us with:
(τs ) 2 (τs )3 + + .... = .eτs 1 + (τs ) + 2! 3! 96
ScholarFriend.com
QED III.10. A step change of magnitude 4 is introduced into a process having the transfer function:
y(s) 10 = 2 u ( s ) s + 1.6 s + 4 Obtain the output response by simulation and determine: •
Percent overshoot
•
Rise time
•
Settling time
•
Period of oscillation
•
Ultimate value of y(t)
Solution: The response is given in Figure III.S4. 14
12
10
8
3.0 6
4
2
0
0
1
2
3
4
5
6
7
FIGURE III.S4 The step-response of transfer function in Exercise III.10.
97
ScholarFriend.com
8
9
10
From Figure III.S4, we can establish the following quantities: ♦ Percent overshoot: %Overshoot =
12.6 − 10.1 100 = 24.75% 10.1
♦ Rise time: 1.2 ♦ Settling time: 4.5 ♦ Period of oscillation: 3.0 ♦ Ultimate value of y(t): 10 III.11. A process consists of five perfectly stirred tanks in series. The volume in each tank is 50 liters, and the volumetric flow rate through the system is 5 liters/min. At some particular time, the inlet concentration of the nonreacting species is changed from 0.7 to 0.83 (mass fraction) and held there. Write an expression for c5 (the concentration leaving the fifth tank) as a function of time, and determine exit concentrations from all tanks at t = 30 min. Solution: The component balance on the nonreacting species in the first tank looks like:
d ( ρVc1 ) = ρqc1 − ρqc 0 dt The density, volume and the volumetric flow rate are constants, thus, the equation reduces to:
V
dc1 = q( c1 − c 0 ) dt
This is a linear equation, so one can re-write it in deviation variable form trivially,
V
dc1 = q( c1 − c 0 ) dt
We are interested in the transfer function that relates the exit concentration to the inlet concentration. Taking the Laplace transform yields,
V sc1 ( s ) = c1 ( s ) − c 0 ( s ) q c1 ( s ) 1 = c 0 ( s ) (V / q) s + 1 Recognizing that all tanks are the same, we can generalize to the following relationships:
98
ScholarFriend.com
ci ( s ) 1 = ci −1 ( s ) (V / q) s + 1
c5 ( s ) 5 ci ( s ) 1 =∏ = c 0 ( s ) i =1 ci −1 ( s ) (V / q) s + 1
5
Thus 5
1 1 0.15 c 0 ( s ) = c 5 ( s ) = 5 ((V / q ) s + 1) s (V / q ) s + 1 This can be rewritten as c5 (s) =
p5
(s + p )
5
0.15 s
Where p=q/V. We will use Partial Fraction Expansion to find the time solution. In this case c5 ( s) =
p5
a a3 a5 a 6 a a4 0.15 = p 5 0.15 1 + 2 + + + + s s + p (s + p )2 (s + p )3 (s + p )4 (s + p )5 (s + p )5 s
Next we find the coefficients. To find a1 we multiply both sides by s sp 5
(s + p )
5
sa sa 3 sa 5 sa 6 sa 2 sa 4 0.15 = p 5 0.15 1 + + + + + 2 3 4 s s + p (s + p ) (s + p ) (s + p ) (s + p )5 s
For s=0
1 p5
= a1
We should notice that s=-p is a multiple root so we need to apply the modified procedure To find a6 we multiply both sides by (s+p)5
(s + p )5 1 = (s + p )5 a1 + (s + p )5 a 2 + (s + p )5 a3 + (s + p )5 a 4 + (s + p )5 a5 + (s + p )5 a 6 s s+ p (s + p ) 4 (s + p )5 (s + p )5 s (s + p ) 2 (s + p )3 Or 5 5 5 5 5 1 (s + p ) a1 (s + p ) a 2 (s + p ) a 3 (s + p ) a 4 (s + p ) a 5 = + + + + + a 6 2 3 4 s s s+ p (s + p ) (s + p ) (s + p )
99
ScholarFriend.com
For s=--p -
1 = a6 p
To find a5 we fist calculate the derivative with respect to s to both sides of the last expression (s + p )5 a1 4 3 2 1 ( ) ( ) ( ) ( ) + + + + + + + + + s p a s p a s p a s p a a 2 3 4 5 6 d s s =d ds ds
For s=-p −
1 p2
= a5
Calculating successive derivatives with respect to s and making s=-p we can evaluate all other coefficients to be
−
1 p
3
= a4
; −
1 p
4
= a3
; −
1 p5
= a2
Thus finally we can rewrite the original equation as
1 1 1 1 1 1 p5 p5 p4 p3 p2 p c 5 ( s ) = p 0.15 − − − − − 2 3 4 s s p + ( ) ( ) (s + p )5 ( ) s p s p s p + + + 5
Inverting the individual terms using Table B1 in Appendix B in the book (rows 4 and 5) we have
1 1 1 c5 (t ) = 0.151 − e −t / 10 + pte −t / 10 + ( pt )2 e −t / 10 + ( pt )3 e −t / 10 + ( pt )4 e −t / 10 2! 3! 4! With V / q =
1 = 10 p 2 3 4 t 1 t 1 t 1 t − t / 10 c5 (t ) = 0.151 − e 1+ + + + 10 2! 10 3! 10 4! 10
Concentration after each tank can now be calculated, 30 c1 (30) = 0.7 + 0.151 − e −30 / 10 1 + = 0.8425 10 And others follow:
100
ScholarFriend.com
c 2 (30) = 0.8201 c 3 (30) = 0.7865 c 4 (30) = 0.7529 c5 (30) = 0.7277 III.12. A two-tank flow-surge system is given in Figure III.1, along with the block diagram representing the approximate dynamics of the system.
FIGURE III.1 A two-tank surge process (a) and its transfer function model (b).
101
ScholarFriend.com
1. What is the response q 2 (t ) to a step input of magnitude 0.5 m3/min in q 0 (t ) if the system is initially at steady-state with q 0, s = q1, s = q 2, s = 1 m 3 /min . 2. The head-flow relations for the tanks are
q1 =
5 m 3 /min 2 m 3 /min h1 , q 2 = h2 m m
What are the ultimate values of each tank level after 1 m3 of liquid is suddenly added to the first tank? Why? Solution: The transfer function between the input flow rate and the exit flow rate is given by,
q2′ ( s ) 1 = q0′ ( s ) (5s + 1)(4 s + 1) where we have q ' (t ) = q (t ) − qs as deviation variables. If there is a step change in the input flow rate, the exit flow rate will be given as,
q2′ ( s ) =
1 0.5 (5s + 1)(4s + 1) s
Either using the partial fraction expansions, or the formulas for second-order process responses, we can find the time-domain response of the exit flow rate. We will use the latter,
τ e − t / τ 1 − τ 2e − t / τ 2 q2 (t ) = q2, s + kM 1 − 1 τ1 − τ 2 where kM=0.5, and τ 1 = 5,τ 2 = 4 , as this is a slightly overdamped process ( ξ = 1.006 ). The result is,
(
q2 (t ) = 1 + 0.5 1 − 5e − t / 5 + 4e − t / 4
)
For part (b), we need to first find the transfer functions between the inlet flow rate and the levels in each tank. h'1 ( s ) h'1 ( s ) q'1 ( s ) 1 1 = = q'0 ( s ) q'1 ( s ) q'0 ( s ) 5 5s + 1 h '2 ( s ) h '2 ( s ) q '2 ( s ) 1 1 = = q'0 ( s ) q'2 ( s ) q'0 ( s ) 2 (5s + 1)(4s + 1)
The disturbance for this case is an impulse of magnitude 1. Hence the level responses will look like,
102
ScholarFriend.com
1 1 (1) 5 5s + 1 1 1 h '2 ( s ) = (1) 2 (5s + 1)(4s + 1) h'1 ( s ) =
Using the Final Value Theorem, we can find the ultimate values of these levels, 1 1 lim( sh'1 ( s )) = lim s (1) = 0 s →0 s →0 5 5s + 1 1 1 lim( sh'2 ( s )) = lim s (1) = 0 s →0 s →0 2 (5s + 1)(4s + 1) This means that the levels go back to their original height after a transient deviation, as a result of the fact that the levels act like “self-regulating” processes. III.13. Consider a process consisting of two interacting tanks discussed in Example 8.5 (Figure 8.10). The feed to the second tank is introduced at the bottom, thus its flow rate is influenced by the difference in the static heights in both tanks, thus affecting their operation. 1. Derive the transfer functions in Eq. (8.26) starting from Eqs. (8.24) and (8.25). 2. Discuss the dynamic characteristics of the first tank, and sketch the level response against a change in the inlet flow. 3. Discuss the effect of different design conditions, specifically how the tank cross sectional area and pipe resistance influence the location of poles and zeros. Solution: As shown in Example 8.5, a total mass balance in each tank leads to A1
A2
dh1 (t ) = F0 (t ) − β1 (h1 − h2 ) dt
dh2 (t ) = β1 (h1 − h2 ) − β 2 h2 dt
These equations constitute a set of coupled differential equations and they need to be solved simultaneously. This indicates the mutual effect of the two tanks. Defining deviation variables and using Laplace transformation, we obtain a set of coupled algebraic equations. Solving these equations for h1 and h2 , the following transfer functions result:
103
ScholarFriend.com
(τ 2 / β1 ) s + (1 / β1 + 1 / β 2 ) F (s) τ 1τ 2 s 2 + (τ 1 + τ 2 + A1 / β 2 )s + 1 0
h1 ( s ) = h2 ( s ) =
1
(8.26)
F (s)
τ 1τ 2 s 2 + (τ 1 + τ 2 + A1 / β 2 )s + 1 0
Here, we have τ 1 = A1 / β1 and τ 2 = A2 / β 2 as the time constants of the individual tanks. Here we are interested in analyzing the characteristics of the transfer function between the inlet flow and the level in tank 1.
h1 ( s ) =
(τ 2 / β1 ) s + (1 / β1 + 1 / β 2 ) F (s) τ 1τ 2 s 2 + (τ 1 + τ 2 + A1 / β 2 )s + 1 0
This equation shows that the dynamic response of the first tank follows a second-order behavior. The poles are the same as those for the dynamics of the second tank and the system has a zero at
s=
− (1 / β 1 + 1 / β 2 ) τ 2 / β1
Since τ2, β1 and β2 are always positive then the zero is a negative zero thus the dynamic of the level in the first tank will not show inverse response behavior but may contain overshoot depending of the operating and design conditions. Figure III.S5 illustrates the response of the level in the first tank against step changes in the feed flow for different values of the design/operating conditions as follows: 1. A1 = A2 = 1; β1 = β 2 = 1 2. A1 = 1; A2 = 5; β1 = β 2 = 1 3. A1 = A2 = 1; β1 = 5; β 2 = 1 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0
0
5
10
15
20
25
30
35
40
45
50
FIGURE III.S5 The step-response of transfer function in Exercise III.13. Case 1 (black), Case 2 (blue), Case 3 (green).
104
ScholarFriend.com
III.14. The dynamic behavior of a drum boiler can be represented by the following transfer function between the liquid level and the cold water feed,
h( s ) (τ − 1) s + 1 = qc ( s) s (τs + 1) Plot the poles and zeros of this transfer function in the complex plane for two cases: •
τ = 0.5
•
τ = 2.0
For each case sketch the level response to a step change in the cold water flow rate. Solution: The transfer functions for each case are given below,
− 0. 5 s + 1 h( s ) CASE 1 = q c ( s ) s (0.5s + 1) h( s ) s +1 CASE 2 = q c ( s ) s (2 s + 1) It can be seen that the pole-zero locations for each case are: z = 2, p1 = 0, p2 = −2
CASE 1
z = −1, p1 = 0, p2 = −0.5 CASE 2 and graphically (Figure III.S6), Im
Im
z=-1 p=-2
p=0
z=2
Real
FIGURE III.S6 Poles zeros locations in complex plane.
The responses will look like the following (Figure III.S7),
105
ScholarFriend.com
p=-0.5
p=0
Real
CASE 2
CASE 1
time
FIGURE III.S7 Unit step response
Note the presence of the wrong way behavior due to the right-half-plane zero for CASE 1 and essentially unbounded responses due to the presence of integrators (pole at the origin). III. 15. A process is represented by the following transfer function,
g (s) =
k (τ a s + 1) y(s) = m( s ) (τ 1s + 1)(τ 2 s + 1)
For a step change in the input, m( s ) = M / s , show that the dynamic response is given by the following equation,
τ −τ τ −τ y (t ) = kM 1 + a 1 e −t /τ1 + a 2 e −t /τ 2 τ 2 − τ1 τ1 − τ 2 1. Discuss the effect of the zero 2. For the parameters, τ 1 = 4 , τ 2 = 1 , k = 4 and M = 1 , plot the dynamic response of the process and describe the response characteristics for the following cases: •
τ a = 8 and τ a = 16
•
τa = 2
•
τ a = −2 and τ a = −4
3. Why is there an overshoot, when τ a > τ 1 > τ 2 ? Hint: Consider the contributions of the exponential terms and their weights, when t is close to zero. Solution: • •
Zeros do not change the ultimate value, y∞= kM They affect how response modes (exponential terms) are weighted in the response of output, y(t). 106
ScholarFriend.com
The process response to a unitary step is given in Figure III.S8. 3
τa = 16
2.5
y(t)
2
8
1.5 1
2
0.5
-2
0
-4
-0.5 0
5
10
time
15
20
FIGURE III.S8 Unit step response.
•
Case 1 (τa = 8, 16): Overshoot
•
Case 2 (τa = 2): Similar to a first-order process
•
Case 3 (τa = -2, -4): Output initially moves in opposite direction of ultimate value (inverse response)
III.16. The component balance equation for a continuous stirred-tank reactor with first-order reaction (see Example 4.5) is given as1, V
dC A = FC A0 − FC A − kVC A dt
1. Re-write this equation in dimensionless form by defining new variables for C A and t. 2. What are the implications of the dimensionless form and the resulting parameters? Solution: Starting with the material balance for a CSTR with first-order reaction V
dC A = FC A0 − FC A − kVC A dt
The dimensions for each term in the above equation are those of mass per unit time. Dividing the balance equation by the volume of reactor, V, leads to the equation in the form dC A F = V C A0 − F V C A − kC A dt
Or defining τ=V/F,
107
ScholarFriend.com
dC A C A0 C A − − kC A = dt τ τ
This equation has two parameters τ = V/F (residence time) with dimension of time and k, the reaction rate constant with dimensions of reciprocal time, for a first-order reaction. The concentration of reactant CA in the reactor cannot, under normal circumstances, exceed the inlet feed value, CAO, and thus a new dimensionless concentration, C A , can be defined as CA −
CA C A0
such that C A normally varies in the range from zero to one. The other variable time, t can vary from zero to some undetermined value. A new dimensionless time variable is defined here as t=
t
τ
When substituted into the model equation, the result is
dC A = 1 − C A − kτCA dt The parameter term (kτ) which is called the Damkohler Number, Da, is dimensionless and is now the single governing parameter in the model. This results in a considerable model simplification because originally the three parameters τ, k and CAO, all appeared in the model equation. The significance of this dimensionless equation form is now that only the parameter (kτ) is important; and this alone determines the system dynamics and the resultant steady-state. Thus, experiments to prove the validity of the model need only consider different values of the combined parameter (kτ). III.17. The manipulation of concentration and temperature levels within a reactor provides an opportunity to directly manipulate relative reaction rates and force reactions towards higher degrees of conversion and selectivity. Consider the following parallel reaction where A and B are reactants, P is a useful product and W is a waste byproduct1.
A+ B → P A+ B →W It is important to achieve complete conversion of the reactants A and B and ensure high selectivity for the formation of the product species P with respect to the byproduct W. The individual rates of reaction are given by
108
ScholarFriend.com
rP = k1C An1C Bn 2 rW = k 2 C An 3 C Bn 4 1. Explain how one would manipulate the operating conditions to achieve higher selectivity towards the desired product. 2. What are the consequences if the reaction orders are the same in both reactions? Solution: The relative selectivity for the reaction is given by:
rP k1 ( n1− n 2 ) ( n1− n 2 ) = CA CB rW k2 Consequently, if n1 > n2 high selectivity for P is favored by maintaining the concentration of A high. Conversely, if n1 < n2 , high selectivity is favored by low concentration of B. When the order of reaction is equal in both reactions that is n1 = n2 and n3 = n4
Then,
rP k1 = rW k2 where kl and k2 are both functions of temperature, again showing that a favorable selectivity can be obtained by appropriate adjustment of the reactor temperature. III.18. An exothermic chemical reactor has the following transfer function relationship between the inlet flow rate and the reactor temperature.
g ( s) =
2(−2.5s + 1) 9 s 2 + 3s + 1
The units of the input are liters/min and the output is in °C. Is this system overdamped or underdamped? Does this system exhibit overshoot when subjected to a unit-step change in the input? If yes, what is the % overshoot? What is the ultimate value of the output? Sketch the system response for this input and provide an explanation for the dynamic behavior observed. Solution: This is a second-order system and the denominator is in the following form,
τ 2 s 2 + 2ξτs + 1 = 9s 2 3s + 1 109
ScholarFriend.com
This indicates the following constants:
τ = 3, ξ = 0.5 Hence, this is an underdamped system. By virtue of being an underdamped system, the system will exhibit overshoot. The overshoot can be calculated using the following formula: πξ overshoot = exp − = 0.163 2 − ξ 1
The ultimate value of this system when subjected to a unit-step change can be calculated by the Final Value Theorem. 2(−2.5s + 1) 1 lim 2 s = 2 s →0 9 s + 3s + 1 s A sketch is given in Figure III.S9. Step Response
2
Amplitude
1.5
1
0.5
0
-0.5
0
5
10
20
15
25
30
35
Time (sec.)
FIGURE III.S9 Unit step response.
It is clear that the system exhibits inverse response, as indicated by the RHP zero, and the ultimate value is reached after decaying oscillations. III.19. Draw the Bode diagrams of the transfer functions below, 1 (3s + 1)( s + 1) 1 g 2 (s) = (3s + 1)( s + 1)(0.1s + 1) g1 ( s ) =
Comment on the differences observed in the diagrams and their practical implications.
110
ScholarFriend.com
Solution: To draw the Bode diagrams, use the following steps: Replace s = jω in the transfer function. Find the magnitude (AR) of the complex transfer function as a function of ω . Take the logarithm of the AR function. Plot log( ω ) vs log(AR). This is the magnitude plot of the Bode diagram. Find the argument ( θ ) of the complex function. Plot log( ω ) vs θ . This is the phase angle plot of the Bode diagram. The following rules help in drawing Bode diagrams for systems in series. If g(s) = g1(s) g2(s) g3(s), then log(AR) = log(AR1) + log(AR2) + log(AR3) φ = φ1 + φ2 + φ3 where AR, AR1, AR2, AR3 are the amplitude ratios and φ, φ 1, φ 2, φ 3 are phase angles of g, g1, g2, g3 respectively. Or, you can just use the “Bode” command in MATLAB (Figure III.S10). Bode Diagrams From: U(1)
0
-100
--- g2(s) __ g1(s)
-150 0
To: Y(1)
Phase (deg); Magnitude (dB)
-50
-100
--- g2(s) __ g1(s)
-200
-300 -1 10
0
1
10
10
2
10
Frequency (rad/sec)
FIGURE III.S10 Bode plots.
III.20. Draw the Nyquist diagrams of the transfer functions in Exercise III.19. Discuss the similarities and differences between the Nyquist plots of these transfer functions. 111
ScholarFriend.com
Solution: We use the “Nyquist” command in MATLAB. The two plots looks as follows: Nyquist Diagram
0.6
0.6
0.4
0.4
0.2
0.2
0 -0.2
0 -0.2
-0.4
-0.4
-0.6
-0.6
-0.8 -1
-0.8
-0.6
-0.4
-0.2
0
0.2
Nyquist Diagram
0.8
Imaginary Axis
Imaginary Axis
0.8
0.4
0.6
0.8
-0.8 -1
1
-0.8
-0.6
-0.4
Real Axis
-0.2
0
0.2
0.4
0.6
1
0.8
Real Axis
FIGURE III.S11 Nyquist plots. First TF is on the left and the second is on the right.
However, if we focus around the origin, we see the difference clearly. The third-order TF crosses the Real axis before going to the origin at high frequencies. Nyquist Diagram
Nyquist Diagram
0.04
0.02
0.02 0
0
-0.02
Imaginary Axis
Imaginary Axis
-0.02
-0.04
-0.04 -0.06 -0.08 -0.1
-0.06
-0.12 -0.08
-0.1
-0.14 -0.16 -0.1
-0.05
0
0.05
-0.15
0.1
-0.1
-0.05
0
0.05
0.1
Real Axis
Real Axis
FIGURE III.S12 Nyquist plots – focused around the origin. First TF is on the left and the second is on the right.
III.21 Consider the nonisothermal CSTR problem introduced in Exercise I.16 and also discussed in Example 4.6. A number of experiments have been performed by varying the reactor feed conditions and monitoring the responses of the reactor temperature and concentration. Figure III.2 illustrates the response of the reactor product concentration for a change in the feed concentration. 112
ScholarFriend.com
FIGURE III.2 The response of reactor concentration to a change in the feed concentration.
For this problem: 1. Explain these results from a physical point of view, articulating the mechanisms involved for such behavior. 2. What type of model would be appropriate to capture such dynamics? Provide some thoughts as to the values of the model parameters one would expect. Solution: Clearly from the system response to a change in the feed composition, we can see that the response shows an inverse response behavior. That is, initially the system responds in the opposite direction to where it eventually ends up. This behavior can be explained by the presence of two effects acting in opposite directions and at different time scales. In this case, a positive change in the feed composition will produce an immediate increase in the amount of reactant in the reactor thus increasing its concentration. This is followed up by an increase in conversion due to an increase in the reactant concentration which eventually will lead to a decrease in the amount of reactant in the reactor and eventually will lead to a decrease in its concentration. Based on the discussions in Chapter 8, this type of behavior cannot be modeled using just a FOPDT model. To represent this inverse response behavior, a positive zero needs to be present in the system. Based on these discussions a proper model should be of the type of second-order with a lead element as discussed in Section 8.5: 𝑦𝑦(𝑠𝑠) 𝑘𝑘𝑃𝑃 (𝜏𝜏𝑧𝑧 𝑠𝑠 + 1)𝑒𝑒 −𝑡𝑡𝐷𝐷 = 𝑔𝑔(𝑠𝑠) = (τ1 𝑠𝑠 + 1)(τ2 𝑠𝑠 + 1) 𝑢𝑢(𝑠𝑠) 113
ScholarFriend.com
where, τZ is negative. Performing a nonlinear regression to estimate the model parameters the following models are obtained: SOPDT with lead,
FOPDT,
𝑔𝑔(𝑠𝑠) =
−2.176(−4.925𝑠𝑠 + 1)𝑒𝑒 −0.103𝑠𝑠 (8.426𝑠𝑠 + 1)(8.426𝑠𝑠 + 1) 𝑔𝑔(𝑠𝑠) =
−2.2𝑒𝑒 −8.89𝑠𝑠 (13.46𝑠𝑠 + 1)
Figure III.S13 illustrates the approximation using the lead/lag model combination and a FOPDT model. As expected the FOPDT model cannot approximate the inverse response behavior and considers that period as a delay in the model.
FIGURE III.S13 The performance of model fitting using two different models.
III.22 For the CSTR problem in Exercise III.21, the responses of the product concentration and temperature to a change in the feed flow rate are given in Figure III.3.
114
ScholarFriend.com
FIGURE III.3 The response of reactor concentration and temperature to a change in the feed flow rate.
For this problem: 1. Explain these results from a physical point of view, articulating the mechanisms involved for such behavior. 2. What type of model would be appropriate to capture such dynamics? Provide some thoughts as to the values of the model parameters one would expect. Solution: The responses of the concentration and temperature (Figure III.3) to changes in the feed flow rate shows again the effect of two processes with opposing contributions. The response for the reactor concentration shows that the initial transient is dominated by a faster process but the other one catches up later and brings the overall process response down. In this case, the process response exhibits an overshoot. Physically, increasing the feed flow rate will initially increase the concentration of the reactant in the reactor. However, that increase in reactant concentration produces later an increase in the amount of reaction thus bringing the concentration down. In the case of the reactor temperature, an increase in the feed flowrate will produce an immediate decrease of the temperature under the same cooling conditions. However, due to the increase in the reactant concentration, we will have an increase in the amount of reaction thus leading to an increase in the reactor temperature. As discussed in Section 8.5, when processes have zeros on the LHP, the initial transient response will be in the direction of the ultimate (steady-state) value of the process, and the process response may exhibit an overshoot, depending on the location of the zero with respect to the pole locations. Thus, in this case, a model to represent this type of behavior is given by
115
ScholarFriend.com
𝑘𝑘𝑃𝑃 (𝜏𝜏𝑧𝑧 𝑠𝑠 + 1)𝑒𝑒 −𝑡𝑡𝐷𝐷 𝑔𝑔(𝑠𝑠) = (τ1 𝑠𝑠 + 1)(τ2 𝑠𝑠 + 1)
However, in this case the zeros should be negative (stable zero). Performing a nonlinear regression to estimate the model parameters the following models are obtained for the reactor concentration and the reactor temperature 𝑔𝑔(𝑠𝑠) =
𝑔𝑔(𝑠𝑠) =
𝑐𝑐 0.3692(31.79𝑠𝑠 + 1)𝑒𝑒 −0.053 = (8.823𝑠𝑠 + 1)(8.823𝑠𝑠 + 1) 𝐹𝐹0
𝑇𝑇 −0.3666(202.3𝑠𝑠 + 1)𝑒𝑒 −0..0𝑠𝑠 = (7.864𝑠𝑠 + 1)(9.148𝑠𝑠 + 1) 𝐹𝐹0
Figures III.S14 and III.S15 illustrate the model approximations using the SOPTD plus lead model combination. As expected the models can approximate the overshoot behavior present in both responses due to the presence of a negative (stable) zero.
FIGURE III.S14 Comparison of the data and the SOPTD+lead model, reactor concentration prediction for a change in the feed flow rate.
116
ScholarFriend.com
FIGURE III.S15 Comparison of the data and the SOPTD+lead model, reactor temperature prediction for a change in the feed flow rate.
117
ScholarFriend.com
SECTION IV (Feedback Control, Analysis and Design)
118
ScholarFriend.com
IV.1. For the bioreactor introduced in Exercise II.13, we would like to control the biomass concentration ( x 2 ) using the dilution rate (D). 1. Draw the block diagram for the feedback control loop. 2. Determine the closed-loop transfer function between the biomass concentration and its setpoint for a P controller. 3. Find the characteristic equation. Solution: From Exercise II.13, we have b s + (b2 a12 − b1a 22 ) y(s) = g p (s) = 1 2 u (s) s − a 22 s − a12 a 21 Substituting the numerical values for the constants:
y(s) − (1.45s + 0.579) = g p (s) = 2 u (s) s + 1.36 s + 0.39 Consequently,
g p (s) =
− (1.45s + 0.579) s 2 + 1.36 s + 0.39
We have g c ( s ) = k c for a P controller and assuming g f ( s ) = g m = 1 , we obtain the feedback control loop shown in Figure IV.S1.
ysp
u
g c ( s ) = kc
g p (s) =
− (1.45s + 0.579) s 2 + 1.36 s + 0.39
FIGURE IV.S1 Closed-loop block diagram for Exercise IV.1.
The closed-loop transfer function between the output and set-point is given by,
g sp =
g p gc 1 + g p gc
Substituting for the values in our example,
119
ScholarFriend.com
y
− (1.45s + 0.579) kc 2 + + s 1 . 36 s 0 . 39 g sp = − (1.45s + 0.579) kc 1+ 2 s + 1.36 s + 0.39 g sp =
g sp = g sp =
2
2
− (1.45s + 0.579)k c
( s + 1.36 s + 0.39) − (1.45s + 0.579)k c
− (1.45s + 0.579)k c
s + 1.36 s + 0.39 − 1.45k c s + 0.579k c 2
− (1.45s + 0.579)k c
s + (1.36 − 1.45k c ) + (0.39 − 0.579k c )
The characteristic equation is then given by:
s 2 + (1.36 − 1.45k c ) + (0.39 − 0.579k c ) = 0 The following can be observed: •
The closed-loop system remains second order with the inclusion of a proportional controller
•
The two closed-loop system poles are now function of the controller parameter k c
•
The independent term of the polynomial become negative for k c larger than 0.67 and they remain always positive for negative values of k c
IV.2. A process under closed-loop control is expressed using the block diagram representation shown in Figure IV.2. Determine the following transfer functions: •
y(s) y sp ( s )
•
y( s) d ( s)
120
ScholarFriend.com
FIGURE IV.1 The closed-loop block diagram for Exercise IV.2.
Solution: First the internal loop can be expressed as a single transfer function:
g4 =
g1 1 + g1 g 2
For the set-point response, the forward transfer functions are: g 4 g 3 The loop transfer functions are: g 4 g 3 g m This yields g1 g3 1 + g1 g 2 g 4 g3 y = = ysp 1 + g 4 g 3 g m g1 g 3 g m 1 + 1 + g1 g 2 Then, the other transfer function is
gd y = = d 1 + g 4 g3 g m
gd g1 g 3 g m 1 + 1 + g1 g 2
IV.3. Consider the process represented by the following transfer function
y(s) =
2e −5 s 1 m( s ) + d (s) 5s + 1 5s + 1
121
ScholarFriend.com
The process is under feedback control with a P controller and we assume that g f = g m = 1 . If kc = 1 , 1. Determine the closed-loop transfer functions. 2. What is the offset if a positive unit-step change is introduced in ysp with d = 0 . Solution: We have
2e −5 s kc g f gc g p kc 2e − 5 s 5s + 1 = Gsp = = 2e − 5 s 1 + gm g f gc g p 5s + 1 + kc 2e − 5 s 1 + kc 5s + 1 gd Gd = = 1 + gm g f gc g p
1 kc 5s + 1 = −5s 2e 5s + 1 + kc 2e − 5 s 1 + kc 5s + 1 kc
The offset can be calculated from the transfer function, y ( s ) = Gsp ( s ) ysp ( s ) =
kc 2e −5 s 1 −5s 5s + 1 + kc 2e s
Using the FVT, we can show,
kc 2e −5 s 1 y (t → ∞) = lim s = 0.66 − 5 s s →0 5 s + 1 + k c 2e s IV.4. For the oil stream being heated as it passes through two well-mixed tanks in series in Exercise II.3, we wish to develop a control scheme that maintains the temperature in the second reactor ( T2 ) at its set-point, using the heat input (Q). 1. Draw the schematic of the feedback control loop including the input disturbances 2. Find the closed-loop transfer function between the output temperature and the set-point and disturbance (inlet flow) for a P and PI controllers Solution: Assuming as operating and design conditions: Tin = 20; T1 = 50; T2 = 45;V1 = V2 = 1; Fs 5; ρc p = 1
We have as constants, 122
ScholarFriend.com
a1 = −30; a 2 = 4; a3 = 1; b1 = 5; b2 = 5; b3 = −5 And the process and disturbance transfer functions become:
gp =
5 5s − 125 ; g = d (5s + 1) 2 (5s + 1) 2
The closed-loop block diagram is represented as in Figure IV.S2: d
gd =
ysp
y
5 gp = (5s + 1) 2
g c (s )
5s − 125 (5s + 1) 2
FIGURE IV.S2 Closed-loop block diagram for Exercise IV.4.
The closed-loop transfer function between the process output and the set-point becomes: 5 kc g p gc y (5s + 1) 2 = = 5 y sp 1 + g p g c 1+ kc (5s + 1) 2
y=
2
5k c
s + 10 s + (25 + 5k c )
y sp
The closed-loop transfer function between the process output and the disturbance becomes: 5s − 125 gd y (5s + 1) 2 = = 5 d 1 + g p gc 1+ kc (5s + 1) 2
y=
5s − 125 d s + 10 s + (25 + 5k c ) 2
123
ScholarFriend.com
IV.5. A process is described by the following state-space model (Exercise II.18): 𝑥𝑥̇ = 𝐴𝐴𝐴𝐴 + 𝐵𝐵𝐵𝐵 𝑦𝑦 = 𝐶𝐶𝐶𝐶
where
−2 1 0 0 𝐴𝐴 = �−3 0 3 � ; 𝐵𝐵 = �3� ; 𝐶𝐶 = [1 −1 0 −3 1
Assume that the sensor dynamics is represented by 𝑔𝑔𝑚𝑚 (𝑠𝑠) =
0 0]
1 0.5𝑠𝑠 + 1
1. Find the characteristic equation for the closed loop system under a P-controller. 2. Analyze closed-loop stability using Routh’s criterion and the Root-Locus. Solution: From the solution of Exercise II.18, the process transfer function is given by:
gp =
(3s + 12) s + 5s 2 + 9 s + 12 3
Using a P controller, i.e., g c ( s ) = k c , we obtain the characteristic equation as:
3s + 12 1 1 + g p gc gm = 0 = 1 + 3 k c 2 s + 5s + 9 s + 12 0.5s + 1 or
0 = ( s 3 + 5s 2 + 9 s + 12)(0.5s + 1) + (3s + 12)k c and
0 = 0.5s 4 + 3.5s 3 9.5s 2 + (15 + 3k c ) s + (12 + 12k c ) Figures IV.S3 and IV.S4, show the Root-Locus diagram for this system with the squares indicating different values of the controller gain. It can be seen from the figures that, as the gain is increased, the system moves towards the unstable region. The critical value for the controller gain (from Figure IV.S4) is 2.4 since, at this point, the Root-Locus crosses the imaginary axis.
124
ScholarFriend.com
FIGURE IV.S3 Root-Locus diagram (squares indicate the location of locus for k c = 1.14 ).
FIGURE IV.S4 Root-Locus diagram (squares indicate location of locus for k c = 2.4 ).
IV.6 Consider the process in Exercise II.19, represented by the following state-space model:
0 x1 7 x1 − 2.405 x = 0.833 − 2.238 x + − 1.117 u 2 2 x y = [0 1] 1 x2 1. Draw the block diagram representing the feedback control loop.
125
ScholarFriend.com
2. Find the characteristic equation for the closed loop system with a P controller. 3. Analyze the stability of the system using Root-Locus with P control. 4. Analyze the stability of the system with a PI controller with τ I = 0.1 . 5. Analyze the stability of the system for different values of τ I . Solution: From Exercise II.13
g p ( s) =
− 1.117 s + 3.145 ( s + 2.238)( s + 2.405)
The P controller is represented as g c ( s ) = k c . The block diagram for the closed-loop system is given in Figure IV.S5. y sp
g c (s )
u
1.117 s + 3.145 g p (s) = ( s + 2.238)( s + 2.405)
y
FIGURE IV.S5 Closed-loop diagram for Exercise IV.6.
Assuming, g f ( s ) = g m = 1 , the characteristic equation becomes,
1 + g p gc = 0 = 1 +
− 1.117( s − 2.81) kc ( s + 2.238)( s + 2.405)
or ( s + 2.238)( s + 2.405) − 1.117( s − 2.81)k c = 0 s 2 + 4.64 s + 5.38 + (3.145s − 1.117)k c = 0
Finally, the characteristic equation becomes: s 2 + (4.64 + 3.145k c ) s + (5.38 − 1.117 k c ) = 0
From here we have 5.38 − 1.117 k c = 0 is where the system becomes unstable. Thus at kc = 4.8, the system with P control is unstable. Figure IV.S6 illustrates the Root-Locus for the closed-loop system under a P controller. Figures IV.S7 and IV.S8 illustrate the changes in the locus when the integral action is added for two values of the integral time constant.
126
ScholarFriend.com
Root Locus Editor (C)
6
4
Imag Axis
2
0
-2
-4
-6 -4
-2
0
2
4
6
8
10
Real Axis
FIGURE IV.S6 Root-Locus diagram for Exercise IV.6 (P controller gain equal to 4.3). Root Locus Editor (C)
3
2
Imag Axis
1
0
-1
-2
-3 -10
-5
5
0
10
15
Real Axis
FIGURE IV.S7 Root-Locus diagram for Exercise IV.6 (PI controller kc=2; τ I = 0.1 ).
127
ScholarFriend.com
Root Locus Editor (C)
5 4 3 2
Imag Axis
1 0 -1 -2 -3 -4 -5 -4
-2
0
2 Real Axis
4
6
8
FIGURE IV.S8 Root-Locus diagram for Exercise IV.6 (PI controller with τ I = 1 ).
From these figures, the following can be observed: •
The Root-Locus for the closed-loop system with P controller is on the left-hand-side of the plane, thus always stable for a controller gain less than 4.2.
•
By adding integral action, a pole at the origin is introduced and the range of gain for stability is reduced. Larger gain margin is obtained when τI is increased.
IV.7 For the blending process (see Continuing Problem), and using the transfer functions developed in Chapter 5, we wish to implement a feedback control scheme to control the level of the tank using F1 as manipulated input. F2 , in this case, is a disturbance: 1. Formulate the characteristic equation. 2. Determine the range of controller gains that makes the closed-loop system stable using Routh’s criterion and the Root-Locus method. Solution: We have the following model for the process and disturbance transfer functions: = h ( s)
e −0.1s e −0.1s F1 ( s ) + F2 ( s ) 5s + 1 5s + 1
Assuming, g f ( s ) = g m = 1 , the characteristic equation becomes 128
ScholarFriend.com
1 + g p gc = 0 = 1 +
e −0.1s kc 5s + 1
(5s + 1) + e −0.1s k c = 0 This is a nonrational transfer function, so in order to use the Routh’s criterion, we need to transform the polynomial into a rational one. This is accomplished by a first-order Pade approximation. e −0.1s ≈
1 − 0.1s 1 + 0.1s
Consequently, the characteristic equation becomes,
( 5s + 1) +
(1 − 0.1s ) kc = 0 (1 + 0.1s )
or
0 ( 5s + 1) (1 + 0.1s) + (1 − 0.1s)kc = This is now a polynomial equation. Expressing this equation in the standard form yields,
0.5s 2 + (5.1 − 0.1kc ) s + (1 + kc ) = 0 For the Routh’s criterion, all coefficients in the characteristic polynomial need to be positive. Since k c is positive, the condition for stability, then, becomes
( 5.1 − 0.1kc ) > 0 Or, we can show that, kc < 5.1/ 0.1 = 51
Figures IV.S9 and IV.S10 illustrate the Root-Locus diagrams for two values of the controller gain, 10 and 50.5. As the value of the controller gain is increased, the location of the roots (indicated by the squares in the plot) moves towards the imaginary axis. When the value of k c is around 51, it is exactly at the crossing point reaching the critical stability value, which is consistent with the results provided by the Routh’s criterion.
129
ScholarFriend.com
FIGURE IV.S9 Root-Locus for the blending process, squares show the root location when k c = 10 .
FIGURE IV.S10 Root-Locus for the blending process, squares show the root location when k c = 50.5 .
IV.8. The “open-loop” transfer function for a feedback system is given below:
g OL ( s ) =
kc s ( s + 1)(2 s + 1)
Using the frequency response approach, determine if the feedback system would be stable with k c = 2 . Find the critical value of k c for stability. Solution:
130
ScholarFriend.com
Nyquist Stability Criterion dictates that the point (-1,0) should not be encircled by the frequency response. So we can start by finding where the Nyquist plot crosses the real axis. The frequency response is:
g OL ( jω ) =
kc kc = 2 jω ( jω + 1)(2 jω + 1) − 3ω + jω (1 − 2ω 2 )
The frequency response can be written as a complex number as: g OL ( jω ) =
kc − 3ω 2 − jω (1 − 2ω 2 ) k c (−3ω 2 − jω (1 − 2ω 2 )) = − 3ω 2 + jω (1 − 2ω 2 ) − 3ω 2 − jω (1 − 2ω 2 ) (3ω 2 ) 2 − ω 2 (1 − 2ω 2 ) 2
− 3k c ω 2 k c ω (1 − 2ω 2 ) = −j (3ω 2 ) 2 − ω 2 (1 − 2ω 2 ) 2 (3ω 2 ) 2 − ω 2 (1 − 2ω 2 ) 2 On the real axis, the imaginary part needs to be equal to zero, thus, k c ω (1 − 2ω 2 )) =0 (3ω 2 ) 2 − ω 2 (1 − 2ω 2 ) 2 Or, k c ω (1 − 2ω 2 ) = 0
The nontrivial solution is the frequency:
ω=
1 2
At that frequency, the Nyquist plot has the value:
g OL ( jω ) =
1 − 3k c 2 2
2
1 1 1 − 1 − 2 3 2 2 2 2
2
2
2
=−
2k c 3
The critical value of k c is obtained by
−
2k c = −1 3
Thus, the critical value of the proportional gain is k c =
3 . Hence the system is stable for, 2
0 < kc < 3 / 2 This makes the system with k c = 2 unstable. 131
ScholarFriend.com
IV.9. The temperature T of a heated metal bar is to be controlled by using a power supply, P (see Figure IV.2). A good model exists in terms of the following transfer function: T ( s) e −s = P ( s ) 0 .5 s + 1 The time is expressed in seconds. Design a controller so that the following objectives are met: •
The closed-loop system is stable.
•
The offset to step set-point changes is at most 1%.
•
The settling time is less than 20 sec.
•
The maximum overshoot is 20%.
FIGURE IV.2 Heated metal bar.
Solution: We should be able to use C-C method to design a P or a PI controller as the transfer function is in FOPDT form. Then we can evaluate if the design specifications are met. If not, further tuning may be necessary. From Table 12-2, the proportional gain for a P controller is:
kc =
1 τ t D 1 0.5 1 1 + = 0.8333 1 + = k t D 3τ 1 1 3(0.5)
The set-point response is given in Figure IV.S11. We can see that while the system is stable and the settling time is less than 20 sec. The offset however is quite large. One can increase the gain to minimize the overshoot but this will come at the expense of higher overshoot and very likely instability (the reader should verify this).
132
ScholarFriend.com
0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
15
10
5
0
FIGURE IV.S11 Closed-loop response using P controller for the heated bar example.
The next option is to design a PI controller: kc =
1τ t 1 0.5 1 = 0.5333 0.9 + 0.9 + D = 12τ 1 1 12(0.5) k tD
t 1 30 + 3 D 30 + 3 τ 0.5 =1 = 0.7347 τ I = tD 1 tD 9 + 20 9 + 20 0.5 τ This yields the response in Figure IV.S12. 1.4 1.2 1 0.8 0.6 0.4 0.2 0
0
5
10
15
FIGURE IV.S12 Closed-loop response using PI controller for the heated bar example.
133
ScholarFriend.com
This satisfies all the objectives. IV.10. For the chemical reactor in Exercise II.11, we are interested in developing a control scheme to control the outlet stream composition ( C A ) by manipulating the feed flow rate ( F0 ): 1. Design a PI controller using the C-C method. 2. Design a PI controller using the Z-N method. 3. Analyze and compare the closed-loop process response for both set-point and disturbance changes. Solution: Cohen and Coon Method: From the solution of Exercise II.11, we have g (s) =
2.86 −0.38 s e 1.9 s + 1
We already have the system response in the FOPDT form, thus directly from the Table 12.2, we can find the PI controller settings as: k c = 1.6;τ I = 0.89 Figure IV.S13 illustrates the performance of the closed-loop system under C-C settings for a setpoint change
FIGURE IV.S13 Closed-loop response using C-C settings k c = 1.6;τ I = 0.89 for a set-point change.
Ziegler-Nichols Method: 134
ScholarFriend.com
To apply the Z-N method, a P controller was implemented within the APC_Tool environment and the controller gain is increased until we reach sustained oscillations. Figure IV.S12 illustrates the closed-loop dynamics under a P controller with the controller gain k c = 2.6 . Based on Z-N rules, this is the ultimate value of the controller gain and the ultimate period from the figure can be determined as pu = 1.7 . With these two values, we can now calculate the Z-N settings using Table 12.4, k c = 1.17;τ I = 1.41 . Figure IV.S14 illustrates the closed-loop process response under Z-N settings for a set-point change.
FIGURE IV.S14 Closed-loop response using P controller k c = 2.6 .
FIGURE IV.S15 Closed-loop response using Z-N settings k c = 1.17;τ I = 1.41 for a set-point change.
Comparing Figures IV.S13 and IV.S15 (closed-loop responses for a set-point change) under the two alternative settings, the following can be concluded:
135
ScholarFriend.com
•
The closed-loop response under C-C settings shows faster response but with very large oscillations
•
Also the overshoot using C-C settings is large reaching a highest value of 2 (almost 100% with respect the set-point value)
•
The closed-loop response under Z-N settings shows smaller degree of oscillations without sacrificing too much of the speed of response.
•
The overshoot for the Z-N controller is also significant but lower than that obtained using C-C method (40% of the set-point value)
IV.11. For the shell-and-tube heat exchanger in Exercise II.21, we wish to implement a feedback control system using a PID controller by controlling the outlet temperature with steam flow rate. 1. Sketch the closed-loop block diagram. 2. Determine the characteristic equation. 3. Find the ultimate controller gain ( kcu ). 4. Design a PID controller using the Z-N tuning method. Solution: In Exercise II.21, the transfer function for the process was found as:
2e − s g ( s) = 5s + 1 The characteristic equation becomes
2e − s 1 + g p gc = 0 = 1 + kc 5s + 1 0 = 5s + 1 + 2e − s k c Approximating the delay using first order Pade approximation 0 = 5s + 1 + 2
1− s kc 1+ s
0 = (5s + 1)(1 + s ) + 2(1 − s )k c
0 = (5s 2 + 6 s + 1) + 2k c − 2 sk c 0 = 5s 2 + (6 − 2k c ) s + (1 + 2k c )
136
ScholarFriend.com
For Routh’s criterion, all coefficients in the characteristic polynomial need to be positive. Since k c is positive, the condition for stability, then, becomes (6 − 2k c ) > 0 Or, we can show that, kc <
6 =3 2
Figures IV.S16 and IV.S17 illustrate the Nyquist diagram and the closed-loop response for the systems for a values of the controller gain of 4, where the system is exactly at the crossing point reaching the critical stability value, which is consistent with the results provided by the Routh’s criterion (the small difference on the critical value of the gain may be due to the approximation error introduced when approximating the delay using Pade approximation.
FIGURE IV.S16 Nyquist plot for with k c = 4 .
FIGURE IV.S17 Closed-loop response for with k c = 4 ( pu = 4 ).
137
ScholarFriend.com
From the values of the ultimate gain and the ultimate period, the Z-N tuning parameters are found to be, k c = 1.845; τ I = 3.33 . Figure IV.S18 illustrates the closed-loop process response under Z-N settings for a set-point change.
FIGURE IV.S18 Closed-loop set-point response with Z-N settings k c = 1.845; τ I = 3.33 .
IV.12. Consider the bioreactor problem discussed in Exercise IV.1. 1. Analyze the stability of the closed-loop system using Root-Locus. 2. Design a PI controller using Z-N tuning rules. (Hint: introduce a small delay, compared to the process time constant, in the transfer function.) 3. Discuss the closed-loop performance regarding the set-point response. Solution: Using sfb_Tool, we obtain two Root-Locus plots shown in Figures IV.S19 and IV.S20 for a P controller depending on the sign of the controller gain. In the case where the controller gain is positive, the system may become unstable for gains larger than 0.67. On the other hand, when a negative controller gain (reverse action) is introduced, one can observe no stability limitations for the controller gain.
138
ScholarFriend.com
FIGURE IV.S19 Root-Locus for P controller (the dot at k c = 0.7 ).
FIGURE IV.S20 Root-Locus for P controller (the dot at k c = −1.2 ).
Next, integral action is introduced. In the case of the PI controller, different plots are produced for different controller parameters and are given in Figures IV.S21 to IV.S23.
139
ScholarFriend.com
FIGURE IV.S21 Root-Locus for PI controller for τ I = 1 (the dot at k c = −1.2 ).
FIGURE IV.S22 Root-Locus for PI controller for τ I = 0.2 (the dot at k c = −1.2 )
140
ScholarFriend.com
FIGURE IV.S23 Root-Locus for PI controller for τ I = 1 (the dot at k c = −20 ).
The following conclusions can be reached: •
The system is always stable for any value of the controller parameters both for P and PI controllers as long as the controller gain is negative (reverse action)
•
The addition of integral action increases the order of the system and introduces a pole at the origin
•
For P controller the poles are always real while for PI controller, they may become complex for certain combination of the controller parameters
To apply the Z-N method, we need to incorporate a small delay; otherwise, the system will not show oscillatory behavior as it does not have a crossover frequency. Adding a delay of 0.1, the modified Root-Locus plot shown in Figure IV.S24 is obtained. We can now observe the changes in the locus due to the incorporation of the delay. There is now a region in the Root-Locus, which crosses the imaginary axis, thus, indicating a region of unstable operation. The ultimate gain is k cu = −7.5 , with a period of oscillation according to Figure IV.S25 (showing the time response for gain k c = −7.5 ) with Pu = 0.65 . Consequently, the Z-N settings can be obtained from Table 12.4, and they are k cu = −3.375 and τ I = 0.54 . Figure IV.S26 illustrates the closed-loop response for a set-point change using the tuning parameters.
141
ScholarFriend.com
FIGURE IV.S24 k c = −7.5 (P controller) with addition of a time delay of 0.1.
FIGURE IV.S25 k c = −7.5 (P controller) with addition of a time delay of 0.1.
FIGURE IV.S26 Closed-Loop response with PI controller using Z-N settings ( k cu = −3.375 and
τ I = 0.54 ). 142
ScholarFriend.com
IV.13 For the process described in Exercise IV.5, 1. Find the ultimate value of the controller gain ( kcu ). 2. Design a PID controller using the Z-N tuning method. 3. Discuss the closed-loop performance. Solution: For this problem, the process and measurement transfer functions are given by
gp =
(3s + 12) 1 and g M = 2 (0.50s + 10) s + 5s + 9 s + 12 3
The Nyquist plot for the system under P controller for a value of the controller gain equal to 2.4 is given in Figure IV.S27. From this figure we can appreciate that the Nyquist plot is exactly crossing the critical point (-1;0) thus indicating that this is the critical gain ( k cu ). This is also consistent with the finding in Exercise IV.5 using the Root-Locus diagram (see Figure IV.S4).
Critical point
FIGURE IV.S27 Nyquist diagram for k cu = 2.4 .
The corresponding closed-loop response for the same value of the controller gain is given in Figure IV.S28. From this Figure, the ultimate period can be estimated as pu = 2.5 . From the Z-N settings using Table 12.4, we find for a PID controller, k c = 1.44;τ I = 1.25;τ D = 0.31
143
ScholarFriend.com
FIGURE IV.S28 Closed-loop response for P controller with k c = 2.4 .
Figure IV.S29 illustrates the closed-loop response for a set-point change using the Z-N PID controller settings.
FIGURE IV.S29 Closed-loop set-point response with a PID controller using k c = 1.44;τ I = 1.25;τ D = 0.31 .
IV.14 Consider a stirred-tank heater process (Figure IV.3). The following information about the process model is given:
144
ScholarFriend.com
FIGURE IV.3 The schematic representation of the stirred-tank heater.
g p (s) =
1.2e −10 s 0.9e −10 s ; g d (s) = (60s + 1)(5s + 1) 60 s + 1
where g p (s ) and g d (s ) represent the transfer functions between the outlet temperature and steam flow rate and the outlet temperature and the inlet temperature, respectively. For this process: 1. Sketch the feedback control loop on the process diagram, labelling all relevant process elements and signals. 2. Draw the block diagram for the feedback loop. 3. Based on the theoretical frequency response equations, design a Z-N controller using: •
an “open-loop method” where you first find g OL (s ) and then calculate kcu and pu .
•
a “closed-loop method” where you first formulate the characteristic equation and then use the direct substitution method. (Hint: Express the delay using Padé approximation.)
Solution: Figures IV.S30 and IV.S31 illustrate the schematic representation of the feedback control scheme and the closed-loop block diagram respectively for the problem defined in Figure IV.3.
145
ScholarFriend.com
Tin
TCFB
Tout
Steam
FIGURE IV.S30 Process schematic with feedback loop.
d 0.9e −10 s g d (s) = 60 s + 1
ysp
g p (s) =
g c (s )
y
1.2e −10 s (60s + 1)(5s + 1)
FIGURE IV.S31 Closed-loop block diagram.
We have in our case:
gp =
g c = k c (P controller only)
1.2e −10 s (60s + 1)(5s + 1)
g OL = g c g p
g OL = k c
1.2e −10 s (60s + 1)(5s + 1)
g OL (iω ) = 1.2k c
e −10iω (60iω + 1)(5iω + 1)
By getting rid of the delay term using Pade approximation, we get:
g OL (iω ) = 1.2k c
(60iω − 1) × (5iω − 1) e −10iω × (60iω + 1)(5iω + 1) (60iω − 1) (5iω − 1) 146
ScholarFriend.com
(60iω − 1) × (5iω − 1) 1 × (60iω + 1)(5iω + 1) (60iω − 1) (5iω − 1)
g OL (iω ) = 1.2k c e −10iω After rearranging:
g OL (iω ) = 1.2k c e −10iω
(1 − 60iω ) × (1 − 5iω )
(1 + 3600ω ) (1 + 25ω ) 2
2
Now determining the amplitude ratio: AR = Re( g OL )2 + Im( g OL )2
1 + 3600ω 2 1 + 25ω 2 1 + 3600ω 2 1 + 25ω 2
AR = 1.2k c
(
)(
)
Now calculating the phase angle:
Im(g OL ) Φ = tan −1 Re(g OL ) which can be written as:
Φ = tan −1 (− τ p1ω ) + tan −1 (− τ p 2ω ) + (− τ d ω ) where τ p1 = 60 , τ p 2 = 5 and τ d = 10 . Φ = tan −1 (− 60ω ) + tan −1 (− 5ω ) + (− 10ω ) When AR = 1, Φ = −π , which gives cross over frequency ( ω co). Equations for AR and Φ become:
1 = 1.2k c
1 + 3600ω 2 1 + 25ω 2 1 + 3600ω 2 1 + 25ω 2
(
)(
)
− π = tan −1 (− 60ω ) + tan −1 (− 5ω ) + (− 10ω ) Solving these simultaneously for kc and ω , we get: kc = 7.3 (this is the ultimate kc) and ω co = 0.123 Now we can determine the ultimate period:
pu =
2π
ω co
=
2π = 51 0.123
The next step is to determine the Z-N controller settings using the ultimate gain and the ultimate period: 147
ScholarFriend.com
kc
τI
τd
P
3.65
-
-
PI
3.32
42.5
-
PID
4.29
25.5
6.375
We offer another solution using direct substitution. We have for the closed-loop system, g CL = 1 + g c g p = 0
1.2e −10 s g CL = 1 + k c =0 (60s + 1)(5s + 1)
(60s + 1)(5s + 1) + k c 1.2e −10 s = 0 Using a first-order Pade approximation for the deadtime, e −10 s ≈
1 − 5s 1 + 5s
Substituting this in the main equation and rearranging, we get:
(60s + 1)(5s + 1)(5s + 1) + k c (1 − 5s ) = 0
(300s + 65s + 1)(5s + 1) + 1.2k (1 − 5s ) = 0 (1500s + 625s + 70s + 1) + 1.2k (1 − 5s ) = 0 2
3
c
2
c
Using the direct substitution method to solve the above, we apply s = i ω
(1500(iω ) + 625(iω ) + 70(iω ) + 1) + 1.2k (1 − 5(iω )) = 0 3
2
c
− 1500iω 3 − 625ω 2 + 70iω + 1 + 1.2k c − 6k c iω = 0
(
)
− 625ω 2 + 1 + 1.2k c + − 1500ω 3 + 70ω − 6k c ω i = 0
We can now extract the real and imaginary terms: − 625ω 2 + 1 + 1.2k c = 0 − 1500ω 3 + 70ω − 6k c ω = 0
Solving these Equations simultaneously for kc and ω , we get: kc = 7.61 (this is the ultimate kc) and ω co = 0.127 148
ScholarFriend.com
pu =
2π
ω co
=
2π = 49.3 0.127
Again, the next step is to determine the Z-N controller settings using the ultimate gain and the ultimate period: kc
τI
τd
P
3.80
-
-
PI
3.46
41.12
-
PID
4.48
24.67
6.17
IV.15 For the problem defined in Exercise IV.13, 1. Validate the results using simulations (e.g., using MATLAB). 2. Investigate and discuss the performance of the closed-loop system under both set-point changes and disturbances. Solution: To validate the results using the graphical approach, we implement the same setup (plant) within the APC_Tool environment. Using a P controller, we increase the gain until we reach the sustained oscillations. Figure IV.S32 illustrates this condition and the value of the gain is 7. Consequently, from graphical approach k cu = 7 and from the same figure pu = 50 . From these two values, the Z-N controller settings for a PI controller are calculated as, k c = 3.15 and τ I = 41.66 . These are very close to the values obtained using the analytical approach.
FIGURE IV.S32 Closed-loop response with a P controller using k c = 7 . 149
ScholarFriend.com
Figures IV.S33 and IV.S34, show the closed-loop responses using the designed controller for both set-point and disturbance changes.
FIGURE IV.S33 Closed-loop set-point response with a PI controller using k c = 3.15 and τ I = 41.66 .
FIGURE IV.S34 Closed-loop disturbance response with a PI controller, k c = 3.15 and τ I = 41.66 .
IV.16. For the heating of the oil stream described in Exercise IV.4 and considering the same operating conditions: 1. Design a PI controller using Z-N tuning rules. (Hint: Incorporate a small delay in the transfer function to find the ultimate gain.) 2. Analyze the closed-loop behavior for both set-point and disturbance changes. 3. Analyze the closed-loop response against disturbances and explain your findings for the following new operating conditions: •
T2, s = 400 C
•
T2,s = 500 C 150
ScholarFriend.com
Solution: Using a P controller, we increase the gain until reach the condition of sustained oscillations. Figure IV.S35 illustrates this condition and the value of the gain is 44. Consequently, from graphical approach k cu = 44 and from the same figure we can determine pu = 0.4 . From these two values, the Z-N controller settings for a PI controller are, k c = 19.8;τ I = 0.3666 .
FIGURE IV.S35 Closed-loop response with a P controller using k c = 44 .
Figures IV.S36 and IV.S37, show the closed-loop responses using the designed controller for both set-point and disturbance changes. Figure IV.S37 shows the presence of an inverse response behavior for a disturbance change, which is due to the presence of a positive zero in the transfer function of the disturbance.
FIGURE IV.S36 Closed-loop set-point response, PI controller with k c = 19.8;τ I = 0.3666 .
151
ScholarFriend.com
FIGURE IV.S37 Closed-loop disturbance response, PI controller with k c = 19.8;τ I = 0.3666 .
Consider now change the operating conditions by modifying the temperature in the second tank ( T2 ). From the results of Exercise II.15, the only modifications (due to this change) are in the disturbance transfer function. Figures IV.S38 and IV.S39, illustrate the disturbance rejection of the feedback controller under the new operating conditions. We can see from the figures that when the temperatures of the two tanks are equal, the inverse response behavior disappears. On the other hand, when the temperature T2 is smaller (40) than T1 , the inverse response behavior is accentuated.
FIGURE IV.S38 Closed-loop response, PI controller with k c = 19.8;τ I = 0.3666 . Disturbance change for T2, s = 50 .
152
ScholarFriend.com
FIGURE IV.S39 Closed-loop response, PI controller with k c = 19.8;τ I = 0.3666 . Disturbance change for T2, s = 40 .
IV.17 For the blending process (see Continuing Problem), and following the definitions of the manipulated and controlled variables as described in Exercise IV.7, 1. Design a PI controller using the Z-N method. 2. Analyze the gain and phase margins using the Z-N controller settings. 3. Adjust the proportional gain to achieve a gain margin of 2.5. 4. Compare and discuss the performance of the resulting controllers. Solution: The closed-loop tuning method (Z-N) is used to tune the controllers which could then be implemented in the blending process. In this case, to find the ultimate gain and period we will follow an analytical approach using the frequency response method. We have: 0.10e − s x = gp = 2.5s + 1 F2
g c = k c (P controller) g OL = g c g p
g OL = k c
0.10e − s 2.5s + 1
From Chapter 9, we know that the AR for a first-order system with delay is given by: AR =
k
(τ ω + 1) 2
2
In our case, we have 153
ScholarFriend.com
AR =
0.1k c
(2.5 ω + 1) 2
2
The phase angle is expressed as
φ = (tan −1 (−τω ) ) + (−t D ω ) where τ = 2.5 and t d = 1 :
φ = (tan −1 (−2.5ω ) ) + (−ω ) Using Bode Stability Criterion, when AR = 1 , the condition φ = −π
yields the crossover
frequency (ωco). Thus, equations for AR and φ become: 0.10k c
1=
(2.5 ω + 1) − π = (tan (−2.5ω ) ) + (−ω ) 2
−1
2 co
co
co
Solving these simultaneously for k c and ω co , we get k c = 45.85 (this is the ultimate gain k cu ) and ω co = 1.79 Now, we can determine the ultimate period: pu =
2π
ω co
=
2π = 3.51 1.79
The ultimate gain, k cu , and the ultimate period, pu , are found to be 45.85 and 3.51, respectively. We can verify our calculations using also the experimental approach to find k cu and pu (see Figure IV.S40). The controller settings are then calculated using the Z-N tuning relations. The tuning parameters are depicted in Table IV.S1.
154
ScholarFriend.com
FIGURE IV.S40 Closed-loop response for a set-point change with P controller with k c = 45.8 . TABLE IV.S1 Z-N tuning parameters for the P, PI and PID controllers
Controller
kc
τI
τD
P
22.92
-
-
PI
20.63
2.925
-
PID
27.51
1.755
0.438
Figures IV.S41 and IV.S42, show the closed-loop response for the P, PI and PID controllers for a set-point change. The control action is typical of PI and PID controllers and is shown to achieve the desired set-point and stabilize the system within approximately 15 seconds and 10 seconds, respectively.
155
ScholarFriend.com
FIGURE IV.S41 Closed-loop response (output) for set-point changes with P Controller; PI controller and PID controller with settings from Table 12.6 (step set-point introduced at t = 4 ).
FIGURE IV.S42 Closed-loop response (output) for disturbance changes with P Controller; PI controller and PID controller with settings from Table 12.6 (step disturbance introduced at t = 4 ).
Next we examine the stability margins for the PI controller using the frequency domain approach. Figure IV.S43 shows the Bode plots with the gain and phase margins. The gain and phase margins are 1.96 and 47.5, respectively, thus indicating that the PI controller has a proper safety margin with respect to stability while providing a good time response as indicated in Figure IV.S41. Finally, Figure IV.S44 shows the Root-Locus plot for the same PI controller. We observe that the
156
ScholarFriend.com
Root-Locus now moves to the complex left half-plane (additional pole due to the incorporation of the integral action).
FIGURE IV.S43 Stability margins in frequency domain with a PI controller with k c = 20.63 ,
τ I = 2.925 (GM=1.96 PM=47.5)
FIGURE IV.S44 Root locus diagram with a PI controller with k c = 20.63 , τ I = 2.925
We now explore the use of frequency domain specification in terms of requiring the closed-loop system to achieve a pre-specified gain margin. By choosing as our objective GM = 2.25 , we need to detune the PID controller gain to k c = 18 . Figure IV.S45 shows the Bode plots with the stability margin for the new situation.
157
ScholarFriend.com
FIGURE IV.S45 Stability margins in frequency domain with a PI controller with k c = 18 , τ I = 2.925 (GM=2.25 and PM =53.9).
IV.18 Consider a SOPDT process defined by the following transfer function: g p (s) =
ke − t D s (τ 1 s + 1)(τ 2 s + 1)
1. Show that a controller designed using the Direct Substitution (DS) method with the desired closed-loop response represented by the SOPTD model is a PID controller. 2. Provide the relationships for each of the PID parameters as function of the model parameters. Solution: Substituting for g(s) 1 e −tD s gc = g (τ c + t D ) s =
(τ 1s + 1)(τ 2 s + 1) 1 (τ c + t D ) s k
τ τ s 2 + (τ 1 + τ 2 ) s + 1 k (τ c + t D ) s (τ + τ ) 1 ττ = 1 2 1 + + 1 2 s k (τ c + t D ) (τ 1 + τ 2 ) s (τ 1 + τ 2 ) = 1 2
158
ScholarFriend.com
Defining:
kc =
(τ 1 + τ 2 ) k (τ c + t D )
τI =
1 (τ 1 + τ 2 )
τD =
τ 1τ 2 (τ 1 + τ 2 )
We have,
1 g c = kc 1 + + τ D s) τIs IV.19 For the blending process (see Continuing Problem), and using the transfer functions developed in Chapter 5, we would like to implement a feedback control scheme to control the concentration of the tank using F2 as the manipulated input. F1 , in this case, is a disturbance: 1. Design a PI controller using the DS method 2. Investigate the effect of using alternative closed-loop time constants τ c using simulations of the linear system 3. Analyze the resulting gain and phase margins and compare the performance of the controllers. Solution: We have the following model for the process and disturbance transfer functions:
x=
− 0.10e − s 0.10e − s F2 + F1 2.5s + 1 2.5s + 1
e −tD s 1 gc = g p (τ c + t D ) s =
(2.5s + 1) 0.1
1 (τ c + 1) s
This controller can be expressed in the PI form if we define the following parameters:
kc =
1 2.5 ; τ I = 2.5 0.10 (τ c + 1)
The Table IV.S2 shows the corresponding controller settings for three values of the closed-loop time constant τ c . Figures IV.S46 and IV.S47 illustrate the closed-loop responses using each controller for both setpoint changes and disturbances. The set-point responses are not quite like FOPTD systems due to the approximation of the delay in the controller formulation. 159
ScholarFriend.com
TABLE IV.S2 Variation of controller parameters as a function of τ c .
τc =1
τc = 2
τ c = 0.5
kc
12.5
8.33
16.66
τI
2.5
2.5
2.5
1.4 tC=0.5
1.2
tC=1.0
1
0.8 x(t)
tC=2.0
0.6
0.4
0.2
0
0
5
10
15 Time
FIGURE IV.S46 Closed-loop response for set-point changes.
160
ScholarFriend.com
20
25
30
0
-0.01 tC=0.5 -0.02
x(t)
tC=2 -0.03
tC=1
-0.04
-0.05
-0.06
0
5
10
15
20
Time
25
30
.
FIGURE IV.S47 Closed-loop responses for disturbance changes.
Figures IV.S48 and IV.S49 illustrate the Bode diagrams and the gain and phase margins for the values of τc=1and τc=0.5 respectively.
Phase
-100 -150 Phase Margin=60.7136 -200 -250
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
2.2
2.4
2
2.2
2.4
2
Modulus
1.5 Gain Margin=3.1045
1 0.5 0
0.4
0.6
0.8
1
1.2 1.4 1.6 Freuqency
FIGURE IV.S48 Stability margins for τc=1.
161
ScholarFriend.com
1.8
Phase
-100 -150 Phase Margin=51.3394 -200 -250
0.6
0.8
1
1.2
1.6
1.4
1.8
2
2.2
2.4
2.2
2.4
2
Modulus
1.5 Gain Margin=2.3293
1 0.5 0
0.6
0.8
1
1.2
1.6 1.4 Freuqency
1.8
2
FIGURE IV.S49 Stability margins for τc=0.5.
As we can see, reducing the value of the parameter (τc) reduces also the margins, thus providing a more aggressive controller. A characteristic of the DS technique is that by using τ c as a design parameter, we can make the controller more aggressive (small τ c ) or less aggressive (large τ c ). The performance of the DS controller is excellent especially for values of τ c = 1 with reduced overshoot while maintaining good speed of response. IV.20. For the chemical reactor in Exercise IV.10, 1. Using the frequency analysis investigate the gain and phase margins under the settings obtained in Exercise IV.10 2. Obtain new settings to achieve a gain margin equal to 2 3. Compare the closed-loop system responses Solution: A PI controller with k c = 1.17;τ I = 1.41 (Z-N settings) and the model of the process are provided in previous exercises. Figure IV.S50 illustrates the Bode Diagram with the Gain and Phase Margins for the Z-N tuning case.
162
ScholarFriend.com
FIGURE IV.S50 Bode diagram (showing stability margins), PI controller with k c = 1.17;τ I = 1.41 .
Next, the gain of the controller is adjusted to achieve the desired gain margin. Figure IV.S51 illustrates the Bode Diagram using a PI controller with k c = 1.3;τ I = 1.41 (gain margin settings). The gain margin for this tuning set is obtained from the graph to be equal to 2.0829 (close to the desired margin). Figures IV.S52 and IV.S53, show the closed-loop responses for both the new settings as well as the original Z-N settings for comparison.
FIGURE IV.S51 Bode diagram (showing stability margins), PI controller with k c = 1.3;τ I = 1.41 .
163
ScholarFriend.com
FIGURE IV.S52 Closed-loop response using new settings k c = 1.3;τ I = 1.41 .
FIGURE IV.S53 Closed-loop response using Z-N settings k c = 1.17;τ I = 1.41 .
IV.21. For the vertical tube double-pipe heat-exchanger in Exercises I.12 and II.22, we would like to control the outlet temperature (stream 2) with the flow rate of stream 1 considering as disturbance the inlet temperature (stream 1). Using the model obtained in Exercise II.22: 1. Design a PI controller using the Z-N method. 2. Design a PI controller using the DS method. 3. Investigate the effect of using an alternative τC using simulations of the linear system. 164
ScholarFriend.com
4. Compare and discuss the performance of the resulting controllers. Solution: Figure IV.S54 illustrates the simulation of the closed loop system with a P controller (kC=-230). Since the system’s response shows continuous oscillation then kcu=-230 also pu=0.4. From Z-N Tables we obtain the following settings for the controller, kc = −103 and τ I = 0.3 . 1.8 1.6 1.4
T(t)
1.2 1 0.8 0.6 0.4 0.2 0
0
2
1
3
4
5
6
Time
7
8
10
9
FIGURE IV.S54 Closed-loop response with P Controller kc=-230.
Figures IV.S55 and IV.S56 illustrate the closed-loop responses under a PI controller with the Z-N settings both for set-point and disturbance changes, respectively. 1.8 1.6 1.4
T(t)
1.2 1 0.8 0.6 0.4 0.2 0
0
1
2
3
4
5
Time
6
7
8
9
10
FIGURE IV.S55 Closed-loop response with PI controller kc = −103 and τ I = 0.3 (set-point change).
165
ScholarFriend.com
-3
7
x 10
6 5
T(t)
4 3 2 1 0 -1
0
1
2
3
4
5
Time
6
7
8
9
10
FIGURE IV.56 Closed-loop response with PI controller kc = −103 and τ I = 0.3 (Disturbance rejection).
Next we design a DS controller. From Exercise II.22, we have the following transfer functions
− 0.138e −0.1s 0.133e −0.15 s gp = and g d = 1.99 s + 1 3.33s + 1 The DS controller for the system is given as (Equation 12.15): gc =
e −tD s 1 g p (τ c + t D ) s
1 τs + 1 = k (τ c + t D ) s
This controller can be expressed in the PI form if we define the following parameters (Equation 12.16):
kc =
1 τ ; τI =τ k (τ c + t D )
In our case,
kc =
14.5 1 1.99 ; τ I = 1.99 = − 0.138 (τ c + 0.1) (τ c + 0.1)
Figure IV.S57 illustrates the closed-loop response under different values of τc. The responses with the Z-N controller are also shown for comparison purposes.
166
ScholarFriend.com
1.8
T(t)
1.6 1.4
ZN-controller
1.2
DS-controller (tC=0.1)
1 0.8
DS-controller (tC=0.5)
0.6 0.4 0.2 0
0
1
2
3
4
5
Time
6
7
FIGURE IV.S57 Closed-loop response under different values of τc.
167
ScholarFriend.com
8
9
10
SECTION V (Model-Based Control)
168
ScholarFriend.com
V.1. For the blending process (Continuing Problem), and using the transfer functions developed in Chapter 5, we wish to implement a feedforward-feedback control scheme to compensate for variations in the feed flow rate of stream 2 ( F2 ). 1. Design the feedforward compensator. 2. Implement the designed feedforward controller within a feedforward-feedback scheme using APC_Tool. 3. Analyze the closed-loop dynamics and compare the results with those obtained using conventional feedback scheme. 4. Study the performance of the closed-loop system under model uncertainty. Solution: First, using the model already available we design the feedforward compensation. The model of the process from previous Exercises is given by:
h (s) =
e −0.1s e −0.1s F1 + F2 5s + 1 5s + 1
In this case F2 is the disturbance to the level controller and F1 is the manipulated variable. Using the equations for the feedforward compensator given in the textbook, we have: g FF = −
gd gp
In this case,
e −0.1s e −0.1s gd = and g p = 5s + 1 5s + 1 Consequently, e −0.1s g g FF = − d = 5s−0+.1s1 = −1 gp e 5s + 1 Due to the special characteristics of the process, the feedforward compensator is just a constant, negative unit gain. Implementing the feedforward compensator into the existing feedback loop obtained previously in Exercise IV.7, we can analyze the performance of the new configuration. Figure V.S1 illustrates the closed-loop response under the configuration for a disturbance change. A small error has been introduced to be able to show some kind of dynamic of the process output, otherwise it will be mainly constant and equal to zero due to perfect compensation, thus a value of -1.1 was used in the feedforward loop. Notice that the axis is multiplied by 10-3 thus little change 169
ScholarFriend.com
is felt by the output against the disturbance change even though with an error of 10% in the feedforward constant term. Figure V.S2 illustrates the closed-loop response with an error in the negative feedforward gain of 30%. Still, in the case the performance of the closed-loop system is excellent when compared to the performance of the conventional feedback control given in Figure V.S3.
FIGURE V.S1: Closed-loop response with FF-FB (Z-N setting for feedback loop) for a disturbance change (10% error in the feedforward gain).
FIGURE V.S2 Closed-loop response with FF-FB (Z-N setting for feedback loop) for a disturbance change (30% error in the feedforward gain).
170
ScholarFriend.com
FIGURE V.S3 Closed-loop response with feedback (Z-N setting) for a disturbance change.
V.2. Consider the continuous stirred-tank heater introduced in Exercise IV.14. 1. Sketch a block diagram that shows a feedforward and a feedback control loop. 2. Design a realizable feedforward controller. 3. Using the new controller (feedforward and feedback together), compute the dynamic response of the system for a unit-step change in disturbance (using SFB_Tool) and compare the responses with those obtained in Exercise IV.14. Solution: The sketch of the feedback-feedforward controller and its block diagram are given in Fig. V.S4 and Figure V.S5.
FIGURE V.S4 Process schematic with feedforward/feedback loop.
171
ScholarFriend.com
d
ysp
y
+ +
FIGURE V.S5 Closed-loop block diagram for feedforward/feedback scheme.
To design the feedforward controller we have, g cFF = −
gd 0.9(60 s + 1)(5s + 1)e −10 s =− = −0.75(5s + 1) gp 1.2(60 s + 1)e −10 s
However, this controller is not realizable, since the order of the numerator polynomial is larger than the denominator polynomial. To make this controller realizable, a denominator polynomial is added with a small time constant compared to the numerator time constant. Thus,
g cFF = −0.75
(5s + 1) (τs + 1)
This controller is then implemented within the APC_Tool environment to analyze the closed-loop performance under different values of τ . Figures V.S6 to V.S9 illustrate the performance of the combined scheme using different values of the time constants in the denominator of the feedforward compensator. As can be seen, the performance of the feedforward compensator deteriorates as the time constant of the denominator becomes larger and gets closer to the time constant of the process. This is due to the fact that the inclusion of the denominator polynomial is seen as a model error, which, for small time constants, is negligible but as the time constant increases, it becomes more and more important. However, even with the associated uncertainties, the performance of the combined feedforward/feedback scheme is still clearly superior to the performance of the conventional feedback control as shown in Exercise IV.14.
172
ScholarFriend.com
FIGURE V.S6 Closed-loop response for a disturbance change with τ = 0.1 .
FIGURE V.S7 Closed-loop response for a disturbance change with τ = 1 .
FIGURE V.S8 Closed-loop response for a disturbance change with τ = 2 .
173
ScholarFriend.com
FIGURE V.S9 Closed-loop response for a disturbance change with τ = 3 .
V.3. For the oil stream being heated as it passes through two well-mixed tanks in series in Exercises IV.4 and IV.16 and considering the same operating condition as T2,s = 400 C , 1. Redraw the control loop in block diagram form to show the feedforward or feedback scheme. 2. Design a realizable feedforward controller. 3. Using the new controller (feedforward and feedback together), compute the dynamic response of the system for a unit-step change in disturbance (using SFB_Tool) and compare the responses with those obtained in Exercise IV.12. Solution: The closed-loop block diagram is given in Figure V.S10. d
ysp
y
+ +
FIGURE V.S10 Closed-loop block diagram for feedforward/feedback scheme.
174
ScholarFriend.com
To design the feedforward controller we have, g (10 s − 100)( s + 5) 2 − D = − = −(2 s − 50) gCFF = gP 5( s + 5) 2 However, this controller is not realizable, since the power of the numerator polynomial is larger than the denominator polynomial. To make this controller realizable a denominator polynomial is added with a small time constant compared to the numerator time constant. Thus,
gCFF = −
(2 s − 50) (τ s + 1)
This controller is then implemented within the APC_Tool environment to analyze the closed-loop performance under different values of τ . Figures V.S11 and V.S12 illustrate the performance of the combined scheme using different values of the time constants in the denominator of the feedforward compensator. As can be seen, the performance of the feedforward compensator deteriorates as the time constant of the denominator becomes larger and gets closer to the time constant of the process. This is due to the fact that the inclusion of the denominator polynomial is seen as a model error, which, for small time constants, is negligible but as the time constant increases it becomes more and more important. However, even with the associated uncertainties, the performance of the combined feedforward/feedback scheme is clearly superior to the performance of the conventional feedback control as shown in Figure V.S13.
FIGURE V.S11 Closed-loop response for a disturbance change with τ = 0.1 .
175
ScholarFriend.com
FIGURE V.S12 Closed-loop response for a disturbance change with τ = 0.01 .
FIGURE V.S13 Closed-loop response for a disturbance change with Z-N feedback control.
V.4. The vertical tube double-pipe heat-exchanger was introduced in Exercises I.11, II.22 and IV.21. With the inlet temperature (stream 1) being the disturbance and using the model obtained in Exercise II.22: 1. Sketch the feedback loop and draw it in block diagram form to show the feedforward/feedback scheme. 2. Design a realizable feedforward controller. 3. Using the new controller (feedforward and feedback together), compute the dynamic response of the system for a unit step change in disturbance and compare the responses with those obtained in Exercise IV.21. Solution: From Exercise II.22 we have the following transfer functions 176
ScholarFriend.com
gp =
− 0.138e −0.1s 0.133e −0.15 s and g d = 1.99 s + 1 3.33s + 1
The FF-controller for the system is given as (Equation 13.4)
g ff ( s ) = −
g d (s) g p (s)
0.133 (1.99 s + 1) −( 0.15−0.10) e 0.138 (3.33s + 1) 0.133 (1.99 s + 1) −0.05 s = e 0.138 (3.33s + 1)
g ff ( s ) =
Figure V.S14 shows a particular implementation of the feedforward-feedback combined scheme in Simulink environment.
FIGURE V.S14 Simulink implementation of the combined scheme.
Figures V.S15 and V.S16 illustrate the closed-loop responses for the combined scheme when compared to conventional feedback control and under different levels of model uncertainties.
177
ScholarFriend.com
-3
7
x 10
6 5
T(t)
4 3 2 1 0 -1
0
1
2
3
4
5
Time
6
7
8
9
10
FIGURE V.S15 Closed-loop response for a disturbance change with conventional controller and feedforward controller. -3
7
x 10
6 5
Conventional PI controller
T(t)
4 3
Feedforward Controller 20% error in kD
2 1 0 -1
Feedforward controller kD=kP 0
1
2
3
4
5
Time
6
7
8
9
10
FIGURE V.S16 Closed-loop response for a disturbance change with feedforward controller and model uncertainty.
178
ScholarFriend.com
V.5. Consider again the vertical tube double-pipe heat-exchanger in Exercise V.4. Considering now as disturbance the inlet flow (stream 1) and using the model obtained in Exercise II.22: 1. Design a realizable feedforward controller. 2.
Using the new controller (feedforward and feedback together), compute the dynamic response of the system for a unit step change in disturbance and compare the responses with those obtained with conventional feedback control.
Solution: In this case
gp =
− 0.138e −0.1s − 0.0572(−2.5s + 1)e −0.275 s and g d = 1.99 s + 1 (3.695s + 1)(0.0296 s + 1)
The FF-controller for the system is given as,
g ff ( s ) = −
g d (s) g p (s)
− 0.0572 (−2.5s + 1)(1.99 s + 1) −( 0.275−0.10) s e − 0.138 (3.695s + 1)(0.0296 s + 1) (−5s 2 − 0.5s + 1) = −0.41 e −0.175 s 2 (0.111s + 3.73s + 1)
g ff ( s ) = −
Figure V.S17 illustrates the closed-loop responses for the combined scheme when compared to conventional feedback control.
FIGURE V.S17 Closed-loop responses for the combined scheme when compared to conventional feedback control.
179
ScholarFriend.com
V.6. For the shell-and-tube heat-exchanger discussed In Exercise IV.11, we wish to implement a delay compensator in addition to the existing PID controller where the outlet stream temperature is the controlled variable and the steam flow rate is the manipulated variable: 1. Sketch the closed-loop block diagram for the new configuration. 2. Design the delay compensator using the process model. 3. Implement the new configuration within the APC_Tool environment. 4. Compare the performance of the closed-loop system with and without delay compensation. 5. Investigate the effect of modeling errors on the performance of the delay compensator. Solution: The schematic configuration for a delay compensation scheme is given in Figure V.S18 for this specific application. ySP +
1 ) g C ( s ) = 1.845(1 + 3.33s
-
+
+
g (s) =
2e − s 5s + 1
y
2 (1 − e −τ D s ) 5s + 1
FIGURE V.S18 Schematic representation of the delay compensation scheme.
Next, we implement this configuration into the APC_Tool software using the model available and the same controller settings found in Exercise IV.11. Figures V.S19 and V.S20 illustrate the closed-loop responses of the process with delay compensation using original settings, increasing the gain of the controller to 5. As observed, the system is still stable even with the increase in the gain. This is also confirmed by plotting the Nyquist diagram with the new controller gain (Figure V.S21).
180
ScholarFriend.com
FIGURE V.S19 Closed-loop response with delay compensator with original controller settings.
FIGURE V.S20 Closed-loop response with delay compensator with increased gain ( k c = 5 ).
FIGURE V.S21 Nyquist diagram for process with delay compensator with increased controller gain.
181
ScholarFriend.com
Next, the effect of error in the delay of the process model is investigated. Figures V.S22 and V.S23 illustrate the Nyquist diagram and the process response assuming a 30% error in the model of the delay of process ( t d = 1.3 ).
FIGURE V.S22 Nyquist diagram for process with delay compensator with increased controller gain and 30% (positive error) error in delay.
FIGURE V.S23 Closed-loop response with delay compensator with increased gain ( k c = 5 ) and 30% error in the delay of the model.
Next, we investigate the range of controller gains that can be used, assuming 30% in the delay and for which the closed-loop system remains stable. Figures V.S24 and V.S25 illustrate the Nyquist diagram and the closed-loop response when the controller gain is increased to 10 and using P controller in the feedback loop. As can be seen, the system is at the limiting condition for stability. From the dynamic response, also the period of oscillation is obtained, thus a Z-N tuning can be obtained under the new condition. The proposed controller parameters are now, k c = 4.5;τ I = 0.58 . Using these settings, the closed-loop process response are given in Figure V.S26 and V.S27 for two cases: •
Assuming a positive error in the delay of the process model ( t d = 1.3 ) 182
ScholarFriend.com
•
Assuming a negative error in the delay of the process model ( t d = 0.7 )
Finally, Figure V.S28 illustrates the Nyquist diagram of the process with delay compensation and 30% (positive) error in the delay using the proposed new controller settings.
FIGURE V.S24 Nyquist diagram for process with delay compensator with a controller gain of 10 and 30% (positive error)
FIGURE V.S25 Closed-loop response for process with delay compensator with a controller gain of 10 and 30% (positive error).
183
ScholarFriend.com
FIGURE V.S26 Closed-loop response with delay compensator with Z-N tuning and 30% (positive) error in the delay of the model.
FIGURE V.S27 Closed-loop response with delay compensator with ZN tuning and 30% (negative) error in the delay of the model.
FIGURE V.S28 Nyquist diagram with 30% (positive) error using new proposed controller settings.
184
ScholarFriend.com
V.7. For the shell-and-tube heat-exchanger discussed In Exercise IV.11, we wish implement an IMC control configuration where the outlet stream temperature is the controlled variable and the steam flow rate is the manipulated variable: 1. Design the IMC controller. 2. Implement the designed IMC controller within APC_Tool. 3. Analyze the closed-loop performance under different filter time constants. 4. Analyze the closed-loop performance when there is a 30% error in the process gain. Solution: The transfer function for this process is:
2e − s g p (s) = 5s + 1 The IMC controller can be shown to be,
g IMC ( s ) =
(5s + 1) 2.5s + 0.5 = 2(1 + λs ) (1 + λs )
Next we implement the IMC controller within the APC_Tool environment and evaluate he performance of the closed-loop system. Figures V.S29 and V.S30 show the performance of the process under closed-loop for two values of the IMC filter time constant λ = 0.5 and λ = 2 .
FIGURE V.S29 Closed-loop response for λ = 0.5 .
185
ScholarFriend.com
FIGURE V.S30 Closed-loop response for λ = 2 .
Next, the performance of the process is investigated against modeling errors. A 30% (negative) error in the delay of the process model is assumed. Figures V.S31 and V.S32 illustrate how this error influences the closed-loop response.
FIGURE V.S31 Closed-loop response for λ = 2 with 30% error in delay ( t d = 0.7 ).
FIGURE V.S32 Closed-loop response for λ = 0.5 with 30% error in delay ( t d = 0.7 ).
186
ScholarFriend.com
It is clear that the model uncertainty deteriorates the performance of the scheme affecting also the stability characteristics. We then investigate the range of filter time constants that can be used before the process reaches the stability limit (under model uncertainty). Figure V.S33 shows the Nyquist diagram for λ = 0.1 and demonstrates that under these conditions the closed-loop system is at the critical conditions for stability. Consequently, the minimum value of the filter time constant that can be used is λ = 0.1 . Figure V.S34 shows the corresponding time response for a set-point change, indicating sustained oscillations. It seems that for this system, assuming a 30% error in the delay, the value of λ = 0.5 is a good compromise showing good closed-loop response and reasonable stability characteristics. Figure V.S35 shows the Nyquist diagram for λ = 0.5 and 30% error in the delay.
FIGURE V.S33 Nyquist diagram with 30% (negative) error using with λ = 0.1 .
FIGURE V.S34 Closed-loop response for λ = 0.1 with 30% error in delay ( t d = 0.7 ).
187
ScholarFriend.com
FIGURE V.S35 Nyquist diagram with 30% (negative) error using with λ = 0.5 .
V.8. For the blending process (see Continuing Problem), and using the transfer functions developed in Chapter 5, we wish to implement a feedback scheme that controls the level of the tank using F1 as the manipulated variable. F2, in this case, is considered as a disturbance: 1. Design a PI controller using IMC PID tuning rules. 2. Analyze the closed-loop performance and compare it with the one obtained using ZN settings. 3. Find the IMC filter time constant to achieve a gain margin of 2 for the closed-loop system. Solution: The model for the process was found to be:
g p (s) =
e −0.1s 5s + 1
The IMC controller can be shown to be,
g IMC ( s ) =
(5s + 1) (1 + λs )
To obtain the conventional controller g c (s ) , we use Eq. (13.39) from the text. g c ( s) =
τ 1 1 + kλ τs
In our example, the controller parameters for a conventional controller under IMC tuning strategy are given by
188
ScholarFriend.com
kc =
τ 5 = and τ I = 5 kλ λ
Next, we investigate the performance of the feedback loop under these settings for different values of λ . Figures V.S36 and V.S37 show the closed-loop responses for λ = 0.25 and λ = 0.15 , respectively and Figure V.S38 shows the disturbance rejection performance.
FIGURE V.S36 Closed-loop response with λ = 0.25 .
FIGURE V.S37 Closed-loop response with λ = 0.15 .
189
ScholarFriend.com
FIGURE V.S38 Closed-loop response with λ = 0.15 . Disturbance rejection.
Next we investigate the values of λ to reach a stability gain margin of 2. Figure V.S39 shows the Bode diagram when λ = 0.25 ( k c = 33.33 ). In this case, the margin is still large, so we decrease the filter time constant until a condition is reached when GM = 2 . This condition is illustrated in Figures V.S40 and V.S41 showing the Bode diagram and the closed-loop response of the system when k c = 40 ( λ = 0.125 ).
FIGURE V.S39 Bode diagram with λ = 0.25 .
190
ScholarFriend.com
FIGURE V.S40 Bode diagram with k c = 40 ( λ = 0.125 ).
FIGURE V.S41 Closed-loop response with k c = 40 ( λ = 0.125 ) and GM = 1.96 .
V.9. A process has the following transfer function: y(s) =
1 −2 s 2 e −2 s u ( s) + e d (s) 5s + 1 s +1
Assume that there is a 25% error in the time-delay of the model. Calculate the bound on the IMC filter for robust stability. Solution: Let us first calculate bounds on uncertainty
g ( s ) = g~ ( s )(1 + l ( s )) 191
ScholarFriend.com
or
l (s) =
g ( s ) − g~ ( s ) g~ ( s )
In our case
2 2s 2 −2.5 s − l ( s ) = 1 + 5s − 2.51s + 5s 2 1 + 5s By algebraic manipulation we have l ( s ) = e −0.5 s − 1 For stability, we want to know when the modulus of the uncertainty is equal to one (at which frequency):
e −0.5 jω − 1 = 1 The modulus is equal to one at ω C = 2.0940 . Recalling the stability condition,
f l <1 We, then, can obtain the bound on the magnitude of the filter time constant to satisfy this condition
λ=
1
ωC
= 0.5
Figures V.S42 to V.S48 illustrate the plots of the magnitude of the uncertainty l(s), the IMC filter and the combination as function of frequency for a number of filter time constants.
FIGURE V.S42 Plot of the magnitude of the uncertainty as function of frequency (λ=0.50).
192
ScholarFriend.com
FIGURE V.S43 Plot of the magnitude of the IMC filter as function of frequency (λ=0.70).
FIGURE V.S44 Plot of f l as function of frequency (λ=0.20).
FIGURE V.S45 Plot of the magnitude of the IMC filter as function of frequency (λ=0.50).
193
ScholarFriend.com
FIGURE V.S46 Plot of f l as function of frequency (λ=0.50).
FIGURE V.S47 Plot of the magnitude of the IMC filter as function of frequency (λ=0.30).
FIGURE V.S48 Plot of f l as function of frequency (λ=0.30).
V.10. A chemical reactor (CSTR) has the following state-space representation: 𝑥𝑥̇ = 𝐴𝐴𝐴𝐴 + 𝐵𝐵𝐵𝐵 194
ScholarFriend.com
𝑦𝑦 = 𝐶𝐶𝐶𝐶
with the following matrices:
1 − k 0 − (1 + k ) k , C = [0 1] A= B = , − (1 + k ) −1 1 The constant k (the steady-state value of the feed flow rate) is subject to change during operation, according to:
k = 0.5 ± 0.1 Using the multiplicative uncertainty description, find the uncertainty bound for this system. Comment on its shape. Solution: The transfer function can be found using the relationship: g ( s ) = C [sI − A] B −1
This yields the following:
g (s) =
(
)
− s + 1 − 2k − k 2 / k (s + (1 + k ) )(s + (1 + k ) )
To calculate bounds on uncertainty, we have
g ( s ) = g~ ( s )(1 + l ( s )) and
l ( s) =
g ( s ) − g~ ( s ) g~ ( s )
The uncertain parameter changes in the range 0.4 < k < 0.6 . We can calculate the value of l(s), for each realization of the uncertain parameter. The magnitude of the multiplicative uncertainty,
l ( jω ) , is then given in Figure V.S49.
195
ScholarFriend.com
1
10
0
10
-1
10
-2
10
-3
10
-4
10
-5
10
-6
10
-2
10
-1
10
0
1
10
10
2
10
3
10
4
10
FIGURE V.S49 Plot of l( jω for values of k in the range 0.4 < k < 0.6 .
The figure indicates that the bound is high at low frequencies and low at high frequencies. This is a typical result for parametric uncertainty where the steady-state behavior of the plant would be highly uncertain. V.11. Consider the following plant transfer function, 2(𝜏𝜏1 𝑠𝑠 + 1)e−𝑡𝑡𝑑𝑑 𝑠𝑠 𝑔𝑔𝑝𝑝 (𝑠𝑠) = (5𝑠𝑠 + 1)(3𝑠𝑠 + 1)(𝜏𝜏2 𝑠𝑠 + 1)
where 0 ≤ τ 1 ≤ 2, 0 ≤ τ 2 ≤ 1, 0 ≤ τ d ≤ 0.5 . It is approximated by the following simple model: 𝑔𝑔�(𝑠𝑠) =
2 (5𝑠𝑠 + 1)(3𝑠𝑠 + 1)
A PI controller is used with the initial settings,
k c = 1,τ I = 2 Explore the robust stability of the closed-loop system as a function of the controller parameters (by varying kc and τI). Use simulations to support your arguments. Solution: First, we need to estimate the upper bound on the uncertainty. We shall assume multiplicative uncertainty, lm (s) =
g ( s ) − g~ ( s ) < l m (ω ) g~ ( s )
196
ScholarFriend.com
The upper bound on the uncertainty can be found basically by searching the parameter space 0 ≤ τ 1 ≤ 2, 0 ≤ τ 2 ≤ 1, 0 ≤ τ d ≤ 0.5 for a range of frequencies, and selecting the maximum value of the multiplicative error at each frequency. A MATLAB program that performs this calculation is given below: %Frequency Range fmin=0.1; fmax=10; w=[fmin:0.01:fmax]; [m,n]=size(w); %Parameter ranges t1min=0;t1max=2;t2min=0;t2max=1;tdmin=0;tdmax=0.5; T1=[t1min:0.1:t1max]; T2=[t2min:0.1:t2max]; TD=[tdmin:0.1:tdmax]; [M1,N1]=size(T1); [M2,N2]=size(T2); [M3,N3]=size(TD); %Calculation of multiplicative Error bound for k=1:n err=0; for i1=1:N1 for i2=1:N2 for i3=1:N3 gp(k)=2*(T1(i1)*i*w(k)+1)*exp(-TD(i3)*i*w(k))/(5*i*w(k)+1)/(3*i*w(k)+1)/(T2(i2)*i*w(k)+1); gm(k)=2/(5*i*w(k)+1)/(3*i*w(k)+1); errnew=(gp(k)-gm(k))/gm(k); if abs(errnew)>err err=abs(errnew); else end end end end error(k)=err;
197
ScholarFriend.com
end figure;loglog(w,error);
The result is shown in Figure V.S50. As expected, the uncertainty grows at high frequencies. 2
10
1
l(w)
10
0
10
-1
10
-2
10
-2
10
1
0
-1
10
frequency
10
10
FIGURE V.S50 The upper bound on multiplicative uncertainty.
For the given PI parameters, the robust stability condition can be calculated from,
η~ ( s )l m ( s ) < 1 where η~ ( s ) is the nominal complementary sensitivity function. A plot of the left-hand side of the above equation for k c = 1,τ I = 2 is shown in Figure V.S51. It can be seen that the RS condition is not satisfied. 1
10
0
10
-1
10
-2
10
-2
10
-1
10
0
frequency
10
FIGURE V.S51 Robust stability condition with k c = 1,τ I = 2 .
198
ScholarFriend.com
1
10
If the PI parameters are detuned, the RS condition may be satisfied as shown in Figure V.S52. 0
10
-1
10
-2
10
-3
10
0
-1
-2
10
10
frequency
10
1
10
FIGURE V.S52 Robust stability condition with k c = 0.25,τ I = 2 .
V.12. We have the following detailed model for a process:
g detailed ( s ) =
3(−0.5s + 1) (2s + 1)(0.1s + 1) 2
However, we would like to use the simple model given below: g simple ( s ) =
3 2s + 1
For performance, we require offset-free tracking (for step inputs), and we would like the speed of response for the closed-loop system to be as fast as allowed by the robustness considerations. Find the corresponding IMC controller, report the value of the filter constant and confirm your results with simulations. Solution: The IMC controller can be designed using the process model as follows (see Example 14.3).
g IMC ( s ) =
(2 s + 1) 0.66 s + 0.33 = 3(1 + λs ) 1 + λs
Note that g A = 1 . The uncertainty can be evaluated as,
199
ScholarFriend.com
3 3(−0.5s + 1) − 2 g p ( s ) − g~ ( s ) 2s + 1 − 0.01s 2 − 0.8s (2 s + 1)(0.1s + 1) l m (ω ) = = = 3 g~ ( s ) 0.01s 2 + 0.2 s + 1 2s + 1
Next, we need to check the robust conditions as a function of the filter parameter. The criterion is given as:
f ( s )l m ( s ) < 1 This is depicted in Figure V.S57 for various values of the filter parameter. It can be seen that for λ = 0.1 , the RS condition is violated. 1
10
0
10
-1
10
-2
10
-3
10
2
1
0
-1
10
10
10
10
FIGURE V.S57 Robust stability condition with λ = 0.1;0.5;1.0;2.0 . As λ increases the curve goes down.
A simulation is given in Figure V.S58 for λ = 1.0 . Note the stable and offset-free performance. 1.2 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4
0
1
2
3
4
5
6
7
FIGURE V.S58 Simulation result.
200
ScholarFriend.com
8
9
10
V.13. For the shell-and-tube heat-exchanger discussed in Exercise IV.11, and using MPC_Tool, 1. Implement an SISO MPC controller to control the temperature using the steam rate: a. Analyze the closed-loop performance when W1 = 1 and W2 = 1 with NP = 15 and NU = 5. b. Comment on the performance when we have W1 = 1 and W2 = 5. 2. With W1 = 1, W2 = 1 and NP = 15, NU = 5, a. Incorporate an upper bound in the manipulated variable, Q ≤ 0.8. b. Add an upper bound on the rate of change of the manipulated variable ΔQ ≤ 0.1. 3. Analyze the performance in the presence of modeling errors: a. Error in the process time delay (td = 0.7). b. Error in the process time constant (τp = 6) in addition to the error in the time delay. Solution: Figures V.S59 and V.S60, show the results of the first case (1) when we have two cases with different weights between the error and the control action. It is clear that by increasing the weight on the control action (in the objective function of the MPC), the response is more sluggish than for equal weighting but less control effort is required (the control action is not as aggressive as the previous case).
Output response
Manipulated Variable
FIGURE V.S59 Closed loop response for ( W1 = 1, W2 = 1 ).
201
ScholarFriend.com
Output response
Manipulated Variable
FIGURE V.S60 Closed loop response for ( W1 = 5, W2 = 1 ).
Figures V.S61 and V.S62 illustrate the effect of incorporating a constraint in terms of the maximum value and rate of change of the input, respectively. In both cases, as can be expected, the response of the process is more sluggish than with the system without constraints. Another point to note is that in the second case when constraint is on the rate of change of the input, the system does not reach the constraint for the maximum value (Figure V.S61) thus producing a less aggressive control action.
Manipulated Variable Output response FIGURE V.S61 Closed loop response for ( W1 = 5, W2 = 1 ) and Q ≤ 0.8 .
202
ScholarFriend.com
Output response
Manipulated Variable
FIGURE V.S62 Closed loop response for ( W1 = 5, W2 = 1 ) and Q ≤ 0.8 and ∆Q ≤ 0.1 .
Figures V.S63 and V.S64 illustrate the effect of incorporating a mismatch between the plant and the process model, specifically in the delay term both for the unconstrained and the constrained problems. In both cases, as can be expected, the response of the process starts to show larger overshoot and incipient oscillatory behavior. This behavior is less severe for the case of the constrained MPC, since the control action as discussed before is less aggressive, hence exhibiting better stability characteristics.
Manipulated Variable Output response FIGURE V.S63 Closed loop response for ( W1 = 5, W2 = 1 ) ( t d = 0.7 ), unconstrained MPC.
203
ScholarFriend.com
Output response
Manipulated Variable
FIGURE V.S64 Closed loop response for ( W1 = 5, W2 = 1 ) ( t d = 0.7 ), constrained MPC.
Figures V.S65 and V.S66 illustrate the effect of incorporating an additional error in the process time constant. In both cases, as can be expected, the response of the process shows a larger overshoot and oscillatory behavior than the case where only an error in the process delay was considered. This behavior is less severe for the case of the constrained MPC, since the control action as discussed before is less aggressive, hence showing better stability characteristics.
Manipulated Variable
Output response
FIGURE V.S65 Closed loop response for ( W1 = 5, W2 = 1 ) ( t d = 0.7 and τ p = 6 ), unconstrained MPC.
204
ScholarFriend.com
FIGURE V.S66 Closed loop response for ( W1 = 5, W2 = 1 ) ( t d = 0.7 and τ p = 6 ), constrained MPC.
V.14. Consider the system defined in Exercise V.12 with the high-order model as the plant and the low-order model for the controller design. Using MPC_Tool, a) Implement a SISO MPC controller and analyze its closed-loop performance when W1 = 1 and W2 = 1 with N p = 15 and N u = 5 . b) With W1 = 1,W2 = 1 and N p = 15, N u = 5 , incorporate an upper bound on the manipulated variable, u (t ) ≤ 0.5 . Also, add an upper bound on the rate of change of the manipulated variable, ∆u ≤ 0.2 . c) Discuss the results. Solution: This example illustrates the use of a simple model to control a more complex process using modelbased control techniques. For this application, as shown in Exercise VI.12, we have the following detailed model for a process:
g detailed ( s ) =
3(−0.5s + 1) (2s + 1)(0.1s + 1) 2
However, we would like to use the simple model given below to implement a SISO MPC controller: g simple ( s ) =
3 2s + 1
Figures V.S67 and V.S68 show the closed-loop response under the settings as specified in part (1) of the problem definition.
205
ScholarFriend.com
FIGURE V.S67 Control action response for conditions in case (1).
FIGURE V.S68 Output response for conditions in case (1).
Next we incorporate a restriction on the upper bound on the manipulated variable, thus in this case u(t) is restricted to be less or equal to 0.50. Figures V.S69 and V.S70 show the closed-loop behavior under the new situation.
206
ScholarFriend.com
FIGURE V.S69 Manipulated variable response for a bounded input constraint.
FIGURE V.S70 Output response for conditions in case of bounded input.
Finally, we consider the case of incorporating a restriction on the rate of change of the manipulated variable in this case ∆u ≤ 0.2 while maintaining the upper bound restriction as in case (2). Figures V.S71 and V.S72 show the closed-loop behavior.
207
ScholarFriend.com
FIGURE V.S71 Manipulated variable response for an upper bound and rate of change input constraints.
FIGURE VI.S72 Output variable response for an upper bound and rate of change input constraints.
From the analysis of the closed-loop behavior we can conclude that: •
The incorporation of the bounds on the manipulated variable, restricting the maximum value and the rate of change, produces a more attenuated control action (less aggressive).
208
ScholarFriend.com
•
Although the control action is attenuated, there is no substantial loss of effectiveness in the control quality with respect to the output response.
•
We can actually see that in this specific case the incorporation of the bound on the control action actually has a positive effect in terms of reducing the overshoot.
209
ScholarFriend.com
SECTION VI (Multivariable Control)
210
ScholarFriend.com
VI.1. Food safety is a primary concern during operation of the high temperature short time (HTST) pasteurization of milk 4. High temperatures result in increased shelf life, and pasteurization destroys enzymatic systems to safeguard product quality. Milk is supplied into a plate heat exchanger (PHE) where it is heated to the pasteurization temperature and then sent to a holding tube (section) where the temperature is held constant. The sketch in Figure VI.1 illustrates the process.
FIGURE VI.1 The sketch of HTST pasteurization of milk.
A cascade control system is suggested to ensure constant pasteurization temperature. Draw the block diagram of this feedback control system, clearly identifying all process elements (blocks) and the variables involved. Solution: The cascade control is suggested to minimize the impact of disturbances on the primary process section, which is the holding section. Thus, one would measure the temperature at the exit of the holding section and sent it to the primary controller that will dictate the set-point for the secondary controller that measures the temperature at the exit of the heating section and manipulates the steam rate through the valve. The block diagram is given in Figure VI.S1.
Negiz, A., P. Ramanauskas, and A. Cinar, “Modeling, monitoring and Control Strategies for High Temperature Short Time (HTST) Pasteurization Systems,” Food Control, 9, 1-47 (1998).
4
211
ScholarFriend.com
FMS, or TMS
THT,sp
+/-
gc,master
THS,sp
+/-
gc,slave
FST
Heating Section
+/+
THS
Holding Section
THT
Thermocouple / Transmitter
Thermocouple / Transmitter
FIGURE VI.S1 Cascade control configuration for the HTST process.
VI.2. Consider the closed-loop diagram depicted in Figure VI.2. For this system: 1. Suggest a cascade control configuration exploiting the dynamic characteristics of the process. 2. Design and implement a cascade controller that would improve the performance of the control system under the effect of the second disturbance ( d 2 ). 3. Simulate and compare the closed-loop results with those using the conventional feedback configuration shown in Figure VI.2.
FIGURE VI.2 Closed-loop block diagram for Exercise VI.2.
212
ScholarFriend.com
Solution: The first step in tuning the cascade controller is to adjust the controller parameters for the slave (secondary) controller. With the primary loop open, we perform a test adjusting the controller gain using P controller for the secondary loop (Z-N tuning). Figure VI.S2 shows the closed-loop response for controller gain of 5.3. This indicates that the system is already unstable for that value of the controller gain, thus he ultimate gain ( k cu ) is assumed to be 5. The period of oscillation is pu = 3.33 . With these two values and using Z-N settings, we find: k c = 2.25;τ I = 2.775 Figure VI.S3 illustrates the closed-loop response against change in disturbance ( d 2 ) using only the secondary controller and with the settings found above.
. FIGURE VI.S2 Closed-loop response for secondary loop with P controller.
FIGURE VI.S3 Closed-loop response for secondary loop with PI controller (Z-N tuning).
With the secondary controller functioning, we now tune the primary controller using Z-N rules. Figure VI.S4 illustrates the closed-loop response with the primary controller using a P controller for a controller gain of 4. The system shows sustained oscillations thus indicating the critical value of the controller gain ( k cu = 4 ), and the ultimate period is obtained from this figure as pu = 9 . This gives us for the primary controller, using Z-N tuning rules, k c = 1.8;τ I = 7.5 .
213
ScholarFriend.com
FIGURE VI.S4 Closed-loop response with P controller in the primary loop ( k cu = 4 ).
Figures VI.S5 to VI.S7 illustrate the closed-loop performance using the cascade configuration with the settings obtained above for set-point and two disturbance ( d1 and d 2 ) changes.
FIGURE VI.S5 Closed-loop response with PI controller in the primary loop (Z-N tuning). Set-point change.
FIGURE VI.S6 Closed-loop response with PI controller in the primary loop (Z-N tuning). Change in 𝑑𝑑1 .
214
ScholarFriend.com
FIGURE VI.S7 Closed-loop response with PI controller in the primary loop (Z-N tuning). Change in 𝑑𝑑2 .
Next the secondary controller is eliminated from the loop, resulting in a conventional feedback configuration. Figures VI.S8 to VI.S10 show the performance of the closed-loop system under conventional feedback. Figure VI.S8 shows the response of the system using the same tuning for the primary controller. It is clear that the system, under the same tuning as in cascade control, is closed-loop unstable. Figures VI.S9 and VI.S10 illustrate the performance of the system when the controller gain is reduced for stability reasons. The plots clearly illustrate the deterioration of the closed-loop system with conventional feedback controller as compared with the performance achieved using the cascade configuration.
FIGURE VI.S8 Closed-loop response with PI controller in the primary loop (Z-N tuning), without cascade compensation.
215
ScholarFriend.com
FIGURE VI.S9 Closed-loop response with PI controller in the primary loop (adjusted gain), without cascade compensation. Change in d 2 .
FIGURE VI.S10 Closed-loop response with PI controller in the primary loop (adjusted gain), without cascade compensation. Set-point change.
VI.3. A process is shown in Figure VI.3 where the concentration of a calcium chloride salt solution is adjusted. As can be seen in the figure, the flow rate of calcium chloride solution can be changed with the available control valve, while the water flow rate does not have any control valve.
216
ScholarFriend.com
FIGURE VI.3 The schematic of the calcium chloride mixing process.
1. Show where the flow meters would be properly placed if a ratio controller is to be implemented. 2. Propose two control configurations that would maintain a uniform outlet salt concentration by maintaining a constant ratio of the water and the calcium chloride solution flow rates. 3. Discuss and compare each configuration. Solution: Ratio control strategy is often used to control the ratio of the flow rates of two or more streams. Consequently, in this case both stream flow rates need to be measured but only one stream is controlled. In this case the manipulated one will be as indicated in the diagram the flow of calcium chloride solution.
F M
F M
FIGURE VI.S11 Illustration of measurements for ratio control.
Two possible control configurations are: •
Conventional feedback control measuring the outlet composition and manipulating the calcium chloride solution flow rate
•
Ratio control by measuring the two inlet flows as described above and their ratio is compared with the set-point specified by the operator. The controller, then, using the error in the ratio computes the control action that is implemented as a change in the flow rate of the calcium chloride solution flow
217
ScholarFriend.com
Figure VI.S12 illustrates the two possible configurations.
FIGURE VI.S12 Alternative control strategies.
As we can see the conventional feedback control uses measured values of concentrations to adjust the calcium feed flow, while the ratio controller does not requires concentration measurement for adjusting the flows since it aims at maintaining the ratio between them constant using only flow measurements. This control configuration is thus efficient under water flow rate changes, however will not be efficient for changes in the concentration of the calcium chloride solution VI.4. For the furnace problem introduced in Exercise I.9, we mentioned the safety implications associated with the temperature of the tubes inside the furnace. In addition to the feedback and feedforward controllers discussed in Exercise I.9, the safety problem needs to be addressed using a different control configuration. For this problem, discuss and formulate an override control scheme that would deal with the safety issue assuming that the surface temperature of the tubes can be measured. Solution: The furnace heater is process that requires the implementation of an override scheme due to the possibility of reaching unsafe condition under simple feedback configuration control. Figure VI.S13 shows the systems with a temperature control manipulating the fuel flow.
218
ScholarFriend.com
Heated Process Stream
TS
Fuel
P
FIGURE VI.S13 Heater feedback control.
There are however, conditions, under this configuration that can prove hazardous. These include: a) higher combustible pressure that can sustain a stable flame and b) higher stack, or tube temperature that the equipment can safely handle. 5
FIGURE VI.S14 Heater possible override control.
If these conditions occur, we need to incorporate a mechanism to decrease the fuel flow and override the temperature control, which under these conditions becomes less relevant. Figure VI.S14 shows a possible override control strategy to protect the system against unsafe conditions.
5
C. Smith, and A. Corripio, Principles and practice of automatic process control, Third Edition, Wiley (2006).
219
ScholarFriend.com
In this strategy, under normal conditions, the temperature controller is the controller selected by the low selector switch, because its output will be the lowest of the three controllers. Only when one of the unsafe conditions occur this controller is overridden by one of the other controllers VI.5. Consider the thermal mixing tank in Example 17.4. A cold stream and a hot stream are mixed in a continuously stirred tank with a constant cross sectional area, A. The height of the liquid in the tank is denoted by h. We define the following variables: F = β 2 gh
;
x1 =
h − hs hs
m1 =
FC − FCs FCs
τ=
;
Fs = β 2 ghs x2 =
T − Ts Ts
; m2 =
FH − FHs FHs
Fs t Ahs
Show that the process can be represented by the following MIMO linear model,
dx1 dt − 0.5 0 x1 T 1− T s dx = x + Cs 0 1 − 2 2 Ts dt
1 THs − Ts m1 Ts m2
1 0 y= x = Ix 0 1 Solution: We start with the overall mass balance:
dh = ρFC + ρFH − ρF dt dh = FC + FH − F A dt
Aρ
The assumption is made that the stream densities are comparable and constant. Using the assumption of constant density along with constant heat capacities, we arrive at the energy balance, A
d (Th) = FC (TC − Tr ) + FH (TH − Tr ) − F (T − Tr ) dt
Here, Tr represents a reference temperature. We know that
220
ScholarFriend.com
dh dT d (Th) , thus, =T +h dt dt dt
Ah
dT = T ( FC + FH − F ) + FC (TC − Tr ) + FH (TH − Tr ) − F (T − Tr ) dt
At steady-state, we can show that 0 = FC + FH − F 0 = FC (TC − Tr ) + FH (TH − Tr ) − F (T − Tr ) The following definitions are introduced, F = β 2 gh m1 =
FC − FCs FCs
;
Fs = β 2 ghs ; m2 =
;
FH − FHs FHs
x1 =
h − hs hs
; τ =
;
x2 =
T − Ts Ts
Fs t Ahs
After linearization, we arrive at the following model,
dx1 dt − 0.5 0 x1 T 1− T s dx = x + Cs 0 1 − 2 2 Ts dt
1 THs − Ts m1 Ts m2
This equation can be expressed in compact notation,
x = Ax + Bu Here, x is the two-dimensional vector of state variables and u is the two-dimensional vector of input variables. The corresponding measurement equation for the system is defined accordingly as, y = Cx
As expected, y is the two-dimensional vector of measured variables as we assume that both the tank level and the exit temperature can be measured. This makes the output matrix C the identity matrix: 1 0 y= x = Ix 0 1 VI.6 For the continuous stirred tank reactor (CSTR) problem discussed in Example 16.3: 1. Expand the linear state-space model to incorporate as inputs (disturbances) the temperature of the inlet cooling stream ( T j 0 ) and the feed concentration ( C A0 ). 2. Obtain the transfer functions for the expanded model.
221
ScholarFriend.com
3. Implement the model into the Simulink environment. 4. Implement and test a feedback loop to control the reactor temperature using as a manipulated variable the cooling flow rate. Solution: For the CSTR system we have the following set of nonlinear differential equations
F dC A F0 = C A0 − 0 C A − k 0 e − E / RT C A dt V V k U A dT F0 = (T0 − T ) + 0 (∆H )C A e − E / RT − t t (T − T j ) dt V ρc p ρc pV
dT F j UA = (T j 0 − T j ) + t t (T − T j ) dt V j ρ j c pjV j
In compact notation, for the original linear state-space model, we have dx = Ax + Bu dt y = Cx
where, C A − C As − 1 / τ 1 k1 / τ 1 F0 − F0 s A = k3 / τ 2 − 1 / τ 2 x = T − Ts , u = F j − F js 0 k6 / τ 3 T j − T js
0 k2 / τ 1 k5 / τ 2 ; B = k 4 / τ 2 0 − 1 / τ 3
0 0 k7 / τ 3
y 1 0 0 y = 1 ; C = 0 1 0 y2 We now expand the vector u and matrix B to include two extra elements corresponding to the new inputs (disturbances) F0 − F0 s k2 /τ1 F − F j js ; B = k 4 / τ 2 u= T j − T js 0 C 0 − C 0 s
0 0 k 7τ 3
0 0 k8 / τ 3
k9 / τ 1 0 0
where k8 and k9 are obtained by calculating the corresponding derivatives and evaluated at the steady-state conditions,
k 8 = (F j / V j )s = and k 9 = (F0 / V )s
222
ScholarFriend.com
Using the values from Table 16.3, and the steady-state operating conditions from Table 16.2,
0 0 0.14 0 0.1043 − 0.2648 − 0.02584 x (t ) = 1.789 0 0 0 u (t ) − 0.1251 0.1057 x(t ) + − 0.9816 0 0 0 0.5627 − 0.1.083 0.202 − 0.7447 1 0 0 y (t ) = 0 1 0 x(t ) 0 0 1 From this linear state-space model, the following disturbance transfer function matrix is obtained using the Matlab environment -0.0005517 0.14 s 2 + 0.08674 s - 0.02137 3 2 s 3 + 0.88s 2 + 0.057 s − 0.0059 s + 0.88s + 0.057 s − 0.0059 0.02135 s + 0.005654 0.2505 s + 0.1865 G D (s) = 3 2 3 2 s + 0.88s + 0.057 s − 0.0059 s + 0.88s + 0.057 s − 0.0059 0.202 s 2 + 0.02822 s + 0.002646 0.1409 3 s 3 + 0.88s 2 + 0.057 s − 0.0059 s + 0.88s 2 + 0.057 s − 0.0059 The implementation of such a linear model in the Simulink environment is shown in Figure VI.S15.
FIGURE VI.S15 Simulink implementation.
Figure VI.S16 illustrates the open-loop simulation using the implemented model. As expected, the system is open-loop unstable.
223
ScholarFriend.com
200
150
100
50
0
-50
0
20
40
60
80
100
120
140
160
180
200
FIGURE VI.S16 Open-loop simulation of the CSTR system
Now we implement the PI controller for the reactor temperature control. Figure VI.S17 shows the implementation of a PI controller for the temperature control by manipulating the coolant flow rate.
In1
Out1
Feed flow
Outlet Concentration In2
Out2
Reactor Temperature In3
Out3
Coolant Inlet T
Coolant Temperature Subsystem 1
PID PID Controller Coolant flow Tsp
FIGURE VI.S17 PI controller implementation of the CSTR system (reactor temperature control).
Figures VI.S18 and VI.S19 illustrate the closed-loop responses for both disturbance and set-point changes (controller adjusted by trial and error following conditions imposed by stability according to example).
224
ScholarFriend.com
0.2 0.15 0.1 0.05 0 -0.05 -0.1 -0.15
0
20
40
60
80
100
120
140
160
180
200
FIGURE VI.S18 Closed-loop response of the CSTR system (unit-step disturbance change in inlet cooling temperature). 3 2.5 2 1.5 1 0.5 0 -0.5 -1 -1.5
0
20
40
60
80
100
120
140
160
180
200
FIGURE VI.S19 Closed-loop response of the CSTR system (unit-step set-point change in reactor temperature).
VI.7 For the CSTR problem in Exercise VI.6 and based on the results of Example 16.10: 1. Implement and test a second feedback loop to control the reactor concentration using the feed flow rate as the manipulated variable. 2. Implement and test a cascade control configuration on top of the feedback loop to control the reactor temperature. 3. Simulate and discuss the closed-loop performance for both set-point and disturbances changes. Solution: 1. Implementing a second PI controller for the reactor concentration control. Figure VI.S20 illustrates the implementation of the second control loop to control the reactor concentration manipulating the feed flow rate.
225
ScholarFriend.com
PID PID Controller 1 Feed flow
Csp1
Out1
In1
Outlet Concentration Out2
In2
Reactor Temperature Out3
In3
Coolant Inlet T
Coolant Temperature Subsystem 1
PID PID Controller Coolant flow Tsp
FIGURE VI.S20 Second PI controller implementation of the CSTR system (reactor concentration control).
Figures VI.S21 and VI.S22 illustrate the closed-loop responses for both disturbance and set-point changes when both loops are closed (concentration controller also adjusted by trial and error). 0.25 0.2 0.15 0.1 0.05 0 -0.05 -0.1
0
20
40
60
80
100
120
140
160
180
200
FIGURE VI.S21 Closed-loop response of the CSTR system (unit-step disturbance change in inlet cooling temperature).
226
ScholarFriend.com
14 12 10 8 6 4 2 0 -2 -4
0
20
40
60
80
100
120
140
160
180
200
FIGURE VI.S21 Closed-loop response of the CSTR system (unit-step set-point change in reactor concentration).
2. Implement and test a cascade control configuration on top of the feedback loop to control the reactor temperature. Figure VI.S23 illustrates the implementation of the cascade control configuration. A cascade scheme is implemented within the temperature control utilizing the measurement of the coolant temperature
FIGURE VI.S23 Cascade control implementation for the CSTR system (reactor temperature control).
227
ScholarFriend.com
Figures VI.S24 to VI.S26 illustrate the closed-loop responses for a unit-step change in the inlet cooling temperature for all three variables. As expected, large improvements are observed when using the cascade configuration.
FIGURE VI.S24 Closed-loop response of the CSTR system under cascade control for a unit-step setpoint change in inlet cooling temperature (reactor temperature).
FIGURE VI.S25 Closed-loop response of the CSTR system under cascade control for a unit-step setpoint change in inlet cooling temperature (reactor concentration).
FIGURE VI.S26 Closed-loop response of the CSTR system under cascade control for a unit-step setpoint change in inlet cooling temperature (cooling temperature).
228
ScholarFriend.com
VI.8. For the system introduced in Exercise II.17 and described by the following dynamic equations: 2
dx1 = −2 x1 + exp(− x1 ) − 3u1 x 2 dt 2 x1 dx 2 + 4u 2 = − x2 + 1 + x2 dt
1. Analyze the process interaction using the RGA. 2. Define the best pairing of inputs and outputs which yields the least amount of interaction. 3. Design a multiloop control scheme. 4. Design a one- and a two-way decoupler. 5. Analyze the closed-loop performance and comment on the handling interactions by the alternative controllers. Solution: The following operating conditions are defined to calculate the parameters:
u1 = 1; u 2 = 1; x1 = −1.777; x 2 = 3.144 The transfer functions for this process then given as:
x1 ( s ) x (s) −4.72 s − 3.5 −6 = = ; 1 2 2 u1 ( s ) s + 1.825s + 0.8 u2 ( s ) s + 1.825s + 0.8 x2 ( s ) x (s) 4 s + 4.34 −2.26 ; 2 = = 2 2 u1 ( s ) s + 1.825s + 0.8 u2 ( s ) s + 1.825s + 0.8 For a 2 × 2 system, the RGA is given by:
1 − λ λ Λ= λ 1 − λ
λ=
1 k k and ξ = 12 21 1−ξ k11k 22
In this case,
ξ=
1 1 (−6 / 0.8) (−2.26 / 0.8) = λ = = 0.53 = −0.893 and 1 − (−0.893) 1.893 (−3.5 / 0.8) (4.34 / 0.8)
And we have,
0.53 0.47 Λ = 0.47 0.53 229
ScholarFriend.com
Thus, RGA indicates that either u1 should control x1 and u 2 should be used to control x 2 and the system has large interactions at steady-state, thus, independently designed multi-loop controllers would not be expected to have good performance when both loops are closed simultaneously. Next, we design two Z-N controllers for a multi-loop controller (a small delay of 0.05 has been incorporated into each loop to obtain the sustained oscillations). The multi-loop PI controller parameters based on Z-N tuning are given by: 1 0 −2.7 1 + 0.1833s Gc = 1 0 3.15 1 + 0.1666 s Figures VI.S27 to VI.S29 illustrate the performance of the closed-loop system when loop 1 is on, when loop 2 is on and when both loops are on, respectively.
FIGURE VI.S27 Loop 1 closed with Z-N settings k c = −2.7;τ I = 0.1833 .
FIGURE VI.S28 Loop 2 closed with Z-N settings k c = 3.15;τ I = 0.1666 .
230
ScholarFriend.com
FIGURE VI.S29 Both loops closed with Z-N settings.
Since the loops still show a certain amount of interaction, a decoupler needs to be designed for this process. In this case, the simplified decoupler transfer function is obtained as follows
1 d12 ( s ) 1 = D( s ) = 1 − g 21 ( s ) d 21 ( s ) g (s) 22 1 = −2.26 (4 s + 4.34)
− g12 ( s ) g11 ( s ) 1
6 (4.72 s + 3.5) 1
Figures VI.S30 and VI.S31 illustrate the closed-loop performance of the process using one-way and two-way (simplified) decoupling schemes with perfect model. As can be seen from the responses, the decoupling strategy effectively eliminates the remaining interactions in the process.
FIGURE VI.S30 Both loops closed with one-way decoupler.
231
ScholarFriend.com
FIGURE VI.S31: Both loops closed with two-way (simplified) decoupler.
VI.9. A heat-exchanger network is given in Figure VI.4. For this process, the open-loop steadystate gain matrix is obtained as: T1 − 0.33 0.017 0.014 m1 T = − 0.16 0.01 0.05 m 2 2 T3 − 1.0 − 0.03 0.03 m 3
1. Find an acceptable pairing between the controlled variables (T) and the manipulated variables (m) using interaction analysis. 2. Comment on the physical significance of the pairing structure that you found in (1).
FIGURE VI.4 Heat-exchanger network
Solution: 232
ScholarFriend.com
The RGA is given as Λ = G • (G −1 ) T This results in the RGA, 0.66 − 0.17 0.51 Λ = − 0.13 − 0.03 1.16 0.62 0.37 0.01
The most obvious pairing is (T2, m3). This also makes good physical sense. The rest of the array does not produce clear pairings. However, the negative RGA elements point to pairings that would be disfavored: (T1, m3), (T2, m1) and (T2, m2). These make sense also. The remaining pairings could be selected as (T1, m2) (T3, m1) but it is clear that these will have significant interactions due to the integrated nature of the network. VI.10. For the blending process (see Continuing Problem), and the transfer functions developed in Chapter 5, consider the following two cases: •
Case 1: Assume that the steady-state value of the inlet composition x1, s is now 0.1.
•
Case 2: Assume that the steady-state value of the inlet composition x 2, s is now 0.7.
For these two cases: 1. Perform an interaction analysis using RGA 2. Choose the optimal pair of control and manipulated variables to minimize interactions and compare with the base case discussed in Chapter 17. Solution: Case 1: The transfer functions for this process are now given as: x( s) 0.1e − s h( s ) e −0.1s = ; = F2 ( s ) 2.5s + 1 F2 ( s ) 5s + 1 x( s ) − 0.025e − s h( s ) e −2 s = ; = F1 ( s ) 2.5s + 1 F1 ( s ) 5s + 1 The plant transfer function matrix now becomes:
233
ScholarFriend.com
e −0.1s G ( s ) = 5s + 1 − s − 0.025e 2.5s + 1
e −0.1s 5s + 1 −s 0.1e 2.5s + 1
For a 2 × 2 system, the RGA is given by:
1 − λ λ Λ= λ 1 − λ
λ=
1 k k and ξ = 12 21 1−ξ k11k 22
In this case,
ξ=
1 1 1 (−0.025) = = 0.8 = −0.25 and λ = 1 − (−0.25) 1.252 1 0.1
And we have,
0.8 0.2 Λ= 0.2 0.8 Thus, RGA indicates that F1 should control x1 (level) and F2 should be used to control x 2 (composition) and the system has less interactions at steady-state with respect to the base case as discussed in the textbook (Chapter 15). Thus, independently designed multi-loop controllers would be expected to perform better when both loops are closed simultaneously. Case 2: The plant transfer function matrix now becomes:
e −0.1s G ( s ) = 5s + 1− s − 0.15e 2.5s + 1
e −0.1s 2s + 1 −s 0.05e 2.5s + 1
In this case,
ξ=
1 1 1 (−0.1) = = 0.333 = −2 and λ = 1 − (−2) 3 1 0.05
And we have,
0.34 0.66 Λ= 0.66 0.34
234
ScholarFriend.com
Thus, RGA indicates that either F2 should control x1 (level) and F1 should be used to control x 2 (composition) and the system has again less interactions at steady-state with respect to the base case as discussed in the textbook (Chapter 17). Thus, independently designed multi-loop controllers would be expected to perform better when both loops are closed simultaneously with the loops reversed to minimize interactions. VI.11. Consider again the model of the mixing tank process in Exercise VI.5. Defining the following new variables,
∆TC =
TCs − Ts T − Ts and ∆TH = Hs Ts Ts
1. Show that the TFM is given as,
1 G ( s ) = s + 0.5 ∆TC s +1
1 s + 0.5 ∆TH s +1
2. Determine the multivariable poles and zeros. Solution: 1. Consider the model of the mixing tank process in Example 18.4.
dx1 dt − 0.5 0 x1 1 dx = x + ∆T 0 1 − 2 2 C dt
1 u1 ∆TH u 2
Then, we can write.
[
]
Y(s) = C(sI − A) −1 B U(s) = G(s)U(s) −1
1 0 1 1 0 s + 0.5 = U (s) s + 1 ∆TC ∆TH 0 1 0 1 0 1 1 s + 0.5 = U (s) 1 ∆TC ∆TH 0 s + 1 1 1 s + 0.5 s + 0.5 U (s) Y (s) = ∆TC ∆TH s +1 s +1
235
ScholarFriend.com
Thus, the TFM is given as,
1 G ( s ) = s + 0.5 ∆TC s +1
1 s + 0.5 ∆TH s +1
2. We note that for a 2 × 2 matrix H,
h H = 11 h21
h12 h22
the determinant is given by
det H = h11h22 − h12 h21 Therefore, the determinant of the TFM can be expressed as ∆TC ∆TH − ( s + 0.5)( s + 1) ( s + 0.5)( s + 1) ∆TH − ∆TC = ( s + 0.5)( s + 1)
det G ( s ) =
Thus, the process has: •
Two poles located at -0.5 and -1.0,
•
No finite zeros. Only two zeros at infinity.
VI.12. For the blending process (see Continuing Problem), and using the conditions defined for Case 1, in Exercise VI.10, 1. Design and implement a multiloop PI controller, with parameters based on Z-N tuning for both level and composition loops. Take into account that the level controller is the same as designed before since the corresponding transfer functions have not changed. 2. Design and implement a decoupling controller for this process and compare its performance with the conventional multiloop control. Solution: The process transfer function matrix is given according to Exercise V.4 as:
e −0.1s G ( s ) = 5s + 1 − s − 0.025e 2.5s + 1
e −0.1s 2s + 1 −s 0.1e 2.5s + 1
236
ScholarFriend.com
The Z-N controller settings for a multiloop controller have been evaluated previously (Chapter 17) and since the only change in the transfer function, under the new situation, is to change the offdiagonal element g 21 ( s ) (which is neglected when designing a multiloop controller) the previous results are still valid under the conditions defined in Case 1. The multiloop PI controller parameters based on Z-N tuning are given as reported in Chapter 17 as: 1 0 22.951 + 0.5s Gc = 1 0 20.251 + 3.33s
FIGURE VI.S32 Closed-loop responses for multiloop independent Z-N design.
Figure VI.S32 shows the closed-loop response for the multiloop controller. As can be seen from the responses, the closed-loop system, in this case, shows a significant reduction on the amount of interactions when compared with the base case (see Chapter 15). Since the loops still show a certain amount of interaction, a decoupler needs to be designed for this process. In this case, the (simplified) decoupler parameters are obtained as follows:
237
ScholarFriend.com
− g12 ( s ) 1 d12 ( s ) 1 g11 ( s ) D(s) = = 1 − g 21 ( s ) d 21 ( s ) 1 g 22 ( s ) − (1)e −0.1 (5s + 1) 1 (5s + 1)(1)e −0,1 = −1 − (0.025)e (2.5s + 1) 1 (2.5s + 1)(−0.1)e −1 − 1 1 = 0.25 1 Figures VI.S33 to VI.S35 illustrate the closed-loop performance of the process using one-way and two-way (simplified) decoupling schemes with perfect model. As can be seen from the responses, the decoupling strategy effectively eliminates the remaining interactions in the system.
FIGURE VI.S33 Closed-loop response for two-way (simplified) decoupling.
238
ScholarFriend.com
FIGURE VI.S34 Closed-loop responses for two-way (simplified) decoupling.
FIGURE VI.S35 Closed-loop response for one-way decoupling.
VI.13. Reverse osmosis (RO) has gained recent popularity due to its success in water desalination projects. In an RO unit, brackish water (or seawater) is separated from the dissolved salts by flowing through a water-permeable membrane. The liquid flows through the membrane (permeate) by the pressure differential created between the pressurized feedwater and the desalinated product water. The latter is often at or near-atmospheric pressure. The remaining feedwater, highly concentrated in dissolved salts, continues through the pressurized side of the reactor as brine. A model of an RO unit and its control using model predictive control has been reported by Abbas2. The key controlled variable is the product conductivity which is a measure of quality. One is also interested in maintaining a desired product flow rate through the membrane. Manipulated variables are the feed pressure and pH. Abbas2 has reported the following transfer function model,
239
ScholarFriend.com
0.007(0.056 s + 1) 0 m1 ( s ) y1 ( s) 0.213s 2 + 0.7 s + 1 y ( s) = − 7.3(0.35s + 1) − 57(0.32s + 1) m1 ( s ) 2 0.213s 2 + 0.7 s + 1 0.6s 2 + 1.8s + 1 where y1 ( s ) and y 2 ( s ) are the permeate flow rate and permeate conductivity while m1 ( s ) and
m 2 ( s ) are the feed pressure and pH, respectively. The variables are in deviation form. For this process, 1. Design two multi-loop controllers using the direct substitution method. 2. Show that the resulting controllers are in the form of a PID controller with an extra lag term. The extra lag term is often incorporated into PID controllers to ensure realizability. 3. Using simulations, determine acceptable closed-loop time constants ( τ c ) for each loop. Use 10% step changes in the conductivity set-point. 4. Compare the closed-loop performance of your control system with the multi-loop PID controllers reported by Abbas2 ( k c1 = 163, τ I 1 = 0.23 and k c 2 = −7.4, τ I 2 = 1.81 ). Solution: The model transfer functions are the diagonal elements of the TFM that will be the basis for the DS method. The DS method suggests the following controller design:
g c (s) =
1 1 g p (s) τ c
This yields the following for both controllers: g c1 ( s ) =
0.213s 2 + 0.7 s + 1 1 0.007(0.056 s + 1) τ c s
g c 2 (s) =
0.6 s 2 + 1.8s + 1 1 − 57(0.32 s + 1) τ c s
It is trivial to show that these indeed are in the form of a PID controller with an additional lag element. The Simulink model for this case is given in Figure VI.S36.
240
ScholarFriend.com
0.3 ss value of permeate flow
0.213s2 +0.7s+1 0.007*0.056*0.2s2 +0.007*0.2s Step
Add
0.007*0.056s+0.007
y1 To Workspace
0.213s2 +0.7s+1
442
g21
ss value of conductivity
0.6s2 +1.8s+1 Add1
Add3
g11
-7.3*0.35s-7.3
gc1
Step1
y1
0.213s2 +0.7s+1
-57*0.32*0.2s2 -57*0.2s
-57*0.32s-57
Add2
0.6s2 +1.8s+1 g22
gc2
Add4 y2
y2 To Workspace1
FIGURE VI.S36 Simulink model.
Figure VI.S37 shows the simulations for two values of the closed-loop time constant. One can see the trade-off between speed of response and good tracking in the permeate flow rate response with high deviation from steady-state in the conductivity response.
FIGURE VI.S37 Simulations with τ c = 0.5 (top panel) and τ c = 0.2 (bottom panel).
Figure VI.S38 show the simulations for the PID controllers obtained by Abbas. One can observe that the response is highly oscillatory although the interactions are much less. 241
ScholarFriend.com
442.4
0.3 0.295
442.3
0.29
442.2
0.285
442.1
0.28 0.275
442
0.27
441.9
0.265
441.8
0.26 0.255
0
1
2
3
4
5
6
7
8
9
10
441.7
0
1
2
3
4
5
6
7
8
9
10
FIGURE VI.S38 Simulations with PI controllers.
VI.14. Following transfer function matrices were developed from experimental data from the operation of a bench-scale distillation column: − 0.007e −9.73s T1 Freflux 23.97 s + 1 = s G ( ) 1 F = −65.5 s reboiler − 0.025e T8 18.34 s + 1
0.029e −3.67 s 3.82 s + 1 Freflux 0.369 Freboiler 79.42 s + 1
− 0.006e −9.73s T1 Freflux 59.5s + 1 ( ) G s = 2 T F = − 23 s 8 reboiler − 0.034e 81.45s + 1
0.016e −7.03s 37.12 s + 1 Freflux 0.185e −11.81s Freboiler 18.62 s + 1
The transfer function matrix G1 ( s ) was obtained by changing the reflux and the boilup rates in the positive direction and observing the response of two tray temperatures. The transfer function matrix G2 ( s ) , on the other hand, was obtained by changing the reflux and the boilup rates in the negative direction. 1. For each model, design a multiloop PI controller and analyze the degree of interactions using the RGA. 2. Test each multiloop controller on both models and discuss the results with respect to closed-loop performance. 3. Explore the use of decouplers if necessary. Solution: First let us analyze the process interaction (based on both models) using the RGA. For model one the gain matrix is given by
242
ScholarFriend.com
− 0.007 0.029 K = − 0.025 0.369 For a 2 × 2 system, the RGA is given by:
1 − λ λ Λ= λ 1 − λ
λ=
1 k k and ξ = 12 21 1−ξ k11k 22
In this case,
ξ=
1 1 0.029 (−0.025) = = 1.39 = 0.28 and λ = 1 − 0.28 0.72 (−0.007) 0.369
And we have,
1.39 − 0.39 Λ= − 0.39 1.39 Thus, RGA indicates that Freflux should control T1 (top temperature) and Freboiler should be used to control T8 (bottom temperature) and the system has considerable interactions at steady-state. Thus, independently designed multiloop controllers would be expected to lose their performance when both loops are closed simultaneously. For the second model we have, − 0.006 0.016 K = − 0.034 0.185 In this case,
ξ=
1 1 0.016 (−0.034) = =2 = 0.50 and λ = 1 − 0.50 0.50 (−0.006) 0.185
And we have,
2 − 1 Λ= − 1 2 Thus, RGA indicates again that Freflux should control T1 (top temperature) and Freboiler should be used to control T8 (bottom temperature) and the system has still considerable interactions at steadystate. Thus, independently designed multiloop controllers would be expected to lose their performance when both loops are closed simultaneously as in the previous case. 243
ScholarFriend.com
Second, let us consider model one and design a multiloop controller for this system. For the first control loop using the Z-N controller design technique, we found that the ultimate controller gain for this system is kcu=600 with an pu=40 (Figure VI.S39). The controller gain and integral time constant are kc=240 and τI=34. Figure VI.S40 illustrates the closed loop behavior (for this single loop) for a set point change using the Z-N settings.
FIGURE VI.S39 Continuous oscillations for loop 1 and model 1.
FIGURE VI.S40 Closed-loop response for first loop independent Z-N design.
Following similar arguments the controller parameters for the second loop were found to be (Z-N design) kc=260 and τI=5 (with a kcu=260 and pu =6). Figure VI.S41 illustrates the closed-loop response for the independent loop.
244
ScholarFriend.com
FIGURE VI.S41 Closed-loop response for second loop independent Z-N design. (kc=104 τI= 5)
When both loops are implemented into the multivariable column environment the system shows an unstable behavior, thus gain reduction was attempted to find a reasonable closed-loop (multiloop) behavior. Figure VI.S42 illustrates the closed-loop behavior for the multivariable plant (model 1) when the controller gain of the first control loop is decreased to kc =-50 (reversed). The plant shows in this case a stable behavior however, the oscillations are still important. A decoupling scheme was attempted with different configurations (one-way, two-way) with and without gain reduction. Figures VI.S43 and VI.S44 illustrate one of the best results achieved through this procedure using one-way decoupler (d21) and with the controller gain for the second loop reduced to kc1 =-0.5 and kc2 =0.1.
FIGURE VI.S42 Closed-loop response for multivariable plant with multiloop independent Z-N design. (kc =-50 τI = 34 and kc =104, τI =5)
245
ScholarFriend.com
FIGURE VI.S43 Closed-loop responses for one-way (simplified) decoupling (d21) and controller gains reduced to kc1 =-50 and kc2 =0.5.
FIGURE VI.S44 Closed-loop responses for one-way (simplified) decoupling (d21) and controller gains reduced to kc1=-50 and kc2=0.1,
We next move to the second system represented by model two. Following similar arguments two independent Z-N design controllers were obtained with the corresponding tuning parameters given by kc1=-600, τI =34 and kc2=6, τI =34. The corresponding closed-loop responses to set point changes are illustrated by Figures VI.S45 and VI.S46.
246
ScholarFriend.com
FIGURE VI.S45 Closed-loop response for first loop under Z-N design (kc =600 τI =34).
FIGURE VI.S46 Closed-loop response for second loop under Z-N design (kc=6 τI=34).
Similar to the previous system a number of studies were performed on the multivariable system when both loops were closed simultaneously, since the process with the original controller settings was unstable. Figures VI.S47 and VI.S48 illustrates two of these experiments using one-way decoupler using the original controllers gains and with reduced gains.
FIGURE VI.S47 Closed-loop responses for one-way (simplified) decoupling (d21) and original controller gains. 247
ScholarFriend.com
FIGURE VI.S48: Closed-loop responses for one-way (simplified) decoupling (d21) and controller gains reduced.
From the previous analysis it is clear that the control of the system represented by model one is more challenging than the one represented by model two. Consequently, if a single control design is required to control the process based on the two models provided, the controller settings given for model one need to be considered since they provide the most limiting design. The next step then was to implement the controller settings designed for model 1 into model 2 to verify its behavior. Figures VI.S49 to VI.S52 illustrate some of the trials performed using the controllers found acceptable for the first model for both models. Also, it is clear from the previous analysis that a decoupling scheme is not recommended in this situation since the model uncertainties associated with the representation of the process by the two models are very large and decoupler will be very sensitive to these model uncertainties.
FIGURE VI.S49 Closed-loop response of second model with controllers designed based on model 1 kc1 =-50 τI1 =34 kc2 =2 τI2 =34.
248
ScholarFriend.com
FIGURE VI.S50 Closed-loop response of second model with controllers (kc1 =-50; τI1=34; kc2=5; τI2=34).
FIGURE VI.S51 Closed-loop response of second model with controllers (kc1=-50; τI1=34; kc2=10; τI2=34).
FIGURE VI.S52 Closed-loop response of first model with controllers (kc1=-50; τI1=34; kc2=10; τI2=34).
249
ScholarFriend.com
VI.15. For the blending process (see Continuing Problem), and using the conditions defined for the base case, 1. Implement a MIMO MPC controller using MPC_Tool to control the tank level and the product concentration by manipulating the inlet flow rates: a. Analyze the closed-loop performance for W1 = 1, W2 = 1 and Np = 15, Nu = 5. b. Comment on the performance when W1 = 5 and W2 = 1. 2. Using W1 = 1, W2 = 5 and Np = 15, Nu = 5, add an upper bound in the rate of change of the manipulated variables ∆F1 ≤ 0.8 and ∆F2 ≤ 0.8. 3. Analyze the closed-loop performance for the modified problem in Case 1, in Exercise V.4 with a. W1 = 1, W2 = 1 and Np = 15, Nu = 5 b. W1 = 1, W2 = 5 and Np = 15, Nu = 5 Solution: Figure VI.S53 illustrates the closed-loop responses for the base case in terms of the tuning parameters of the MPC ( W11 = 1, W22 = 1 and N p = 15, N u = 5 ) for changes in the set-point of each output variable respectively.
250
ScholarFriend.com
FIGURE VI.S53 Closed-loop responses with output weights W11 = 1, W22 = 1 and N p = 15, N u = 5 .
Figure VI.S54 illustrates the closed-loop responses for the case of changing the weights on the output variables of the MPC ( W11 = 1, W22 = 5 and N p = 15, N u = 5 ) again for changes in the setpoint of composition ( x 2 ).
FIGURE VI.S54 Closed-loop responses for x 2 set-point changes, with new output weights,
W11 = 1, W22 = 5 . Figure VI.S55 illustrates the closed-loop responses for a new set of input constraints ∆F1 ≤ 0.8 and ∆F2 ≤ 0.8 for set-point changes on x 2 .
251
ScholarFriend.com
FIGURE VI.S55 Closed-loop responses with new output weights ∆F1 ≤ 0.8 and ∆F2 ≤ 0.8 .
Figures VI.S56 illustrates the closed-loop responses for a new setting of the input steady-state values x1,s = 0.1 for the base case in terms of the tuning parameters of the MPC ( W11 = 1, W22 = 1 and N p = 15, N u = 5 ).
FIGURE VI.S56 Closed-loop responses with new output weights W11 = 1, W22 = 1 .
Figure VI.S57 illustrates the closed-loop responses for a new input steady-state, x1, s = 0.1 for the case when the weights for the output variables in the MPC tuning are modified ( W11 = 1, W22 = 5 and N p = 15, N u = 5 ).
252
ScholarFriend.com
FIGURE VI.S57 Closed-loop responses with new output weights W11 = 1, W22 = 5 .
VI.16 For the deethanizer column introduced in Appendix E, and the transfer function model given, 1. Design a multiloop PI controller and simulate it in the Simulink® environment. 2. Formulate an inverse-based controller. 3. Implement and test the results of the inverse-based controller in the Simulink® environment. 4. Compare and discuss the results. Solution: Following the results of Exercise VI.16, a multiloop PI control strategy was implemented on the model developed with 𝑘𝑘𝑐𝑐1 = −0.07; 𝜏𝜏𝐼𝐼1 = 14.28 ; 𝑘𝑘𝑐𝑐2 = 0.8; 𝜏𝜏𝐼𝐼2 = 10. For the case of the inverse-based controller, inverting the plant gives the following plant inverse 𝐺𝐺 −1
−0.6782𝑠𝑠 3 − 0.04𝑠𝑠 2 − 0.000716𝑠𝑠 − 0.000003768 ⎡ 𝑠𝑠 2 + 0.042𝑠𝑠 + 0.00033 =⎢ 3 2 ⎢0.08097𝑠𝑠 + 0.0056𝑠𝑠 + 0.0001259𝑠𝑠 + 0.0000008996 ⎣ 𝑠𝑠 2 + 0.042𝑠𝑠 + 0.00033
9.75𝑠𝑠 3 + 0.455𝑠𝑠 2 + 0.0068𝑠𝑠 + 0.0000325 ⎤ 𝑠𝑠 2 + 0.042𝑠𝑠 + 0.00033 ⎥ 5.086𝑠𝑠 3 + 0.3221𝑠𝑠 2 + 0.0061𝑠𝑠 + 0.0000339⎥ ⎦ 𝑠𝑠 2 + 0.042𝑠𝑠 + 0.00033
Comparative results of both control strategies are given in Figures VI.S58-VI.S59 for both setpoint and disturbances changes.
253
ScholarFriend.com
1.5
Pressure
1
PI Controller Inverse-based controller
0.5
0 50
0
100
150
200
250
300
350
400
Time [min]
10
-3
8
Inverse-based controller
6
PI controller
4
2
0
Temperature
-2
-4
-6
-8
-10
-12 0
50
100
150
200
250
300
350
400
Time [min]
FIGURE VI.S58 Performance of the two controller strategies in response to a change in the pressure setpoint, (a) Pressure response, (b) Temperature response.
254
ScholarFriend.com
1.6
Inverse-based controller PI Controller
1.4
1.2
1
Pressure
0.8
0.6
0.4
0.2
0
-0.2 0
50
100
150
200
250
300
350
400
Time [min]
0.02
Inverse-based controller PI controller
0.01
0
-0.01
Temperature
-0.02
-0.03
-0.04
-0.05
-0.06
-0.07 0
50
100
150
200
250
300
350
400
Time [min]
FIGURE VI.S59 Performance of the two controller strategies in response to a change in the feed flow rate, (a) Pressure response, (b) Temperature response.
VI.17 Consider the CSTR process discussed in Example 16.6, now with alternative operating and design conditions as specified in Table VI.1. For this system:
255
ScholarFriend.com
1. Plot the heat-generated and heat-removed curves as a function of temperature3 and compare those with the conditions given in Example 16.6. 2. Discuss the results.
TABLE VI.1 New Design and Operating Conditions for the Nonisothermal CSTR Model
Variable
Value
Units
CA0
5
kmol/m3
F0
3.2
m3/min
Fj
1.092
m3/min
Tj0 k0
294.4 1.69 × 1013
K h-1
E
82,500
kJ/kmol
Ut
20,124
kJ/h m2 C
R
8.314
kJ/kmol K
−∆H
84,000
kJ/kmol
cp
3.9
kJ/kg K
cpj
4.18
kJ/kg K
ρ
1,500
kg/m3
ρj At
1,000 42.08
kg/m3
V
22.82
m3
Vj CAs ‘‘“A Ts
5.4
m3
2.353
kmol/m3
362.4 345.69
K K
Tjs
m2
Solution: Figure VI.S60 illustrates the heat-generated and-heat removed plots for both conditions. As can be observed, the new condition has a single steady-state operating point, which is stable. As a comparison, the previous condition has multiplicity with one unstable steady-state.
256
ScholarFriend.com
10
6
Heat Generated, Heat Removed, Steady States
2
1.5
1
377.3004
362.0567 0.5
Q (kJ/min)
338.3325 0
-0.5
-1
-1.5 280
300
320
340
360 o
Temperature (
380
400
K)
FIGURE VI.S60 Heat-generated vs heat-removed curves for the CSTR, (a) conditions given in Table VI.1, (b) conditions given in Table 16.2.
257
ScholarFriend.com
VI.18 Consider the CSTR example specified in Exercise VI.17. For this process, 1. Obtain the linear state-space model. 2. Check stability conditions to determine if the system is open-loop stable. 3. Discuss the results Solution: The model is obtained as 0.1437 0 0 0 −0.4066 −0.03542 0 1 0 0 𝐴𝐴 = � 2.868 ; 𝐵𝐵 = ; 𝐶𝐶 = ; 𝐷𝐷 = �−1.025 � � �0 0� 0 � 0.1355 0.1057 � 0 1 0 0 −8.048 0 0 0 0.5627 −0.7447
Eigenvalues are:
λ1= -0.1106 + 0.0303i λ2= -0.1106 - 0.0303i λ3 = -0.7947 + 0.0000i Therefore, the system is stable under the new operating conditions. VI.19 For the CSTR example discussed in Exercises VI.17 and VI.18, 1. Obtain the corresponding transfer functions assuming as output (measured) variables the reactor composition and reactor temperature. 2. Determine the poles of the system and compare them with the eigenvalues from Exercise VI.18. Solution: The transfer function matrix is, 0.1437 𝑠𝑠 2 + 0.1239 s + 0.004005 ⎡ 3 2 𝐺𝐺 = ⎢𝑠𝑠 + 1.0162 𝑠𝑠 + 0.1889 s + 0.01045 ⎢ −1.025 𝑠𝑠 − 0.7685 s − 0.003594 ⎣𝑠𝑠 3 + 1.016 𝑠𝑠 2 + 0.1889 s + 0.01045
The poles are:
p1= -0.1105 + 0.0303i
0.03014
⎤ ⎥ −0.8509 s − 0.3459 ⎥ 3 2 𝑠𝑠 + 1.016 𝑠𝑠 + 0.1889 s + 0.01045⎦ 𝑠𝑠 3 + 1.016 𝑠𝑠 2 + 0.1889 s + 0.01045
p2= -0.1105 - 0.0303i p3 = -0.7945 + 0.0000i This is as expected as they are equal to the eigenvalues of matrix A and all have negative real parts so the system is stable.
258
ScholarFriend.com
VI.21 For the CSTR example discussed in Exercises VI.17, VI.18 and VI.19, 1. Implement the model in the Simulink® environment. 2. Formulate and design a multiloop PI controller to control the temperature and composition using the coolant flow rate and the feed flow rate as manipulated variables. 3. Discuss the results. Solution: The Simulink model is given in Figure VI.S61.
FIGURE VI.S61 Simulink model for the CSTR.
Two multiloop PI controllers to control the reactor and temperature using the feed flowrate and the coolant flowrate as manipulated variables, respectively, are implemented in the Simulink environment with 𝑘𝑘𝑐𝑐1 = 0.6 ; 𝜏𝜏𝐼𝐼1 = 0.7 ; 𝑘𝑘𝑐𝑐2 = −0.1 ; 𝜏𝜏𝐼𝐼2 = 0.1. Figures VI.S62-VI.S69 illustrate the closed-loop trajectories of the reactor concentration and temperature under disturbance changes in the inlet concentration, inlet coolant temperature as well as set-point changes in reactor temperature and concentration.
259
ScholarFriend.com
FIGURE VI.S62 Closed-loop response of the reactor concentration under changes in inlet concentration.
FIGURE VI.S63 Closed-loop response of the reactor temperature under changes in inlet concentration.
260
ScholarFriend.com
FIGURE VI.S64 Closed-loop response of the reactor concentration under changes in coolant temperature.
FIGURE VI.S65 Closed-loop response of the reactor temperature under changes in coolant temperature.
261
ScholarFriend.com
FIGURE VI.S66 Closed-loop response of the reactor concentration under changes in the concentration setpoint.
FIGURE VI.S67 Closed-loop response of the reactor temperature under changes in the concentration setpoint.
262
ScholarFriend.com
FIGURE VI.S68 Closed-loop response of the reactor temperature under changes in the temperature setpoint.
FIGURE VI.S69 Closed-loop response of the reactor concentration under changes in the temperature setpoint.
263
ScholarFriend.com
SECTION VII (Special Topics)
264
ScholarFriend.com
VII.1. Consider the quadratic objective function f ( x) = a0 + a1 x + a2 x 2 1. Find the optimal solution for the unconstrained case 2. Discuss and represent graphically the constrained cases: a. Case (b): x ≥ x where x is a given value of x b. Case (c): x ≤ x where x is a given value of x Solution: Unconstrained Case: The unconstrained optimization of a quadratic function is straightforward, differentiating f(x) with respect to x and setting the derivative equal to zero max f ( x) = a0 + a1 x + a2 x 2 df = 0 = a1 + 2a2 x dx a x opt = − 1 2a2 A graphical representation of the unconstrained case is shown in Figure VII.S1a. Now let us consider the constrained case.
FIGURE VII.S1 Graphical representation of VII.1.
Constrained Case: Let us impose a linear inequality constraint. We analyze two cases: •
Case (a): x ≥ x where x is a given value of x (Figure VII.S1b). The constraint does not have an effect, i.e. the unconstrained optimization problem satisfies the constraint.
265
ScholarFriend.com
•
Case (b): x ≤ x (Figure VII.S1c). The constraint now becomes relevant (active). That is the optimum point is at the constraint.
VII.2. Consider the problem of minimizing the fuel costs in a boiler-house which consists of two turbine generators (Figure VII.1). The generators can be simultaneously operated with two fuels: •
Fuel oil
•
Medium BTU gas (MBG)
MBG is produced as a waste off-gas from another part of the plant and must be flared if it cannot be used on site. We wish to find the optimum flow rates of fuel oil and MBG. This will define the optimal setpoints for the flow controllers for these units. We have the following additional information: •
The operating objective of the boiler house is to provide 50 MW of power while minimizing costs.
•
The two turbogenerators (G1, G2) have different operating characteristics: efficiency of G1 is higher than that of G2.
•
Data collected on the fuel requirements for the generators yield the following empirical relations: P1 = 4.5 x1 + 4 x2 P2 = 3.2 x3 + 2 x4
where P1 is the power output (MW) from G1, P2 is the power output (MW) from G2, x1 is the fuel oil flow rate to G1, x2 is the MBG flow rate to G1, x3 is the fuel oil flow rate to G2, and x4 is the MBG flow rate to G2. The total amount of MBG available is 5 fuel units/h and also the power generation from each unit is limited: 18 ≤ P1 ≤ 30 14 ≤ P2 ≤ 25
266
ScholarFriend.com
FIGURE VII.1 Schematic representation of boiler house generators in Exercise VII.2.
Solution: 1) Select Variables: P1, P2 and x1 through x4 (6 variables) 2) Select Objective Function: Minimize f =x1 +x3 Or alternatively Maximize f =-x1 -x3 3) Develop the model and constraints Power Range
18 ≤ P1 ≤ 30 14 ≤ P2 ≤ 25 Total Power
P1 = 4.5 x1 + 4 x 2 P2 = 3.2 x3 + 2 x 4 MBG supply
50 = P1 + P2 4) Model Simplification:
5 = x2 + x4
267
ScholarFriend.com
NV=6 and NE=4 then four out of six variables can be eliminated. Solving for P1 and P2 and combining equations: 4.5 x1 + 6.4 x3 ≥ 50 4.5 x1 + 6.4 x3 ≤ 62 4.5 x1 + 6.4 x3 ≥ 44 4.5 x1 + 6.4 x3 ≤ 55 Also, applying the constraint that x2 and x4 must be nonnegative
2.25 x1 + 1.6 x3 ≤ 20 (x2 ≥ 0) 2.25 x1 + 1.6 x3 ≥ 15 (x4 ≥ 0) Figure VII.S2 illustrates the graphical solution of the problem, the feasible region as well as the optimal solution. As we can see the solution lays on the intersection of constraints C2 and C3.
FIGURE VII.S2 Feasible region and optimal solution for VII.2.
This means: –
2.2 tons/h of fuel oil is delivered to generator G1 while 6.25 tons/h are used in G2
–
G1 operates with all MBG , while G2 uses none, due to the low efficiency of G2
In terms of power production, we have P1 = 30 and P2 =20. VII.3 Two input variables u1 and u2 affect a state variable x which is also measured as output y. A disturbance d also influences the system dynamics. The system is modeled as: 268
ScholarFriend.com
dx = 3u1 + 4u 2 − x + d dt y=x Or, in terms of transfer functions: y=
1 3 4 d u1 + u2 + s +1 s +1 s +1
The steady-state optimization problem for this process can be formulated as: max Φ = −5u1 − 6u2 + 7 y s.t.
y ≤ 10 u1 ≥ 0 u2 ≥ 0 y = 3u1 + 4u2 + d
For the nominal problem (d=0), solve this optimization problem graphically. Plot the feasible region and the objective function contours. Solution: This formulation can be rewritten in terms of u1 and u2 substituting the values of y from the equality constraint, max Φ = 16u1 + 22u2 s.t.
3u1 + 4u2 + d ≤ 10 u1 ≥ 0 u2 ≥ 0
This problem can then be represented graphically, as function of u1 and u2 (Figure VII.S3)
FIGURE VII.S3 Feasible Operating Region (d=0).
269
ScholarFriend.com
VII.4 Consider again the process given in Exercise VII.3 but now the disturbance dynamics is given as: d ( s) =
3 s +1
This results in the maximum input magnitude of 3 at steady-state. Calculate the steady-state openloop back-off graphically and report the associated economic penalty. Solution: The optimization problem is now rephrased as: max Φ = 16𝑢𝑢1 + 22𝑢𝑢2
s.t. 3𝑢𝑢1 + 4𝑢𝑢2 + 3 ≤ 10 𝑢𝑢1 ≥ 0 𝑢𝑢2 ≥ 0
The new result is displayed in Figure VII.S4 and shows that the back-off point and the new optimum.
FIGURE VII.S4 The new optimum for Exercise VII.4.
This open-loop back-off provides the upper limit on the cost of controller. In the next step, one can establish an estimate of the amount of the penalty that can be recovered using a controller. VII.5 A multilayer control scheme was discussed in Chapter 21 for advanced operation and optimal control of process units. Consider a polymerization process where the particle size polydispersity index (PSPI) (a measure of the particle size distribution), and the numberaverage molecular weight (NAMW) are controlled by manipulating the monomer feed and
270
ScholarFriend.com
temperature. We assume that there are infrequent measures of the controlled variables (PSPI and NAMW): 1. Represent, in simple terms, using the block diagram configuration, how one would implement a multilayer control scheme for this polymerization process. Use MPC as the intermediate control layer. 2. Also, in simple terms, describe the different uses of the model within this multilayer scheme. 3. What are the consequences if the MPC layer is eliminated? Solution: The simple block diagram representation of the multi-layer strategy is shown in Figure VII.S5. J (Cost function) Constraints Off-line Optimisation
PSPI (setpoint) NAMW (setpoint)
Fm ,Te
Controller
d
Polymerisation Process
PSPI NAMW CHDF GPC
Dynamic Model
-
+
FIGURE VII.S5 Block diagram representation of multi-layer strategy.
From the diagram in Figure VII.S5, we can see that the model is used in different ways in the multi-layer formulation: •
It is used within the proposed strategy to calculate the optimal set-points for PSPI and NAMW by solving (off-line) an optimization problem
•
As a soft sensor to provide information about PSPI and NAMW in real-time to make the closed-loop control of the desired objective feasible.
•
A model is also used as part of the MPC implementation, however, in this case, it is just a simple input-output linear model, which can be obtained from the mechanistic (rigorous) model or from plant data.
Note that since we are assuming we have infrequent measurements of the control objectives by some experimental means, they can be used (infrequently) to adjust the predicted values provided by the model (model corrections). Elimination of the intermediate layer consisting of the model predictive control algorithm (MPC) is possible. In this case, the off-line predicted optimal trajectories of monomer feed and temperature are directly fed to the lower layer (PID) controller that will force the process to follow these trajectories through a feedback action. However, the practical implication of this is that we cannot guarantee the satisfaction of the control objective if a disturbance occurs. 271
ScholarFriend.com
VII.6. Consider the problem given in Examples 22.6 and 22.7. We now consider the flow rate of streams 1, 2, 5, 7, and 8 to be measured: 1. Write the balance equations and confirm the variable classification obtained in Example 22.7. 2. Assume that the flow rate of stream 3 is also measured. How does this affect the classification of the process variables? 3. Assume again that the flow rate of stream 3 is measured, but the flow rate of stream 8 is unmeasured. Classify the process variables again and explain the results. Solution: The balance equations for this problem are: F1 + F2 + F3 − F4 = 0 F4 + F5 − F3 − F6 = 0 F6 + F7 − F8 = 0 From the first equation, we can solve for F4 F4 = F3 + F1 + F2 Substituting in the second equation we obtain F3 + F1 + F2 − F3 = F6 − F5 F1 + F2 + F5 − F6 = 0 F3 and F4 cannot be obtained from any of the balance equations. So they are unmeasured and indeterminable process variables. Solving this equation for F6 we have F6 = F5 + F1 + F2
In this equation, we found F6 as function of all measured variables, thus F6 is an unmeasured but determinable variable. Substituting for F6 in the third equation we finally have − F8 + F7 + F5 + F1 + F2 = 0 This equation contains only measured variables, consequently all the variables involved are redundant. Now, if F3 is assumed measured, then we can use the first equation to calculate F4 so this variable will become unmeasured but determinable process variable. The rest of the classification remains unchanged from the previous classification. If F3 is assumed measured and F8 is considered unmeasured, then the following procedure can be used to calculate F4, F6 and F8
272
ScholarFriend.com
From the first equation calculate F4 F4 = − F3 + F1 + F2 Then, from the balance around unit 2 calculate F6 F1 + F2 + F5 = F6 And from a balance around unit 3, calculate F8 F8 = F7 + F6 In this way, F4, F6 and F8 are now unmeasured but determinable process variables (all unmeasured variables can be determined from the balance equations) but there is no redundant subsystem, so there will not be redundant process variables. VII.7. The process topology of a section of an ethylene plant is represented by the following matrix: 0 0 0 1 1 1 − 1 − 1 0 A = 0 0 − 1 1 0 −1 0 0 0 0 0 0 0 1 0 − 1 − 1 − 1
For the total mass balance data reconciliation problem, 1. Obtain the corresponding flow diagram and develop the mass balances. 2. Assume that all process stream flow rates measured. Discuss the classification of variables and the number of redundant equations. 3. Assume that the flow rate of stream 5 is unmeasured. Classify the process variables and find the redundant equations if any. Solution: We can see from the process matrix that this process has 9 streams and 3 process units. The flow diagram for this process is given in Figure VII.S6. F5
F2 F1
1
F3 F4
F9
2
F6
F8
3 F7
FIGURE VII.S6 Block diagram representation of multi-layer strategy.
The corresponding mass balances around each unit are given by
273
ScholarFriend.com
F1 + F2 + F3 − F4 − F5 = 0 − F3 + F4 − F6 = 0 F5 − F7 − F8 − F9 = 0 If all process streams flow rates are measured, then, all variables are redundant (over measured) and we will have three redundant equations. Now, if flow rate of stream 5 is considered unmeasured, then, by solving for F5 from the first balance equation, we have: F5 = F1 + F2 + F3 − F4 Substituting this value into the third mass balance, we obtain F1 + F2 + F3 − F4 − F7 − F8 − F9 = 0 Consequently, from the resulting equations, the following variable classification follows: Over-measured variables:
F1 , F2 , F3 , F4 , F6 , F7 , F8 , F9 and F8
Just-Measured variables:
none
Determinable variables:
F5
Indeterminable Variables:
none.
VII.8. For the problem described in Exercise VII.7, assume that the data set in Table VII.1 is given (measured values). Flow rates
Measured values
Variances
F1
70.49
10.9
F2
7.103
0.2
F3
13.04
0.4
F4
35,38
2.6
F5
53.21
5.76
F6
23.90
0.9
F7
0.00
0.6
F8
0.0765
0.23
F9
54.59
5.8
Table VII.1: Data for Exercise VII.7. 274
ScholarFriend.com
1. Apply the Global Test to check the consistency of a set of measurements (assume an error probability of 0.10) 2. Perform data reconciliation on the given set of data Solution: To apply the Global Test to evaluate the set of data for statistical consistency, we need to calculate the balance residuals and their variances. The residual in the balances and their corresponding variances are given by
δ = Ax m ; φ = A ΨAT In this case, the corresponding values are − 1.1796 0.2019 0.1263 0.0543 −1 δ = 1.1031 ; φ = 0.1263 0.5863 0.034 1.4565 0.0543 0.034 0.095
Applying the consistency global test, we have h = δ T φ −1δ = 0.79 If we consider an error probability of 0.10, the critical value for h with 3 degrees of freedom is hc = 6.251 (from statistical tables). Since, in this case h < hc , we can say that based on the global test and an error probability level of 0.10, the data is statistically consistent and gross errors are not present in the data set. From the previous procedure, we checked that data do not contain gross errors, however, there are still random errors present in the data set, so we can safely apply a data reconciliation procedure to obtain a better prediction of the process status. The new estimate of the process variables, as shown in the textbook, is given for the linear case by xˆ = y − ΨAT ( AΨAT ) −1 Ay Using the available information (measurements and covariance matrix), then, we have the following measurement errors and variable estimates
275
ScholarFriend.com
0.1236 70.37 - 0.0023 7.10 - 0.1581 12.88 1.0451 36.42 ε = 0.7128 ; xˆ = 53.92 - 0.3567 23.54 - 0.0684 − 0.07 - 0.0259 0.05 - 0.6483 53.94 And the values of the new residuals in the balance equations are 0.71 δ = 0.36 e −14 − 0.71
VII.9. Fisher’s classical data set consists of three classes with each class containing m = 4 measurements and n = 50 observations. Class 3 data were used to construct the covariance matrix of the measurements. After autoscaling and performing the eigenvalue decomposition: 0 0 0 1.92 0 0.96 0 0 Λ = 0 0 0.88 0 0 0 0.24 0
0.64 −0.29 0.052 −0.71 0.64 −0.23 0.25 0.69 V = 0.34 0.33 −0.88 0.11 0.41 −0.09 0.25 0.87
1. Calculate the amount of variance explained when only one PC is retained. 2. How many PCs should be retained for the PCA model to explain 70% of the total variance and what is the eigenvector matrix in this case? Solution: The total variance of the covariance matrix projected along V is equal to the trace of Λ If only one PC is retained (i.e. a=1), then:
Trace= Λ 1.92 + 0.96 + 0.88 + 0.24 = 4.0
1.92 Variance Explained by= first PC = 100 48.0% 4
276
ScholarFriend.com
2.88 Variance Explained by = first PC = 100 72.0% 4
For a =2 the loading matrix P is equal to the first two columns of V:
0.64 −0.29 0.64 −0.23 P= 0.34 0.33 0.25 0.87 VII.10. In Chapter 23, we introduced a method to define the ellipsoid that represents the region of normal operation. Based on the concepts of multivariate statistics and the singular-value decomposition of the measurement covariance matrix: 1. Find an alternative representation of the ellipsoid based on the vector of scores 2. Illustrate the situation for the case when only two scores are retained Solution: Let (S) be the covariance matrix, then the eigenvalue decomposition of the covariance matrix can be stated as: S = VΛV T where, V represents the matrix of eigenvectors and Λ is the diagonal matrix of eigenvalues. The projection y =VTx decouples the observation space into a set of uncorrelated variables y and the variance of the ith element of y is equal to the ith eigenvalue in the matrix Λ. Using z = Λ −1/ 2V T x we can define the Hotelling’s statistic as: Τ2 = z T z
(
= Λ−1 / 2V T x
) (Λ T
−1 / 2
−1 / 2
T
T
−1 / 2
Λ
T
−1
T
= x VΛ
VTx
V x
= x VΛ V x
277
ScholarFriend.com
)
By including in the matrix P the loading vectors associated with the largest a eigenvalues, the T2 statistic becomes 2 Τ= xT PΛα−1 PT x
But
t = PT x
Consequently
T 2 = t T Λ at If only the two largest eigenvalues are retained the T2 is given by t2 t2 T 2 = 1 + 2 ≤ Ta2
λ1
λ2
This defines the confidence region ellipsoid and Ta2 can be obtained from statistical tables. VII.11 For the problem described in Exercise VII.9, assume that only the first two PCs are retained. 1. Calculate the T2 statistical threshold (Hint: consider that the covariance matrix is estimated from the sample covariance matrix.). 2. Estimate the elliptical confidence region. Solution: When the actual covariance matrix is estimated from the sample covariance matrix, the T2 statistic threshold is: = Τα2
α (n − 1)(n + 1) Fα (α , n − α ) n( n − α )
Since n= 50 and a=2, from statistical Tables F(2,48)=3.19 and Tα2 = 6.64
The elliptical confidence region is then given by:
Τ 2 =xT PΛα−1 PT x =6.64
278
ScholarFriend.com
Now, since
0 1.92 Λα = 0.96 0
Then, finally, the elliptical confidence region becomes t12 t2 + 2 ≤ 6.64 1.92 0.96 VII.12. The test data (Table VII.2) come from the quality control testing for the concentration of a chemical component in solution. The testing takes place via two methods, Method 1 and Method 2: •
Method 1 is the current standard testing procedure.
•
Method 2 is a new proposed alternative (the reason being irrelevant for the purpose of the example).
A set of results obtained from both methods is shown in the Table VII.2. The number of observations is chosen to be 15. We note that in most quality control testing situations this number would be much higher, but it will suffice for this exercise. For this problem: 1. Plot the original data set in two dimensions. 2. Autoscale and plot the data again. 3. Calculate the eigenvalues/eigenvectors. 4. Project the data into the new coordinates. 5. Verify the PC properties. 6. Analyze the correlations between each PC with each of the original variables. 7. Provide your interpretation of the results.
Obs. #
Method 1
Method 2
1
10.0
10.7
2
10.4
9.8
3
9.7
10.0
4
9.7
10.1
279
ScholarFriend.com
5
11.7
11.5
6
11.0
10.8
7
8.7
8.8
8
9.5
9.3
9
10.1
9.4
10
9.6
9.6
11
10.5
10.4
12
9.2
9.0
13
11.3
11.6
14
10.1
9.8
15
8.5
9.2
Table VII.2 Data for Exercise VII.12. Solution: 13 12
Method 2
11 10 9 8 7 6 6
7
8
9 10 Method 1
11
Original data set FIGURE VII.S7 Original data set in two dimensions.
280
ScholarFriend.com
12
13
2 1.5
Mewthod 2
1 0.5 0 -0.5 -1 -1.5 -2
-1.5
-1
-0.5
0 Method 1
0.5
1
1.5
2
Original data set scaled FIGURE VII.S8 Auto scaled data.
In order to illustrate the PCA method, sample means, variances and the covariance between the two methods are required. The vector of sample means is: x1 10.00 x= = x2 10.00 And the sample covariance matrix is: 0.7986 0.6793 S= 0.6793 0.7343 The next step involves the calculation of characteristic roots or eigenvalues of S. The eigenvalues may be obtained by solving the characteristic equation: For the example case: S − lI =
0.7986 − l 0.6793 = 0.124963 − 1.53291 + l 2 = 0 0.6793 0.7343 − l
and l1 = 1.4465, l2 = 0.0864 Solving for the eigenvectors the orthonormal matrix U is found; 0.72368 − 0.6902 U = [u1 u2 ] = 0.6902 0.72368
281
ScholarFriend.com
and recalling that U T SU = L It can easily be calculated 0 1.4465 L= 0.0864 0 Generally speaking, the procedure just implemented is nothing more than a principal axis rotation. Now the results obtained are used in the transformation from data measurements to latent variables or principal components. A modification is used whereby the data being considered is meancentered zi = uiT [x − x ] Considering the first observations from the Table
This yields:
10.0 x= 10.7
0.7236 0.6902 10.0 − 10.0 0.48 z= = − 0.6902 0.7236 10.7 − 10.0 0.51 Hence the z-scores for the first observations are z1=0.48 and z2=0.51. A similar final step can be used to calculate the entire z-scores (principal components) for the entire data.
282
ScholarFriend.com
3
2
z2
1
0
-1
-2
-3 -0.8
-0.6
-0.4
-0.2
z1
0
0.2
0.4
0.6
Data Project into the PC space FIGURE VII.S9 Data projected into the new coordinates.
The ratio of each eigenvalue to the total will indicate the proportionality of the total variability accounted by each pc. In our example: For z1 1.4465 = 0.944 1.5329 For z2 0.0864 = 0.056 1.5329 This means that roughly 94% of the total variability of these chemical data as represented is accounted by the first pc. The interpretation of the two-variable example is rather straightforward •
The coefficients of the first eigenvector are nearly equal and both positive, indicating that the first principal component is a weighted average of both variables.
•
This is related to the variability that both methods have in common - probably representing process variability.
•
The coefficients of the second eigenvector are also nearly equal except for the sign.
This means that the second principal component represents differences in the measurements for the two methods.
283
ScholarFriend.com