PID IMPLEMENTING PARAMETERS FOR CONTROL DC MOTOR IN CNC MACHINES

In this article, the PID controller design for a DC motor used in a CNC machine is discussed, with a focus on rotor angular speed regulation. A DC electric motor is an electrical machine that utilizes DC current to generate mechanical torque, which is essential in CNC applications. The PID controller, or Proportional-Integral-Derivative, is often employed to regulate the speed of DC motors based on desired parameters. This approach not only addresses the technical aspects of PID controller design but also integrates action research methods to enhance understanding and practical implementation in the context of using DC motors in CNC machines. In this study, the design of a DC motor controller with a PID closed-loop block aims to reduce the rise time value in the transfer function design. By applying the PID controller to a rotor speed of 13 rad/s, experimental results show a settling time of approximately 0.68 seconds and an overshoot of 3.02%. The lowest rise time achieved is around 136.893 milliseconds.


INTRODUCTION
The DC motor, as a type of electric machine, operates by consuming DC electrical power in CNC applications and produces mechanical torque.The high level of torque generated makes the DC motor a commonly chosen option, especially in the context of CNC machines.The torque produced by the DC motor is directly related to the current flowing through the armature coil and the strength of the magnetic field inducing the armature (A.R. Sinawane, 2017).The utilization of DC motors in CNC machines often focuses on the movement of the spindle, which serves as the driver for the cutting tool.The importance of tool movement in CNC machines has a direct impact on the rotor's angular speed in the DC motor.This speed can be adjusted based on the set values for the DC motor parameters.However, it is essential to note in this context that saturation and friction can lead to a performance decrease in conventional control (A.Ristu, 2016).
The use of PID controllers has become common in motor control applications due to their simple structure and easily understandable control algorithms.The determination of controller parameters is generally carried out using the Trial and Error method, which, although it can yield successful results, requires a considerable amount of time to achieve a satisfactory system response (A.Ristu, 2016).
The use of PID controllers has become common in motor control applications due to their simple structure and easily understandable control algorithms.The determination of controller parameters is generally carried out using the Trial and Error method, which, although it can yield successful results, requires a considerable amount of time to achieve a satisfactory system response (A. Ma'arif, 2021).
The growth of intelligent control based on Artificial Intelligence (AI) has experienced significant developments, contributing to the enhancement of conventional control.These advancements can serve as a learning source for academics to analyze and apply existing theories (D.Eriason, 2017).The design approach for a DC motor control model can be performed by using PID control tuned with autotuning in the MATLAB environment.With this method, an electric motor can be designed according to the desired needs for applications in CNC machines.Therefore, this article specifically discusses the PID controller design for a DC motor optimized for use in CNC machines, with the implementation of autotuning through the MATLAB application.

METHODOLOGY
The research method applied in this project is Action Research (AR) or Action Research.The main objective is to enhance students' understanding of PID controllers and transfer functions.The research process involves several stages, including the identification of designs, solving transfer function problems, creating block diagrams, determining PID parameters, and simulating PID performance (Miskuri,2018).
The research workflow can be found in Figure 1.In its execution, this research utilizes the MATLAB 2022 software application.Proficiency and in-depth understanding of this application in designing PID controllers for machines are crucial focal points in this study.

Identification Process
The schematic diagram of the DC electric motor used can be seen in Figure 2. In the context of this case study, the magnetic field strength is considered constant, resulting in the torque of the DC motor being linearly related only to the current flowing through the armature coil.This relationship is represented by the constant K_t in the relationship as seen in Equation 1.

𝑻 = 𝑲 𝒕 𝒊
(1) The resistance arises from the magnetic field generated by the electromagnet coil (back electromotive force or back emf), which is proportional to the rotor angular velocity with a constant K_e as stated in the relationship given by Equation 2.
By applying Newton's second law to rotational motion and Kirchhoff's law, the system can be expressed in the form of equations 3 and 4.
̈+  ̇=    (3) The design of the 3-phase DC electric motor that has been created exhibits characteristics as outlined in Table 1.

Transfer Function
The Transfer Function (TF) or transfer function is the ratio of the Laplace transform of the output to the Laplace transform of the input, assuming all initial conditions are zero.By combining the torque balance equations from equations 3 and 4, we can form the electrical circuit equation at the armature, as depicted in equation 5 (Pirmana,2013).

Parameter PID
An efficient DC motor system can produce precise shaft displacements.Other performance requirements involve the motor's ability to achieve the final rotational state rapidly.In this context, the desired settling time is less than 2 seconds, overshoot is less than 5%, and steady-state error is less than 1%.Through the implementation of the transfer function in MATLAB using a graphical user interface (GUI) by defining the numerator and denominator as vectors, along with specifying the final value step parameters, the step response in the open-loop is obtained, as seen in Figure 8.The analysis results indicate that the rise time, overshoot, and amplitude of the transfer function are 1.094 s, 0.502%, and 0.01193, respectively.In this context, it can be concluded that the DC motor transfer function has met the desired performance parameters.In determining a suitable controller for the system, PID controller parameters are determined through the trial-and-error method using the MATLAB application, as seen in Figure 9. From this process, PID controller values, namely   ,   ,   for each speed level based on the used parameters, are obtained, as listed in

PID Simulation
Referring to the DC motor design parameters that use a PID controller, this concept is applied through the creation of a block diagram.The block diagram is structured based on each PID parameter adjusted to the motor speed.The creation of the block diagram is done using the MATLAB software application, as illustrated in Figure 10.The DC motor design simulation has been successfully executed.Simulation results using MATLAB indicate that the use of a speed of 13 rad/s in this DC motor design yields the smallest rise time, which is 136.893ms.The overshoot at a speed of 13 rad/s reaches 2.577%.The simulation graph of the DC motor design utilizing the PID controller can be found in Figure 11.

Figure 7 .
Figure 7. Closed loop diagram with PID Matlab

Figure 10 .
Figure 10.block diagram DC motor with PID valueThe DC motor design simulation has been successfully executed.Simulation results using MATLAB indicate that the use of a speed of 13 rad/s in this DC motor design yields the smallest rise time, which is 136.893ms.The overshoot at a speed of 13 rad/s reaches

Figure 11 .
Figure 11.simulation graph of the DC motor design utilizing the PID controllerCONCLUTIONSThe control design for the DC motor in CNC has been successfully implemented using MATLAB.Utilizing moment of inertia, friction constant, coil resistance, and coil inductance values of 0.01 kgm², 0.1 Nms, 8.1 ohms, and 4.05 H, respectively, the simulation results show the rise time, overshoot, and amplitude values as 1.094 s, 0.502%, and 0.01193, respectively.By implementing the DC motor control design through a closed-loop using PID, it successfully reduces the rise time of the designed transfer function.The use of a speed of 13 rad/s in the PID controller shows a settling time of approximately 0.68 s and an overshoot of 3.02%, with the lowest rise time reaching 136.893 ms.This implementation proves the effectiveness of the PID controller design in enhancing the performance of the DC motor in the context of CNC machine usage.

Table 2 .
The results indicate that as the speed increases, the settling time tends to decrease, while the overshoot value increases.In this context, the PID controller parameter values show a tendency to increase with the system's speed.