ARTICLE IN PRESS
Control Engineering Practice 13 (2005) 613–628
Greenhouse climate hierarchical fuzzy modelling Paulo Salgado*, J. Boaventura Cunha ! ! CETAV- Centro de Estudos Tecnologicos do Ambiente e da Vida, Universidade de Tras-os-Montes e Alto Douro, Dep. Engenharias, 5000-911 Vila Real, Portugal Received 25 July 2003; accepted 12 May 2004 Available online 1 July 2004
Abstract Fuzzy modelling has been widely applied as a powerful methodology for the identification of nonlinear systems from process measurements. Most applications use flat sets of fuzzy rules, which are hardly interpretable black-box approaches. Hierarchical modelling is a promising tool to deal with real world complex systems. A large-scale model can be easily readable if it is partitioned into several independent smaller models to represent functional relations of the processes involved in the system. This article deals with the application of a new fuzzy modelling technique that automatically organizes the sets of fuzzy IF–THEN rules in a Hierarchical Collaborative Structure. This organizational structure makes the fuzzy model interpretable as in the case of the physical model. This new methodology was tested to split the inside greenhouse air temperature and humidity flat fuzzy models into fuzzy sub-models, which have alike counterpart on the physical sub-models. r 2004 Elsevier Ltd. All rights reserved. Keywords: Hierarchical systems; Fuzzy models; Identification algorithms; Computer simulation; Agriculture
1. Introduction During the last two decades, a large effort was devoted to develop adequate greenhouse climate and crop models, for simulation, control and management purposes (Bot, 1983; Jones, Hwang & Seginer, 1995; Bakker, Bot, Challa, & van de Braak, 1995; Marcelis, Heuvelink, & Goudrian, 1998). The study and design of efficient greenhouse environmental controllers require to have a priori knowledge of the greenhouse climate models. These models must be related with the external influences of the outside weather conditions (such as solar radiation, outside air temperature, wind velocity, etc.), and with the actuating actions performed (such as ventilation, cooling, heating, among others). Proper design for engineering applications requires detailed information of the system-properties such as radiation, heat and mass exchanges, condensation, etc., and of the heating, ventilation and crop system, in space and time domain. This information can be obtained by either experimental measurement or computational *Corresponding author. Tel.: +351 259 350 359; fax: +351 259 350 480. E-mail address:
[email protected] (P. Salgado). 0967-0661/$ - see front matter r 2004 Elsevier Ltd. All rights reserved. doi:10.1016/j.conengprac.2004.05.007
simulation. Although experimental measurement is reliable, it needs a lot of labour efforts and time. Therefore, the computational simulation has become a more popular method as a design tool since it only needs a fast computer with a large memory. Frequently, those engineering design problems deal with a set of differential equations (DEs), which are to be numerically solved such as for the mass and heat transfer within fluid mechanics. In the literature, techniques for mathematical modelling of real processes are classified in two main categories: physical modelling and system identification (Ljung, 1987). One is based in terms of the physical laws involved in the process and the other is based on the analysis of the process input–output data and from empirical expertise. Fuzzy set theory allows the use of linguistic concepts for representing quantitative values (Zadeh, 1996) and can be employed to describe the greenhouse climate based on the system identification approach. Moreover, fuzzy system modelling is a powerful technique to describe complex dynamic systems. The basic framework used in this approach involves a representation of the relationship being modelled by a collection of fuzzy IF–THEN rules.
ARTICLE IN PRESS 614
P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
Compared to traditional mathematical modelling, fuzzy modelling possesses some distinctive advantages, such as the mechanism of reasoning in human understandable terms, the capacity of taking linguistic information from human experts and combining it with numerical data and the ability of approximating complex non-linear functions with simple models. However, many fuzzy modelling approaches concentrate on model accuracy, i.e. on data fitting with the highest possible accuracy, paying little attention to model simplicity and interpretability, i.e. as a ‘‘blackbox’’ model, which is considered a primary merit of fuzzy rule-based systems. In the field of fuzzy modelling, the exclusive consideration of the modelling error leads to problems concerning the handling of high-dimensional applications and the interpretability of the resulting rule base. Several methods for the identification of fuzzy models have been reported in literature (Jang, Sun, & Mizutani, 1997; Yager, 1994; Klir & Yuan, 1995). Many of them can automatically generate fuzzy rules relations from real data and make the optimization of the fuzzy sets membership parameters by combining fuzzy logic with neural networks learning techniques (Dubois & Prade, 1980; Wang, 1997). Generally, the resultant rule base of fuzzy system contains a large set of rules without any organization, where all rules are placed in the same flat. In this context is proposed a method to organize the information of a flat fuzzy system in an hierarchical structure of n fuzzy sub-systems f1 ðxÞ; f2 ðxÞ;y, fn ðxÞ; which maintains the model accuracy and simultaneously allows its interpretability. Thus, each of these systems may contain information related with a particular submodel of the system f ðxÞ: This objective can be reached if the fuzzy system is represented in a hierarchical fuzzy system, i.e., the information contained in the initial flat fuzzy system is transferred to a new hierarchical structure. This methodological process is called Separation of Linguistic Information Methodology (SLIM) (Salgado, 1999; Salgado, 2001). It decides if a fuzzy IF– THEN statement is a relevant rule to a specific part of the hierarchical structure or fuzzy sub-system. Also, in this way, the problem of finding an efficient rule base can be reduced to the task of choosing the system relevant rules. This paper deals with the modelling and simulation of a greenhouse using a hierarchical fuzzy model. As in the case of the physical-oriented approach, the fuzzy model can be of capital interest to study the greenhouse climate dynamics under different control policies. The proposed software tools must be adequate to predict the greenhouse inside climate in order to optimize the crop production by achieving an adequate climate regulation while reducing pollution and energy consumption. The greenhouse climate dynamic behaviour, resulting from the contribution of diverse physical processes, suggest
the use of the Hierarchical Collaborative Structure, (HCS), where each system works independently and collaborates with the others, without any order or inhibition factor, to the global model response (Salgado, 1999, 2001). The practical goal of this work is to model the greenhouse air temperature and humidity under process control (Boaventura, Couto, & Ruano, 1997; Salgado, Boaventura, & Couto, 1998). These processes are nonlinear in nature and, frequently, the measured data do not have persistent information. To accomplish the fuzzy identification task, a NRLS Fuzzy adapter method is employed, which combines the Nearest Neighbourhood Fuzzy Method with Recursive Least Square algorithm, RLS, (Cowan & Grant, 1985; Specht, 1996, Chapter 3). As expected, the identification procedure for this kind of process models leads to a set with a very high number of rules. To solve this problem, the flat fuzzy system information is organized into subsystems by using a SLIM-HCS algorithm. The resulting HCS structures improve the model readability and reduce the number of rules with no loss of valuable information. In this final process, each fuzzy sub–model reflects the behaviour of one real physical sub-model (air leakage, ventilation, etc.). The paper is organized as follows. Firstly, a brief introduction to non-Singleton fuzzy systems and the concept of the relevance are briefly presented. In Section 3 is proposed an algorithm that was used in the flat fuzzy identification procedure. Section 4 introduces the hierarchical fuzzy system, with the Hierarchical Collaborative Structure and its main theory background is briefly reviewed. Also here, the SLIM-HCS algorithm is proposed. In Section 5, the dynamical model of the greenhouse climate is formulated in two distinct perspectives: physical and fuzzy modelling. The experimental setup and the results achieved are presented in Section 6. The use of the SLIM-HCS algorithm is used to transform the fuzzy model in physical interpretable fuzzy sub–models. Finally, in Section 7, the main conclusions are outlined.
2. Fuzzy systems Fuzzy knowledge-based systems are one of the most successful applications of fuzzy sets and fuzzy logic methods. This is mainly due to the flexibility and simplicity by which knowledge can be expressed using fuzzy rules as well as to the theoretical developments in this field. Fuzzy modelling and control provide a framework for modelling complex non-linear relations (Dubois and Prade, 1980; Yager, 1994; Klir & Yuan, 1995; Mendel, 1995) (e.g., fuzzy systems are universal approximators), using a rule-based methodology.
ARTICLE IN PRESS P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
In this paper is assumed, without loss of generality (Chuen-Lee, 1990a,b), that the fuzzy system is a multiinput single output (MISO) system f : UCRn /V CR; where U ¼ U1 U2 ? Un CRn is the input space and V CR is the output space. Consider the system y ¼ f ðx1 ; y; xn Þ; in which y is the output (or consequent) variable and x1, x2 ;y, xn are the input (or antecedent) variables. In fuzzy systems modelling, this relationship is represented by a collection I of M fuzzy IF–THEN rules
engine uses the fuzzy IF-THEN rules to determine a mapping from fuzzy sets in the input universe of discourse UCRn to fuzzy sets in the output universe of discourse V CR; based on fuzzy logic principles. the measurements of the input variables x ¼ From T x1 ; y; xi ; y; xn with x1 ¼ x1 ; y; xn ¼ xn ; the values of y are computed as a fuzzy subset G using a fuzzy inference process (Dubois & Prade, 1980): 1. For each rule l, find the firing level of the ruleAl : Al x ¼ Al x %?%Al x %?%Al x %: ð2Þ 1
Rðl Þ : IF x1 is Al1 and ? and xi is Ali and ? ?and xn is Aln THEN y is Bl
ð1Þ
in which fuzzy terms are used in their antecedent and consequent parts (i.e., Ali ; i=1,y, n, and Bl ; l=1,y, M, are terms with their meaning–semantics expressed by means of fuzzy sets) to denote under which conditions the rules have to be fired and to express an explanation of the system operation. In other words, the above rule means that when the values of the input variable xi belong to the fuzzy set Ali ; with i=1,y,n, then the output variable y should be equal to Bl : The Ali ’s and Bl ’s are normal fuzzy subsets over the spaces Ui and V, which are usually in the real space. The input space U ¼ n Xi¼1 Ui CRn is partitioned into fuzzy regions Al ¼ Al1 l A2 ? Aln ¼ Xni¼1 Ali ; where the output values Bl are known. The central point of this approach is the idea of partitioning the input–output space. Here, the variable x ¼ ðx1 ; y; xi ; y; xn ÞT is a mathematical representation of natural language concepts through fuzzy sets, whose domain UCRn is the numerical support where concepts can be expressed. The collection of fuzzy sets used to describe the base variable usually forms a fuzzy partition A ¼ fA1 ; A2 ; y; Al ; y; AM g of the base variable domain. It allows a fuzzy discretization of the base variable x domain, corresponding to a set of fuzzy sets antecedent of all fuzzy rules. The basic configuration of a pure fuzzy logic system is shown in Fig. 1 enclosed by a dashed square line. The fuzzy rule base consists of a collection of fuzzy IF–THEN rules of the type of Eq. (1). The inference
Fig. 1. Structure of a fuzzy logic system.
615
1
i
i
n
n
The linguistic connective ‘‘and’’ is defined to be the tnorm operation, %, (usually the min or product operation). Then the antecedent of rule Rl in Eq. (1) can be viewed as the fuzzy set Al ¼ Xni¼1 Ali with membership functions ml done by Eq. (2). 2. The fuzzy implication of each rule l, RlA/B : l A /Bl is a fuzzy set in U V which is defined as RlA/B ðx; yÞ ¼ Al ðxÞ#Bl ð yÞ;
ð3Þ
where ‘‘#’’ is an operator rule of fuzzy implication. Two of these operators, commonly used by the reasons described in Chuen-Lee (1990a,b) are the min–max and arithmetic inference paradigms (Wang, 1997; ChuenLee, 1990b). 3. For each rule l, compute the effective output value Gl based of sup-star composition. If A0 is an arbitrary input fuzzy set in U with membership function A0 ðxÞ; then each implication RlA/B in Eq. (3) determines a fuzzy set B0l ð yÞ in V as follows: B0 ð yÞ ¼ sup A0 ðxÞ%RlA/B ðx; yÞ ; ð4Þ xAU
where % could be any operator in the class of t-norm (as min, product, bounded product, or drastic product operator). 4. Finally, the output of the fuzzy inference engine is the combination of the M fuzzy sets B01 ; y; B0l ; y; B0M by union. B0 ¼
M [
B0l :
ð5Þ
l¼1
The last step procedure corresponds to the case of having a disjunctive rule base. An alternative case is the one with conjunctive rules. Main differences are detailed in Klir and Yuan (1995). This article is focused on the disjunctive rules case, the most common situation in practical applications. There are many paradigms for implementing steps 2 and 3. Two of these paradigms, min–max and algebraic inference paradigms (Wang, 1997; Lin & Lee, 1996), have been commonly used by the reasons described in (Chuen-Lee, 1990a,b). A fuzzifier maps a crisp point x AU into a fuzzy set 0 A in U. Then, if a Singleton fuzzifier (i.e., A0 ðxÞ ¼ 1 if x ¼ x and A0 ðxÞ ¼ 0 for xax ) is used, and from the
ARTICLE IN PRESS P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
616
commonly used fuzzy inference engine Eqs. (2), (3) and (4), each rule Rl will lead to an output fuzzy set: B0l ð yÞ ¼ sup A0 ðxÞRlA/B ðx; yÞ ¼
xAU RlA/B ðx; yÞ
¼ Al ðxÞ#Bl ð yÞ
ð6Þ
because the ‘‘sup’’ is archived at x ¼ x and A0 ðxÞ ¼ 1: The most widely used fuzzifier is the Singleton fuzzifier (Wang, 1997; Lin & Lee, 1996; Chuen-Lee, 1990b), mainly because of its simplicity and lower computational requirements. However, this kind of fuzzifier is not always suited for the cases where noise or uncertainty is present in the training data. A different approach is necessary to account with the data uncertainty, which is the reason why this work was directed to non-Singleton Fuzzy Logic Systems, NSFLS, which have non-Singleton fuzzy sets as inputs (Mouzouris & Mendel, 1997). The structure of the NSFLS, is identical to the Singleton FLS case, except that input linguistic variables are allowed to take set values (instead of single-point values). In the case of a non-Singleton fuzzifier, the point x AU is mapped into a non-singleton fuzzy set A0 in U, that has a maximum value at x ¼ x and decreases while moving away from x ¼ x : In this work is used a triangular fuzzifier, which has the following triangular membership function: 8 xi x < i 1 if xi xi pbi ; 0 Ai ðxi Þ ¼ ð7Þ bi : 0 otherwise where bi are positive parameters. The aggregation of all inputs memberships function is done by A0 ðxÞ ¼ A01 ðx1 Þ%?%A0i ðxi Þ%?%A0n ðxn Þ where % is the t-norm operation, that is usually chosen as the algebraic product or min. Assuming that the fuzzy rule base consists of M rules in the form of Eq. (1) and that, 8 xi x% l > < i if xi x% li pali 1 ð8Þ Ali ðxÞ ¼ ali > : 0 otherwise if it is chosen an algebraic product or min for the tnorm, %, operation in Eq. (2) within the product or minimum inference engine, respectively, Eq. (4) is simplified to B0l ð yÞ ¼
n Y
A0i l xliP Ali xliP Bl ð yÞ
ð9Þ
i¼1
or B0l ð yÞ ¼ min Al1 xliP ; y; Aln xliP ; Bl ð yÞ ;
ð10Þ
where xliP ¼
bi x% li þ ali xi : bi þ ali
ð11Þ
Non-Singleton fuzzification is especially useful in cases where the available training data or the input data to the fuzzy logic system are corrupted by noise. Conceptually, the non-Singleton fuzzifier implies that the given input value is assumed to be exact. Defuzzication is the process of transforming the union (the most common situation) of the conclusions of each rule (that is a fuzzy set expressed by Eq. (5)) into a crisp value (usually a numerical value). This process can be seen as either an element selection from a set (in fact, from a fuzzy set), or a fusion process in which the information to be fused is the fuzzy set and the outcome is the numerical value. The defuzzifier performs a mapping from the fuzzy sets in V to crisp points in V. In this paper, a center-average defuzzifier (Wang, 1997), Eq. (12), is employed. PM 0 l l¼1 Bl ð yÞ y y¼ P ; ð12Þ M 0 l¼1 Bl ð yÞ where yl is the centroid point in V for which the membership function Bl ð yÞ achieves its maximum value, by assuming that Bl ð yÞ is a normal fuzzy set, i.e. Bl yl ¼ 1: In resume, the fuzzy system of Fig. 1 is a system that works on numerical data and converts it into a symbolic form through a fuzzification process. Afterwards, a logic of decision-making is implemented to provide a symbolic answer that must be converted into numerical data (defuzzification). From Eqs. (9) and (12), and B0l yl ¼ 1; the considered fuzzy system can be expressed as follows, l l l l PM Q n 0 y l¼1 i¼1 Ai l xiP Ai xiP y ¼ PM Q n ð13Þ l l l : 0 l¼1 i¼1 Ai l xiP Ai xiP The Fuzzy Logic Model (FLM) described by Eq. (13) has been clearly recognized as an attractive alternative to functional approximation schemes, since it is able to realize nonlinear mappings of any continuous function (Wang & Mendel, 1992). Conceptually, the functional relationships between input–output variables, mathematically called dependent–independent variables, are captured by the adjustable parameters of FLM. In this fuzzy system, here designed as a flat fuzzy system, all the rules have the same variables in the antecedent part, the same Fuzzy Inference Engine and conclude about the same variable. When a particular input is applied to the flat fuzzy system, all rules are fired in parallel and for each rule a conclusion is computed. The computation takes into account the degree in which the antecedent is satisfied in such a way that if it is not at all satisfied, the conclusion is an empty set. Finally, the
ARTICLE IN PRESS P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
final output is computed by combining the conclusions of all rules. Similarly, if the fuzzy system collaborates with other fuzzy systems, it will express a confidence about its output response to the global output. Its characterization is done by the relevance of the fuzzy system. As the response of fuzzy system is the contribution of each one of its rules, this characterization will be extended to the fuzzy rules. The relevance of fuzzy rules is a measure of the relative importance of fuzzy rules into a fuzzy system. Next, the definitions of the relevance of a set of rules and the relevance of a rule in a single point and in the region of the product space are presented. Definition 1. Consider I a set of rules from the input space U, into the output space V, covering the region in the product space S ¼ U V : The relevance is defined as RS : P* ðIÞ-½0; 1 ;
ð14Þ
where P* ðIÞ is the power set of I. Definition 2. For the fuzzy system of Eq. (12), the relevance of a rule lAI in a point of the product space ðx; yÞAU V can be defined by RS ðl; ðx; yÞÞ ¼ B0l ð yÞ=
M X
B0r ð yÞ;
ð15Þ
r¼1
i.e., the ratios between the values of the output membership function of rule l in (x, y) and the value of the membership of the union of all the functions in (x, y). Definition 3. The relevance of a rule lAI in S is defined as: RS ðl Þ ¼ max RS ðl; ðx; yÞÞ x;y
ð16Þ
i.e., the maximum value for all points (x,y)AS, of the ratio between the membership output function of rule l, and the value of the union of all the output membership functions. Finally, fuzzy system relevance is the aggregation of all fuzzy set rules relevances. So, with relevance of Definition 2, is concluded that the fuzzy system relevance, Eq. (12), in a region S is 1. This is due to the inclusion of region S in the fuzzy system support and, simultaneously, by the realization of a correct map in S. In the next section a cooperative strategy to identify the structure (input space partition) and to estimate the parameters of the FLM is presented. This technique matches input–output pairs of real data through an adaptation procedure. The obtained model describes the
617
dynamical behaviour of the system with satisfactory noise rejection in data.
3. Recurrent fuzzy model algorithm The Greenhouse climate dynamics can be described by non-linear Auto Regressive with exogenous input models (Ljung, 1987). In the discrete-time domain, this type is expressed by ð17Þ xk ¼ f xk1 ; y; xkn ; uk1; y; ukm where f ðdÞ is a nonlinear static transition function, xk1 ; y; xkn ; uk1; y; ukm are the past model outputs and inputs, and n and m denote the model order. The main task in system modelling is to determine the best function approximation for the unknown non-linear function f ðdÞ; here using the fuzzy system model approach. Generally, fuzzy model identification methods follow three generic steps: structure identification, parameter estimation and model validation. The fuzzy model structure identification involves the choice of the model type, in this case assumed as being of the type of Eq. (13), the determination of the number of fuzzy rules and the positioning of fuzzy sets in the input space domain, here realized by the Nearest Neighbourhood Fuzzy Method, NNFM (Specht, 1996). Model parameters are generally associated with rule conclusion, which estimation is realized by the Recurrent-Least Squares optimisation algorithm, RLS (Wang, 1997; Jang et al., 1996). So, the present algorithm combines the NNF method with the regularization RLS algorithm, here designated as the Regularization NRLS algorithm. A popular method to solve the regression problem is to resort to the so-called Regularization Networks with positive-definite basis matrix G. This method considers the following optimization problem J ðkÞ ¼ arg min y
k X
ðdi f ðxi ; hÞÞ2 þrjjhjjG ;
ð18Þ
i¼0
where rX0 is a regularization parameter. The vector xi collect the last, xk1 ; y; xkn ; dependent and independent variables, uk1; y; ukm : This is a Tikhonov-like regularization problem (Tikhnov & Arsenin, 1997) where the first part of the cost functional weights the sum of the squared residuals and the second one weights the magnitude of h parameters according to the norm jjhjjG ¼ hT Gh: It is apparent that jjhjjG represents a smoothness constraint. If r=0, only the sum of the squared residuals is taken into account and f ðxi ; hÞ fit the measured real data di. On the other hand, for r- þ N; the observations becomes less important and f ðxi ; hÞ-0 to minimize Eq. (18). The regularization parameter generates solutions involving small parameters which smoothes the output function, since large
ARTICLE IN PRESS P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
618
parameters are usually required to produce a highly variable (rough) output function. The preceding problem is quite general. If the fk’s are constrained to be linear functions of y ’s parameters, the problem becomes an RLS adaptive design problem: f ðxk ; hÞ ¼ pT ðxk Þ h; 1
ð19Þ l
M
T
where pðxÞ ¼ ½p ðxÞ; y; p ðxÞ; y; p ðxÞ and h ¼ ½y1 ; y; yl ; y; yM T are the vectors of FBF’s and y’s parameters, respectively. The fuzzy basis functions (FBF) Pof the fuzzy system, Eq. (13), is pl ðxÞ ¼ l l ml ðxÞ= M l¼1 Q m ðxÞ; where xiP is computed using Eq. (11) and ml ¼ ni¼1 A0i lðxliP Þ Ali ðxliP Þ: Choosing the appropriate FBF requires the placement of the input membership functions. For this reason, is proposed the use of the nearest-neighbour methodology, which has as main attributes the simplicity and capacity to work in on-line identification processes. This identification method consists in establishing a single radius of influence r. Starting with the first sample point (x,y), a cluster with centre x% l is generated in x. A sample point for which the distance to the nearest cluster is greater than r becomes the centre of a new cluster: IF xk x% l > rTHEN x% lþ1 ¼ xk ylþ1 ¼ 0 8lAf1; y; M g M ¼ M þ 1: ð20Þ The radius r determines the complexity of the adaptive fuzzy model. Smaller radius implies the use of more clusters resulting in a more complex nonlinear regression that demands large computational efforts. Vector h can be updated using the RLS algorithm, that applied to the problem defined in Eq. (18), results on the following recursive regression algorithm (Jang et al., 1997): (i) Begin with, 1 S 0 ¼ I; ð21Þ r where r is the regularization parameter of Eq. (18), I the identity matrix and h0=0, a null vector. (ii) Adapt recursively for each new sample of data ð22Þ hk ¼ hk1 þ S k pk d ðkÞ pTk hk1 ; S k ¼ S k1
S k1 pk pTk S k1 ; 1 þ pTk S k1 pk
ð23Þ
where k=1, 2,y is the iteration number. The similarity to the RLS algorithm is seemingly obvious. In the RLS algorithm the matrix S0 is initialised with g. I, where g is a large number. This corresponds to a very small regularization parameter, r, and so the right term of Eq. (18) can be negligible. The previous identification algorithm are henceforth designed as Regularized NRLS algorithm. In many practical applications is convenient to express the nonlinear ARX model, Eq. (17), by an incremental
equation, which constitutes an approximation to the numerical solution of the differential equation that mathematically models the system. In this way, the model can be written as ð24Þ xk ¼ xk1 þ g xk1 ; y; xkn ; uk1; y; ukm ; where the function g provides the increment value of variable x between the k and k+1 samples. The main objective of the fuzzy identification process is to find the appropriate fuzzy approximation to function g, in the form of Eq. (19), i.e. gðxk ; hÞ ¼ pT ðxk Þ h
ð25Þ
From Eq. (24) is possible to specify the variable x increment as function of the r previous sample. !T r X pðxkr Þ h: ð26Þ xk ¼ xkr þ i¼1
The robustness of the fuzzy model will be significantly improved if large increments are used, namely when the measured data is noise corrupted and the measured variable increments have the same order of magnitude of the noise signal. The adaptation of the original regression problem to the multi-step system, Eq. (26), is straightforward. This algorithm was applied to identify the incremental air temperature and humidity models of the greenhouse climate.
4. Hierarchical collaborative fuzzy system 4.1. The structure When the application is complex, the usual procedure of having a at rule base becomes infeasible. This is due to two main causes: a large number of rules, which increases exponentially with the number of variables, and the difficulty of tracking the environmental changes due to the large number of variables and parameters involved. Hierarchical fuzzy modelling is a promising method to identify fuzzy models of target systems with many input variables or/and with different complexity interrelation. Partitioning a fuzzy system reduces its complexity (the input partition space has less number of input variables and rules), which simplifies the identification problem, improves the computation times and saves the resources, such as memory space. It should be noticed that not all fuzzy systems can be divided independently, or even if a fuzzy system was partitioned, subsystems might not be disjointed. Nevertheless, in this circumstance, each fuzzy subsystem can also contribute to the success of the others subsystems, by, for example, increasing the accuracy without extra linguistic information to the system. So, with an organization hierarchical structure the fuzzy system can improve the model
ARTICLE IN PRESS P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
619
sub-models fi denotes the contributions of different mechanisms to the changes in the outputs, such as the heat exchange between inside and outside air. 4.2. The SLIM-HCS algorithm
Fig. 2. Structure of hierarchical collaborative fuzzy system.
readability and transparency, since each sub-system collaborate to accomplish the fuzzy model. The aim of this work is to organize a fuzzy system f(x) as a set of n fuzzy systems f1(x), f2(x),y, fn(x), where each one has the goal of collaborating to the global response. Each of these subsystems may contain information related with particular aspects of the system or merely collaborates to the performance of f(x). A HCS structure with n sub-model fuzzy system is depicted in Fig. 2. Each fuzzy system model l has two outputs: an output variable yl and the correspondent fuzzy system relevance Rl ðxÞ; in response to the input variable vector x. The inputs applied to each fuzzy model will be composed by x or by its subset variable. This fuzzy system architecture describes the strength of mind collaboration among the different fuzzy models. Therefore, the output of the SLIM model is the integral of the individual contributions of each fuzzy subsystem: Z n f ð xÞ ¼ fi ðxÞ Ri ðxÞ; ð27Þ i¼1
where Ri ðxÞ represents the relevance function of the ith fuzzy subsystemRcovering the point x of the Universe of Discourse, and is an aggregation operator. The relevance Ri ðxÞ reveals the effective contribution (or belief of its contribution) to the respective fuzzy system. This variable should be considered in the aggregation of all collaborative systems. With the same meaning of its congener sub-systems, the relevance of an aggregated system is given by n [ Ri ðxÞ ¼ Ri ðxÞ: ð28Þ
Usually, in the hierarchical modelling research works there are concerns regarding the construction of the system structure followed by the identification process of the parameters that generates the best fit within the input/output pairs of the training pattern. When the environment changes, the rules that define the system become less reliable and outdated. To deal with this situation, adaptive intelligent modelling has been developed (Wang, 1992). These systems are able to adapt its rules to the environment changes. However, the self-adaptation is restricted to its parameters, since it is not possible to modify the model structure without starting the identification process. Here is proposed the development of a fuzzy system from a flat system previously identified. This process involves dynamical organization, initially introduced in a new hierarchical fuzzy system, by transferring its information to others structure parts. At any moment, is possible to add a new fuzzy system to a structure and transfer its information to the previous structure. Fig. 3 shows an example of the application of the SLIM methodology to fuzzy modelling using two fuzzy subsystems. The fuzzy system f1(x) may describe some aspects of the original system f(x) (usually with typified rules), while the fuzzy system f2(x) (empty at start) describes all the remaining aspects, in order to improve the model accuracy. As far as this process works, part of the f1(x) information is transferred to f2(x). This process is keeping to decrease the relevance of the f1 rules at the same proportion that f2 assumes a greater importance (more relevance), by adding new rules or adapting its rules, at a proportion that it can assimilate the translated information. In each stage of this process, there is no change of the model transfer function. The generalization for more than two subsystems is straightforward. Considering f1 as fuzzy subsystem of the type of Eq. (13), previously identified (for example by the
i¼1
Naturally, if the ith fuzzy subsystem covers appropriately the region of point x, its relevance value is high (very close to one), otherwise the relevance value is low (near zero or zero). This organizational structure of the fuzzy system will be applied in this work to model two different processes involved in the dynamical behaviour of the greenhouse climate, thermal and humidity models, where the output variable y is the air temperature or humidity respectively. In this case the
Fig. 3. Two stage HCS structure with information transferring from f1 to f2 fuzzy system.
ARTICLE IN PRESS P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
620
Regularized NRLS algorithm), and f2 a fuzzy subsystem with early null output values for all domain (or relevance null). M1 and M2, are the number of rules of f1 and f2, respectively. The first subsystems can be expressed by fR;1 ðxÞ ¼ qTR ðxÞ Y; ð29Þ l l T where Y ¼ y% 1 ; y% 2 ; ?; y% lM is the vector (or matrix) of all the centres of the output membership functions and qR ðxÞ ¼ qðxÞ#Rl l1
ð30Þ l1
l2
l2
l M1
lM1 T
i.e., qR ðxÞ ¼ ½q ðxÞ a ; q ðxÞ a ; Ny; q ðxÞ a is the inner product between the FBF vector and the relevance vector. The relevance function of the fuzzy rules used here is as stated in Definitions 2 and 3. Other relevance functions can be used as well. The parameter al1 is closely connected to the relevance of the rule in the fuzzy system. When al1 is equal to unity, rule l1 has maximum relevance, while for null al1 ; the rule loses its relevance. If al1 ¼ 1 for all l1=1,...,M1, then l1 f 1 =f1. If parameter a ; associated to rule l1, converges to null, rule l1 is removed from function fR,1. If this is possible for all rules of f1 then f1 is eliminated (lima-N f1 ¼ 0). Similarly, the second fuzzy system is expressed by fR;2 ðxÞ ¼ pT ðxÞ hR ;
ð31Þ
where hR is the inner product between the h vector and the relevance vector. Initially, f1 contains all the information, Rl ðl1 Þ ¼ 1; 8l1 Af1; 2; y; M1 g while f2 is empty, i.e., Rl ðl2 Þ ¼ 0ðylR2 ¼ 0Þ; 8l2 Af1; 2; ?; M2 g; fR;2 ðxk Þ ¼ 0: The aim is to decrease the relevance of the f1 rules at the same proportion that f2 assumes more importance. Thus, during this transfer of process information there is no change in the sum of the models. The problem consists on the optimization of the cost function J: min J ðaÞ ¼ min aT a i i subject to f ðxÞ ¼ fR;1 ðxÞ þ fR;2 ðxÞ:
ð32Þ
In order to solve this problem, the Lagrange multipliers technique is used. Thereby transforming the previous problem into the minimization of the function: L ¼ 1=2 aT a lT ðQð1 aÞ PhÞ;
ð33Þ
where Q and P are matrixes, in which qT ðxk Þ and pT ðxk Þ are row vectors, and 1 is a vector of ones. With this algorithm the relevance of every rule in f1 is diminished, and a compensation of this effect is done by increasing the relevance, and possibly tuning, the rules in f2, while maintaining the transfer function of the system invariant (Eq. (32)). Next, are analysed the advantages that arise from the use of the consistent fuzzy sets (Zeng & Singh, 1996) in the transferring information of the HCS fuzzy system, when the centre-average desfuzzification strategy is
employed. Obviously, if the radius of the rules of f1 is too small, then the centre of the rule is a point representative of the region covered by the rule (Zeng, Zhang, & Za, 2000; Ding & Shao, 2000), where the memberships and, by definitions (2) and (3), the relevance of rule are maximum. The solution of problem defined in Eq. (32) is computed for a discrete domain of M1 points, which correspond to the M1 rules centres. In this paper, the algorithm is applied to tune the centre of fuzzy outputs sets, hR : Under these circumstances, the problem solution is obtained by solving a set of non-linear equations: @L ¼ 0; @a
@L ¼0 @k
@L ¼ 0: @hR
ð34Þ
The minimization of Eq. (33) is done by hR ¼ S 1 R
ð35Þ
and 1 ðpðxk ÞÞT hR ; for k ¼ 1; y; M1 ; ð36Þ y% k P 1 where R¼ M % k is a vector and S ¼ k¼1 pðxk Þ=y PM 1 T k % is a symmetrically matrix with k¼1 ðpðxk Þ ðpðxk ÞÞ Þ=y dimension M1 M1 : Finally, if the ak value for rule k is null or near zero, then the rule will be not considered.
ak ¼ 1
5. The greenhouse model 5.1. The physical model The dynamic behaviour of the greenhouse-climate is a combination of physical processes involving energy transfer (radiation and heat) and mass transfer (water vapour fluxes and CO2 concentration) taking place in the greenhouse and from the greenhouse to the outside air, Fig. 4. These processes depend on the outside climate conditions, structure of the greenhouse, type and state of the crop and on the actuating control signals (typically ventilation and heating to modify inside temperature and humidity conditions, shading and artificial light to change internal radiation, CO2 injection to influence photosynthesis and cooling by evaporation for humidity enrichment and decreasing the air temperature). The greenhouse climate model describes the dynamic behaviour of the stated variables by the use of differential equations for the air temperature, humidity and CO2 concentrations. In this paper, only the temperature and humidity models are considered. The model equations can be written by deriving the appropriate energy and mass balances, for the inside temperature,
ARTICLE IN PRESS P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
621
where cheat is the heat transfer coefficient expressed per square meter of soil. Similarly, the convective energy transferred from soil is proportional to the difference between the soil, Tsoil, and inside air temperatures. QT;soil ¼ csoil ðTsoil Tin Þ;
ð40Þ
where csoil is an heat transfer coefficient. The effect of sunlight radiant energy is governed by, QT;Rad ¼ crad Rad;
ð41Þ
where, Rad (W/m2) is the solar radiation and the coefficient crad denotes the roof transmission properties, the interception of solar radiation and the solar energy conversion to heat. Energy losses to the outside air is described by QT;out ¼ cvent fvent þ cleak;roof ðTin Tout Þ; ð42Þ Fig. 4. Greenhouse climate model structure.
Tin( C) and humidity, Hin(kg/m3), respectively: dTin 1 ¼ QT;heat QT;out þ QT;soil þ QT;rad ; Ccap;T dt
ð37Þ
dHin 1 ¼ Fh;C;AI Fh;AI;AE Fh;cond ; Ccap;h dt
ð38Þ
where, Ccap;T (J. m-2. C1], Ccap;h (m) are the heat and mass capacities of the greenhouse air, respectively. In this model, the heat and mass transfer in the greenhouse are described per square meter of soil. The energy balance in the greenhouse air is affected by the energy supplied by the heating system, QT,heat (Wm2), the energy losses to the outside air due to the transmission through the greenhouse cover and the forced ventilation exchange, QT;out (Wm2), the energy exchange with the soil QT;soil (Wm2) and by the heat supplied by Sun’s radiation, QT;rad (Wm2). The humidity balance in the greenhouse air is determined by canopy transpiration and soil evaporation, Fh;C;AI (g m2 s1), and by the free and forced ventilation exchange with the outside air Fh;AI ;AE (g m2 s1). Condensation of water at roof surface, is neglected during daylight periods, being only considered in the model at night periods, Fh;cond (g m2 s1]. The greenhouse climate is regulated by 2 main control signals (control variables): heating (0puheat p1) and ventilation (0puvent p1), corresponding to a range from 0% to 100% of the actuator nominal power. When the heating system is active the inside air is forced through an heat exchanger. The convective energy transferred from the heating system is proportional to the difference between heating pipe water temperature, Theat, and inside air temperature, Tin: QT;heat ¼ cheat ðTheat Tin Þuheat ;
ð39Þ
where cleak;roof is the heat transfer coefficient through greenhouse cover, fvent ¼ cforce;vent uvent þ fleak;vent is the ventilation flux, described by the sum of natural ventilation (fleak;vent ) and forced ventilation (cforce;vent uvent ), cvent is the heat capacity per unit volume of air and Tout ( C) is the air outside temperature. The water vapour exchange through the ventilation system is influenced by the ventilation flux and the difference between inside and outside air humidities (Hin and Hout (kg m3)). Fh;AI ;AE ¼ fvent ðHin Hout Þ:
ð43Þ
A short time-scale growth static model is used to describe crop transpiration. Canopy transpiration acts as a source of water vapour to the greenhouse air. The driving force of this phenomenon is the difference in water vapour pressure between the ambient air and the sub-stomatal cavity, which is assumed to be saturated with respect to water vapour. This saturation pressure depends on the crop temperature, which in this model is assumed equal to the air temperature, Hstoma ðTin Þ: The canopy transpiration is described by Fh;C;AI ¼ ccanopy;h cm;h cres;h Hstoma ðTin Þ Hin ; ð44Þ where cres;h is a parameter, which reflects the stomatal resistance to the humidity transpiration, found in calibration process and cm;h is a mass transfer coefficient constant (3.6 103, (Stanghellini, 1987)). The ccanopy;h represents the canopy humidity range, which depends on the canopy foliar area, that is assumed to be constant in our experiments. Apart from the parameter ccanopy;h ; the right part of this equation describes the transpiration of a canopy having an effective surface area of 1 m2 per square meter of soil. Usually, during night periods the outside temperature is much lower than inside air temperature. This phenomenon drives a condensation process at the greenhouse roof surface. If the roof surface temperature is assumed to be equal to the outside air temperature,
ARTICLE IN PRESS P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
622
Table 1 Parameters of the greenhouse climate model Parameter
Value
Dimension
Ccap;T Ccap;h cheat csoil crad cvent cleak;roof cforce;vent fleak;vent ccanopy;h cm;h cres;h ccond;h
21108 2.3604 1.1480 4.5440 0.5 1290 1.3721 0.0100 0.0014 1.9643 3.6 103 1.0500 0.2480
J m2 C1 m W m2 C1 W m2 C1 — J m2 C1 W m2 C1 m s1 m s1 — m s1 — m s1
the roof condensation process can be described by, Fh;cond ¼ ccond;h Hroof ðTout Þ Hin ; ð45Þ where Hroof ðTout Þ is the roof saturation pressure. First, it was used this physical model to simulate the greenhouse climate. This model is a set of first-order differential equations. Using the initial conditions it is possible to solve these differential equations for any point. The integration of these equations solves the system over a given time period. The Euler method was employed to carry out the integration of the greenhouse climate model. The model parameters were obtained based in a square means sense, by employing Levenberg–Marquardt and Gauss–Newton algorithms, for a set of real data measured, between January 15 and February 4 of 1998, with 1min sampling interval. Two other data periods were used to test the models: from 8 to 14 of January and from 5 to 11 of April. The computed parameters of the greenhouse climate physical model are showed in Table 1. The parameters, ccanopy;h and cres;h ; show an overweight to their expectation values, that usually are around 1 and 0.85, respectively, for the crop development stage at the phase experiment. This fact is due to the water evaporation of soil and the irrigation system, not considered in the model. 5.2. The fuzzy model The previous model requires detailed knowledge of the physical process and accuracy of the measured process variables. Fuzzy modelling can provide an alternative way of describing the process, being readily interpretable by a non-specialist. This section describes the procedure to design fuzzy models from input/output data. The model can be significantly improved if it is divided into sub-models. The temperature and humidity models are broken into two parts: with and without
forced ventilation sub-models, LDT—Low Dynamical Temperature and HDT—High Dynamical Temperature, respectively. The reason why the models were splitted in this LDT and HDT components are due to fact that time responses and gains are very different for the cases where the forced ventilation is performed or not performed. Next equation describes the temperature LDT submodel (valid under the operating conditions uvent=0 or Qvent ¼ 0), dTin ¼ fTemp ðDT; Rad; Qheat ; Qsoil Þ; ð46Þ dt uvent ¼0 where Qheat ðtÞ ¼ ðTheat ðtÞ Tin ðtÞÞ uheat ðtÞ is the heat flux from the heating system,DT ðtÞ ¼ Tin ðtÞ Tout ðtÞ; Theat is the temperature of the water circulating in the heating pipes and Qsoil ðtÞ ¼ ðTsoil ðtÞ Tin ðtÞÞ is the heat exchange between greenhouse air and soil. The HDT temperature sub-model (valid for uvent>0) is described by dTin ¼ fTemp;vent ðQvent Þ; ð47Þ dt uvent >0 where Qvent ðtÞ ¼ ðTout ðtÞ Tin ðtÞÞ uvent ðtÞ is the heat flux exchange from outside to inside air. The dynamic model of the inside temperature is the sum of the contributions of Eqs. (46) and (47) dTin dTin dTin ¼ þ : ð48Þ dt dt uvent ¼0 dt uvent >0 The humidity LDH sub-model (valid for uvent=0) is given by dHin ¼ fH ðDHd ; DH Þ; ð49Þ dt uvent ¼0 where DH ðtÞ ¼ Hin ðtÞ Hout ðtÞ is the difference between inside and outside absolute humidities and DHd ðtÞ ¼ Hd ðTin ðtÞÞ Hin ðtÞ is the difference between the dewpoint humidity of the air at temperature Tin(t), and the absolute humidity of the greenhouse air. The humidity HDH sub-model (valid for uvent>0), is described by dHin ¼ fH;vent ðDHd ; Fvent Þ; ð50Þ dt uvent >0 where Fvent ðtÞ ¼ ðHin ðtÞ Hout ðtÞÞ uvent ðtÞ is the water mass exchange between inside and outside air. Here, the required task is to develop the above fuzzy systems that can match all the N pairs of collected data (temperature, humidity, etc.) to a given level of accuracy, with Eqs. (46)–(50) represented to their equivalent difference equations in the form of Eq. (17) with n=m=1, as: Tin;kþ1 ¼ Tin;k þ fTemp ðuT Þ þ fTemp;vent ðQvent Þ
ð51Þ
ARTICLE IN PRESS P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
623
and Hin;kþ1 ¼ Hin;k þ fH ðuH Þ þ fH;vent ðFvent Þ;
ð52Þ
where uT ¼ ½DT; Rad; Qheat ; Qsoil T and uH ¼ ½DHd ; DH T : At the first stage, the system was modelled using the fuzzy system Eq. (26) with Regularized NRLS algorithm. This flat model was obtained and tested for the same period used in the previous physical model. Its input variables (uT and uH ) are scaled in such a way that the number of fuzzy model rules is minimized without decreasing the model accuracy. The identification process was performed using triangular membership functions with a radius of 4 for temperature models. Triangular fuzzifier, with halfwidth of the membership functions, was used. The fuzzifier maps improve the model robustness to noise input data. A set of 196 and 6 fuzzy rules were generated for the Low Dynamical Temperature (LDT) and for the High Dynamical Temperature (HDT) models, respectively. The regularization parameter r of Eq. (18) and r parameter of Eq. (26) were chosen in order to minimize the cost function in Eq. (18), which correspond to the experimental values of 0.8 and 8, respectively. In the same way, Low Dynamical Humidity (LDH) and High Dynamical Humidity (HDH) sub-models were modelled using 122 and 111 fuzzy rules, respectively. In this case a triangular fuzzifier with a quarter of wide of triangular membership function was employed. The best values of the parameters r and r are 0.1 and 1, respectively. This model is a set of first-order differences equations, where the state variables are the air temperature and absolute humidity inside the greenhouse. Other climate variables (not controlled) are independent variables. These equations are used to foresee the evolution of the state variables trajectories by performing, at each iteration time, the feedback of previous model outputs to the inputs. The simulated and measured air temperatures and absolute humidities are plotted in Fig. 5 for two days of validation data set, 5 and 6 of April, 1998. These curves show a good agreement between measured data and the models outputs. The relevance inputs to the greenhouse climate models are shown in Fig. 6 for the outside air temperature, soil temperature, outside absolute humidity, solar radiation and ventilation and heating actuations. Tables 3 and 4 show the air temperature and humidity models performances, obtained with the Regularized NRLS algorithm for different time periods. From these results, it can be concluded that the fuzzy and physical models have adequate and similar performances. Despite, this similarity in the results the fuzzy modelling methodology is beneficial from the point of view that dynamic greenhouse climate can be described by
Fig. 5. Air temperature: measured (blue) and simulated with fuzzy model (red) (Top); absolute humidity: measured (blue) and simulated with fuzzy model (red), (Bottom) for the days 5 and 6 of April.
Fig. 6. Inputs variables used in the greenhouse temperature and humidity models acquired in the same time period used in Fig. 5.
linguistic models without being necessary to analyse the thermodynamic laws involved in the process. Moreover the fuzzy model can also estimate the heat and mass fluxes, when organized in a structured model, which will be illustrated in the following section.
ARTICLE IN PRESS 624
P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
5.3. The HCS fuzzy model From the physical point of view, the dynamic behaviour of the greenhouse-climate results from the combination of different and independent (orthogonal) physical processes, involving energy and mass transfer. These processes were modelled and incorporated in the physical model Eqs. (39)–(45), with the parameters being identified from a set of data collected over long time periods (months). The ‘‘collaboration’’ amongst physical processes suggests the structuring of the fuzzy model in a HCS structure, within each sub-model is a fuzzy model of a physical process. The implementation and tuning of the hierarchical model can be done using two different approaches: (1) tuning the fuzzy rules of the hierarchical structure directly from collected experimental data; (2) building a flat fuzzy system, using a conventional learning algorithm, followed by its organization in an hierarchical structure. The second method has some great advantages: it is not necessary to implement a specific learning process to the specified structure; and the hierarchical structures can be modified at any time, without being necessary to repeat all the identification process and use all the collected data. Also, a very important point is that the number of rules of each one fuzzy sub-system can be dynamically adapted in the way to assimilate the information to be transfer to it, which corresponds to a configuration with an optimal minimum of rules. Here, was adopted the second strategy. Firstly, the Regularization NRLS algorithm is used to identify the fuzzy model. Afterwards, the SLIM methodology organizes the fuzzy system into a hierarchical structure designed as HCS. Each fuzzy system should model a specific dynamic behaviour of the greenhouse climate or represent the different mechanisms contributions to the model behaviour. In this way, the previous LDT and LDH flat fuzzy models have been organized in HCS structures, with 5 sub-models each one. Initially, their flat models are placed in the firsts structure levels, with others levels having null relevance, i.e. without any contribution to the output model. The use of the HCS algorithm proceeds to the transferring of the information from the sub-system f1 to others four levels in the HCS structure. This step consists in diminishing the relevance of the rules in level 1 in favour of the rules of others levels. This is accomplished by tuning the membership functions and increasing the rules relevances of the others submodels to compensate the diminution of relevance rules in level 1. The optimisation procedure is achieved using Eqs. (35) and (36). If it is possible to incorporate all the information contained in the flat fuzzy model into these new models, then the relevance of the sub-system f1, at the final transfer process, will be residual or null. Moreover, if
the sub-models of the HCS structure are mutually orthogonal then each one cans only absorb specific information from f1. At end, each fuzzy model incorporates one part of the model meaning and the rules of f1 describe the remains information. By imposing adequate subset of input variables and fuzzy relation forms in each sub-model, they will be limited to absorb different types of information. This strategy was used to break the greenhouse fuzzy model into different parts, with a correspondent meaning in the analogous physical sub-model. So, four submodels of the HCS structure have one input variable, which are spanned by descriptor triangular fuzzy sets, as illustrated in Figs. 7 and 8 for the LDT and LDH models. As an illustrative example, Table 2 shows same IF-THEN fuzzy rules of the LDT sub-models represented in Fig. 7. Between square brackets ½x% i ; ai are indicated the central and wide parameters of the membership equations of form (8), used in the antecedent of rule, being the consequent parameters yl used in the Eq. (13). The rules for the LDH models are built in a similar manner. According to the above, each fuzzy HCS level is a single input single output model, SISO. The main problem with flat fuzzy models is the exponential growth in the number of possible fuzzy rules as a function of input space dimension, well known as ‘‘curse of dimensionality’’. As explained in section 3, the number of fuzzy rules and the positioning of fuzzy sets in the input space
Fig. 7. Descriptor fuzzy sets of input variables for each fuzzy submodel LDT.
ARTICLE IN PRESS P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
625
However, the main improvement is the possibility to extract the information required from the fuzzy model and in adequate shape, i.e. in manner to provide good readability (it is brought to the number of rules, the shape of memberships and the inference mechanism of each sub-model that is possible to select). The short number of rules of each fuzzy sub-system can also help to avoid this problem, without degrading global model accuracy.
6. Experimental results
Table 2 Fuzzy Rules of the LDT fuzzy sub-systems Sub-system 1: 2: 3: 4:
Rli : Rules l from i sub-system 1 1 R11 If DT is [2.17, 2] Then y11 is 0.027; y R If Rad is [0, 0.2] Then y 2 is 0.0094; y 21 1 R If Q is [0, 2] Then y is 0.0015; y heat 3 3 1 1 R42 If Qsoil is [5.86, 14.36] Then 2y4 is 0.0512 R4 If Qsoil is [8.50, 14.36] Then y4 is 0.0061
domain were obtained using the Nearest Neighbourhood Fuzzy Method, (NNFM), while the parameters associated with rule conclusion were tuned by the regularization RLS algorithm. Here, these two methods are aggregated in the Regularization NRLS algorithm. With this approach it was first constructed a flat temperature fuzzy model LDT that contains a total of 199 rules, despite the optimisation performed by scaling the inputs variables. Afterwards, it was applied the SLIM-HCS algorithm to generate an hierarchical structure composed of parallel associations of fuzzy models, as depicted in Fig. 2. This is a very effective way to overcome the problem of generate a large number of rules, since in this case there is a linear growth in the number of rules and parameters with the input dimension increasing, and not exponential as in the previous fuzzy models. The resulting HCS structure for the temperature model LDT has 4 fuzzy sub-models, each with one input variable and a total of 19 rules. A similar procedure was done for the humidity fuzzy model. The stratification of the fuzzy system on the HCS structure can solve the problem of dimensionality.
˘
Fig. 8. Descriptor fuzzy sets of input variable for each fuzzy submodel LDH.
In this section are presented the results achieved with the proposed greenhouse climate model strategies: physical model; flat fuzzy model and HCS fuzzy model. The identification of the above models was realized by using input–output data collected from 15 January to 4 February of 1998, in a greenhouse located at the university campus. The sampling rate used was 1 min. The physical model was built by adding the contributions from the different system mechanisms, involved in the greenhouse climate behaviour, that establish the energy and mass exchanges among the parts. With the data collected from this process it is not possible to know with accuracy these mass and energy fluxes due to the difficulties and complexity in measuring these processes. Moreover, the physical model parameters were obtained by minimization of the squared errors sum. So, this learning process does not give a complete guaranty about the accuracy of the sub-models, and their results will be only used for comparative proposes with the fuzzy system counterpart. Nevertheless, it is possible to infer about the climate dynamical behaviour of the heat and mass transfer processes. The models performances were evaluated from the time periods used in the model identification and also for two validation data sets from 8 to 14 January and 5 to 11 April of 1998, by computing the root-meansquared errors vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi u N uX E ¼ t ðy d Þ2 =N ð53Þ k
k
k¼1
and the absolute-mean errors N X E% ¼ jyk dk j=N;
ð54Þ
k¼1
where N is the number of data samples, yk is the model output, and dk is the real output data. The performance of the temperature and humidity physical models are showed in Table 5. It is proposed in this work to demonstrate that the fuzzy system can also be organized with the aim of being interpretable as the physical model, in a way that each fuzzy sub-system could describe an energy or mass flux.
ARTICLE IN PRESS P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
626
SLIM-HCS algorithm was used to transfer information among subsystems and it has been applied to the HCS fuzzy system to identify the dynamic behaviour of temperature and humidity. The responses of the flat fuzzy, shown in Fig. 5, and the HCS fuzzy temperature models for the inside temperature are very similar for the estimation and validation periods, as can be seen in Table 3. Similar results were obtained with the flat and HCS fuzzy models for the inside absolute humidity case, with the index performances shown in Table 4. (See also Table 5). Experimental work shows that fuzzy identification systems, generated with the regularized NRLS methods, have large number of IF–THEN rules. The major part of the relevant information of the air temperature and humidity (absolute and relative) models was transferred to different parts of a HCS structure, with about 10% of the number of rules and with negligible differences in their performances, as illustrated in Tables 3 and 4. In this way, it can be concluded that the ‘‘slimed’’ system, with a superior organization, contains the same level of information and uses a lower number of rules. The second propose of this work is to compare the sub-systems of the HCS structure, organized by the SLIM methodology, with their counterpart sub-systems
of the physical model. This comparative process was done in a qualitative manner, since it real data measurements of the energy and mass flows were not available. These simulations results are shown in Figs. 9 and 10. In Fig. 9 are plotted the heat fluxes computed with the physical and the fuzzy sub-models of the HCS structure for the same two days used in the previous simulations. In this figure, the heat leakage responses (Qout,leak) computed with the physical model, Eq. (42) without ventilation Qout;leak ¼ cleak;roof ðTin Tout Þ ; and by the fuzzy sub–model of the HCS structure show similar behaviours. Also, the losses heat fluxes, due to natural and forced ventilation, (Qvent), being Qvent ¼ cvent fvent ðTin Tout Þ; the heat exchanges between the inside air and the soil (Qsoil); the heat input due to the sunlight radiation (QRad) and the heat supplied by the heating system (Qheat) show a good agreement for both simulations. The absolute humidity of the inside air is dependent on two main processes: water vapour exchange with outside air and crop transpiration rate, which are shown in Fig. 10. The transpiration rate (Top) and vapour exchange (Bottom) responses are computed with the physical model Eq. (43) and with the fuzzy sub-models of the HCS structure.
Table 3 Performance and number of rules of the NRLS and SLIM-HCS Temperature’s fuzzy system Fuzzy Method
# E) % ( C) Temperature error E(
No of rules
8–14 Jan
15 Jan–4 Feb
5–11 April
Regularized NRLS
196 for ventilation and 6 without ventilation
0.714 (0.561)
0.582 (0.392)
0.826 (0.672)
SLIM-HCS
19 for ventilation and 6 without ventilation
0.880 (0.731)
0.582 (0.392)
0.812 (0.671)
Table 4 Performance and number of rules of the NRLS and SLIM-HCS humidity’s fuzzy system models Fuzzy Method
# E) % (g m3 ) [(%)] Absolute [Relative] humidity error—E(
No of rules
Regularized NRLS
122 for ventilation and 111 without ventilation
SLIM-HCS
25 for ventilation and 27 without ventilation
8–14 Jan
15 Jan–4 Feb
5–11 April
0.292 (0.224) [2.559 (1.900)] 0.302 (0.227) [2.621 (1.950)]
0.362 (0.234) [3.628 (2.131)] 0.365 (0.245) [3.650 (2.341)]
0.581 (0.471) [4.131 (3.430)] 0.456 (0.421) [3.961 (3.230)]
Table 5 Performance of temperature and humidity physical models # E) % Temperature and humidity Error—E(
Physical model
Temperature Humidity
( C) Absolute (g/m3) Relative (%)
8–14 Jan
15 Jan–4 Feb
5–11 April
0.746 (0.592) 0.452 (0.340) 2.433 (1.643)
0.580 (0.447) 0.486 (0.323) 2.970 (2.019)
1.101 (0.747) 0.917 (0.631) 5.038 (3.386)
ARTICLE IN PRESS P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
627
7. Conclusions
Fig. 9. Heat fluxes computed with physical model (blue) and HCS fuzzy sub-model (red).
This article deals with the application of a new fuzzy modelling technique that automatically organizes a flat fuzzy system into a Hierarchical Collaborative Structure (HCS). It begins to transfer the information contained in the sets of fuzzy IF–THEN rules to other HCS fuzzy subsystems, by using a new SLIM-HCS algorithm. The result is a HCS structure that maintains the accuracy of original fuzzy system and improves the readability of the model, reducing (if necessary) the number of rules essential to describe the system. Moreover, this methodology has some great advantages to allow the modifications of hierarchical structures (by adding or removing a sub-model or by adding or remove rules) at any time, without being necessary to repeat all the identification process and use all the collected data. Due to the above advantages, this new methodology was been tested to split the inside greenhouse air temperature and humidity flat fuzzy models into fuzzy sub-models. These sub-models have alike counterpart on the physical modelling, that represent the contributions of the process mechanisms involved in global system dynamics. Their applicability and the good results achieved to the modelling of the greenhouse climate have demonstrated the success of this methodology to separate the information (SLIM) in the HCS structure.
Acknowledgements This work was supported by the Portuguese Ministry of Science and Technology (MCT), under the project SAPIENS- POCTI/33574/99.
References
Fig. 10. Forecasts of crop transpiration rate (Top); and water vapour exchange with outside air (Bottom), for physical (blue) and HCS fuzzy (red) models.
These results show that the responses of the HCS fuzzy sub-models are similar to the physical models, with more conservative responses in the HCS models. The main advantage of the applied methodology is that the information transferred to each of the HCS submodels have physical means. Also, since the number of the implemented rules is low, these fuzzy systems are readable, which is one of the main advantages imputed to a fuzzy system.
Bakker, J. C., Bot, G. P. A., Challa, H., & Van de Braak, N. J. (Eds.), (1995). Greenhouse climate control—an integrated approach. Wageningen Netherlands: Wageningen Press. Boaventura, J. C., Couto, C., & Ruano, A. E. B. (1997). Real-time parameter estimation of dynamic temperature models for greenhouse environmental control. Control Engineering Practice, 5/10, 1473–1481. Bot, G. P. A. (1983). Greehouse climate: from physical process to a dynamic model. Ph. D. Thesis, Wageningen Agricultural University, Wageningen, Netherlands. Chuen-Lee, C. (1990a). Fuzzy Logic in Control Systems: Fuzzy logic controller, Part I. IEEE Transactions on Systems Man and Cybernetics, 20, 404–418. Chuen-Lee, C. (1990b). Fuzzy Logic in Control Systems: Fuzzy logic controller, Part II. IEEE Transactions on Systems Man and Cybernetics, 20, 419–435. Cowan, C. F. N., & Grant, P. M. (Eds.), (1985). Adaptive Filters. Englewood Cliffs NJ: Prentice-Hall.
ARTICLE IN PRESS 628
P. Salgado, J.B. Cunha / Control Engineering Practice 13 (2005) 613–628
Ding, Y., & Shao, S. (2000). Necessary conditions on minimal system configuration for general MISO Mamdani Fuzzy systems as universal approximators. IEEE Transactions on Systems Man and Cybernetics- Part B, 30, 857–864. Dubois, D., & Prade, H. (1980). Fuzzy sets and systems: theory and application. New York: academic press. Jang, J.-R. S., Sun, C.-T., & Mizutani, E. (1997). Neuro-fuzzy and soft computing—a computational approach to learning and machine intelligence. Englewood Cliffs, NJ: Prentice-Hall. Jones, J. W., Hwang, Y. K., & Seginer, I. (1995). Simulation of greenhouse crops, environments and control systems. Acta Horticulturae, 399, 73–84. Klir, G. J., & Yuan, B. (1995). Fuzzy sets and fuzzy logic, theory and applications. Englewood Cliffs, NJ: Prentice Hall PTR. Lin, C.-T., & Lee, C. S. G. (1996). Neural fuzzy systems, a neuro-fuzzy synergism to intelligent systems. Englewood Cliffs, NJ: Prentice Hall. Ljung, L. (1987). System identification—theory for the user. Englewood Cliffs, NJ: Prentice-Hall. Marcelis, F. F. M., Heuvelink, E., & Goudrian, J. (1998). Modelling biomass production and yield of horticultural crops: A review. Sciencia Horticulturae, 74, 83–111. Mendel, J. M. (1995). Fuzzy logic systems for engineering: A tutorial, Proceedings of the IEEE, 83, pp. 345–377. Mouzouris, G. C., & Mendel, J. M. (1997). Non-Singleton fuzzy logic systems: Theory and application. IEEE Transactions on Fuzzy Systems, 5, 56–71. Salgado, P., Boaventura, J., & Couto, C. (1998). A fuzzy identification and controller for the agriculture greenhouse. In Proceedings of the seventh international conference on computers in agriculture, October 26–30, Orlando, USA, (pp. 813–820).
& Difusa. Ph.D. Salgado, P. (1999). Novos me´todos de Identifica@ao Thesis, UTAD, July 1999, Portugal. Salgado, P. (2001). Fuzzy rule clustering. IEEE International conference on systems, man and cybernetics, Tuckson, Arizona, USA. Specht, D. F. (1996). Probabilistic Networks and General Regression Neural Networks. In C. H. Chen (Ed.), Fuzzy Logic and Neural Networks Handbook (pp. 3.1–3.44). London: McGraw-Hill Series on Computer Engineering. Stanghellini, C. (1987). Transpiration of the greenhouse crops. Ph D. Thesis, Wageningen Agricultural University, Wageningen, Netherlands. Tikhnov, A. N., & Arsenin, V. Y. (1997). Solution of ill-posed problems. Washington: Winston. Wang, L.-X. (1992). Stable adaptive fuzzy control of nonlinear systems. IEEE Transactions on Fuzzy Systems, 1, 146–155. Wang, L.-X., & Mendel, J. M. (1992). Fuzzy basis functions, universal approximation, and orthogonal least-square learning. IEEE Transactions on Neural Networks, 3, 807–814. Wang, L.-X. (1997). A course in fuzzy systems and control. Englewood Cliffs, NJ: Prentice-Hall PTR. Yager, R. R. (1994). Essentials of fuzzy modeling and control. New York: Wiley. Zadeh, L. (1996). Fuzzy logic=computing with words. IEEE Transactions on Fuzzy Systems, 4, 103–111. Zeng, X.-J., & Singh, M. G. (1996). Approximation accuracy analysis of fuzzy systems as function approximators. IEEE Transactions on Fuzzy Systems, 4, 44–63. Zeng, K., Zhang, N.-Y., & Xu, W.-L. (2000). A comparative study on sufficient condictions for Takagi-Sugeno fuzzy system as Universal Approximation. IEEE Transactions on Fuzzy Systems, 8, 773–780.