Identification of the Flip Folder Folding Machine Using Artificial Neural Network with Nonlinear Autoregressive Exogenous Structure

— Folding machine is a tool that is needed in the small and medium scale laundry industry that has a goal for the efficiency of production time. The flip folder is the main component of this tool, which functions to fold the clothes by moving to form a certain deflection angle where the movement process is controlled by the controller. The system modeling process is the first step to study the characteristics of the system. In a dynamic system, the form of linear modeling is approved difficult to obtain a model that represents the actual physical model. Selecting the structure of the NARX (Nonlinear Autoregressive eXogenous) model was chosen to obtain the dynamic nature of the system. An estimation method to obtain parameter values from the system used Artificial Neural Networks (ANN), which is a trading scheme to be able to predict the output of a system that uses input data and output. Based on the offline assessment process using measurement data obtained by the NARX ANN model on the variation of the number of layers in 30 with a value of MSE 0, 38641 .


I. INTRODUCTION
The need for clean clothes when there is a rush of community activity in the city makes rapid development in the laundry business. In the laundry business, the production process, which is often done automatically using a machine, is only limited to the washing and drying stages. The final stage of the process of folding and packaging clothing still relies on human manual labor. While the demand by the people in these higher needs, so that this condition can lead to the operating capacity to be blocked.
At this time has begun to develop the use of automatic clothes folding equipment called the Folding Machine. This tool has a mechanism such as DOF (Degree of Freedom) robot manipulator arm. It is composed of several arms with movers in the form of a DC motor, which is controlled using a microcontroller [1][2][3]. Some other designs use four flip folders that are moved alternately to form a fold pattern of clothing. Each flip folder is controlled by the deflection angle formed by the table where the clothes are placed and moves sequentially alternately [4]. The amount of deflection angle formed by the flip folder needs to be controlled so that it does not exceed the nominal reference angle.
Folding machine is designed using a semiautomatic system mechanism for folding clothes. This design uses four pieces of flip folder driven by DC motors at each respective flip use Microcontroller to operate automatically [5][6]. This system is the development of the use of manual folding equipment, which was the initial idea for making this tool. In the following research, a prototype folding machine appeared using the LEGO Mindstorm EV3 robot module [7]. The use of this robot module aims to simplify design because all devices are easily compiled.
The most important process in the design of the controller to obtain a good performance that is a modeling system [8][9]. To obtain the necessary identification process models using the measurement system input and output data online or offline [10][11]. The model derived from the structure of a mathematical model following the design. The flip folder modeling process has been designed with the structure of the ARX (Autoregressive eXogenous) model using the Extended Least Square identification method using offline data [12]. The form of the model obtained using a linear approach second-order system.
Linear form model approaches often do not represent the actual system. So that when the system runs when the conditions are loaded, there are parameters that change [13]. Therefore, a modeling approach in a nonlinear form is needed. Artificial Neural Network (ANN) algorithm is one of the methods that can be used in the identification process. This method was chosen because it has the advantage of being able to mimic the way of thinking based on computational intelligence based on measurement data on pattern recognition [14]. ANN method is used for the process of identifying a system using the backpropagation training algorithm that is applied to the steam system [15]. The nonlinear model approach uses the NARX (Nonlinear Autoregressive eXogenous) structure with the Levenberg-Marquardt training algorithm [16]. This training algorithm is used to minimize the means square error criteria so that the value of convergent λ is controlled by the ratio between the reduction of the actual price and the predicted price.
Based on research on the folding folder folding machine that has been done using a linear identification approach with the structure of the ARX model [12]. The author will use a nonlinear approach identification method to obtain the actual model especially when conditions are burdened with the NARX (Nonlinear Autoregressive eXogenous) model structure using ANN with the Levenberg-Marquardt training algorithm. The identification process is based on measurement data input and output obtained offline, which is then performed testing and analysis on the model.

