## 2 Methods
### Learning Process  
The originality of this study is the use of an AI method to recommend PID parameters after identifying the target system. In the proposed method, two neural networks were configured (Figure 3). One was configured to identify the type of system from the PID parameters and response characteristics, and the other to find the acceptable PID parameters for the identified system. These two neural networks were configured to work in series and recommend PID parameters quickly.  
The first neural network was composed of two methods. One used a simple artificial neural network (ANN), and the other used a long short-term memory (LSTM) network that was capable of handling order dependence in sequential data. The ANN had three hidden layers and the LSTM had three hidden layers and one flattened layer. The ANN received inputs that included n sampling with position values at 0.1 s intervals (Figure 4), response characteristics, and PID parameters. In this method, response characteristics (RC) include values of: rise time when the position firstly reaches 95% of the target position; settling time, when the position settles with a 5% error band; overshoot, when the position reaches the highest position; and second peak, when the position reaches the second peak. LSTM received similar inputs as ANN that were converted to two-dimensional data to handle the sequential data. The outputs of both of the neural networks were \(m\), \(k\), and \(c\).  
Figure 4: Sampling method for using the data as inputs when number of sampling was 11 or 21.  
Figure 3: Architectures of the two proposed neural networks.  
The neural network inputs were given via eight approaches (Table 1). Two types of neural network were considered. The values of n were considered as 11 and 21, indicating that response data were sampled from 0 to 1 s and from 0 to 2 s at 0.1 s intervals for comparing the effect of the amount of sampling data considered as inputs. The response characteristics could be included or excluded for comparing the effect of response characteristics considered as an input.  
The second neural network generated the output of the acceptable PID parameters from the values of \(m\), \(k\), and \(c\). As it produced three outputs from three inputs, it was configured as a simple ANN with four hidden layers represented by groups of multiple neurons. This ANN was able to learn the acceptable PID parameters for the system.  
For training, an Adam optimizer with a learning rate of 0.0005 and mean squared logarithmic error as loss was used. The activation functions used for the LSTM network and Multi-layer Perceptron (MLP) were tanh and ReLu, respectively. To prevent overfitting, a 10% of drop out method and L1, L2 regularizer method were used.  
In this study, the data for learning were accumulated by simulation; hence, 10 million data samples could be produced at a time using this method. However, this was a challenge in real-time implementation. Therefore, in an actual PID system it is important to achieve an acceptable performance by generating the minimum amount of data. To check the amount of data required for learning, AI was trained by reducing the number of learning data in the order of 10 million, 10,000, and 1000.