MODELLING, SIMULATION AND CONTROL OF HEAT EXCHANGER BY USING MATLAB Kevin Ch’ng Jun Yan, Universiti Malaysia Sabah (2015),
[email protected] Abstract: This project is about modelling, simulation and control of heat exchanger and perform it in GUI form by using Matlab. Ordinary differential equation of heat exchanger is using to build the model of heat exchanger. The Euler numerical method is using to assume the updating value of model. An end-user simulator is built to show the result, and able to change the flowrate of product, flowrate of cooling/heating fluid, inlet temperature of shell/tube, ambient temperature and PID controller setting during simulation. The screenshot of simulator is shown in diagrams below:
1
) ………………………………… ….(1) Heat exchanger is important equipment in chemical plant, it plays important role in optimization of reactor, heat exchanger, absorption, adsorption.distillation,separation and etc.
Tube Side: Rate of accumulation of thermal energy in tube-side fluid = Rate of energy in – Rate of energy out – Heat transferred from shell-side
1 Define Set Point, Manipulated Variables, and Disturbance …………………………………………………….(2)
Set Point – Desired Outlet Temperature of Product MV – Flowrate of Cooling/Heating Fluid Disturbance – Flowrate of Product, Inlet Temperature of Cooling/Heating Fluid, Inlet Temperature of Product, Ambient Temperature.
where, = mass of the fluid , kg = density of fluid, kg/m3 = inlet temperature of fluid, K F = flowrate of fluid, m3/s = outlet temperature of fluid, K = heat transfer coefficient between shell and tube, = area of heat transfer between shell and tube, m2 = heat capacity of fluid, J/kg*K = length of tube, m = heat transfer coefficient between ambient and shell, = ambient temperature
2 Schematic Diagram & Control Strategy
5 Euler Numerical Method In mathematics and computational science, the Euler method is a SN-order numerical procedure for solving ordinary differential equation (ODEs) with a given initial value.
Temperature transmitter is using to detect the temperature of product(input-Feedforward or outputFeedback) and send signal for the controller to control the valve% opening of heating/cooling fluid.
New Value = Old Value + StepSize*Changes (dTs/t/dt)
3 Assumptions In the simulator, step size is assume as 0.01. 1) Assume heat capacity and density is constant 2) Assume heat transfer coefficient is constant 3) Assume the temperature of fluid in the heat exchanger is equal to the temperature of fluent in the outlet of heat exchanger.
6 PID Controller and Its Analysis A proportional-integral-derivative controller (PID controller) is a control loop feedback mechanism.
4 Ordinary Differential Equation Ordinary differential equations are shown as below: Shell Side: 7 Laplace Transform of Non-Linear Equation for adaptive control
Rate of accumulation of thermal energy in Shell Side = Rate of energy in – Rate of energy out – Rate of heat transferred to tube-side fluid- Rate of heat loss to the surroundings.
The laplace transform of each equation, after rearrangement, and assuming, Ts’(0) = Tt’(0) = 0, is Shell Side: 2
……………………………….…………………….(8)
…...…(3)
For Shell Side (linearization) Tube Side :
There are 4 input variables can affect Ts, which are Ts,inlet, Tt, Fs, T ∞ . The nonlinearities are due to the products terms Find the steady state . Then, the function can be expressed as
……………………………….……….(4) Let
………………(9)
A= B= C= D=
………………………….…(10)
∞+
E= Sub Tt in equation (4) to substitute into equation (3)
From equation (7) ,
Model of Shell Side:
........................................................................(5)
Sub Ts in equation (3) to substitute into equation (4)
……………………………………………..(6)
Remind again, the disturbance is Tt,inley, TS,inlet , , Ft/FS (product stream). However, since flowrate of Cooling/heating fluid is involve in the time constant, and gain of the laplace transform model, the tunning of PID controller should be carry out from time to time – discrete-time PID control.
Substitute into (10)
……………………….…………..…(11)
8 Linearization of Non-linear Equation
Perform laplace transform to get transfer function
Most of process control is developed based on linear equation. Hence, prediction of linear equation from nonlinear equation is very important. Rearrange (1) and (2) to get
…………………………………….….…(12)
Shell Side
…………………………………… ….(7) Tube Side
3
Adaptive Control is preferable if there is big changes in output since the approximation of model might not accurate anymore.
D= E=
9 Controller Setting For Tube Side (linearization)
Based on the model build in step 8, feedforward or feedback controller can be applied. Standard tuning method like IMC, Coheen Coon, Ziegler Nichols can be applied.
There are 3 input variables can affect Tt, which are Tt,inlet, Ts, Ft. The nonlinearities are due to the products terms Find the steady state . Then, the function can be expressed as
10 Simulator Simulator running follow:
………………..…(13)
1) Initialize Variables 2) ODE equation in 4 Ordinary Differential Equation. 3) Updating Output using euler. 4) Goes to (2)
……………………………………………….......(14)
Controller can be added to adjust the manipulated variables – the flow of heating fluid/cooling fluid.
From equation (8) ,
In conclusion, the simulator is running by using ODE in 4 Ordinary Differential Equation, not transfer function in 8 Linearization of Non-linear Equation. It is because there is always some errors in approximation. However, due to classical process control developed, control tuned by using transfer function in 8 Linearization of Non-linear Equation. 8 Conclusion Substitute into (14)
In conclusion, revise again on some important information 1) Heat Exchanger model is classified as non-linear model. 2) Set Point – Desired Outlet Temperature of Product MV – Flowrate of Cooling/Heating Fluid Disturbance – Flowrate of Product, Inlet Temperature of Cooling/Heating Fluid, Inlet Temperature of Product, Ambient Temperature. 3) Linearization of non-linear equation is necessary because process control developed based on linear equation. 4) For large changes in model, adaptive control is preferable than linearization shown in this paper. 5) Simulator is running using ODE, not transfer function developed in linearization. But, controller tuned by transfer function developed in linearization.
……………………….…………..……….(15) Perform laplace transform to get transfer function …..(12)
D=
4
5