A. Folding Machine
Folding machine is a tool used for folding clothes automatically. This tool aims to make it easier for humans to carry out activities, especially when used by laundry entrepreneurs who can provide time efficiency and production costs [4] [17]. In this study, the tool consists of 5 flip folders that will be arranged in such a way that they will form a fold of clothing. Each flip folder has a different size and angle of deflection [12]. Figure 1 shows the composition of the flip folder consisting of 5 pieces, i.e., A, B, C, D, E, and one of the deflection angles of the flip folder when forming a value of 30o. For easier operation by human operators, the placement of the folding machine always becomes one with a table, as in Figure 2. The Folding Machine system is composed of several flip folders as part of involving clothes. At each flip folder that resembles a DOF manipulator robotic arm, an actuator component is arranged using a 12 Volt DC motor. As a controlling component to carry out sequential moving processes using a microcontroller. The command to start the folding process is given by the operator by pressing a button on the control panel. In the process of folding, the deflection angle of the flip folder is controlled by the controller. A Rotary encoder sensor is added as feedback to measure the formed deflection angle. The deflection angle should be following the setpoint that has been given to flip the folder that is not damaged.
The block diagram of the flip folder is shown in Figure 3. Based on the block, the magnitude of the setpoint angle or input from the flip folder is given using the program contained in the Microcontroller. Then the controller device will provide a control signal in the form of a PWM (Pulse Width Modulation) signal to the DC Motor driver device. The driver will respond by moving the DC motor following the magnitude of the input angle given to the Microcontroller. The shaft of the DC Motor is connected in such a way to the flip folder so that when the DC Motor is moving, the flip will also move to form a certain deflection angle. The Rotary Encoder in this system functions as a component of measuring the size of the angle formed in reality from the flip folder. The measurement data from this component will be read by a microcontroller. Furthermore, the controller calculation correction can be done to be able to correct the angular errors that occur. Artificial Neural Network (ANN) is a mechanism of mathematical calculation that resembles the working principle of the nerve of the human brain. ANN is widely used to solve problems such as grouping, recognition, pattern classification, optimization, and prediction [13][14] [18]. In the process of identifying systems whose parameter values are unknown can be done using measurement data input and output [11]. The results of the mathematical model that will be obtained can be adjusted to the desired model structure. The identification schema using ANN can be shown in Figure 4.

Input Output
Error Model The structural model compiled in this study uses NARX (Nonlinear Auto Regression eXogenous). This structure is the development of the ARX (Auto Regression eXogenous) structure using a nonlinear approach for dynamic systems [16]. The identification process using ANN with the NARX structure has feedback that covers several networks. The arrangement of this architecture is shown in Figure 5. To obtain maximum performance from the network in NARX used for prediction of nonlinear time series by utilizing memory capabilities using previous or current measurement values [18][19]. The architecture of NARX ANN used in this study is a parallel-series model. In this model, the future value of y (t-1) is predicted using the present and previous values of x (t) and the actual measurement value x (t). The advantage of using this model is that the use of actual measurement values as input from the feed-forward network is more precise [16] [20]. Besides, the resulting network algorithm is purely feedforward, which is a normal training algorithm that can be used for Multi-Layer Perceptron (MLP) [19]. This architecture can be represented in Equation (1).

Modeliing System
where (•) is a mapping function of Neural Network which is a nonlinear parameter that was initially unknown, ̂( + 1) is the predicted output value of the NARX structure, ( ), ( − 1), ( − ) is the output data obtained from measurements and ( ), ( − 1), ( − ) is input data obtained from measurements. For nx is the number of input delays dan ny is the number of output delays. The NARX structure model using ANN, the architect who made this approach was MLP by providing a strong structure and made it possible to carry out learning on all types of nonlinear mapping continuously. As shown in Figure  6, MLP consists of three layers, i.e., the input layer, hidden layer, and output. At each layer, each neuron multiplies the input vector xj given by the previous layer with the weight vector wij to obtain the scalar result xj x wij. To obtain the output of the function satisfies Equation (2), where f is the activation function, i is the Neuron index layer, and j is the ANN input index.
This study uses the Levenberg-Marquardt algorithm for the data training process. The reason for using the algorithm is because it can minimize the means square error criteria [16]. Training is done by modifying the weights until obtaining the appropriate value. Furthermore, the weight value obtained is set, so ANN has an output close to the target value.

