Control of DC Motor Using Integral State Feedback and Comparison with PID: Simulation and Arduino Implementation

—The Direct Current (DC) motor is widely applied in various implementations. The main problem in the DC motor is controlling the angular speed on the specific reference. This research then proposed an integral state feedback design for tracking control in DC motor, with Simulink Matlab simulation and the Arduino hardware implementation. The results will be compared with the implementation of the PID controller . The integral state feedback controller can handle the system to reach the setpoint with good performance in the simulations, even with changing different poles and setpoints. In the hardware implementation, the current sensor (INA219) and encoder sensor are used since all state variables need to be calculated. Based on the result, the controller can reach the setpoint stably with oscillation. Similar results are showed in simulations with different setpoints. Compared with the PID Controller, the integral state feedback controller has a better response with faster rise time and faster settling time.

The main problem in DC motor is controlling the angular speed on the specific reference, even with uncertainty or disturbance happens [16] [17].The angular speed can be controlled by adjusting the motor's power supply.It sounds simple, yet is very challenging considering the whole system's performance.Thus, a controller is needed.Some controllers can be implemented to the DC motor.PI Controller [18], PID Controller [19] [20], ANFIS Based Hybrid P-I-D Controller [21], Fractional Order PID [22], Fuzzy Logic Controller [23], Model Reference Adaptive Control (MRAC) [24], Integral state feedback [25], have been implemented to DC motor system.The most popular among them is the PID controller since it is quite simple and easy to be implemented in a real hardware system [26][27] [28].Those previously mentioned researches were done only in the simulation since the real hardware system's implementation is difficult to be done.
However, the PID Controller also has some weaknesses.Any slightest change in setpoint will affect the whole system's performance.Hence, it is not suitable to use the PID controller for tracking control in the DC motor.
However, the hardware implementation of integral state feedback is very challenging because all state variables in the system need to be calculated.This research then proposed an integral state feedback design for tracking control in DC motor, with Simulink Matlab simulation and Arduino hardware system implementation.The results of the system's responses will be compared with the implementation of the PID controller [48].
The research is written as follows.The first section is the introduction.The second section is the method that consists of the DC Motor Modelling, Integral State Feedback Control, and Hardware Implementation Configuration.The third section is the result and discussion that consists of Simulink Matlab Simulation Result, Hardware Implementation Result, and Comparison with PID Controller.The last section is the conclusions.

A. DC Motor Model
Some modeling methods to determine the DC motor model are the physical and identification system models [49].It can be determined in transfer function or state-space representation.
The state-space model of the DC motor model can be made through mechanical and electrical analysis.The torque () generated by the DC motor is where,   is the constant factor,  is the armature current.
The back-EMF is where,   is the constant factor.
The torque constant and back-EMF constant have the same unit as   =   .Thus,  will be used to represent them.The DC motor can be modeled then by using the second newton's law and Kirchhoff voltage law as where  is moment inertia,  is the resistance,  is the inductance,  is the friction constant.
The DC motor model can be written in the state-space form as Define the  1 as the angular speed,  2 as the current.Hence, the state-space model can be written as where

B. Integral State Feedback
The integral state feedback controller has other names: full state-feedback [50][51], servo state feedback [52][53] [54], servo controller [32][55] [56][57], or statefeedback integral [39].The scheme is shown in Figure 1 where  is the state vector of the plant,  is the output of integrator, ̇ is the deviation between the reference and the feedback,  is the control signal,  is the output signal,  is the reference signal,   is the integral parameter constant,  is the state feedback constant,  is the constant matrix,  is the constant matrix, and  is the constant matrix.In the integral state feedback, all of the system state variables must be known.Thus, it needs sensors for calculating the unknown states.Else, the observer can be used as an alternative.

C. Hardware System Design
The system structure design to control the DC motor using the integral state feedback is shown in Figure 2.There are some components such as an encoder to calculate the angular speed, the current sensor to calculate the current, Arduino as the microcontroller, and a motor driver to drive the motor supply.Current encoder sensor has a 3.3volt supply; thus, it needs a buck converter.The current sensor used is INA219 with I2C communication.There are other electrical current sensors, such as ACS712, but they cannot read the electrical current well, especially if there is an electrical current surge.

