*2.4. Control Algorithms*

Rapid control of temperature and humidity simultaneously under limitations of mass and volume is challenging, due to limited choice of components, strong temperature/humidity coupling, performance hysteresis and nonlinear dynamic characteristics. Consequently, a simple PID controller will not be sufficient to control the system [14,15]. Therefore, the proposed test system utilizes a feed-forward decoupling control algorithm to decouple and control the temperature and humidity, improving the accuracy of the system [16]. The feed-forward decoupling control algorithm is used to predict the effect of the coupling between the temperature and humidity on the control process, and subsequently eliminate the cross-coupling effect. The block diagram of the heating-humidifying decoupling controller is shown in Figure 4a. Similarly, the cooling-humidifying decoupling control block diagram is obtained, as shown in Figure 4b.

**Figure 4.** (**a**) The heating-humidifying decoupling control block diagram, (**b**) the cooling-humidifying decoupling control block diagram.

It is crucial for the feed-forward decoupling control system to solve the feed-forward decoupling transfer function. The output of the heating-humidifying decoupling system can be described as:

$$\begin{aligned} \left[ \mathbf{T\_{C}} \, \mathbf{R} \mathbf{H\_{C}} \right] = \begin{bmatrix} \mathbf{C\_{1}(s)} & \mathbf{C\_{2}(s)} \end{bmatrix} \times \begin{bmatrix} \mathbf{G\_{11}(s)} & \mathbf{G\_{12}(s)} + \mathbf{G\_{22}(s)} \times \mathbf{D\_{12}(s)}\\ \mathbf{G\_{21}(s)} + \mathbf{G\_{11}(s)} \times \mathbf{D\_{21}(s)} & \mathbf{G\_{22}(s)} \end{bmatrix} \end{aligned} \tag{1}$$

where *G*11(s) is the system heating model and *G*12(s) is the system heating-humidifying coupling model. *G*21(s) is the system humidifying-heating coupling model, *G*22(s) is the system humidifying model, *D*21(s) is the humidifying-heating feed-forward decoupling factor and *D*12(s) is the heating-humidifying feed-forward decoupling factor.

After the decoupling the heating and humidifying process, the ideal system output should be described as:

$$\begin{bmatrix} T\_{\mathbb{C}} \, R H\_{\mathbb{C}} \end{bmatrix} = \begin{bmatrix} \, \, \mathbb{C}\_{1}(\mathbf{s}) & \, \mathbb{C}\_{2}(\mathbf{s}) \end{bmatrix} \times \begin{bmatrix} \, \, \, \mathbb{G}\_{11}(\mathbf{s}) & \, \, \mathbf{0} \\\, \, \mathbf{0} & \, \, \mathbf{G}\_{22}(\mathbf{s}) \end{bmatrix} \tag{2}$$

From Equations (1) and (2), the relationship between the heating, humidifying feedforward decoupling factor and the inherent model of the system can be obtained:

$$
\begin{bmatrix} D\_{21}(\mathbf{s}) & \mathbf{1} \\ \mathbf{1} & D\_{12}(\mathbf{s}) \end{bmatrix} \times \begin{bmatrix} \mathbf{G}\_{11}(\mathbf{s}) & \mathbf{G}\_{12}(\mathbf{s}) \\ \mathbf{G}\_{21}(\mathbf{s}) & \mathbf{G}\_{22}(\mathbf{s}) \end{bmatrix} = \begin{bmatrix} \mathbf{0} & \mathbf{0} \\ \mathbf{0} & \mathbf{0} \end{bmatrix} \tag{3}
$$

Similarly, the expression between the feed-forward decoupling factor of cooling, humidifying and the inherent model of the system can be obtained:

$$
\begin{bmatrix} D\_{32}(\mathbf{s}) & 1 \\ 1 & D\_{23}(\mathbf{s}) \end{bmatrix} \times \begin{bmatrix} \mathbf{G}\_{22}(\mathbf{s}) & \mathbf{G}\_{23}(\mathbf{s}) \\ \mathbf{G}\_{32}(\mathbf{s}) & \mathbf{G}\_{33}(\mathbf{s}) \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} \tag{4}
$$

where, *G*23(*s*) is humidifying-cooling coupling model, *G*32(s) is cooling-humidifying coupling model, *G*33(s) is the system heating model, *D*23(s) is humidifying-cooling feed-forward decoupling factor and *D*32(s) is cooling-humidifying feed-forward decoupling factor.

#### *2.5. Simulink Simulation*

To verify the effectiveness of the control methodology, the control system is simulated by using Simulink according to the proposed control block diagram in Figure 5.

**Figure 5.** (**a**) The heating-humidifying system model, (**b**) the cooling-humidifying system model [16].

The model of the control system is effective in tuning the parameters of the controller, including both the feedback and feed-forward parameters, which are essential factors for a rapid and accurate control of temperature and humidity. In the actual tuning process, the parameters *a*, *b*, *c* of *G*11(s), *G*12(s), *G*21(s), *G*23(s) and *G*33(s) can be obtained experimentally [17], and the parameters *u*, *w*, *x*, *y*, *z* of feed-forward decoupling factors *D*21(s), *D*12(s), *D*23(s) and *D*32(s) can be solved by Equations (3) and (4). The solving process will be used for the tuning process detailed in Section 3.2. By implementing the discretized feed-forward decoupling factor differential equation into the control program, the effects

of the system caused by the temperature and humidity coupling can be predicted and eliminated [18].
