## 9 Energy Control Strategies
### Detailed steps of the algorithm:  
These instructions outline the steps for comparing speeds, calculating distances, making decisions, and setting commands based on those decisions. Adjustments can be made according to specific requirements or additional constraints. * Path nodes with associated maximum speed values. * AIV initial position and speed. * Real-time energy consumed and speed profile for the AIV. * Identify the starting and ending nodes of the path. * Assign maximum speed values to each node using the PMP. * Calculate acceleration and deceleration distances:
* For each pair of nodes, calculate the distance required for the robot to accelerate from the current speed to the maximum speed of the next node. * Similarly, calculate the distance required for deceleration. * Generate speed profile:
* For each segment between nodes, generate a speed profile that smoothly transitions between the two maximum speed values. * Ensure the profile adheres to the calculated acceleration and deceleration distances. * Real-time adjustment:
* Continuously monitor the AIV position and adjust the speed profile in real time to account for any deviations or changes in the path. In the application, step 1 \"Offline Method: Table of Maximum Speed\", represents the three strategies, which are included as a table or database of the maximum speed for each node. The second step, \"Online Method: Current Speed, Energy\", will be called up in real time under the fuzzy rule, which decides what type of strategy can be adapted to meet the constraints of waiting baggage and traffic flow. The energy constraint will be more advantageous for waiting baggage and traffic, which are defined as model inputs, with the three strategies as outputs of the fuzzy decision model in the next section. Finally, we define three strategies, \(strategy1\), \(strategy2\), and \(strategy3\), which represent \(LowEfficiency\), \(MediumEfficiency\), and \(StrongEfficiency\), respectively. ```
Step1- Offline Method: Table of Speed Max Input: \(M\), \(g_{max}\), \(F\), \(x_{0}\), \(x_{f}\), \(v_{0}\), \(v_{f}\) Output: TableSpeedMax
1 Function[\(T\)_TableSpeedMax_]=Optimal-SpeedMax(\(M\), \(a_{max}\), \(x_{0}\), \(x_{f}\), \(v_{0}\), \(v_{f}\))
2\(F_{max}=M*a_{max}\)
3\(F_{min}=-M*a_{max}\)
4\(T_{min}=f(M,F_{max},F_{min},x_{0},x_{f},v_{0},v_{f})\) -cf. Equation (16)
5 Fixed \(T>T_{min}\)
6\(\Delta t=g(T,M,F_{max},F_{min},x_{0},x_{f},v_{0},v_{f})\) -cf. Equation (18)
7\(SpeedMax=\frac{F_{min}-F}{M}\Delta t+v_{0}\)
8 Step2\(\rightarrow\) Online Method: Current Speed, Energy Input: \(M\), \(h\), \(a_{max}\), NextNode, CurrentDistance, \(T\)_TableSpeedMax Output: Energy, Current Speed
9 FunctionEnergy=MotorEnergy(\(Speed\), \(FinalCommand\))
10\(Energy=Energy+abs(FinalCommand)*Speed\)
11 Function\(Speed\)=CurrentSpeed(\(Speed\), \(FinalCommand\),\(h\), \(F_{r}\))
12\(Speed=Spord+h*\frac{FinalCommand-F}{M}\)
13
14 Function\(FinalCommand=\)Command(\(CurrentPosition\), \(NextNode\), \(Command_{asp}\), \(Command_{inf}\), \(Distance1\), \(Distance2\))
15
16 if\((CurrentPosition-Distance1)\leq 0\)then
17\(FinalCommand=Command_{asp}\)
18 elseif\((NextNode-CurrentPosition-Distance2)\leq 0\)then
19\(FinalCommand=Command_{inf}\)
20 else
21\(FinalCommand=0\)
22
23 Function\([Command_{asp},Command_{inf},Distance1,Distance2]=\)
24 Acceleration-Deceleration(\(PreviousSpeedMax\), \(NextSpeedMax\), \(NextSpeedMax\), \(M,a_{max},h\))
25\(F_{max}=M*a_{max}\)
26\(F_{min}=-M*a_{max}\)
27\(F_{min}=-M*a_{max}\)
281. Compare the \(PreviousSpeedMax\) and \(NextSpeedMax\) values, as well as the \(NextSpeedMax\) and \(NextSpeedMax\) values, to then establish an acceleration or deceleration decision at the exit of each of the node. 29. Two distances are calculated based on the speed comparisons: \(Distance1=|PreviousSpeedMax-NextSpeedMax|*N1\)
30\(Distance2=|NextSpeedMax|*h\)
31 where \(N1\) represents the number of points between \(PreviousSpeedMax\) and \(NextSpeedMax\), depending on the step of discretization, \(h\). 32. Between each node, two decisions are defined.