A. Simulink Matlab Simulation
The section is about DC motor simulation in the Simulink Matlab.The parameter of the DC motor is as follows.The moment of inertia () is 0.01kgm^2, the motor friction () is 0.1Nms, the EMF constant () is 0.01V/rad/s, the motor torque constant () is 0.01Nm/Amp, the resistance () is 1Ohm, and the inductance () is 0.5H.
The state-space model of DC motor is The response system result using the parameter controller in Table 1 is shown in Figure 3.The x-axis is time in seconds, and the y-axis is the angular speed in radian per minute (RPM).The system's response performances listed in Table I are rise time, settling time, and overshoot.In Figure 3, the reference signal or setpoint used is 50 rad/s.It can be seen that the proposed controller can control the DC motor to reach the reference signal.The rise time is 0.8488 second, the settling time is 1.5056 second, and the overshoot is 0%.

B. Hardware Implementation
The section is about hardware implementation using Arduino Uno.The system configuration setup is shown in Figure 4.The DC motor, current sensor, Arduino Uno R3, and motor driver can also be seen.The first experiment is to examine the effect of the integral control parameter (  ) addition.The response system result using the parameter in Table II is shown in Figure 5.  Based on Figure 5 and Table II, it can be seen that the integral controller affects the rise time and settling time.The bigger integral controller parameter gives a faster rise time and settling time.Based on Figure 6 and Table III, it can be seen that the state feedback controller affects the rise time and settling time.The bigger state feedback controller parameter gives a faster rise time and settling time.

C. Tracking Control
In the section, the integral state feedback will be applied with various references.The result is shown in Figure 7. Setpoints (SP) used are 50RPM, 100RPM, and 150 RPM.Based on Figure 7, it can be seen that the integral state feedback can follow the reference (setpoint).The system performed with similar characteristics when various references are used.Overall, the system can give good performances with various references used.The integral state feedback has a robust characteristic because it always gives the same performances with different setpoints.

D. Comparison with PID Controller
In the section, the integral state feedback (ISF) will be compared with PID Controller [58]  Based on Figure 8, the integral state feedback has a better system response than PID Controller.Visually, the time to reach the reference is faster than PID Controller.

IV. CONCLUSIONS AND FUTURE WORK
The research is about controlling DC Motor using integral state feedback.The research was done by simulation and hardware implementation.In the simulation and hardware implementation result, the integral state feedback gave a good performance while reaching the set point.From the tracking control result with different setpoints, integral state feedback presented similar performance: the augmented system performed with fast rising time and settling time with small overshoot.Compared with the PID controller, the integral state feedback had a better system response in tracking control at some setpoints.
Future works of the research are widely open in many areas.The tuning parameter was still done using trial and error.Thus it will need a method to determine the parameter controller.An experiment with uncertainty and disturbance has not been done yet.Another challenging problem in applying the integral state feedback is that all states must be known.Hence, observers, such as minimum or full order observers, can be applied to overcome this issue in the future.The observer makes the augmented system will not need all states to be known.Another possible future research is to apply the Kalman filter to minimize the oscillation and noises in the output sensor.From a hardware perspective, it is also possible to conduct future research on controlling the DC motor's angular speed using the current sensor since it has more stability while reading the measurement than using the encoder sensor.

Fig. 2 .
Fig. 2. System Block Structure DiagramThere are some types of motor drivers such as L298, BTS7960, and H-Bridge IRF.For the best result, BTS7960 and H-Bridge are recommended.The Arduino gives a control signal to the motor driver using Pulse Width Modulation (PWM).The motor power supply voltage is 24V.The DC Motor used is PG28 with the encoder sensor included.The
The second experiment is to examine the effect of the state feedback  1  2 ].The system responses using the controller parameter in Table III are shown in Figure6.

Fig. 6 .
Fig. 6.System's response with various state feedback control parameters.

Fig. 8 .
Fig. 8. Tracking control experiment.Integral state feedback results are compared with PID controller.

TABLE I .
POLE PLACEMENT