Model Validation and Real-Time Process Control of a Continuous Flow Ohmic Heater

: Ohmic heating is a highly efficient method for rapid fluid heating, with applications in fields such as food processing, pharmaceuticals, and chemical engineering. Prior to its industrial application, thorough analysis and modeling are crucial to ensure safe and efficient operations. Therefore, this research focuses on the development and validation of a transfer function-based model for a continuous flow ohmic heater (CFOH). Validation metrics include root mean square error (RMSE) and mean absolute percentage error (MAPE). The developed model achieves an RMSE of ± 1.48 and a MAPE of ± 2.58% compared to experimental results, demonstrating its accuracy. Furthermore, the research presents the implementation of robust real-time applications of advanced process controllers, including PID, MPC, and AMPC. These controllers were first simulated using the developed model and subsequently deployed in the pilot plant ohmic heater system to achieve precise temperature control and optimised input voltage. The reliability of this procedure was affirmed through a comparison between simulated results and empirical data obtained from the CFOH pilot plant. The study concludes by suggesting potential applications in fault diagnosis


Introduction
Ohmic heating, also known as Joule heating or electrical resistance heating, is a rapidly emerging thermal processing technology with widespread applications.This innovative heating method relies on the principles of electrical resistance, where an electric current is passed through a conductive fluid, generating heat directly within the fluid.Ohmic heating offers several advantages, such as precise temperature control, uniform heating, and reduced processing times, making it a compelling choice for many industrial processes.
To harness the full potential of ohmic heating and ensure its reliable and efficient operation, it is imperative to develop accurate models that describe the behaviour of the ohmic heating system.These models serve as invaluable tools for gaining a comprehensive understanding of the system dynamics, optimising process parameters, and facilitating precise control strategies before their implementation in real-time industrial applications.
Mathematical modelling proves to be a useful method for designing ohmic heating systems for processing solid or liquid food products [1].Previously, Marra, F. et al. (2009) [2] analysed the pasteurisation process of solid food materials during ohmic heating.This model involves the solution of the Laplace equations that describe the electrical potential in the food product.It further considers the heat transfer equations that incorporate a source term corresponding to electrical energy.The model predicted that colder regions existed near the curved surfaces at the electrode junctions.
Similarly, a study conducted by Pesso, T. et al. (2009) [3] modelled thermo-fluid analysis of apricot puree using a collinear configuration of the ohmic heater.The fluid in this application was considered homogeneous.It was concluded from this study that suspended small particles in fluids have insignificant effects on both the laminar flow of the fluid and the ohmic heating process.
Moreover, Shim, J. et al. (2010) [4] presented modelling of the ohmic heating patterns on solid-liquid food mixtures characterised by significantly varying electrical conductivities.This study utilised computational fluid dynamics (CFD) and identified the cold and hot spots in the product medium.
Numerical analysis techniques, as described by Choi, W. et al. (2020) [5] and Khodeir, M. et al. (2021) [6] have also been devised to simulate temperature distribution for the pasteurisation of orange juice and the processing of pre-bake cake batter, respectively, using batch ohmic heating.
However, developing these models is one aspect of the process; their validation against experimental data is equally essential for further applications of the process.
Model validation of any process is an essential design phase in process engineering.It is a critical process of assessing the accuracy and reliability of any model by comparing its predictions with real-world experimental observations.Validated models provide a platform for advanced controllers to be simulated before deployment for efficient process control.In addition, process faults can be diagnosed with validated models in the simulation, while system identification techniques can be applied to determine critical process parameters.
Simulations of various physical process models have been used in education, research, and industry for many years to compare performance, detect faults and failures, and identify critical process parameters for control and safe use of the final product.Process simulation, as described by Thornhill, N.F.et al. (2008) [7], falls into two categories, which are either simulation based on system dynamics captured through first principle or linear models presented in state space or transfer function form.
In this paper, the transfer function (TF)-based model of a continuous flow pilot plant ohmic heater is presented.The developed model is validated using experimental data.The process dynamics of a continuous flow ohmic heater are known beforehand for simulation, while the critical parameters in the heating process are identified to facilitate the control of the ohmic heater.Before the deployment of advanced controllers on the physical pilot plant, they are tested in the simulation using the validated TF model to assess all the critical parameters involved in the heating process.Volumetric heat measured from the experimental data are compared along with the algebraic equation derived from the model.A feature of the developed model is that it uses measured data instead of simulated data as the inputs and, therefore, provides a very realistic ground for system identification and fault detection.
This TF model also aims to be used as a benchmark for testing and validating different continuous flow ohmic heater models in education and research.Furthermore, it presents a reduced algorithm with fewer process parameters but the same input-output dynamics of a physical system.
The TF model development, validation, and controller implementation on the programmable logic controller (PLC) for the physical plant have all been conducted using MATLAB and SIMULINK.The choice of MATLAB and SIMULINK presents easy access to students and researchers in the industry.
At the time of writing, there is currently a dearth of articles on the linear model of a continuous flow ohmic heater.Therefore, the research work presented in this paper will fill the knowledge gap.This work is therefore focused on addressing the following gaps in the literature as follows: The pilot scale continuous flow ohmic heater has the following specifications: • delivers nominally 10 kW into a wide range of product conductivities from 0.15 S/m to 0.9 S/m (infeed); The applicator comprises a parallel configuration of three electrodes contained in insulating housings arranged in a vertical column with insulating pipe spool sections between the electrodes.High voltage is applied to the centre electrode relative to the in-feed and out-feed electrodes, creating two heating sections/lengths, one between the in-feed and middle electrodes (0.6 m) and a second between the middle and out-feed electrodes (0.8 m).
Power delivered to the product for heating is controlled by varying and controlling the voltage applied to the HV transformer using a thyristor operating in phase angle control mode (as opposed to burst firing).The thyristor setting is controlled by the PLC and via the lab-based PC control system.
Figure 1 displays the internal layout of the CFOH control panel, showing the different electrical components.The control panel contains an integral Mitsubishi PLC that, in effect, drives the thyristor locally.
fill the knowledge gap.This work is therefore focused on addressing the following gaps in the literature as follows: • modelling the continuous flow ohmic heater using a linear model represented in state-space or transfer function forms; • validating the linear model with experimental data; • applying advanced process control with the aid of the validated model on the physical plant; • evaluating the performance of different controllers on a continuous ohmic heater plant.

