## 3 Automatic Power Management System  
### Logic Development of Automatic Switching  
The aim of the automatic switching system is to manage the distribution of power to the banks based on the available power from wind and the power demand by the banks. A supervisor is changing the power demand by manually turning the banks' switches ON/OFF, and the automatic switching system will make the decision of turning the banks' switches ON/OFF based on the generated power and some conditions related to power demand. The design of the logic for the priorities of the banks' automatic switching is based on the following conditions:  
1. The number of banks turned ON will be determined by the power generated from the wind turbine. 2. A bank is considered to be ON if it is illuminated without flickering and with minor power fluctuation. 3. Based on the amount of generated power, the banks are ranked by priority from the left to the right in the load (Bank 1, Bank 2, \(\ldots\) and Bank 6). However, the priorities can be assigned to different banks by switching wires into the multiplexer. 4. A supervisor can manually turn ON/OFF any bank (_i.e._, if Bank 3 is manually turned OFF, less power should be required to turn Bank 4 ON than if Bank 3 is also ON). In this case, the priority of automatic switching will be based on the captured power from wind and the required power, which will be regulated to follow a power reference by changing the pitch angle of the blades through the pitch actuator and a pitch angle controller. The signal of the power reference is built based on the state of the manual switches given by the supervisor. The Boolean expressions of the priorities of the banks' automatic switching are given as follows:  
\[\mathrm{Pr}_{\mathrm{f}}=A[Q] \tag{3a}\]  
Figure 3: Configuration of the load banks. \[\Pr_{2}=B[R(A)+Q(\overline{A})] \tag{3b}\] \[\Pr_{3}=C[S(AB)+R(A\overline{B}+\overline{A}B)+Q(\overline{A}\overline{B})]\] (3c) \[\Pr_{4}=D[T(ABC)+S(\overline{A}BC+A\overline{B}C+AB\overline{C})+R(\overline{A} \overline{B}C+\overline{A}\overline{B}\overline{C}+A\overline{B}\overline{C})+Q (\overline{A}\overline{B}\overline{C})]\] (3d) \[\Pr_{5}=E[U(ABCD)+T(\overline{A}BCD+A\overline{B}CD+AB\overline{ C}D+ABC\overline{D})\] \[\qquad\qquad+S(\overline{A}\overline{B}CD+\overline{A}B\overline{ C}D+\overline{A}B\overline{C}D+A\overline{B}\overline{C}\overline{D}+AB \overline{C}\overline{D})\] (3e) \[\qquad\qquad+R(\overline{A}\overline{B}\overline{C}D+\overline{A} \overline{B}\overline{C}\overline{D}+\overline{A}B\overline{C}\overline{D})+Q (\overline{A}\overline{B}\overline{C}\overline{D})]\]  
\[\Pr_{6}=F[V(\overline{A}BCDE)+U(\overline{A}BCDE+A\overline{B}CDE+AB \overline{C}DE+AB\overline{C}\overline{D}E \tag{3f}\] \[\qquad\qquad+AB\overline{C}DE+A\overline{B}\overline{C}DE+A \overline{B}\overline{C}DE+\overline{A}B\overline{C}DE+\overline{A}BCD \overline{E}\] Figure 3:0 Figure 3:1 Figure 3:2  
where, all quantities are logic variables (TRUE \(\equiv\) ON \(\equiv\) 1; FALSE \(\equiv\) OFF \(\equiv\) 0). \(\Pr_{n}\) (\(n\) = 1:6) is the priority of bank \(n\), which automatically turns it ON/OFF. A, B, C, D, E and F: conditions of the manual switches for the banks (1,..., 6) respectively. \(-\): symbol of the logic NOT. Q, R, S, T, U and V: conditions of the generated power (\(P_{gen}\)) given in the following table. Table of generated power conditions has been built based on experimentation and observation. Depending on the manual switching of the banks, it is observed that for each bank a power of 0.1 W is required to illuminate the bank's LEDs and remain bright enough to be considered ON.