# Optimizing Non-Glare Zone Width of Adaptive Driving Beam (ADB) Using Fuzzy Logic Control
## 3 Data Collection and Post-Processing
### Fuzzy Logic Controller  
Fuzzy logic was first introduced in 1965 by [PERSON] [27]. It is designed to handle the concept of partial truth, which is close to human semantic statements in which the truth is mostly partial and imprecise. Unlike classical logic that operates at either true or false, fuzzy logic operates with continuous values between the two extremes: completely true and completely false. Similar to how the color gray is found between black and white, fuzzy logic can present imprecise linguistic expressions such as \"slightly\", \"quite\", or \"very\". Fuzzy logic has been employed in many applications such as temperature control of air conditioners and suction power control in vacuum cleaners, amongst others. The data acquired from the simulator is then processed in MATLAB with a Fuzzy Logic Toolbox [28]. This project aims to provide automotive OEMs with an efficient and less time-consuming methodology for studying ADB non-glare zone width. Considering the use of a human test driver to evaluate the performance of a vehicle headlamp, both glare and road illumination cannot be precisely stated between just two opinions: good or bad. Choosing the best value of the non-glare zone width that balances the glare and road illumination is not a dichotomous situation. A fuzzy logic controller is a good candidate to mimic a human test driver in providing feedback and finding the best value in this application, as it not only takes continuous input but also does not require a precise mathematical model or a large volume of data. Instead, it is simply based on logic, making it less time-consuming and less computationally expensive. As shown in Figure 12, the two inputs to the controller are the glare rating and the road illumination rating. The glare rating is represented by the overall time that the lux reading is above the glare limit in a simulation, as discussed in the previous section. The road illumination rating can be represented by the non-glare zone width; this is because the road illumination is at its best when the non-glare zone is at its narrowest and at its worst when the non-glare zone is at its widest. Thus, they can be seen as inversely proportional. The wider the non-glare zone, the less area that is covered by the high beam area that benefits from the dynamic beam pattern of the ADB. The output of the controller is the change in non-glare zone width. Both inputs use two membership functions to represent good and bad performance. The \"good\" membership functions represent a low glare time and a narrow non-glare zone that results in good road illumination, while the \"bad\" membership functions represent the opposite. The output uses three membership functions to indicate that the non-glare zone width should be increased, decreased, or if it is just good. The fuzzy logic controller is based on three rules:  
* If both road illumination and glare are good, then the non-glare zone width is good. * If the road illumination is poor while the glare is good, the non-glare zone width should be increased. * If the road illumination is good, while the glare is poor, then the non-glare zone width can be reduced. Two trials are presented in this research using different basic membership functions to find the best non-glare zone width. The first trial uses linear triangular membership functions, and the second trial uses Gaussian membership functions, as shown in Figure 13. The parameters of the unscaled membership functions are shown in Table 2. The range  
Figure 12: Schematic showing fuzzy logic controller block diagram. of the inputs is considered as spanning from the worst case to the best case. For input on the road illumination, the best case is when the non-glare zone is at its minimum, which is 100% of the width of the boundary box; the worst case is when it is the widest, with all glare eliminated in all driving scenarios, which is 256% of the boundary box width.