# Nonlinear Dynamics and Machine Learning for Robotic Control Systems in IoT Applications
## 2 Materials and Methods
### Adams-Bashforth-Moulton Method for Nonlinear Dynamics
The mathematical formulation for control is presented with the following equations:  
\[u_{1}=K_{p}e_{x}+K_{i}\int e_{x}dx+K_{d}\frac{de_{x}}{dt} \tag{15}\]  
\[u_{2}=K_{p}e_{\psi}+K_{i}\int e_{\psi}dx+K_{d}\frac{de_{\psi}}{dt} \tag{16}\]  
where \(K_{p},\;K_{i},\;K_{d}\) are the control gains, adaptively tuned using the neural network; \(\psi_{d}\) is the desired heading angle; and \(\psi\) is the current heading angle. Mobile robot dynamics: The dynamics of the mobile robot, such as the steering and driving forces, are controlled by the inputs \(u_{1}\) and \(u_{2}\). This block represents the physical model of the robot, whose dynamics were mathematically modeled using the Adams-Bashforth-Moulton method. Sensors and feedback loop: The sensor block provides the actual state \(y=\left[x_{e},\;y_{e},\;\psi\right]^{T}\) back to the controller for feedback-based correction. The sensor inputs, such as the current pose (position and orientation), are used to refine the predictions from the neural network  
Figure 7: Block diagram of the control architecture for a mobile robot. and the Adams-Bashforth-Moulton method, ensuring precise real-time feedback and minimizing the error \(e(t)\). Results and feedback loop: The outputs of the mobile robot block (current positions \(x_{e},y_{e}\); heading \(\psi\); and velocity \(V_{x}\)) are compared to the desired reference values \(x_{ed},\;\;y_{ed},\;\;\psi,\;V_{d}\) to continuously adjust the control inputs. The feedback loop ensures that the robot stays on the desired trajectory by constantly minimizing the errors through corrective actions from the controller. The key equations that are applied in this architecture involve computing the trajectory errors, updating the control laws, and modeling the robot's motion [42], based on its dynamics (typically represented by differential equations). The diagram represents a closed-loop control system for trajectory tracking, where the robot continuously receives updated trajectory information and makes real-time adjustments to its steering and speed to follow the reference path. The control system integrates sensor feedback and guidance algorithms to ensure accurate path following. Forward kinematics is the process of determining the position and orientation of the end-effector (in task space p) from the joint angles (in configuration space q). Mathematically, it is represented as follows:  
\[p=f(q)\]  
where  
p is the position and orientation of the end-effector in the task space;  
q is the vector of the joint angles in the configuration space;  
f is the forward kinematics function. This function maps the joint angles to the end-effector's position and orientation in the task space. Inverse kinematics is the process of determining the required joint angles (in configuration space \(q\)) to achieve a desired position and orientation of the end-effector (in task space p). Mathematically, it is represented as follows:  
\[p=f^{-1}(q)\]  
where q is the vector of the joint angles in the configuration space; p is the desired position and orientation of the end-effector in the task space; and f\({}^{-1}\) is the inverse kinematics function. This function maps a desired end-effector position and orientation back to the necessary joint angles. Mapping the relationship between the spaces: the actuation inputs \(u\) are mapped to the configuration space \(q\) using specific functions, denoted as \(f^{-1}_{spec}\). From configuration space to task space: the joint angles \(q\) are then mapped to the task space \(p\) using the forward kinematics function:  
\[p=f_{final}(q) \tag{17}\]  
Inverse mapping: conversely, the task space \(p\) can be mapped back to the configuration space \(q\) using inverse kinematics, \(f^{-1}_{find}\), and then from the configuration space to the actuation space using \(f_{spec}\). \[q=f^{-1}_{find}(p) \tag{18}\]  
\[u=f_{spec}(q) \tag{19}\]  
Forward process: \(u\) (actuation) \(\to q\) (configuration) \(\to p\) (task space). Inverse process: \(p\) (task space) \(\to q\) (configuration) \(\to u\) (actuation).