## 2 Heliostat Orientation Control
### Control Algorithms
#### 2.2.2 Fuzzy Logic Controller  
An FLC uses the experience of an expert instead of the mathematical model of the system to control a plant, and it can deal with complex non-linear systems with unknown mathematical models. The controller produces a control signal using four blocks [34]: fuzzification, inference engine, rule base and defuzzification, as shown in Figure 3.  
The FLC is graphically shown in Figure 4. The fuzzification module converts the input values into fuzzy sets using the singleton fuzzification, which evaluates the membership value of the input value. The inference mechanism determines the values of the output fuzzy sets by using an \"if-then\" rule base, which describes the relationship between the input and output variables based on their linguistic terms. In Mamdani fuzzy systems, the rule base determines the output fuzzy set value taking the minimum value of the combination of two or more input fuzzy set values as a consequence of one rule in the rule base. Finally, the defuzzification module gets a scalar value by combining the scaled output fuzzy sets values.  
Figure 3: Components of the FLC.  
The reduction of the number of fuzzy rules as long as they express a similar relationship decreases the computational effort and memory requirements used in the implementation of the controller [35]. Therefore, it is necessary to eliminate the less critical rules in order to obtain faster controller actions [36].  
The defuzzification module is another component that can be modified in order to obtain a fast response of the controller. There are many defuzzification methods proposed in the literature [34]. The center of gravity method (CoG), also called the center of area method (CoA), is the most widely used of all the defuzzification methods. Nonetheless, this method has a very high computational effort. The CoG method calculates the area under the combined output fuzzy sets by sampling them between the minimum and maximum values of the output fuzzy sets, as shown in Figure 5a. The drawback of the CoG is that it requires more samples to obtain a more accurate output value. The output value of the CoG defuzzification method is given by (8).  
\[u=\frac{\sum\limits_{i=1}^{n}\mu(x_{i})x_{i}}{\sum\limits_{i=1}^{n}x_{i}} \tag{8}\]  
where \(x_{i}\) represents a value between the minimum and maximum values of the scaled output fuzzy sets, and \(n\) represents the number of the samples.  
Figure 4: Fuzzy logic controller algorithm.  
Another defuzzification method is the center of sums method (CoS), which is a fast method because of its computational simplicity [37]. This method calculates the average between the centroid and the area of each scaled output fuzzy set. The drawback of the CoS is that the intersecting areas are added twice, as shown in Figure 5b. The output value of the CoS defuzzification method is given by (9).  
\[u=\frac{\sum\limits_{i=1}^{n}\mu(\overline{x_{i}})A_{i}}{\sum\limits_{i=1}^{n}A _{i}} \tag{9}\]  
where \(\overline{x}_{i}\) and \(A_{i}\) represent the centroid and the scaled area of the output fuzzy set \(i\), and \(n\) represents the number of the output fuzzy sets.