# Optimizing Non-Glare Zone Width of Adaptive Driving Beam (ADB) Using Fuzzy Logic Control
## 3 Data Collection and Post-Processing
### Fuzzy Logic Controller
For the glare rating, the worst case is the overall glare duration at the 100% non-glare zone width at each driving scenario, while the best case is 0 s of glare, indicating that it is glare-free. These details are shown in Table 3. This research aims to demonstrate the methodology of using fuzzy logic to mimic human feedback. The parameters can be seen as an initial gauss and would require a physical test for fine-tuning, which is considered to be future work and not included in this research. The parameters are also expected to vary from case to case with different ADB systems and different beam patterns. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{2}{c}{**Input**} & \multicolumn{2}{c}{**Output**} \\ \hline Function names & good & bad & increase & good & decrease \\ \hline Trimf parameters & [0, 1, 2] & [\(-\)1, 0, 1] & [0.5, 1, 1.5] & [0, 0.5, 1] & [\(-\)0.5, 0, 0.5] \\ \hline Gaussmf parameters & [0.4247, 1] & [0.4247, 0] & [0.2123, 1] & [0.2123, 0.5] & [0.2123, 0] \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters of the unscaled membership functions, range 0–1. Figure 13: Membership function of fuzzy logic controller: (**a**) road illumination input triangular membership function in Trial 1; (**b**) change in non-glare zone width output triangular membership function in Trial 1; (**c**) road illumination input Gaussian membership function in Trial 2; (**d**) change in non-glare zone width output Gaussian membership function in Trial 1. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & \multicolumn{2}{c}{**Input**} & \multicolumn{2}{c}{**Output**} \\ \hline
**Driving Scenario** & **Glare** & **Road Illumination** &
\begin{tabular}{c} **Change in Non-Glare** \\ **Zone Width** \\ \end{tabular} \\ \hline S-curve with 25 m curvature & 0–8.144 & & \\ \hline S-curve with 50 m curvature & 0–14.686 & & \\ \hline S-curve with 75 m curvature & 0–15.047 & & \\ \hline S-curve with 100 m curvature & 0–9.61 & & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Variable range of the membership functions. The iteration of the optimization in four driving scenarios is shown in Tables 4 and 5, in which the last column are the outputs from the fuzzy logic controller, which were added to the non-glare zone width for the next iterations. The best non-glare zone width is taken when the output change in non-glare zone width is less than 0.5%. The two demonstrated trials show different iteration. Trial 1 took four to five iterations to converge to the optimal glare-free zone, while Trial 2 took six to seven iterations. This shows that different types of membership functions are able to converge to an optimal non-glare zone. A correlation study of physical tests would help to select the membership function type and its parameter in future work. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Driving** & **Iteration** & \
\begin{tabular}{c} **Non-Glare** \\ **Zone Width [\%]** \\ \end{tabular} &
\begin{tabular}{c} **Glare Rating [s]** \\ \end{tabular} & **Output [\%]** \\ \hline \multirow{4}{*}{S-curve with 25 m curvature} & 1 & 256 & 0 & \(-\)105 \\ \cline{2-5}  & 2 & 151 & 4.2 & \(-\)2.3 \\ \cline{2-5}  & 3 & 149 & 4.4 & \(-\)0.53 \\ \cline{2-5}  & 4 & 148 & 4.5 & \(-\)0.06 \\ \hline \multirow{4}{*}{S-curve with 50 m curvature} & 1 & 180 & 0 & \(-\)20 \\ \cline{2-5}  & 2 & 160 & 3 & \(-\)7.93 \\ \cline{2-5}  & 3 & 152.3 & 4.6 & \(-\)0.885 \\ \cline{2-5}  & 4 & 151 & 4.8 & \(-\)0.008 \\ \hline \multirow{4}{*}{S-curve with 75 m curvature} & 1 & 154 & 0 & \(-\)9.34 \\ \cline{2-5}  & 2 & 144.7 & 1.7 & \(-\)5.2 \\ \cline{2-5}  & 3 & 138.4 & 3.1 & \(-\)1.17 \\ \cline{2-5}  & 4 & 137.2 & 3.6 & \(-\)0.23 \\ \cline{2-5}  & 5 & 137 & 3.6 & 0.274 \\ \hline \multirow{4}{*}{S-curve with 100 m curvature} & 1 & 143 & 0 & \(-\)3.87 \\ \cline{2-5}  & 2 & 139.1 & 1.1 & \(-\)2.82 \\ \cline{1-1} \cline{2-5}  & 3 & 136.3 & 1.2 & \(-\)2 \\ \cline{1-1} \cline{2-5}  & 4 & 134.3 & 1.8 & \(-\)0.785 \\ \cline{1-1} \cline{2-5}  & 5 & 133.5 & 1.9 & \(-\)0.5 \\ \hline \end{tabular}
\end{table}