## 3 Proposed System Architecture
### Fuzzy Logic Controller (FLC)  
FLCs made their debut in 1965, thanks to Professor [PERSON] [26]. FLC techniques involve breaking down complex systems into manageable subsystems using human expert knowledge. Each subsystem is controlled by simple laws that imitate human strategies. By combining these local control actions through fuzzy membership functions (MFs), a comprehensive control law is created. This approach replaces complex mathematical models with simple (If-Then) conditional statements and linguistic variables, providing a practical way of analyzing and synthesizing. FLCs are based on rationality and use approximations instead of precise values. FLCs are well suited for processes that involve multiple variables and inconsistencies, where obtaining exact measurements is difficult. FLCs can have either one or multiple inputs and outputs, depending on the specific application. FLCs operate within specific information ranges, using a rule base derived from past data to infer appropriate actions and outcomes. Figure 2 illustrates the general FLC diagram, which comprises three blocks or stages. The function of each block inside the fuzzy structure is described as follows:  
* During the Fuzzification stage, inputs are received, marking the beginning of the fuzzification process. Fuzzification involves converting imprecise input data into fuzzy values. This relates to a domain characterized by MFs. These functions can be in the form of a triangle, trapezoid, or Gaussian. In more complex systems, multiple MFs can be combined, and the choice depends on the specific requirements of the system. The triangular MF is the most commonly used option due to its simplicity, though its effectiveness may vary by implementation. The selection of MF shape is problem-specific, but extensive literature reviews indicate the triangular MF is generally more effective than other MFs [27]. If there is no preference for the shape of MFs, triangular or trapezoidal shapes are recommended for their simplicity and computational efficiency. To maximize performance, a design optimization process is often necessary, where the adjustable parameters of the fuzzy system are tuned to meet a specific performance criterion. The triangular and trapezoidal MFs are defined concisely using the following compact expressions and are visually depicted in Figure 3. \[f(x;a,b,c)=\text{max}\bigg{(}\text{min}\bigg{(}\frac{x-a}{b-a},\frac{c-x}{c-b} \bigg{)},0\bigg{)},\] (1)  
Figure 2: FLC basic structure. where \(x\) is the input variable, \(a\) is the left vertex of the triangle, \(b\) is the peak of the triangle, and \(c\) is the right vertex of the triangle. \[f(x;a,b,c,d)=\max\left(\min\left(\frac{x-a}{b-a},1,\frac{d-x}{d-c}\right),0 \right), \tag{2}\]  
where \(x\) is the input variable, \(a\) is the left vertex of the trapezoid, \(b\) is the left shoulder of the trapezoid, \(c\) is the right shoulder of the trapezoid, and \(d\) is the right vertex of the trapezoid. In this work, a triangular MF is used mostly for the input and output parameters, while a trapezoidal MF is applied to specific cases requiring greater flexibility. This choice is driven by the simplicity and computational efficiency of triangular and trapezoidal shapes. * In the inference/interpretation stage, rules are created using linguistic variables derived from system performance and experience. The interpreter is then used to make decisions based on the given input and the established rule base. There are two main categories of fuzzy inference systems (FIS): Mamdani-type FIS and Sugeno-type FIS, also referred to as Takagi-Sugeno-Kang fuzzy inference. The Mamdani and Sugeno FISs designed for a specific system have an equal number of input and output MFs. Their rules are also aligned, but the main difference lies in how they process fuzzy output through defuzzification. The primary distinction between the Mamdani and Sugeno FISs is their approach to generating precise output from fuzzy inputs.