C. System Identification
The process of system identification is a series that is carried out through several stages to obtain the model results from the system. The expected model is a model that is very close to the actual physical form. So that the model obtained is a form that is very similar to the actual model. The stages in this identification process include the following: • Measurement of input and output data. This process is done by measuring the input and output data from the system. The data shows the relationship between input and output that can show the characteristics of a system. • Determination of the structure of the system model approach. The characteristics of the system to be obtained depend on the structure of the model being designed. Structure models can be used with linear and nonlinear approaches for dynamic systems. The structure can also be formed by considering the number of orders in the system, i.e., first-order, second-order, or large order. In this study, the structure of the Nonlinear Autoregressive eXogenous (NARX) model is used. • Model Estimation. The estimation process is a stage for obtaining values from system parameters. The aim is to obtain a predictive value of the model that approaches the characteristics of the system. Where the prediction error has the smallest value possible. In this study, the model estimation method uses ANN with a training algorithm. • Validation. This process is a method for testing how close the estimation results are to the actual model. One method commonly used is Means Square Error (MSE), which satisfies Equation (3).
Where yp variable is the system output, ym variable is the output model, and N variable is the amount of data. The smaller the value, the results of the modeling approach the actual system. The identification process is carried out continuously with changes in parameters from the estimation method to obtain a model that approaches the actual system. The identification process can be shown in Figure 7. III. RESULT AND DISCUSSION The process of identification using ANN was chosen five variations in the number of tests based on changes in the number of inner layer parameters. In comparison,mparison, the number of the input layer is two, which is a representation of the input data and output measurements for the output layer number in one, which is the predicted output of the NARX structure. The number of test variations is shown in Table I The data to be trained to obtain a model of the system is obtained based on the measurement results of input and output signals. The input signal is obtained by giving the desired angle position input randomly programmed on the Microcontroller. While the output signal is obtained by measuring the deflection angle formed by the flip folder using a rotary encoder, then the data is processed by a microcontroller. Figure 8 shows the measurement of input and output signals. The system modeling process is carried out through 2 stages, the first stage is training to get the model, and the second stage is validation. At the training process and validation stages, the data were measured using the number of input and output data 3500 data. This measurement data will be the target of ANN modeling using the NARX parallel series structure. For initiation of weights obtained by offline weight training by giving a random signal. The criteria used to select the model obtained using the smallest MSE (Means Square Error).
The first variation training is given with the number of inner layers 10. The results of the identification process, as shown in Figure 9, show that the output model of ANN with the NARX model structure tries to approach the structure of the output system by having an MSE value of 1.1689. The next step is to validate the model using the data obtained MSE value 1.11654. The second variation training is given with the number of inner layers 15. The results of the identification process as shown in Figure 10 show that the output model of NN has an MSE value of 1.09495 and MSE in the validation process of 1.26062. It can be seen that the validation results still have a significant difference in MSE values with the results in training. The third variation training is given with the number of inner layers 20. The results of the identification process, as shown in Figure 11, show that the output model of NN has an MSE value of 1.03742 and an MSE in the validation process of 1.03351. In this data, the validation results show that the MSE value is almost the same. The fourth variation training is given with the number of inner layers 25. The results of the identification process, as shown in Figure 12, show that the output model of ANN has an MSE value of 0.83438 and MSE for the validation process of 0.90067. In this data, the results of the validation also show that the MSE value is almost the same as in the third variation training. The fifth variation training is given with the number of inner layers 30. The results of the identification process, as shown in Figure 13, show that the output model of ANN has an MSE value of 0.84436 and MSE for the validation process of 0.38641. In this data, the validation results show that the MSE validation stage is smaller than the training stage. Based on the training and validation process using a variation scheme, the change in the number of inner layers can be summarized as in Table II IV. CONCLUSION Based on testing that has been done through the training and validation stages, the model form of the system that approaches the system is the one with the smallest MSE value of the two stages. So, according to the test results, the model in variation 5 using the number of inner layers 30 has a validation MSE value of 0, 38641.