Adv Syst Sci Appl 2021; 01; 46-59 Published online at https://ijassa.ipu.ru. Decoupling Model-Based Fuzzy Logic Control of Room Temperature and Humidity Snejana Yordanova Department of Automation, Technical University of Sofia, Sofia, Bulgaria E-mail: sty@tu-sofia.bg Abstract: The control of room temperature and humidity is important for ensuring of the necessary indoor human comfort for optimal work capacity and effective rest. The plant nonlinearity and the variables coupling require intelligent control techniques in order to satisfy the high performance demands. The present paper suggests a procedure for the design of a simple for industrial implementation fuzzy logic controller on the principle of parallel distributed compensation (PDC) that consists of linear local decoupling two-variable controllers. It is based on a Takagi-Sugeno-Kang (TSK) plant model, derived from experimentally obtained plant step responses using expert knowledge and parameter optimisation via genetic algorithms. The design is applied for the control of the temperature and the relative humidity of a laboratory air- conditioning system. The PDC system outperforms an existing Mamdani two-variable control system with adaptive properties in shorter settling time, higher robustness and reduced overshoot, estimated from simulations. Keywords: decoupling nonlinear control, laboratory air-conditioning system, parallel distributed compensation, room temperature and humidity control, TSK plant modelling, simulations 1. INTRODUCTION Temperature and humidity are ones of the most often controlled variables in numerous industrial processes and air-conditioning systems in rooms, cars, green houses, public buildings, etc. Their proper control ensures optimal process conditions and human indoor comfort for good work capacity and rest at a low cost [3, 7, 10]. The plant is nonlinear with coupling between the variables and subjected to various disturbances such as the changes of the number of people and their activity in the room, the outside air temperature and humidity, the wind, etc. It is difficult to be modelled which makes the control task complex for solving by classical approaches which are based on a simple and accurate mathematical plant model. Besides, the classical controllers often fail to satisfy the increasing performance demands on the control system. Controllers based on fuzzy logic (FL) can successfully ensure stability and robustness of the designed control system using only expert knowledge [4, 10, 11, 12, 13, 22]. Various fuzzy logic controllers (FLC) for air temperature and humidity have been developed in [1, 2, 4, 5, 7, 9, 10, 11, 12, 13, 18, 19, 21, 22, 24, 25] aiming at diverse performance improvements. Energy efficient FLC are designed in [1, 4]. In [1, 2, 9] evolutionary and genetic algorithms (GA) for FLC tuning are applied to reduce the number of the fuzzy rules and hence the FLC complexity, and optimize the FLC parameters and membership functions (MF). The variables coupling effect is considered in the design of MIMO FLC in [18, 24, 25]. Type 2 FLCs are suggested in [21] to improve system robustness. More sophisticated adaptive FLC are developed in [5, 19, 22, 23]. A simple neuro-fuzzy Sugeno type structure is trained from expert data in [14] to adaptively control the temperature and the relative humidity via the compressor speed in an air-conditioning system. Most of the FL control approaches suggested are tested only in simulations and often are difficult to apply for real time control due to the sophisticated design or/and algorithm. DECOUPLING MODEL-BASED FUZZY LOGIC CONTROL OF ROOM TEMPERATURE AND HUMIDITY 47 Copyright ©2021 ASSA. Adv. in Systems Science and Appl. (2021) The model-based FLC on the principle of parallel distributed compensation (PDC) marks a significant progress in the development of FLC. The PDC has a simple structure of a few rules and a stability and robustness based design supported by the well mastered advanced linear control technique [6, 20, 22, 23, 15]. This greatly facilitates the PDC wide industrial implementation and ensures improved performance of the PDC control system. The derivation of the necessary for the PDC design TSK plant model from plant input-output data is explained in [22, 23]. The data can be collected from experimental step responses in different operation points of the plant or during the real time operation control of the plant in a closed loop. If a nonlinear plant model is available the data can be obtained via simulations for various plant input signals. Both simulations and experiments have to be correctly designed. The TSK plant model is built on GA optimised or expert defined few linear operation zones. It unites a number of fuzzy rules, one for each zone, that recognize the position of the current operation point with respect to each zone, and the linear plant models which accurately represent the plant in the zones. The PDC is built on the same zone recognition conditions of the TSK plant model fuzzy rules. The conclusions, however, represent linear controllers each designed for a stable and robust control of the corresponding local linear plant for the operation zone. The nonlinear PDC performs soft switching between the control actions of all linear controllers taken with weights that depend on the degree of belonging of the current operation point to each of the fuzzy defined linearization zones. The PDC principle allows designing of a nonlinear controller by the use of local linear controllers of any type, MIMO included, in a simple unified manner by the help of the well- known and proven effective linear systems techniques. Based on a TSK plant model such plant peculiarities as nonlinearity, inertia, coupling, etc. can be better accounted for in the PDC design thus ensuring a stable, robust and more accurate control. Therefore the PDC often outperforms the model-free Mamdani controllers. The simple algorithm of operating in parallel local standard linear controllers is a prerequisite for an easy implementation under the real time restrictions for fast computations, traceability and reliability using the widely spread general purpose industrial programmable logic controllers (PLC) or microcontrollers. A two-variable PDC-FLC can be a perspective candidate for improvement of the performance of the control of temperature and relative humidity in an air-conditioning system. So, the aim of the present investigation is to develop a procedure for the design of a PDC- FLC with standard local linear controllers for decoupling two-variable control of the relative humidity and the temperature of a laboratory air-conditioning system and to demonstrate via simulation its implementation for the control and the performance improvement in comparison to a Mamdani two-variable controller. The further paper organization is the following. In Section 2 the theoretical background including previous relevant research and the problem formulation are presented. Section 3 is devoted to the derivation of a simpler plant TSK model from experimental plant step responses. The design of a PDC with decoupling local two-variable controllers is described in Section 4. Section 5 deals with the simulation investigations of the developed PDC system for the control of the relative humidity and the temperature of a laboratory air-conditioning system. There the performance of the system is assessed and its advantages discussed on the basis of a comparison with the performance of a designed in a previous research Mamdani FLC system. Section 6 contains the conclusion and plans for future research. 2. THEORETICAL BACKGROUND AND PROBLEM FORMULATION In the present investigation a modified transfer functions based PDC, developed in [22], is considered. It is a TSK structure built on the basis of a modified transfer functions based TSK plant model. The PDC and the TSK plant model consist of a nonlinear static Sugeno model and a dynamic linear part of operating in parallel elements described by transfer 48 S. YORDANOVA Copyright ©2021 ASSA. Adv. in Systems Science and Appl. (2021) functions or matrices in the multivariable case. The Sugeno model contains expert defined input orthogonal MF that describe the overlapping operation zones of the plant, e.g. under, around and above the norm, where the plant model can be considered linear. Input to it is the measured plant output y(t) which is used to represent the current operation point and to determine the degree k of its matching to all defined linearization zones. The number of the Sugeno model outputs is equal to the number of the linearization zones. Due to the specific rule base used each value k of the MF appears at a k-th output. For instance, the rule base for three linearization zones, k=13, is the following: R1: If y is Zone 1 Then output1 1=1 And output2 1=0 And output3 1=0 R2: If y is Zone 2 Then output1 2=0 And output2 2=1 And output3 2=0 (2.1) R3: If y is Zone 3 Then output1 3=0 And output2 3=0 And output3 3=1. The measured plant output yn at moment tn matches the three defined zones with degrees µ1, µ2 and µ3, respectively. Then the Sugeno model outputs for orthogonal MF (µ1+µ2+µ3=1) after weighted average defuzzyfication become: output1 о=(µ1•output1 1+µ2•output12+µ3•output1 3)=µ1, output2 о=(µ1•output2 1+µ2•output2 2+µ3•output2 3)=µ2, output3 о=(µ1•output3 1+µ2•output3 2+µ3•output3 3)=µ3. For N linearization zones and arbitrary MF each Sugeno model output is computed using weighted average as ∑μμ= N 1=i i/k o koutput . In Fig. 2.1 a modified transfer functions based PDC is depicted for three linearisation zones. It consists of linear controllers Ri(s) – one for each linearisation zone and a Sugeno model. The nonlinear controller output is computed as: .∑μ/∑μ=∑output= N 1=k k N 1=k k•k N 1=k k• o k o PDC uuu Thus the Sugeno model defines the premises of the fuzzy rules in the classic PDC [6, 20]. It is completed in a simple FU with a few MF and simple defuzzyfication which makes it easy to programme in a PLC even if the PLC supports no FL. The dynamic part is an analogue to the conclusions of the fuzzy rules in the classical PDC. It comprises standard linear controllers that exist as PLC components. They are tuned using the linear control systems methods for the local linear plant model in the TSK plant model according to desired stability and performance criteria. The corresponding TSK plant model differs only in the dynamic part, where the common input is the control action u and for each zone a linear model of the local plant with proper transfer function Pi(s) replaces Ri(s). The transfer functions of the local plant models and controllers are replaced by transfer matrices for MIMO plants and controllers. The development of a high performance PDC-FLC for the air temperature (T) and relative humidity (Rh) in a room should comply with the requirements for ensuring R2(s) R3(s) e Sugeno model x 2 uPDC x y=20 1 2 3 1 3 x R1(s) u1 y u2 u3 Fig. 2.1. A modified PDC-FLC for three linearization zones of linear controllers and a Sugeno model with expert designed orthogonal MF DECOUPLING MODEL-BASED FUZZY LOGIC CONTROL OF ROOM TEMPERATURE AND HUMIDITY 49 Copyright ©2021 ASSA. Adv. in Systems Science and Appl. (2021) thermal comfort for the people, defined by the comfort zone on the psychrometric chart in Fig. 2.2 [3]. This chart shows that temperature and relative humidity have to be controlled as coupled variables at references within the comfort zone. The present research is based on the developed in [22-25] laboratory air-conditioning system. It is depicted in Fig. 2.3 together with the designed in [22, 25] Mamdani two- variable FLC for the control of Rh (y1) and T (y2), used later for comparison. The laboratory air-conditioning system consists of three connected via fans chambers – for air heating, for air humidifying and a cabin for the room with humidity and temperature measuring transmitters. The plant-controller interface includes pulse-width modulators (PWMi) for the control actions ui, Digital outputs (DOi) of the Data acquisition (DAQ) board, solid state relays SSRi to the humidifier and the heater, transmitters for Rh and T, Analog-to-digital converters (ADCi) of DAQ and converters of binary code to real physical quantities Rh% and ToC. The Mamdani FLC consists of two identical fuzzy units (FUi) which are cross-connected via the two inputs to each FU [ei n, n jy ], where ei n are the normalized main channel errors, ei=yri-yi, i=1, 2, yri – the corresponding references and n jy , ji, j=1, 2, are the derivatives of the cross channel plant outputs, computed by first order differentiators Wdj(s). The post- processing is proportional-plus-integral (PI) with transfer function CPIi(s). The FLC parameters are tuned by a designed fuzzy supervisory controller in simulations mode for different references yri and disturbances using a model of the closed loop system based on a derived TSK plant model. The final FLC tuning parameters are fixed to their mean values from the supervisor off-line auto-tuning. Thus the designed and tuned to adapt two-variable FLC is applied for real time control of Rh and T in MATLABTM environment [8, 15, 16]. The main tasks of the current research are the following. 1. Derivation of a simpler TSK plant model from experimental plant step responses than the obtained in [22-24] where for each of the four channels a separate Sugeno model with GA optimised Gaussian MF is designed. The Sugeno models in [22-25] are used as parts of the TSK plant model only in simulations. In this research they are included in the structure of the PDC and therefore have to be reduced in number and with fixed and simple in shape MF in order to facilitate the further PLC implementation. 2. Design and tuning of a PDC with local linear two-variable decoupling PI controllers. 3. Simulation investigations of the PDC closed loop system based on the new TSK plant model and system performance assessment. 4. Comparison of the step responses and the performance estimates of the PDC system with the FLC system from [25] and assessment of improvements. Rh, % T, o C X,g/kg Comfort zone Fig. 2.2. ASHRAE comfort zone representation 50 S. YORDANOVA Copyright ©2021 ASSA. Adv. in Systems Science and Appl. (2021) ADCi DOi CABIN yi Software Generalised plant PWMi ui Converters to T o C and Rh% yi=yii+yij A two-variable Mamdani FLC for y1 relative humidity and y2 temperature FUi Kеi PIi Wdj(s) yri ei yj - Fig. 2.3. Laboratory air conditioning system and FLC for control of air relative humidity and temperature 3. TSK PLANT MODELLING The accepted TSK plant model structure is depicted in Fig. 3.1. Two Sugeno models are designed – one for each controlled variable. They describe three linearization zones via 10 60 y1 y2 y2 µ 1 2 µ 2 2 µ 3 2 15 40 Sugeno 1 y1 µ1 1 µ 2 1 µ 3 1 Sugeno 2 µ1 1 µ2 1 µ3 1 µ3 2 µ1 2 µ2 2 Fig. 3.1. Block diagram of TSK plant model structure DECOUPLING MODEL-BASED FUZZY LOGIC CONTROL OF ROOM TEMPERATURE AND HUMIDITY 51 Copyright ©2021 ASSA. Adv. in Systems Science and Appl. (2021) orthogonal MF - triangular for the “Norm” in the middle of the range of the corresponding plant output – y1[10,60]%, y2[15,40]oC, and two trapezoidal MF for “Under the Norm” and “Above the Norm” on both sides of the triangular MF. The dynamic part of each zone is represented by a transfer matrix: 𝐏k(𝑠) = [ 𝑃11 k (𝑠) 𝑃12 k (𝑠) 𝑃21 k (𝑠) 𝑃22 k (𝑠) ] , 𝑘 = 1 ÷ 3 . (3.1) The output of the i-th channel in the k-th zone is yi k(s)=yii k(s)+yij k(s)=Рii k(s)ui k+Pij k(s)uj k, where 𝑦ij k(𝑠) = 𝑃ij k(𝑠)𝑢j(𝑠), (i, j=1, 2). For a main channel i=j and for a cross channel ij. The superscript denotes the number of the zone. The parameters of the TSK plant model are the parameters of the transfer functions (TF) in the dynamic part of each zone qTSK=[qTF], i.e. the parameters of the local linear plant models and the initial conditions for the output variables. They are computed in an optimisation procedure using GA with the fitness function: 𝐅 = ∫ ∑ { [𝑦iTSK(𝑡,𝐪TSK)−𝑦iexp(𝑡)] 𝑦iexp(𝑡) } 2 𝑑𝑡 → 𝐦𝐢𝐧⏟ 𝐪TSK m i=1 , (3.2) where m is the number of the plant output variables (for a two-variable plant m=2), yiTSK(t, 𝐪TSK) and yexpi(t) are the corresponding outputs of the TSK plant model and of the real plant, obtained for the same inputs uexpi(t) via simulation using an available nonlinear plant model or an experimental study of the plant. The experimental and simulation investigations are designed in aspect of ensuring of rich in frequencies and magnitudes input signals to the plant that cover the whole range of operation of the plant. This is a prerequisite for high accuracy in modelling of the plant nonlinearity and other peculiarities. The experimental and simulation data are first processed to ensure fast convergence of the optimisation procedure by noise filtration, reduction of the size of the sample (elimination of non- informative data, dilution of data by discretization of time with higher step size preserving the data pattern) and reduction of the data correlation, normalization or standardization, etc. GA for TSK plant model parameter optimisation are selected for the parallel search of the parameter space, the avoidance of trapping in a local extremum and of computation of gradient. For the safety of the industrial plant operation GA are applied here off-line in combination with simulation in MATLABTM environment. The modified TSK plant model is suitable for Simulink simulation and fast computation of the fitness function. According to GA the model parameters called genes are ordered in an array to make a chromosome or an individual for specific parameters values, which is viewed upon as one possible solution of the optimization problem. Randomly generated chromosomes create the population of the first generation. The individuals are rated according to the value of their computed fitness function. Every next generation is filled by the better rated offspring produced by mating of chromosomes - parents, crossover of genes between parents and random mutation of genes. The optimisation ends after an accepted number of generations or after reaching of a desired minimum of the fitness function. The TSK plant model with the optimal parameters is validated for independent input-output experimental or simulations data or in parallel operation to the original plant with “hanging end”. In case validation fails another optimisation with new random initialization of the first population, fitness function, GA parameters or parameter bounds, etc. or a new model is recommended. The TSK plant model of the relative humidity and the temperature in the laboratory air- conditioning system in Fig. 2.3 is derived from the experimental study of the two-variable plant in the whole range of its operation. The obtained step responses of the generalized plant with respect to the two outputs – Rh and T are shown in Fig. 3.2. The plant inputs applied are u= [u1, u2]=[2, 0; 4, 0; 6, 0; 2, 6; 4, 6; 6, 6], V and change stepwise at step times tstep=[0 800 1600 2400 3400 4400], s, where u1 and u2 are the control signals to the PWM1 and PWM2 52 S. YORDANOVA Copyright ©2021 ASSA. Adv. in Systems Science and Appl. (2021) 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 20 30 40 50 60 70 Experiment y11 y22 y12 y21 Time, s Temperature, o C Rh, % TSK model Fig. 3.2. Step responses of Rh and T Table 3.1. Optimal TSK plant model parameters Zones For y1=y11+y12=Rh, Rh(0)=35%, To1=57s For y2=y21+y22=T, T(0)=22.8oC, To2=244s Main channel 11 (y11) Cross channel 12 (y12) Cross channel 21 (y21) Main channel 22 (y22) K11 k,% T11 k, s K12 k,% T12 k, s K21 k,% T21 k, s K22 k,% T22 k, s Zone1, k=1 1.4 273 -1.1 895 -0.6 1954 2.6 228 Zone2, k=2 2.8 284 -3.6 818 -0.6 2052 3.5 859 Zone3, k=3 4.7 150 -6.5 456 -1.2 1810 3.2 854 respectively, which via SSR1 and SSR2 connect the humidifier and the electrical heater to the nets voltage during the corresponding pulses and disconnect them during the pauses. Three linearization zones for each output are assumed described by two Sugeno models, shown in Fig. 3.1, with expert defined MF of standard shape with economical piecewise linear representation in PLC. The local plants are two-variable. The type of step responses in Fig. 3.2 suggests second order time lag transfer functions in (3.1) which are also convenient for the further model parameter optimisation: Pij k(s)=Kij k.[(Tij k.s+1).(Toi.s+1)]-1. (3.3) The role of the common for all zones time lag element (Toi.s+1)-1 is to reflect the plant inertia in each output using only one tuning parameter – the time constant Toi. The GA tuning parameters are qTSK=[qTSK 1 qTSK 2 qTSK 3 To1 To2 Rh(0) T(0)], where qTSK k=[K11 k T11 k K12 k T12 k K21 k T21 k K22 k T22 k] and Rh(0), T(0) are the initial conditions for humidity and temperature respectively. The optimal TSK plant model parameters, computed by GA minimization of the fitness function (3.2), are systemized in Table 3.1. The TSK plant model is validated in the following way. The designed in previous research Mamdani two-variable FLC, shown in Fig. 2.3, is first applied for the real time control of Rh and T in the laboratory air-conditioning system. Then it is used for the control of the TSK plant model via simulation for the same references. The two types of step responses – experimental and from simulation are presented in Fig. 3.3. From their comparison it can be concluded that they are close and hence the TSK plant model correctly represents the real plant. In Fig. 3.3 the step responses of two simulated systems are shown. DECOUPLING MODEL-BASED FUZZY LOGIC CONTROL OF ROOM TEMPERATURE AND HUMIDITY 53 Copyright ©2021 ASSA. Adv. in Systems Science and Appl. (2021) Fig. 3.3. Step responses of FLC closed loop system from real time control of relative humidity and temperature and from FLC and PDC closed loop systems simulations using a TSK plant model In the first system the FLC parameters are tuned from robust performance criterion while in the second - the computed parameters are improved with correction of the gains after a fuzzy supervisor based off-line auto-tuning [22-25] which leads to a better system performance expressed in a reduced settling time and variables coupling effect. The second order time lag transfer functions (3.3) are approximated to the more convenient for the PDC design Ziegler-Nichols (ZN) plant models Pij k(s)=Kij k[(Tij ks+1).(Tois+1)]-1Kij ke-ijks(Tij knews+1)-1 (3.4) The ZN approximation is based on the representation of the time delay by the first term of the Taylor’ series expansion - e-ijks(ij k.s+1)-1. So, the time lag element with the smaller time constant in (3.3) can be accepted as the approximation of the time delay. In that case ij k =min(Tij k, Toi) and Tij knew=max(Tij k,Toi). The parameters of all ZN models are ij k=Toi, Tij knew=Tij k, k=13, i, j=1, 2 with the exception for i=j=2 where 22 1=T22 1, T22 1new=To2. 4. DESIGN OF PDC WITH LOCAL LINEAR TWO-VARIABLE CONTROLLERS The PDC for the control of a two-variable plant is shown in Fig. 4.1. It is based on the derived TSK plant model. The Sugeno models are the same as in the TSK plant model. The local linear controllers in each of the three linearization zones are two-variable, represented by the following transfer matrices: 𝐑k(𝑠) = [ 𝐶11 k (𝑠) 𝐶12 k (𝑠) 𝐶21 k (𝑠) 𝐶22 k (𝑠) ] , 𝑘 = 1 ÷ 3 . (4.1) The design of the PDC concludes in the design of the local linear controllers. The block diagram of a linear two-variable controller is presented in Fig. 4.2. It consists of two standard PID based main controllers Cii(s) and two cross controllers Cij(s) the aim of which is to 0 1000 2000 3000 4000 5000 6000 7000 8000 20 22 24 26 28 30 32 34 36 38 40 Mamdani FLC system simulation Temperature, C o Humidity, % Dotted line - Mamdani FLC simulation without supervision References PDC system simulation Mamdani FLC real time with corrected gains Two-variable PDC and FLC Time, s 54 S. YORDANOVA Copyright ©2021 ASSA. Adv. in Systems Science and Appl. (2021) u22 C22 2 (s) C22 1 (s) C22 3 (s) u2 Sugeno 1 output k 1 y1 u11 C11 2 (s) C11 1 (s) C11 3 (s) x x x u1 u12 C12 2 (s) C12 1 (s) C12 3 (s) e2 e1 Sugeno 2 output k 2 y2 u21 C21 2 (s) C21 1 (s) C21 3 (s) x x x u11 1 u11 2 u11 3 u21 1 u21 2 u21 3 x x x x x x Fig. 4.1. Modified PDC-TSK with local linear two-variable controllers for three linearization zones C11(s) C12(s) C21(s) C22(s) e1 u11 u12 u21 u22 e2 u1 u2 Fig. 4.2. Block diagram of linear two-variable controller compensate the cross connections between the two plant output variables. The controller outputs are ui=uii+uij (i, j=1,2; i j), where uij=Cij(s).ej. The design of the linear two-variable controllers is based on the linear control theory methods [17, 22]. The design criterion is to achieve decoupling in the closed loop system and a desired performance of the two decoupled systems. The requirement for decoupling is the closed loop system transfer matrix with respect to reference yr (s)=[I+P(s).R(s)]-1P(s).R(s) to be turned into a diagonal matrix (s)=diag[ii(s)] by the help of cross controllers with proper transfer functions. The decoupling ensures that each plant output variable depends only on its reference, i.e. yi(s)=ii(s).yri+ij(s).yrj, ij(s)=0. The transfer functions of the decoupling cross controllers Cij(s), computed from the conditions ij(s)=0, are: DECOUPLING MODEL-BASED FUZZY LOGIC CONTROL OF ROOM TEMPERATURE AND HUMIDITY 55 Copyright ©2021 ASSA. Adv. in Systems Science and Appl. (2021) 𝐶ij(𝑠) = − 𝑃ij(𝑠)𝐶jj(𝑠) 𝑃ii(𝑠) . (4.2) The decoupled closed loop systems are described by the following transfer functions: ii(s)=Piieq(s).Cii(s).[1+ Piieq(s).Cii(s)]-1, (4.3) where Piieq(s) are equivalent plants 𝑃iieq(𝑠) = 𝑃ii(𝑠)[1 − 𝑃12(𝑠)𝑃21(𝑠) 𝑃11(𝑠)𝑃22(𝑠) ]. (4.4) Relationships (4.2)-(4.4) determine the following procedure for tuning of the parameters of the two-variable controller. Step 1. The equivalent plants (4.4) are computed and their ZN models are derived by approximation of the obtained step responses. The ZN plant model is necessary when engineering techniques are applied for the tuning of the main PID based controllers since most empirical tuning approaches are developed for ZN plant model [17]. Step 2. The main controllers are tuned to ensure desired performance indicators in the decoupled closed loop systems, e.g. for ensuring of a good compromise between a small overshoot  and a short settling time ts the parameters Kpii and Ti ii of a main PI controller 𝐶ii(𝑠) =Kр[1+1/(Ti ii.s)] are computed from [17]: Kрii=A. 𝑇iieq/(𝐾iieq. iieq); Тi ii=B. 𝑇iieq, A=0.32.5, B=0.63. (4.5) Step 3. The cross controllers are computed from (4.2) where the plant time delay is represented by its Taylor’s approximation as a time lag in order to obtain rational transfer functions 𝐶ij(𝑠)=(ansn+…+ao).(bmsm+…+bo)-1, mn. Then the simulated step responses are approximated by low order dynamic elements – lead-lags, first order differentiators, PI or PID controllers in order to simplify the PDC completion. This procedure is repeated for each linearization zone of the PDC. The tuning of the PDC for Rh and T considers local two-variable PI controllers. The ZN model parameters of the approximated equivalent plants in the three linearisation zones are shown in Table 4.1. The main controllers are tuned according to (4.5) and the cross controllers (4.2) are approximated with PI algorithms. The computed parameters of all PI controllers are presented in Table 4.2. Table 4.1. ZN model parameters of the approximated equivalent plants Zones Main channel 11 Main channel 22 K11eq k T11eq k 11eq k % s s K22eq k T22eq k 22eq k % s s Zone1, k=1 1.15 300 18 2.15 400 40 Zone2, k=2 2.2 200 40 2.75 750 150 Zone3, k=3 2.26 100 10 1.57 550 150 Table 4.2. Parameters of the PDC local PI controllers Zones Main channel 11 Cross channel 12 Cross channel 21 Main channel 22 Kp11 k Ti11 k % s Kp12 k Ti12 k % s Kp21 k Ti21 k oC s Kp22 k Ti22 k oC s Zone1, k=1 1.03 164 0.08 65 0.03 60 0.36 147 Zone2, k=2 0.53 171 0.4 220 0.038 160 0.9 515 Zone3, k=3 0.17 90 0.65 150 0.03 80 1 513 56 S. YORDANOVA Copyright ©2021 ASSA. Adv. in Systems Science and Appl. (2021) 5. PDC SYSTEM SIMULATION INVESTIGATION AND PERFORMANCE ASSESSMENT The designed PDC for the control of the relative humidity and the temperature of a laboratory air-conditioning system is tested in simulations based on the developed simple TSK plant model. The simulation investigations include the following experiments: 1. Simulation of the step responses of humidity and temperature to reference changes applied to the PDC closed loop system in cases the local two-variable controllers Rk(s) (4.1) are designed with and without (Cij k(s)=0) decoupling controllers. This investigation aims at justification of the necessity of decoupling cross controllers in the local two-variable controllers for improving the performance of the closed loop system, e.g. reduction of the dynamic error due to plant output variables coupling. The parameters of the local two- variable controllers without decoupling controllers for which Rk(s)=diag[Cii(s)] are computed from (4.5) on the basis of the corresponding local main channels plant models, i.e. 𝑃iieq(𝑠) = 𝑃ii(𝑠), and are shown in Table 5.1. Both final defuzzyfied control actions are scaled by 2. The simulated step responses are shown in Fig. 5.1 from where it can be established that the system with the decoupling cross controllers demonstrates reduced overshoot i=(ymaxi/yri).100, %, ymax i=ymax i-yri, settling time tsi and coupling effect, estimated by Ceij=|ymax i|/|yrj|.100, %, for ij. Besides, the step responses for each plant output for equal reference step changes differ a little despite the changes of the parameters of the nonlinear plant in the different operation points. This is a proof that the system is robust. So, the decoupling cross controllers contribute to the improvement of the system performance. 2. Simulation of the step responses of humidity and temperature to reference changes applied to the FLC and the decoupling PDC closed loop systems in order to be compared. The simulated step responses of the PDC closed loop system with the decoupling controllers in the local two-variable linear controllers from Fig. 5.1 are added to the graphs in Fig. 3.3. Table 5.1. Tuning of main controllers of the local diagonal two-variable controllers Zones Kp11,% Ti11, s Kp22, oC Ti22, s Zone 1 1.03 246 0.12 220 Zone 2 0.53 256 0.3 773 Zone 3 0.17 135 0.33 769 0 1000 2000 3000 4000 5000 6000 7000 20 22 24 26 28 30 32 34 36 R k (s) on main controllers (Cij k (s)=0) Temperature, o C Humidity, % References R k (s) with decoupling controllers Cij k (s) Coupling effect Time, s PDC with local two-variable controllers R k (s) Fig. 5.1. Simulated closed loop systems step responses for two-variable PDC with and without decoupling DECOUPLING MODEL-BASED FUZZY LOGIC CONTROL OF ROOM TEMPERATURE AND HUMIDITY 57 Copyright ©2021 ASSA. Adv. in Systems Science and Appl. (2021) The PDC system outperforms the FLC system in reduced overshoot, settling time and coupling effect and better robustness – almost identical responses to equal reference changes from different operation points. Considering the closeness between the simulated and real time step responses of the FLC system it can be deduced that: - the experimental step responses of the real time PDC system will not deviate significantly from its simulated responses; - the performances of the PDC and FLC real time systems will be related in the same manner the corresponding simulated systems performances are related, i.e. the PDC real time control system is expected to have faster step responses with smaller overshoot, insignificant decoupling and better robustness. The investigated systems assessed performance indicators overshoot i, %, settling time tsi, s, and coupling effect Ceij, %, are presented in Table 5.2. The step responses of temperature are characterised by higher ts. The coupling effect is higher on the relative humidity. Both the correction of the FLC gains with the effect of adaptation and the decoupling cross controllers of the PDC reduce at least by 2 the coupling effect in the corresponding systems without gain correction and decoupling cross-controllers respectively. In simulations the decoupling PDC outperforms the FLC with the corrected gains in reduced coupling, settling time and overshoot as seen from the values in colour in Table 5.2. The simulated system with FLC with corrected gains shows on average worse perfomance than the FLC real time system since  and ts are 2-2.5 times greater. This gives grounds to deduce that the decoupled PDC system in real time control can have much better performance than in simulations. Besides, in real time control it can be expected to have smaller overshoot, coupling and settling time than the FLC system with corrected gains. Table 5.2. Assessed performance indicators of all investigated systems Systems yr1% yr2 oC y1, % y2, oC , % ts, s Ce, % , % ts, s Ce, % FLC corrected gains real time 29 34 34 34 25 25 27 29 0 5 - - 250 250 - - - - 0 0 - - 5 3 - - 1300 1400 10 8 - - FLC corrected gains simulations 29 34 34 34 25 25 27 29 0 30 - - 700 700 - - - - 12 15 - - 25 12 - - 2500 2500 4 4 - - FLC simulations 29 34 34 34 25 25 27 29 0 32 - - 1500 1400 - - - - 20 20 - - 25 10 - - 2600 2400 5 10 - - Decoupling PDC simulations 29 34 34 34 25 25 27 29 20 20 - - 700 700 - - - - 10 3 - - 20 4 - - 1200 1500 3 3 - - PDC simulations 29 34 34 34 25 25 27 29 24 26 - - 700 700 - - - - 25 32 - - 0 0 - - 1100 2600 4 4 - - 58 S. YORDANOVA Copyright ©2021 ASSA. Adv. in Systems Science and Appl. (2021) 6. CONCLUSION AND FUTURE WORK The novelty and the main contributions of the research conclude to the following. A fuzzy logic controller on the principle of parallel distributed compensation for decoupling control of a two-variable nonlinear plant - the coupled room relative humidity and temperature in a laboratory air-conditioning system, is developed in order to improve the PDC closed loop system accuracy and robustness with respect to a Mamdani FLC system. The PDC design is based on a novel two-variable TSK plant model with simple structure and local plant transfer matrices models. The TSK plant model is derived and validated from an objective procedure using experimental data in a genetic algorithms optimisation. The PDC has the same structure as the TSK plant model but with local standard linear two-variable decoupling controllers which unlike the two-variable Mamdani FLC simplifies the PDC completion in general purpose industrial programmable logic controllers for real time control. Besides, the PDC design and tuning is based on the linear control theory approaches. Simulations and real time experiments on a laboratory HVAC system are performed to show that the developed PDC system outperforms the existing more complicated adaptive Mamdani two-variable control system in improved dynamic accuracy and robustness. The future research will be focused on the testing of the designed PDC in real time control of the relative humidity and the temperature in a laboratory air-conditioning system using the facilities of MATLABTM real time [16] and of an industrial PLC. REFERENCES 1. Alcala, R., Casillas, J., & Gonzalez, A. (1999). Tuning fuzzy logic controllers for energy efficiency consumption in buildings. Proc. of the EUSFLAT-ESTYLF Joint Conference, Palma de Mallorca, Spain, Sept. 22-25, 103–202. 2. Alcala, R., Casillas, G., Cordon, O., Gonzalez, A., & Herrera, F. (2005). A Genetic Rule Weighting and Selection Process for Fuzzy Control of Heating, Ventilating and Air conditioning Systems. Tarrytown, N.Y.: Pergamon Press Inc. 3. ASHRAE Handbook Fundamentals. (1989). SI Edition, GA. 4. Batayneh, W., Al-Araidah, O., & Batayneh, K. (2010). Fuzzy logic approach to provide safe and comfortable indoor environment. International Journal of Engineering, Science and Technology, 2(7), 65–72. 5. Calvino, F., Gennusa, M.L., Rizzo, G., & Scaccianoce G. (2004). The control of indoor thermal comfort conditions: introducing a fuzzy adaptive controller. Energy and Buildings, 36(2), 97–102. 6. Feng, G. (2010). Analysis and Synthesis of Fuzzy Control Systems: A Model Based Approach. CRC Press. 7. Freire, R., Oliveira, G., & Mendes, N. (2008). Predictive controllers for thermal comfort optimization and energy savings. Energy and Buildings, 40, 1353–1365. 8. Fuzzy Logic Toolbox User’s Guide: for Use with MATLAB. (1998) v.3.0, The MathWorks. 9. Gacto, M. J., Alcalá, R., & Herrera, F. (2012). A multi-objective evolutionary algorithm for an effective tuning of fuzzy logic controllers in heating, ventilating and air conditioning systems. Applied Intelligence, 36(2), 330–347. 10. Gouda, M. (2005). Fuzzy ventilation control for zone temperature and relative humidity. American Control Conference, 507–512. 11. Jantzen, J. (2007). Foundations of Fuzzy Control. John Wiley & Sons Inc. 12. Jaradat, M. (2009). Fuzzy logic controller deployed for indoor air quality control in naturally ventilated environments. Journal of Electrical Engineering, 60(1), 12–17. https://www.sciencedirect.com/science/journal/03787788 https://www.sciencedirect.com/science/journal/03787788 https://www.sciencedirect.com/science/journal/03787788/36/2 DECOUPLING MODEL-BASED FUZZY LOGIC CONTROL OF ROOM TEMPERATURE AND HUMIDITY 59 Copyright ©2021 ASSA. Adv. in Systems Science and Appl. (2021) 13. Kaur, A., & Kaur, A. (2012). Comparison of Mamdani-type and Sugeno-type fuzzy inference systems for air conditioning system. International Journal of Soft Computing and Engineering, 2(2), 323–325. 14. Kaur, A., & Kaur, A. (2012). Development of neuro fuzzy controller algorithm for air conditioning system. International Journal of Engineering Science and Technology, 4(4), 1667–1671. 15. MATLAB – Genetic Algorithm and Direct Search Toolbox. User’s Guide. (2004). Natick, MA: The MathWorks, Inc.. 16. MATLAB – Real-time Workshop. User’s Guide. (1992). The MathWorks, Inc. 17. Neshkov, T., Yordanova, S., & Topalova, I. (2007). Process Control and production automation. Sofia: TU- Sofia. 18. Patil,S., Bhaskar, P., & Sudheer, L. (2011). Design and implementation of an integrated fuzzy logic controller for a multi-input multi-output system. Defence Science Journal, 61(3), 219–227. 19. Soygüder, S., Karaköse, M., & Alli, H. (2009). Design and simulation of self-tuning pid-type fuzzy adaptive control for an expert HVAC system. Expert System with Applications, 36(3), 4566–4573. 20. Tanaka, K., & Wang, H. O. (2001). Fuzzy Control Systems Design and Analysis: A Linear Matrix Inequality Approach. John Wiley & Sons, Inc. 21. Wu, D. (2012). On the fundamental differences between interval type-2 and type-1 fuzzy logic controllers. IEEE Trans. on Fuzzy Systems, 20(5), 832–848. 22. Yordanova, S. (2011). Methods for Design of Fuzzy Logic Controllers for Robust Process Control. Sofia: KING [in Bulgarian]. 23. Yordanova, S. (2016). Design of fuzzy supervisor-based adaptive process control systems. In K. Nakamatsu, & R. Kountchev (Eds), New Approaches in Intelligent Control: Techniques, Methodologies and Applications (pp. 1–42), Book series “Intelligent systems reference library” 107, Switzerland: Springer Int. Publishing. 24. Yordanova, S. (2017). Energy efficient fuzzy logic control of indoor air-conditioning in real time. WSEAS Trans. on Circuits and Systems, 16, 163–170. 25. Yordanova, S., Merazchiev, D., & Jain, L. (2015). A two variable fuzzy control design with application to an air-conditioning system. IEEE Trans. on Fuzzy Systems, 23(2), 474–481. 1. INTRODUCTION 2. THEORETICAL BACKGROUND AND PROBLEM FORMULATION 3. TSK plant modelling 4. DESIGN OF PDC WITH LOCAL LINEAR TWO-VARIABLE CONTROLLERS 5. PDC SYSTEM SIMULATION INVESTIGATION AND PERFORMANCE ASSESSMENT 6. CONCLUSION and Future work