## 7 Proportional--Integral--Derivative (PID) Controller Enhanced with Deep Learning (DL)
### Design of Multi-Layer Deep Learning for PID Tuning  
The design of the deep learning multi-layer network for tuning the PID controller is structured to consider several key inputs: the reference input, disturbance, output vibration, and error signal (see Figure 17). This architecture allows the network to analyze the overall system behavior and provide optimized PID parameters that reduce the cantilever beam vibration. The reference input represents the desired state or target for the cantilever beam. The disturbance accounts for external forces or conditions that may disrupt the system's performance, such as impulse and random disturbances. The output vibration is monitored to track the actual behavior of the system under these disturbances, and the error signal is calculated as the difference between the reference input and the output vibration. Figure 17: Closed Loop System with DL-PID Controller under Disturbance. These inputs are fed into the deep learning model, which consists of multiple layers, including input, hidden, and output layers. The hidden layers in the network process the input data, learning the complex relationships between the reference, disturbances, vibrations, and error signals. By doing so, the model can predict the optimal proportional, integral, and derivative (PID) gains required to minimize the error and mitigate the effects of disturbances. The network's output is the tuned PID parameters, which are adjusted to ensure that the system responds efficiently to changes in disturbances and maintains stability. This design allows the deep learning model to adapt the PID controller's performance, improving control accuracy and reducing the time and effort required for manual tuning. Through this multi-layer architecture, the deep learning network effectively enhances the traditional PID control system, enabling it to handle complex and varying conditions with greater precision. Deep Learning Network Architecture for PID Controller Parameter Tuning  
Figure 18 illustrates a deep learning network architecture designed to process input features and generate corresponding outputs through hidden layers. The network begins with an input layer that takes in seven features, which represents a combination of system states, sensor readings, disturbances, and error signals. These inputs provide the network with a comprehensive view of the system's operational conditions, ensuring that it has all the necessary information to make the prediction. These initial data are then passed into the network's hidden layers for further processing. The first hidden layer, consisting of 10 neurons, applies learned weights and biases to the input data. This layer is followed by an activation function, which introduces complexity into the model's behavior, enabling it to capture and understand intricate patterns and relationships within the data. This layer transforms the raw inputs into higher-level representations that are more suitable for making accurate predictions. The second and third hidden layers each contain six neurons and further refine the data as they pass through the network. Like the first hidden layer, these layers also apply weights, biases, and activation functions to the transformed data. By progressively processing the input data through these hidden layers, the network learns a hierarchical representation of the system, allowing it to make more accurate and informed decisions. This design is particularly effective in scenarios where the relationships between inputs and outputs are complex. Finally, the network outputs three values, corresponding to the proportional gain (\(K_{p}\)), integral gain (\(K_{i}\)), and derivative gain (\(K_{d}\)) of a PID controller. These gains are adjusted based on the network's analysis of the input data, which includes the previous and current  
Figure 18: Deep Learning Network. states of the system, disturbances, and the error signal. By providing these outputs, the network effectively tunes the PID controller parameters, allowing for precise control of the system.