Specifications of the Pilot Plant Continuous Flow Ohmic Heater (CFOH)
The pilot scale continuous flow ohmic heater has the following specifications: • delivers nominally 10 kW into a wide range of product conductivities from 0.15 S/m to 0.9 S/m (infeed); • comprises a continuous process applicator with three electrodes operating at voltages up to 4.2 kV; • integrated with and controlled from a PC-MATLAB or LabVIEW platform; • drives a suitable pump with speed control for product flow rate control of up to 60 L/h.
The applicator comprises a parallel configuration of three electrodes contained in insulating housings arranged in a vertical column with insulating pipe spool sections between the electrodes.High voltage is applied to the centre electrode relative to the in-feed and out-feed electrodes, creating two heating sections/lengths, one between the in-feed and middle electrodes (0.6 m) and a second between the middle and out-feed electrodes (0.8 m).
Power delivered to the product for heating is controlled by varying and controlling the voltage applied to the HV transformer using a thyristor operating in phase angle control mode (as opposed to burst firing).The thyristor setting is controlled by the PLC and via the lab-based PC control system.
Figure 1 displays the internal layout of the CFOH control panel, showing the different electrical components.The control panel contains an integral Mitsubishi PLC that, in effect, drives the thyristor locally.The control system is designed to integrate with a PC-based control system, which is integrated using an Open Platform Communications (OPC) server that generates an output value/setting for the thyristor.OPC is vendor-neutral and is compatible with all major industrial automation platforms.Its seamless integration with MATLAB (Documentation The control system is designed to integrate with a PC-based control system, which is integrated using an Open Platform Communications (OPC) server that generates an output value/setting for the thyristor.OPC is vendor-neutral and is compatible with all major industrial automation platforms.Its seamless integration with MATLAB (Documentation 2022) and Simulink (version 2022b) simplifies the process of reading data and configuring parameters for industrial devices.Hence, adopting this approach enables the user to conveniently achieve accessibility across various vendors with the capabilities of MATLAB for data science and other tasks (MATLAB Documentation 2022).
The configuration involves setting up the KEPServerEX OPC (Kepware, Portland, ME, USA) server to establish communication with the MITSUBISHI FX5U PLC (Mitsubishi Electric Corporation, Tokyo, Japan) using an Ethernet communication protocol.The input/output (I/O) tags assigned to the PLC are then transmitted to the OPC Server, allowing MATLAB to perform read/write operations on them.This arrangement enables the application of both basic and sophisticated model-based control.

Sample Preparation for Real-Time Model Validation
The research uses a saline solution of electrical conductivity ( σ init ) ranging from 0.24 S/m to 0.6 S/m.The saline solution was prepared by mixing known quantities of table salt and tap water.The salt concentration (C) was calculated using Equation (1) for each value of electrical conductivity.
Here, the molar conductivity (Λ m ) of NaCl at infinite dilution at 25 • C was considered to be 180.69Sm 2 /mol [8].After preparation of the solution, the infeed electrical conductivity was measured before heating, using a conductivity meter.

Model Development of the CFOH
This section presents a linear model of a continuous flow ohmic heater represented in state-space or transfer function forms.It is an extension of the published work by [9] on linear model-based validation of a batch ohmic heater with experimental data.This work also presents an application of advanced process control on physical plants with the aid of the developed model.Furthermore, the performance of different controllers has been evaluated on a continuous flow ohmic heating plant.

Transfer Function Modelling of the CFOH
The transfer function model of the continuous flow ohmic heater relates the change in the inlet temperature, applied electrical power, electrical conductivity as a function of temperature, product mass flow rate, thermophysical properties, and the resulting change in the output temperature.Figure 2 shows the heating stages in the ohmic heating chamber separated by the three electrodes.These heating changes are recorded by four optical fibre temperature probes placed in pairs along the heating section of the CFOH.Two sets of thermocouple temperature sensors are also mounted at the inlet and outlet of the heating chamber.
The first stage is examined for simplicity, with the electrical heating and fluid flow being the two dynamics involved.The energy balance equation of the heating stage can be described as: Rate of energy in the chamber − rate of energy out of the chamber + rate of energy from electrical heating = rate of energy accumulation.This relationship is mathematically described by Equation (2).
m in (kg/s) and .
m out (kg/s) are the mass flow rate in and out of the heating chamber, respectively; E is the accumulation of energy, Q (W/m 3 ) is the rate of electrical heating, and H is the enthalpy.
Both the rate of electrical heating (Q) and (H) are defined as: Here, V e (V) is the applied voltage, A (m 2 ) is the cross-section area of the heating chamber, σ (S/m) is the electrical conductivity as a function of temperature, T ( • C), and L (m) is the distance between the electrodes.Therefore, constructing the relationship of the rate of change of energy dE dt using enthalpy (H), where ρ (kg/m 3 ) is the density and V (m 3 ) is the volume of the sample under process.From the above equations, we have the following: The enthalpy can also be represented as H = c T − T re f .Then, substituting the representation of enthalpy (H) in Equation ( 5), we get: Here, c (J/kg   Both the rate of electrical heating (Q) and (H) are defined as: 2 Therefore, the total energy balance can be written as: The energy balance in Equation ( 7) has two inputs ∆T in and ∆Q, resulting in Equation ( 8): Taking the Laplace transform of Equation (8).We obtain the following: .
Then taking, ρV .m = Ψ, and getting the transfer function as follows: For the effect of Q, set T in = 0, obtaining Equation (11): The Laplace transform of Equation ( 11) is given by, where constant 1 .

mC
= k: Taking into account that there are no changes in the inlet temperature T in = 0, transfer functions of nth section of the heating chamber can be given as: Hence, the interactions of all variables to determine the transfer function of the combined heating stages are shown in Figure 3.
Modelling 2024, 5, FOR PEER REVIEW 6 • constant mass flow throughout, and not a time-dependent function;  =  =  .
Therefore, the total energy balance can be written as: The energy balance in Equation ( 7) has two inputs Δ and Δ, resulting in Equation ( 8): Taking the Laplace transform of Equation (8).We obtain the following: Then taking, = , and getting the transfer function as follows: For the effect of Q, set  = 0, obtaining Equation ( 11): The Laplace transform of Equation ( 11) is given by, where constant = : Taking into account that there are no changes in the inlet temperature  = 0, transfer functions of nth section of the heating chamber can be given as: Hence, the interactions of all variables to determine the transfer function of the combined heating stages are shown in Figure 3.
Therefore, the second-order overall transfer function describing the continuous flow ohmic heater is given by: Finally, the developed state-space model is given by: where Therefore, the second-order overall transfer function describing the continuous flow ohmic heater is given by: Finally, the developed state-space model is given by: . where The governing equations represented by the state-space equation describe the dynamics of the CFOH.The state variable 1/(Ψ 1 * Ψ 2 ), represents the energy stored individually as the temperature in each heating cell in series when electrical power is applied.The (Ψ 1 + Ψ 2 )/(Ψ 1 * Ψ 2 ) state represents the rate of energy stored as a resultant effect of the first and second heating chambers.The control vector is the applied electrical power Q.

Modelling of the Transfer Function in MATLAB/Simulink
The developed transfer function-based model has been constructed in MATLAB/Simulink for simulations.Initially, the system was simulated as an open-loop model.In the open-loop model, the control action was not influenced by the system's output (temperature) but was solely based on the input and system dynamics.The governing equations represented by the state-space equation describe the dynamics of the CFOH.The state variable 1/( *  ), represents the energy stored individually as the temperature in each heating cell in series when electrical power is applied.The ( +  )/( *  ) state represents the rate of energy stored as a resultant effect of the first and second heating chambers.The control vector is the applied electrical power Q.

Modelling of the Transfer Function in MATLAB/Simulink
The developed transfer function-based model has been constructed in MATLAB/Simulink for simulations.Initially, the system was simulated as an open-loop model.In the open-loop model, the control action was not influenced by the system's output (temperature) but was solely based on the input and system dynamics.Figure 4 shows the overall open loop model structure.The inputs to the CFOH model are voltage (V), initial electrical conductivity (S/m), initial temperature (°C), heat capacity (J/kg °C), and mass flow rate (kg/s).The output of the model is the output temperature of the heated product in °C.In the next stage of the model development, the adaptive structure of the ohmic heater was designed.It considers the initial electrical conductivity (σ ), the initial (Tinit) and current (T) temperatures, and a proportionality constant ( ).The orange block in Figure 5 of the system is a representation of an equation that models the electrical conductivity (σ) of the food product as it changes with temperature by applying Equation (17): A significant feature introduced in this block model is the addition of a saturation block that constrains electrical conductivity within a specified and realistic range (0.1 S/m to 2.5 times the initial electrical conductivity (σ )).This addition ensures the model generates meaningful and physically valid results, preventing extreme or unrealistic conductivity In the next stage of the model development, the adaptive structure of the ohmic heater was designed.It considers the initial electrical conductivity (σ init ), the initial (T init ) and current (T) temperatures, and a proportionality constant (k o ).The orange block in Figure 5 of the system is a representation of an equation that models the electrical conductivity (σ) of the food product as it changes with temperature by applying Equation (17): A significant feature introduced in this block model is the addition of a saturation block that constrains electrical conductivity within a specified and realistic range (0.1 S/m to 2.5 times the initial electrical conductivity (σ init )).This addition ensures the model generates meaningful and physically valid results, preventing extreme or unrealistic conductivity values as temperature varies.It also conforms with the CFOH plant specification, which has an electrical conductivity range of 0.1-0.9S/m.The purple block of Figure 5 determines the electrical power generation.The inputs to this block are the electrical conductivity as a temperature function and the input voltage square.Within the purple block are blocks that physically represent the length of the electrode gaps (L) and the cross-sectional area (A) of the heating chamber.The output of the block is the electrical power Q.It simulates the power generation equation for Q as described in Equation (3).

lation.
Figure 6 shows how the output temperature for the CFOH model is determined with changing dynamics.The inputs to this section are the electrical power (Q) and the mass flow rate.The outputs are the model states directly related to the state of the state space matrix and the output temperature.In the model, the state corresponding to the output response is selected.This state is the state response of the A matrix in the state-space representation.The other state not selected is a state that describes the input B and U matrices.The green block in Figure 5 is the "Heat determination" block.It represents the total energy balance equation given in Equation ( 11).This block contains the developed state-space model of the CFOH.From this block, the output temperature of the CFOH is determined.The inputs to the block are the change in temperature (Delta_T), the electrical power (Q_ohmic), initial temperature (Tinit), heat capacity (cp), and the mass flow rate (mdot).The output of this block is the determined output temperature.The heat capacity is taken as a universal constant value of 4200 J/kg • C, while the initial temperature is measured at the beginning of each experiment and fed into the model at the start of the simulation.
Figure 6 shows how the output temperature for the CFOH model is determined with changing dynamics.The inputs to this section are the electrical power (Q) and the mass flow rate.The outputs are the model states directly related to the state of the state space matrix and the output temperature.In the model, the state corresponding to the output response is selected.This state is the state response of the A matrix in the state-space representation.The other state not selected is a state that describes the input B and U matrices.

Model Validation of the Continuous Flow Ohmic Heater
In validating the transfer function model, temperature data collected from the experiment are compared with the simulated model results.The voltage inputs are the real-time data measured from the continuous ohmic unit.The product flow rate is set to a constant value during heating.The validation is achieved using a steadily increasing applied voltage and a step-rising applied voltage at the input of the open-loop plant.The applied voltage changes and the corresponding output responses are shown in Figure 7 below.In Figure 7, the simulated temperature output is compared with the experimental temperature output from the CFOH plant.The combination of low electrical conductivity and high flow rate of the saline solution used showed close conformity between the simulated and experimental data.Short voltage steps were taken at random so that the performance and behaviour of the CFOH model could be observed.During the open-loop validation, the flow rate is kept constant at 1 L/min.
Figure 8 shows the results of the combined effect of the saline solution's high electrical conductivity and low flow rate for model validation.The applied voltage in random steps and the corresponding output temperature are observed.In this figure, it can be seen that the model and plant have a high degree of conformity until 500 s.From about 500 s to 600 s deviations were observed between the CFOH model and the real-life plant.Between 500 and 600 s, three-step voltages were applied.Ordinarily, a proportional increase in the reallife temperature response is expected in Figure 7.However, the real-life temperature data appears to dip/lag for about 8 • C.This short deviation is unclear to the author and might be attributed to hardware temperature sensor behaviour or the unmodeled nonlinearities due to fluid mixing within the heating chamber.Figure 9 shows the results of a combination of low electrical conductivity and low flow rate of the saline solution.These combinations are chosen to test all possible scenarios when the real-life plant is operating.In addition, the step voltage is decreased at time 450 s in order to observe the effect of temperature reduction on temperature rise.Table 1 shows the performance metrics of the model in terms of root mean square error (RMSE) and mean absolute percentage error (MAPE) calculated for the developed model to compare against real-time experimental data from the CFOH.
These errors are determined from the real-time data points using Equation ( 18) for RMSE and Equation (19) for MAPE.In the figure above, from 0s to about 450 s, when a steady step rise in voltage is applied, the temperature response from the CFOH model and CFOH real-life plant conform and are proportional to the applied voltage.From time 500 s to 650 s, when a lower step voltage was applied, a temperature difference in the output of the CFOH model and CFOH plant of about 7 • C was observed.The deviation can be attributed to only the CFOH model being developed for output temperature rise.To remove this deviation, the model can be improved to account for temperature reduction by modelling the thermophysical effect that is attributed to temperature reduction.
Table 1 shows the performance metrics of the model in terms of root mean square error (RMSE) and mean absolute percentage error (MAPE) calculated for the developed model to compare against real-time experimental data from the CFOH.
Here, T exp and T sim are the experimental and simulated temperatures in • C, respectively, whereas n is the number of data observations for each experiment.

Implementation of Advanced Process Control
The classical controller developed is the proportional, integral, and derivative controller (PID), while the advanced controllers developed are the model predictive controller (MPC) and adaptive model predictive controller (AMPC).Before the implementation of these controllers, a safeguard system was developed to ensure that the ohmic heater, regardless of whether any controller is deployed, operates in a safe region.

Thyristor Automatic Level Safety Controller
The thyristor automatic level safety controller, termed "auto leveller", ensures the safe operation of the continuous flow ohmic heater.The "auto-leveller" sets a bounded limit to the amount of electrical power that can be supplied for heating operations.Technically, it sets the voltage bounds that the thyristor can supply and, in turn, sets the electrical power.This is to prevent hazards such as overheating and to generally keep the ohmic heater in safe operation.
Even with a temperature probe registering and being used for any control technique, an immediate demand by the control system for 100% power may lead to overheating or overshooting before the product reaches and registers on an outfeed temperature probe.The product may boil before power is reduced, and temperature is brought under control.Therefore, the "auto leveller" limits the thyristor value to prevent a 100% voltage from being applied.The structure of the safeguard system (auto leveller) is shown below in Figure 10.In Figure 11, the "Thyristor setpoint1" block contains OPC-enabled blocks that allow data to be written to the HV thyristor to supply the corresponding HV.The "process control" block also contains write-enabled OPC blocks to send binary commands to the CFOH to turn on/off the device.The "process control" block also allows the frequency of the infeed pump to be modified to attain the desired mass flow rate and to turn on/off infeed pump.
The "OPC Configuration" block contains the OPC server-client configuration that enables read/write functions when the model is running.The OPC server clients link the respective input/output commands to specific tags on the PLC.The auto leveller system works by calculating the theoretical temperature rise using Equation (20) below.The heating rate in a continuous ohmic heater is described by:

Calibration of the Flow Rate Pump and HV Thyristor
Equation ( 20) provides the minimum thermal electrical power to cause a required temperature change.With this information, the required maximum and minimum electrode voltage safety range is therefore estimated.The value of the maximum and minimum voltage safety range is "back-calculated" to a maximum and minimum thyristor setpoint using the designed thyristor scaling function, which will be discussed later.This "autoleveller" ensures that any other controller implemented keeps the food product temperature setpoint within a tolerable theoretical range and prevents temperature oscillations.To select the minimum thyristor value, an intuitive value usually 10% less than the original thyristor value is selected to prevent large oscillations.
The block diagrams for real-time process control from the MATLAB environment to the CFOH system are described below.In Figure 11, the overall open-loop block to implement real-time control on the CFOH is presented.Different blocks and subsystem blocks have separate functions.The "temperature probes" block contains all the blocks to measure and record real-time temperature data from the optic fibre probes and the thermocouples.
The "Vrms, Irms, ct3, HV, ct1, ct2" block measures and records the real-time root mean square voltage (vrms) and current (irms), the voltage and current supplied at the mains.Moreover, the electrical power during heating, the current at each section of electrode spacing (ct1 and ct2), the overall current through the electrodes (ct3), and the high voltage supplied from the HV transformer are measured and recorded.
In Figure 11, the "Thyristor setpoint1" block contains OPC-enabled blocks that allow data to be written to the HV thyristor to supply the corresponding HV.The "process control" block also contains write-enabled OPC blocks to send binary commands to the CFOH to turn on/off the device.The "process control" block also allows the frequency of the infeed pump to be modified to attain the desired mass flow rate and to turn on/off the infeed pump.
The "OPC Configuration" block contains the OPC server-client configuration that enables read/write functions when the model is running.The OPC server clients link the respective input/output commands to specific tags on the PLC.In Figure 11, the "Thyristor setpoint1" block contains OPC-enabled blocks th data to be written to the HV thyristor to supply the corresponding HV.The "proc trol" block also contains write-enabled OPC blocks to send binary commands to th to turn on/off the device.The "process control" block also allows the frequenc infeed pump to be modified to attain the desired mass flow rate and to turn on infeed pump.
The "OPC Configuration" block contains the OPC server-client configuration ables read/write functions when the model is running.The OPC server clients respective input/output commands to specific tags on the PLC.

Calibration of the Flow Rate Pump and HV Thyristor
With the implementation of the OPC technology, reading data in MATLAB/Simulink and writing parameters to the PLC becomes seamless.The OPC approach enables the direct implementation of developed controllers in the MATLAB/Simulink environment on the PLC.
The voltage applied to the electrodes is a significant process variable that influences the heat generated.It can be seen that electrical and thermal energy are functions of the applied voltage and the electrical conductivity of the product.The applied voltage can be easily controlled by manipulating the thyristor setpoint, while the electrical conductivity of the food product as a function of the temperature change can be easily estimated.Therefore, the resulting temperature rise described by Equation ( 9) can be determined.
Before implementing the controllers, the first task is calibrating the infeed pump flow rate.The infeed pump is controlled by a motor inverter located in the MEF pilot plant control panel.The motor inverter varies the flow rate of the pump by varying the voltage frequency applied to the pump.Calibrating the pump's flow rate ensures that when a frequency value is supplied, either by the user or the controller, the corresponding flow rate in L/min is achieved.To calibrate the infeed pump speed, the following steps were taken: • set the frequency on the control panel to a fixed value (e.g., 30 Hz); • measure the quantity of product flow into a measuring beaker for 1 min; • repeat for a different frequency value.
Using the steps above, the result of the infeed pump calibration is shown in Figure 12.The second step is to calibrate the high-voltage thyristor.The high-voltage thyristor effectively controls the root mean square (rms) voltage delivered to the primary side of the HV transformer (1:10).The input term for the thyristor is a dimensionless unit scaled from 0 to 100, while the output is the rms voltage (0-415 V) of the thyristor which is scaled using the input terms.The effective control of the applied high voltage from the HV transformer is achieved by controlling and applying the appropriate input term to the thyristor.Figure 13 shows the relationship between the input to the HV thyristor and the corresponding high-voltage output from the HV transformer measured experimentally.The plot is produced from the HV sensor values recorded from the control panel and the thyristor set point entered by the user.The first 101 thyristor setpoints entered by the user are 0, 1, 2, 3, 4, 5, . .., 100, and the corresponding HV values are recorded.

Implementation of a PID Controller
This section describes the deployment and comparison of the developed PID controller in the simulation and its corresponding performance in implementation on the physical ohmic heater.The comparison can also serve as the closed-loop validation of the TF continuous-flow ohmic heater model developed.
Figure 14 shows the closed-loop PID control of the continuous flow ohmic heater using the PID control technique.The product flow rate is maintained throughout the heating process.The PID controller takes the desired output temperature as a reference.The measured temperature is compared with the reference temperature, and the resulting error is fed into the PID controller.Subsequently, the PID controller provides the HV

Implementation of a PID Controller
This section describes the deployment and comparison of the developed PID controller in the simulation and its corresponding performance in implementation on the physical ohmic heater.The comparison can also serve as the closed-loop validation of the TF continuous-flow ohmic heater model developed.
Figure 14 shows the closed-loop PID control of the continuous flow ohmic heater using the PID control technique.The product flow rate is maintained throughout the heating process.The PID controller takes the desired output temperature as a reference.The measured temperature is compared with the reference temperature, and the resulting error is fed into the PID controller.Subsequently, the PID controller provides the HV In Figure 13, it is seen that the input-output relationship of the HV thyristor is not linear.Therefore, a polynomial function is developed to represent the relationship between the thyristor input setpoint and the HV transformer output.The developed polynomial function translates the controller action into the corresponding dimensionless thyristor set point and voltage.Therefore, when a user or the controller presents a dimensionless thyristor input, the corresponding HV can be determined in the simulation.

Implementation of a PID Controller
This section describes the deployment and comparison of the developed PID controller in the simulation and its corresponding performance in implementation on the physical ohmic heater.The comparison can also serve as the closed-loop validation of the TF continuous-flow ohmic heater model developed.
Figure 14 shows the closed-loop PID control of the continuous flow ohmic heater using the PID control technique.The product flow rate is maintained throughout the heating process.The PID controller takes the desired output temperature as a reference.The measured temperature is compared with the reference temperature, and the resulting error is fed into the PID controller.Subsequently, the PID controller provides the HV thyristor with a dimensionless value ranging from 0 to 100.The dimensionless value corresponds to a high-voltage reading, which is then applied to the electrodes.

OR PEER REVIEW 16
thyristor with a dimensionless value ranging from 0 to 100.The dimensionless value corresponds to a high-voltage reading, which is then applied to the electrodes.The desired performance of the PID controller is ensured by proper tuning of the controller gains.

Comparison of Simulation and Plant Behaviour with PID
Figure 15 shows the comparison of the simulation result with the real-life implementation of the PID controller on the continuous-flow ohmic heater.The electrical conductivity at room temperature of the saline solution is measured to be 0.33 S/m.The product flow rate is kept constant during this test at 0.78 L/min.A general fixed temperature setpoint is set to 90 °C.The PID controller is tuned, setting the proportional (P) term to 2.5, the Integral (I) term to 0.2, and the Derivative (D) term to 0.
It was observed that given the same conditions, the PID controller in the simulation has a shorter rise time and a settling time of 70 s.The deployed controller has a longer settling time of 105 s.The performance of the PID in the simulation can represent the "ideal" condition when a constant flow rate of saline solution of 0.33 S/m is heated to 90 °C.This combination represents a low electrical conductivity and constant flow rate of the saline solution heated.The desired performance of the PID controller is ensured by proper tuning of the controller gains.

Comparison of Simulation and Plant Behaviour with PID
Figure 15 shows the comparison of the simulation result with the real-life implementation of the PID controller on the continuous-flow ohmic heater.The electrical conductivity at room temperature of the saline solution is measured to be 0.33 S/m.The product flow rate is kept constant during this test at 0.78 L/min.A general fixed temperature setpoint is set to 90 • C. The PID controller is tuned, setting the proportional (P) term to 2.5, the Integral (I) term to 0.2, and the Derivative (D) term to 0.
It was observed that given the same conditions, the PID controller in the simulation has a shorter rise time and a settling time of 70 s.The deployed controller has a longer settling time of 105 s.The performance of the PID in the simulation can represent the "ideal" condition when a constant flow rate of saline solution of 0.33 S/m is heated to 90 • C.This combination represents a low electrical conductivity and constant flow rate of the saline solution heated.
Subsequently, the PID controller was simulated at changing flow rates.The initial electrical conductivity measured at room temperature was 0.7 S/m. Figure 16 displays the combination of the saline solution's high electrical conductivity and variable flow rate.This combination is chosen to represent possible scenarios in which the CFOH plant would operate.
For this scenario, it was observed that with the simulated controller, a steady state error of 3 • C was observed until about 250 s.Compared to the real-life controller implementation, reduced steady-state error was observed until 300 s.Fluctuations in the output temperature became significant after 300 s when the controller was implemented on the CFOH plant.These fluctuations are due to the accumulated error caused by the rapidly changing flow rate on the CFOH from the time of 200 s to 400 s.
The model performance in terms of RMSE and MAPE is also displayed in Table 2 for both scenarios of PID control implementation on the developed model.
settling time of 105 s.The performance of the PID in the simulation can represent the "ideal" condition when a constant flow rate of saline solution of 0.33 S/m is heated to 90 °C.This combination represents a low electrical conductivity and constant flow rate of the saline solution heated.Subsequently, the PID controller was simulated at changing flow rates.The initial electrical conductivity measured at room temperature was 0.7 S/m. Figure 16 displays the For this scenario, it was observed that with the simulated controller, a steady state error of 3 °C was observed until about 250 s.Compared to the real-life controller implementation, reduced steady-state error was observed until 300 s.Fluctuations in the output temperature became significant after 300 s when the controller was implemented on the CFOH plant.These fluctuations are due to the accumulated error caused by the rapidly changing flow rate on the CFOH from the time of 200 s to 400 s.
The model performance in terms of RMSE and MAPE is also displayed in Table 2 for both scenarios of PID control implementation on the developed model.

Implementation of MPC and AMPC
Model-based predictive control (MPC) is a category of advanced control techniques to foresee the future behaviour of the controlled process model [10].MPC establishes an optimal control output solution at each time step by solving a constrained optimisation problem.This involves utilising predictions of forthcoming costs, disturbances, and constraints over a dynamic time horizon.Consequently, MPC is commonly known as "receding horizon" control [11].In essence, the concept is that a short-term (predictive) optimisation attains optimality over an extended period.
Short-term prediction over an extended duration facilitates achieving optimal results as the forecasted error is minimal compared to the predictions made farther into the future.The distinctive feature of MPC that distinguishes it from conventional control methods lies in the amalgamation of prediction and optimisation [12].However, a notable drawback of MPC is the necessity to solve the optimisation problem at each time step, leading to its primary suitability for systems with low sampling rates, typically less than 1 Hz [11].
In light of this constraint, AMPC has been developed.AMPC consistently updates a nominal operating point at varying times to align with the plant model.The constraints and cost function of the MPC and AMPC are the same.The main difference is that the AMPC uses an online model running in real-time to determine the solution to the optimisation problem.The following cost functions and their effect on the controller are (when developed in MATLAB): The effects of the cost functions on the performance of the controller are highlighted in Tables 3 and 4 and are the same for both the MPC and AMPC.No effect on the applied power is seen.Increased power dissipation As U.wt > 0, the controller becomes less aggressive.
Table 3 shows the cost function evaluation and its effect on the controller for the OV weight.The OV weight is a function of the plant's output.For the CFOH, the OV is the measured temperature.It can be seen from Table 3 that the influence of the OV cost function is between 0 and 1.From the simulation, it was observed that a low value of OV magnitude close to zero results in a large SSE, while a value close to 0.0011 results in a reduced SSE.Therefore, a value of 0.05 was chosen for the OV.Furthermore, it was observed that when a value between 0.05 and 1 is used, the influence of the OV diminishes, and no significant improvement on the controller is seen.
Table 4 shows the effect of the magnitude of the MV rate weight on the MPC and AMPC.The MV variable for the CFOH is the applied voltage.An MV < 0 has no effect on the SSE.A value of zero makes the controller very aggressive; this feature might be useful if the response time of the overall system is prioritised over SSE.The advantage of having MV equal to zero is faster rise time but at the detriment of increased power demand, which may not be practical in real-life scenarios.When MV is greater than zero, the power dissipation is more efficient, practical, and realistic.For MV > 0, the controller becomes less aggressive but results in a uniform and steady heating rate of food products.It was also observed that the reduction in the aggressiveness of the controller diminishes as the MV value approaches 1.The MV chosen in the development of the MPC and AMPC is 0.
Moreover, the effects of the MV rate weights are presented in Table 5.The MV rate weight DU.wt is the rate of change of the MV from the controller.Therefore, DU.wt is the rate at which the applied voltage varies.The controller reacts slowly to changes.
Table 5 shows that when DU.wt ≤ 0, no effect on the controller is seen, but the controller is penalised when DU.wt is greater than 0. A value of 0 was chosen for the DU.wt variable in both MPC and AMPC.The DU.wt value chosen in developing the MPC and AMPC is 0.000278.
When all the cost functions and their effects on the controller are compared, the MV cost function has the most significant effect on the controller.The MV cost function adjusts the controller's aggressiveness.The magnitude of the MV cost function is related to the voltage magnitude applied to the CFOH.

Comparison of Simulation and Plant Behaviour with MPC
Similar comparison templates and conditions are employed for MPC as for PID controllers.The results for these scenarios are displayed in Figures 17 and 18, and Table 6.
The MPC in the simulation is compared with the deployed version for a fixed flow rate of 0.78 L/min, and in another case, the same pattern of changing flow rate is used for the PID controller.All parameters, such as the temperature setpoint and electrical conductivity, are kept uniform.
Figure 17 shows that the simulated and deployed controllers' temperature responses have a similar rise time profile and settling time of about 70 s.Compared to the settling time of the deployed PID controller, which was 105 s, both the simulated and deployed MPCs performed better.Little or no steady-state error was observed for both the simulated and the deployed MPC controllers.This implies that the CFOH model and the MPC in the simulation give an accurate closed-loop model compared to experimental data.
When a combination of high electrical conductivity of the saline solution is used (as shown in Figure 18, a faster heating rate and shorter settling time of 70 s was observed with the deployed MPC controller.In the simulation, a slower heating rate and a longer settling time of 80 s was observed.The MPC appears to struggle at higher electrical conductivity because the MPC optimisation model was linearised at an infeed electrical conductivity of 0.3 S/m at 1 L/m.Therefore, when the conditions at linearisation vary, the performance of the MPC diminishes.This diminishing performance can be corrected if the optimisation model constantly changes with the infeed parameters.AMPC, which is discussed in the next section, addresses this issue.
shown in Figure 18, a faster heating rate and shorter settling time of 70 s was observed with the deployed MPC controller.In the simulation, a slower heating rate and a longer settling time of 80 s was observed.The MPC appears to struggle at higher electrical conductivity because the MPC optimisation model was linearised at an infeed electrical conductivity of 0.3 S/m at 1 L/m.Therefore, when the conditions at linearisation vary, the performance of the MPC diminishes.This diminishing performance can be corrected if the optimisation model constantly changes with the infeed parameters.AMPC, which is discussed in the next section, addresses this issue.The AMPC is compared on the same basis as the earlier controllers in the simulation  The AMPC is compared on the same basis as the earlier in the simulation and deployment.Figure 19 shows the comparison between the simulated AMPC and the deployed AMPC for a fixed flow rate of 0.78 L/min at 0.33 S/m.

PEER REVIEW 21
parameters.A general trend is seen from 300 to 400 s, where the accumulated error due to varying flow rates presents oscillations in the output temperature of the experiment.The oscillation resulting from the varying flow rates was observed to be greater with the MPC and less with the PID and AMPC.Table 7 shows the comparative RMSE and MAPE for simulated and experimental temperature output trends with adaptive model predictive control.Figure 21 shows a comparison of the temperature response of heating saline solution using PID, MPC, and AMPC controllers, respectively.From this figure, the temperature response from the simulated AMPC and the deployed AMPC are close regarding the temperature rise and the settling time.A settling time of about 80 s was observed.No steady-state error was recorded.In comparison to the response of the PID controller, both the MPC and AMPC outperform the PID controller when a combination of low electrical conductivity and a fixed flow rate of saline solution is used.
Similarly, the same parameters (as of the previous controllers) of higher electrical conductivity and changing flow rates were used to get the results shown in Figure 20.In this figure, the increase in the output temperature of the simulated and deployed AMPC from time 0 to 100 s are uniform.Compared to the MPC controller in the simulation, where the rise in output temperature lagged the experimental output.The AMPC addresses the disadvantage of the MPC, where the initial conditions are used to linearise the MPC optimisation model.For this combination of high electrical conductivity and varying flow rate, the AMPC optimisation function is not linearised; it varies with the varying process parameters.A general trend is seen from 300 to 400 s, where the accumulated error due to varying flow rates presents oscillations in the output temperature of the experiment.The oscillation resulting from the varying flow rates was observed to be greater with the MPC and less with the PID and AMPC.Table 7 shows the comparative RMSE and MAPE for simulated and experimental temperature output trends with adaptive model predictive control.Figure 21 shows a comparison of the temperature response of heating saline solution using PID, MPC, and AMPC controllers, respectively.

R REVIEW 22
Figure 21.Temperature response of heating saline solution using PID, MPC, and AMPC controller (zoomed in between 40 s and 100 s).

Conclusions
This research presented the development of the CFOH model using the state-space and transfer function approach.The modelling technique combines the energy balance

Conclusions
This research presented the development of the CFOH model using the state-space and transfer function approach.The modelling technique combines the energy balance equation, electrical conductivity as a function of temperature, and the physical dimensions of the built CFOH plant to develop the model.The model was built in MATLAB/Simulink environment using a combination of block diagrams and function blocks.
The developed model was primarily validated in an open-loop with experimental data.A saline solution was used as a test product in validation experiments.The achieved low error values demonstrate that the model can accurately predict the behaviour of the real-time ohmic heating system during the temperature rise of the product.The validated transfer function-based model presents an interesting feature that the controller can be tuned in the simulation before deployment on the physical hardware.Therefore, the model was utilised to develop advanced process controllers, including PID, MPC, and AMPC that were deployed on the real-time pilot plant.The performances of these controllers in the simulation were evaluated and compared to the performances when deployed physically on the CFOH.This presented a hardware-in-the-loop (HIL) system whereby the controllers can be fine-tuned in the simulation instead of running multiple physical trials.
In conclusion, the linear transfer function-based model proves to be effective, showing comparable results with the experimental data obtained from the pilot plant.It was found that, in terms of rise time and steady-state error, the performance of the AMPC controller surpasses that of the PID and MPC controllers and exhibits the highest level of temperature control and precision among the tested controllers.Nevertheless, additional research endeavours can be pursued to develop advanced controllers tailored to efficiently process food products exhibiting diverse physicochemical properties.

Figure 1 .
Figure 1.Schematic of the internal structure of the CFOH control panel.

Figure 1 .
Figure 1.Schematic of the internal structure of the CFOH control panel.

Figure 2 .
Figure 2. The ohmic heating chamber, showing different heating stages separated by electrodes: (a) the ohmic heating chamber schematic diagram; (b) the pilot plant ohmic heating chamber.

Figure 2 .
Figure 2. The ohmic heating chamber, showing different heating stages separated by electrodes: (a) the ohmic heating chamber schematic diagram; (b) the pilot plant ohmic heating chamber.

Figure 3 .
Figure 3. Block diagram of the combined heating stages.

Figure 3 .
Figure 3. Block diagram of the combined heating stages.The transfer function-based equation with reference to the Figure 3 can be represented as: Figure 4 shows the overall open loop model structure.The inputs to the CFOH model are voltage (V), initial electrical conductivity (S/m), initial temperature ( • C), heat capacity (J/kg • C), and mass flow rate (kg/s).The output of the model is the output temperature of the heated product in • C.

Figure 4 .
Figure 4. Overview of the CFOH model in Simulink and its internal subsystems.

Figure 4 .
Figure 4. Overview of the CFOH model in Simulink and its internal subsystems.

Figure 5 .
Figure 5. Internal subsystem structure of the CFOH model.Figure 5. Internal subsystem structure of the CFOH model.

Figure 5 .
Figure 5. Internal subsystem structure of the CFOH model.Figure 5. Internal subsystem structure of the CFOH model.

Figure 6 .
Figure 6.Block layout of the heat determination block (green block) corresponding to the state spac model of the CFOH.

Figure 6 .
Figure 6.Block layout of the heat determination block (green block) corresponding to the state space model of the CFOH.

5 ,Figure 7 .
Figure 7. Open-loop validation when applying a gradual step increase in voltage at 1 L/min at 0.3 S/m saline solution.

Figure 7 .
Figure 7. Open-loop validation when applying a gradual step increase in voltage at 1 L/min at 0.3 S/m saline solution.

Figure 7 .
Figure 7. Open-loop validation when applying a gradual step increase in voltage at 1 L/min at 0.3 S/m saline solution.

Figure 8 .
Figure 8. Open-loop validation at 0.48 L/min when applying a step voltage at 0.6 S/m saline solution.

Figure 8 .
Figure 8. Open-loop validation at 0.48 L/min when applying a step voltage at 0.6 S/m saline solution.

Figure 9 .
Figure 9. Open-loop validation at 0.22 L/min when applying a step voltage at 0.3 S/m saline solution.

Figure 10 .
Figure 10.The safeguard system implemented with the controllers deployed in the ohmic heater plant.

Figure 11 .
Figure 11.Open-loop implementation of the CFOH from MATLAB/Simulink environment.

Figure 10 .
Figure 10.The safeguard system implemented with the controllers deployed in the ohmic heater plant.

Figure 10 .
Figure 10.The safeguard system implemented with the controllers deployed in the ohm plant.

Figure 11 .
Figure 11.Open-loop implementation of the CFOH from MATLAB/Simulink environment

Figure 11 .
Figure 11.Open-loop implementation of the CFOH from MATLAB/Simulink environment.

Figure 14 .
Figure 14.Closed-loop PID control of the continuous flow ohmic heater.

Figure 14 .
Figure 14.Closed-loop PID control of the continuous flow ohmic heater.

Figure 15 .
Figure 15.PID comparison between the simulated and deployed controller at a constant flow-rate of 0.78 L/min and electrical conductivity of 0.33 S/m.

Figure 15 .
Figure 15.PID comparison between the simulated and deployed controller at a constant flow-rate of 0.78 L/min and electrical conductivity of 0.33 S/m.

Figure 16 .Table 2 .
Figure 16.PID simulated and experimental response for changing flow rates at electrical conductivity 0.7 S/m.

Figure 17 .
Figure 17.MPC in the simulation compared to the deployed version for 0.78 L/m, 0.33 S/m.

Figure 17 .
Figure 17.MPC in the simulation compared to the deployed version for 0.78 L/m, 0.33 S/m.

Figure 18 .
Figure 18.MPC comparison in the simulation compared to deployment for changing flow-rates at 0.7 S/m.

Figure 18 .
Figure 18.MPC comparison in the simulation compared to deployment for changing flow-rates at 0.7 S/m.

Figure 19 .
Figure 19.The simulated AMPC compared to the deployed version for a fixed flow-rate at 0.3 S/m.

Figure 19 .
Figure 19.The simulated AMPC compared to the deployed version for a fixed flow-rate at 0.3 S/m.

Figure 20 .
Figure 20.AMPC comparison in the simulation compared to deployment for changing flow rates at 0.7 S/m.

Figure 20 .
Figure 20.AMPC comparison in the simulation compared to deployment for changing flow rates at 0.7 S/m.

Figure 21 .
Figure 21.Temperature response of heating saline solution using PID, MPC, and AMPC controller (zoomed in between 40 s and 100 s).
• modelling the continuous flow ohmic heater using a linear model represented in state-space or transfer function forms; • validating the linear model with experimental data; • applying advanced process control with the aid of the validated model on the physical plant; • evaluating the performance of different controllers on a continuous ohmic heater plant.
• C) is the heat capacity, T ( • C) is the temperature at any instant in time (t), T in ( • C) is the input temperature, and T ref ( • C) is the reference temperature.The following conditions have been assumed:• the chamber is well-mixed; • the reference temperature is constant, T re f = 0 • C; • volumetric heating is achieved from the applied electrical energy; • electrical heating Q is constant;• the rate of change of electrical heating is constant, hence, ∆Q = 0; • constant mass flow throughout, and not a time-dependent function;.

Table 1 .
Root mean squared errors (RMSE) and mean absolute percentage errors (MAPE) for openloop validation of the transfer function-based model against real-time experimental data.
These errors are determined from the real-time data points using Equation (18) for RMSE and Equation (19) for MAPE.RMSE

Table 2 .
Root mean squared errors (RMSE) and mean absolute percentage errors (MAPE) for the PID-controlled model against real-time experimental data with constant and variable flow rate.

Table 3 .
Effect of the magnitude of the OV cost function on the MPC and AMPC.

Table 4 .
Effect of the magnitude of the MV cost function on the MPC and AMPC.

Table 5 .
Effect of the DU.wt on the MPC and AMPC.

Table 6 .
Root mean squared errors (RMSE) and mean absolute percentage errors (MAPE) for the MPC-controlled model against real-time experimental data with constant and variable flow rate.

Table 6 .
Root mean squared errors (RMSE) and mean absolute percentage errors (MAPE) for the MPC-controlled model against real-time experimental data with constant and variable flow rate.

Table 7 .
Root mean squared errors (RMSE) and mean absolute percentage errors (MAPE) for AMPC controlled model against real-time experimental data with constant and variable flow rate.

Table 7 .
Root mean squared errors (RMSE) and mean absolute percentage errors (MAPE) for AMPC controlled model against real-time experimental data with constant and variable flow rate.