# Optimal PID Control of a Brushed DC Motor with an Embedded Low-Cost Magnetic Quadrature Encoder for Improved Step Overshoot and Undershoot Responses in a Mobile Robot Application

^{*}

## Abstract

**:**

## 1. Introduction

^{λ}D

^{μ}) in order to control systems that are better described by fractional-order mathematical models, a proposal that has been applied successfully to control a quadrotor unmanned aerial vehicle (UAV) [30] and to control the position of a micrometric linear axis [31].

## 2. Materials and Methods

#### 2.1. Omnidirectional Mobile Robot APR-02

#### 2.2. BDCM with an Embedded Low-Cost Magnetic Encoder

#### 2.3. Electronic Control Board Implementing the PID Controller

#### 2.4. PID Control Method with Anti-Wind-Up

#### 2.5. Error Funtion Used for PID Tuning Optimization

## 3. Practical Motor Modeling and Control

#### 3.1. Optimal Measurement of the Angular Rotational Velocity Using a Magnetic Encoder

#### 3.2. Steady-State Motor Characterization

#### 3.3. Open-Loop Motor Response Evaluation

#### 3.4. Motor Modeling

^{®}software. This software program takes a dataset of measured input and output values from the studied plant and its sampling period to estimate the parameters of a given model structure that better fits the measured data. According to the Matlab

^{®}documentation [59], the initial parameter values are defined using the simplified refined instrument variable method defined by Young et al. [60] and then adjusted using a nonlinear least-squares search method.

#### 3.5. Model Validation Example

#### 3.6. Selection of the PID Sampling Period (${T}_{s}$)

#### 3.6.1. The Sampling Theorem

#### 3.6.2. Sampling Time Deduced form the Encoder Information

#### 3.7. Obtaining Baseline or Reference PID Parameters

^{®}software [63]. This tool requires the creation of a control loop model in Simulink

^{®}using the motor model previously described in this paper. The block description of this modeling is provided in Figure 16 and Figure 17 based on continuous and discrete PID controller implementations. The model of the motor contains various nonlinear elements that attempt to replicate the behavior of the real system. For improved reliability, the behavior of the encoder was also modeled in Simulink

^{®}to be as close as possible to the real one by computing the rotation of the shaft of the motor, internally defining the quadrature encoder signal and finally providing a realistic time-elapsed sequence that is used to provide the same information as the real encoder.

#### 3.8. Basic Validation of the Baseline or Reference PID Parameters

#### 3.9. Validation of the Sampling Rate (${T}_{s}$) of the PID Controller

#### 3.10. Optimization of the PID Parameters for Minimum Overshoot and Undershoot

^{−1}to 100 s

^{−1}in steps of 5 s

^{−1}, and ${K}_{d}$ from 0 s to 0.1 s in steps of 0.005 s. The mesh defined in this 3D space was completely explored by performing 2121 experimental measurements with the real motor, each one consisting of applying a step with a target speed of 30 rpm for 1 s and waiting 0.5 s until the next measurement (in order to be sure that the motor is completely stopped). The value of a target speed of 30 rpm was used in this optimization because it is the most used wheel speed in the APR-02 mobile robot [48]. In total, this exhaustive or brute-force search was completed in 3181.5 s (about 53 min). The color scale used in Figure 20 represents the maximum NIAE in red and the minimum in blue. As could be expected, Figure 20 shows that the maximum NIAE (red color, worst overshoot and undershoot) is generated when ${K}_{p}$ and ${K}_{i}$ have small values (using a PID without P and I control terms). The white point represented in Figure 20 depicts the location of the reference PID parameters obtained from the FRB PID tuner procedure. Three central planes are shown specifically in order to provide visual information of the evolution of the NIAE in the planes defined by the reference PID parameters, and Figure 21 shows the details of the most interesting 2D horizontal planes obtained. The color representation used in Figure 20 and Figure 21 was 2D interpolated in order to enhance the visual interpretation of the data in the planes.

## 4. Discussion and Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Kuindersma, S.; Deits, R.; Fallon, M.; Valenzuela, A.; Dai, H.; Permenter, F.; Koolen, T.; Marion, P.; Tedrake, R. Optimization-based locomotion planning, estimation, and control design for the atlas humanoid robot. Auton. Robot.
**2016**, 40, 429–455. [Google Scholar] [CrossRef] - Yeadon, W.H.; Yeadon, A.W. Handbook of Small Electric Motors, 1st ed.; McGraw-Hill Professional: New York, NY, USA, 2001. [Google Scholar]
- Laughton, M.A.; Warne, D.F. Electrical Engineer’s Reference Book, 16th ed.; Newnes: London, UK, 2003. [Google Scholar]
- Zhou, Y. Dc Motors, Speed Controls, Servo Systems: An Engineering Handbook, 3rd ed.; Elsevier: Amsterdam, The Netherlands, 2013; Volume 3. [Google Scholar]
- Aragon-Jurado, D.; Morgado-Estevez, A.; Perez-Peña, F. Low-Cost Servomotor Driver for PFM Control. Sensors
**2018**, 18, 93. [Google Scholar] [CrossRef] - Hijikata, M.; Miyagusuku, R.; Ozaki, K. Wheel Arrangement of Four Omni Wheel Mobile Robot for Compactness. Appl. Sci.
**2022**, 12, 5798. [Google Scholar] [CrossRef] - Yunardi, R.; Arifianto, D.; Bachtiar, F.; Intan Prananingrum, J. Holonomic Implementation of Three Wheels Omnidirectional Mobile Robot using DC Motors. J. Robot. Control.
**2021**, 2, 65–71. [Google Scholar] [CrossRef] - Minorsky, M. Directional Stability of Automatically Steered Bodies. Nav. Eng. J.
**1922**, 34, 280–309. [Google Scholar] [CrossRef] - Bennett, S. The past of PID controllers. Annu. Rev. Control.
**2001**, 25, 43–53. [Google Scholar] [CrossRef] - Pallejà, T.; Saiz, A.; Tresanchez, M.; Moreno, J.; Ribó, J.; Clariá, F. Didactic platform for DC motor speed and position control in Z-plane. ISA Trans.
**2021**, 118, 116–132. [Google Scholar] [CrossRef] - Grimholt, C.; Skogestad, S. Improved Optimization-based Design of PID Controllers Using Exact Gradients. Comput. Aided Chem. Eng.
**2015**, 37, 1751–1756. [Google Scholar] [CrossRef] - Tabatabaei, M.; Barati-Boldaji, R. Non-overshooting PD and PID controllers design. Automatika
**2014**, 58, 400–409. [Google Scholar] [CrossRef] - Somefun, O.A.; Akingbade, K.; Dahunsi, F. The dilemma of PID tuning. Annu. Rev. Control.
**2021**, 52, 65–74. [Google Scholar] [CrossRef] - Ziegler, J.G.; Nichols, N.B. Optimum Settings for Automatic Controllers. J. Dyn. Sys. Meas. Control
**1993**, 115, 220–222. [Google Scholar] [CrossRef] - Ang, K.H.; Chong, G.; Li, Y. PID Control System Analysis, Design, and Technology. IEEE Trans. Control. Syst. Technol.
**2005**, 13, 559–576. [Google Scholar] [CrossRef] - Fruehauf, P.S.; Chien, I.; Lauritsen, M.D. Simplified IMC-PID tuning rules. ISA Trans.
**1994**, 33, 43–59. [Google Scholar] [CrossRef] - Vilanova, R. IMC based Robust PID design: Tuning guidelines and automatic tuning. J. Process Control.
**2008**, 18, 61–70. [Google Scholar] [CrossRef] - Ho, W.K.; Hang, C.C.; Cao, L.S. Tuning of PID controllers based on gain and phase margin specifications. Automatica
**1995**, 31, 497–502. [Google Scholar] [CrossRef] - Mikhalevich, S.S.; Baydali, S.A.; Manenti, F. Development of a tunable method for PID controllers to achieve the desired phase margin. J. Process Control.
**2015**, 25, 28–34. [Google Scholar] [CrossRef] - Garrido, J.; Ruz, M.L.; Morilla, F.; Vázquez, F. Iterative design of Centralized PID Controllers Based on Equivalent Loop Transfer Functions and Linear Programming. IEEE Access
**2021**, 10, 1440–1450. [Google Scholar] [CrossRef] - Euzébio, T.A.; Da Silva, M.T.; Yamashita, A.S. Decentralized PID Controller Tuning Based on Nonlinear Optimization to Minimize the Disturbance Effects in Coupled Loops. IEEE Access
**2021**, 9, 156857–156867. [Google Scholar] [CrossRef] - Torga, D.S.; Da Silva, M.T.; Reis, L.A.; Euzébio, T.A. Simultaneous tuning of cascade controllers based on nonlinear optimization. Trans. Inst. Meas. Control.
**2022**, 44. [Google Scholar] [CrossRef] - Rachid, A.; Scali, C. Control of overshoot in the step response of chemical processes. Comput. Chem. Eng.
**1999**, 23, S1003–S1006. [Google Scholar] [CrossRef] - Lu, Y.S.; Cheng, C.M.; Cheng, C.H. Non-overshooting PI control of variable-speed motor drives with sliding perturbation observers. Mechatronics
**2005**, 15, 1143–1158. [Google Scholar] [CrossRef] - Bagis, A. Tabu search algorithm based PID controller tuning for desired system specifications. J. Frankl. Inst.
**2011**, 348, 2795–2812. [Google Scholar] [CrossRef] - Mohsenizadeh, N.; Darbha, S.; Bhattacharyya, S.P. Synthesis of PID controllers with guaranteed non-overshooting transient response. In Proceedings of the IEEE Conference on Decision and Control and European Control Conference, Orlando, FL, USA, 12–15 December 2011; pp. 447–452. [Google Scholar] [CrossRef]
- Silva, G.J.; Datta, A.; Bhattacharyya, S.P. New results on the synthesis of PID controllers. IEEE Trans. Autom. Control.
**2002**, 47, 241–252. [Google Scholar] [CrossRef] - Arciuolo, T.F.; Faezipour, M. PID++: A Computationally Lightweight Humanoid Motion Control Algorithm. Sensors
**2021**, 21, 456. [Google Scholar] [CrossRef] [PubMed] - Podlubny, I. Fractional-Order Systems and PI
^{λ}D^{μ}–Controllers. IEEE Trans. Autom. Control.**1999**, 44, 208–214. [Google Scholar] [CrossRef] - Efe, M.Ö. Neural Network Assisted Computationally Simple PI
^{λ}D^{μ}Control of a Quadrotor UAV. IEEE Trans. Ind. Inform.**2011**, 7, 354–361. [Google Scholar] [CrossRef] - Bruzzone, L.; Fanghella, P. Fractional-Order Control of a Micrometric Linear Axis. J. Control. Sci. Eng.
**2013**, 2013. [Google Scholar] [CrossRef] - Birari, A.; Kharat, A.; Joshi, P.; Pakhare, R.; Datar, U.; Khotre, V. Velocity control of omni drive robot using PID controller and dual feedback. In Proceedings of the IEEE International Conference on Control, Measurement and Instrumentation (CMI), Kolkata, India, 8–10 January 2016; pp. 295–299. [Google Scholar] [CrossRef]
- Meng, J.; Liu, A.; Yang, Y.; Wu, Z.; Xu, Q. Two-Wheeled Robot Platform Based on PID Control. In Proceedings of the International Conference on Information Science and Control Engineering (ICISCE), Zhengzhou, China, 20–22 July 2018; pp. 1011–1014. [Google Scholar] [CrossRef]
- Suarin, N.A.S.; Pebrianti, D.; Ann, N.Q.; Bayuaji, L.; Syafrullah, M.; Riyanto, I. Performance Evaluation of PID Controller Parameters Gain Optimization for Wheel Mobile Robot Based on Bat Algorithm and Particle Swarm Optimization. In Lecture Notes in Electrical Engineering; Springer: Singapore, 2019; Volume 538. [Google Scholar] [CrossRef]
- Batayneh, W.; AbuRmaileh, Y. Decentralized Motion Control for Omnidirectional Wheelchair Tracking Error Elimination Using PD-Fuzzy-P and GA-PID Controllers. Sensors
**2020**, 20, 3525. [Google Scholar] [CrossRef] - Megalingam, R.K.; Nagalla, D.; Nigam, K.; Gontu, V.; Allada, P.K. PID based locomotion of multi-terrain robot using ROS platform. In Proceedings of the International Conference on Inventive Systems and Control (ICISC), Coimbatore, India, 8–10 January 2020; pp. 751–755. [Google Scholar] [CrossRef]
- Wang, J.; Li, M.; Jiang, W.; Huang, Y.; Lin, R. A Design of FPGA-Based Neural Network PID Controller for Motion Control System. Sensors
**2022**, 22, 889. [Google Scholar] [CrossRef] - Borenstein, J.; Koren, Y. Motion Control Analysis of a Mobile Robot. J. Dyn. Syst. Meas. Control
**1987**, 109, 73–79. [Google Scholar] [CrossRef] - Borenstein, J.; Everett, H.R.; Feng, L.; Wehe, D. Mobile Robot Positioning: Sensors and Techniques. J. Robot. Syst.
**1997**, 14, 231–249. [Google Scholar] [CrossRef] - Moreno, J.; Clotet, E.; Lupiañez, R.; Tresanchez, M.; Martínez, D.; Pallejà, T.; Casanovas, J.; Palacín, J. Design, Implementation and Validation of the Three-Wheel Holonomic Motion System of the Assistant Personal Robot (APR). Sensors
**2016**, 16, 1658. [Google Scholar] [CrossRef] [PubMed] - Rubies, E.; Palacín, J. Design and FDM/FFF Implementation of a Compact Omnidirectional Wheel for a Mobile Robot and Assessment of ABS and PLA Printing Materials. Robotics
**2020**, 9, 43. [Google Scholar] [CrossRef] - Palacín, J.; Martínez, D.; Rubies, E.; Clotet, E. Suboptimal Omnidirectional Wheel Design and Implementation. Sensors
**2021**, 21, 865. [Google Scholar] [CrossRef] [PubMed] - Li, Y.; Ge, S.; Dai, S.; Zhao, L.; Yan, X.; Zheng, Y.; Shi, Y. Kinematic Modeling of a Combined System of Multiple Mecanum-Wheeled Robots with Velocity Compensation. Sensors
**2020**, 20, 75. [Google Scholar] [CrossRef] - Palacín, J.; Martínez, D. Improving the Angular Velocity Measured with a Low-Cost Magnetic Rotary Encoder Attached to a Brushed DC Motor by Compensating Magnet and Hall-Effect Sensor Misalignments. Sensors
**2021**, 21, 4763. [Google Scholar] [CrossRef] - Qian, J.; Zi, B.; Wang, D.; Ma, Y.; Zhang, D. The Design and Development of an Omni-Directional Mobile Robot Oriented to an Intelligent Manufacturing System. Sensors
**2017**, 17, 2073. [Google Scholar] [CrossRef] - Kao, S.-T.; Ho, M.-T. Ball-Catching System Using Image Processing and an Omni-Directional Wheeled Mobile Robot. Sensors
**2021**, 21, 3208. [Google Scholar] [CrossRef] - Palacín, J.; Rubies, E.; Clotet, E.; Martínez, D. Evaluation of the Path-Tracking Accuracy of a Three-Wheeled Omnidirectional Mobile Robot Designed as a Personal Assistant. Sensors
**2021**, 21, 7216. [Google Scholar] [CrossRef] - Palacín, J.; Rubies, E.; Clotet, E. Systematic Odometry Error Evaluation and Correction in a Human-Sized Three-Wheeled Omnidirectional Mobile Robot Using Flower-Shaped Calibration Trajectories. Appl. Sci.
**2022**, 12, 2606. [Google Scholar] [CrossRef] - Clotet, E.; Martínez, D.; Moreno, J.; Tresanchez, M.; Palacín, J. Assistant Personal Robot (APR): Conception and Application of a Tele-Operated Assisted Living Robot. Sensors
**2016**, 16, 610. [Google Scholar] [CrossRef] [PubMed] - Palacín, J.; Rubies, E.; Clotet, E. The Assistant Personal Robot Project: From the APR-01 to the APR-02 Mobile Robot Prototypes. Designs
**2022**, 6, 66. [Google Scholar] [CrossRef] - Palacín, J.; Clotet, E.; Martínez, D.; Moreno, J.; Tresanchez, M. Automatic Supervision of Temperature, Humidity, and Luminance with an Assistant Personal Robot. J. Sens.
**2017**, 2017, 1480401. [Google Scholar] [CrossRef] - Palacín, J.; Clotet, E.; Martínez, D.; Martínez, D.; Moreno, J. Extending the Application of an Assistant Personal Robot as a Walk-Helper Tool. Robotics
**2019**, 8, 27. [Google Scholar] [CrossRef] - Palacín, J.; Martínez, D.; Clotet, E.; Pallejà, T.; Burgués, J.; Fonollosa, J.; Pardo, A.; Marco, S. Application of an Array of Metal-Oxide Semiconductor Gas Sensors in an Assistant Personal Robot for Early Gas Leak Detection. Sensors
**2019**, 19, 1957. [Google Scholar] [CrossRef] - Dastjerdi, A.A.; Saikumar, N.; HosseinNia, S.H. Tuning guidelines for fractional order PID controllers: Rules of thumb. Mechatronics
**2018**, 56, 26–36. [Google Scholar] [CrossRef] - Huba, M.; Chamraz, S.; Bistak, P.; Vrancic, D. Making the PI and PID Controller Tuning Inspired by Ziegler and Nichols Precise and Reliable. Sensors
**2021**, 21, 6157. [Google Scholar] [CrossRef] - Zhang, J.; Zhuang, J.; Du, H.; Wang, S. Self-organizing genetic algorithm based tuning of PID controllers. Inf. Sci.
**2009**, 179, 1007–1018. [Google Scholar] [CrossRef] - Zhenpeng, Y.; Jiandong, W.; Biao, H.; Zhenfu, B. Performance assessment of PID control loops subject to setpoint changes. J. Process Control.
**2011**, 21, 1164–1171. [Google Scholar] [CrossRef] - Fiedeń, M.; Bałchanowski, J. A Mobile Robot with Omnidirectional Tracks—Design and Experimental Research. Appl. Sci.
**2021**, 11, 11778. [Google Scholar] [CrossRef] - Matlab Documentation: Tfest. Available online: https://es.mathworks.com/help/ident/ref/tfest.html?s_tid=srchtitle_tfest_1#btfb8zb-1 (accessed on 8 February 2022).
- Young, P.; Jakeman, A. Refined Instrumental Variable Methods of Recursive Time-Series Analysis Part III. Extensions. Int. J. Control.
**1980**, 31, 741–764. [Google Scholar] [CrossRef] - Shannon, C.E. Communication in the Presence of Noise. Proc. IRE
**1949**, 37, 10–21. [Google Scholar] [CrossRef] - Santina, M.S.; Stubberud, A.R.; Hostetter, G.H. Sample-Rate Selection. In The Control Handbook; Levine, W.S., Ed.; CRC Press: Boca Raton, FL, USA, 1995; pp. 313–320. [Google Scholar]
- Matlab Documentation: Frequency-Response Based Tuning. Available online: https://es.mathworks.com/help/slcontrol/ug/frequency-response-based-tuning-basics.html (accessed on 27 June 2022).
- Silva, G.J.; Datta, A.; Bhattacharyya, S.P. Robust control design using the PID controller. In Proceedings of the IEEE Conference on Decision and Control, Las Vegas, NV, USA, 10–13 December 2002; pp. 1313–1318. [Google Scholar] [CrossRef]
- Palacín, J.; Rubies, E.; Clotet, E. Classification of Three Volatiles Using a Single-Type eNose with Detailed Class-Map Visualization. Sensors
**2022**, 22, 5262. [Google Scholar] [CrossRef] [PubMed] - Palacín, J.; Clotet, E.; Rubies, E. Assessing over Time Performance of an eNose Composed of 16 Single-Type MOX Gas Sensors Applied to Classify Two Volatiles. Chemosensors
**2022**, 10, 118. [Google Scholar] [CrossRef]

**Figure 1.**(

**a**) Image of the APR-02 mobile robot. (

**b**) Details of the internal structure supporting the three BDCMs that drive the three omnidirectional wheels of the mobile robot.

**Figure 2.**Image of the BDCM used in the APR-02 mobile robot, which includes a 64:1 planetary gearbox and a low-cost magnetic encoder attached to the motor shaft. The motor is supported by an aluminum support structure that has some (red) support elements made of flexible rubber in order to reduce the transmission of vibrations.

**Figure 5.**Representation of all steps and modules required to practically implement the PID controller of one motor of the APR-02 mobile robot.

**Figure 6.**(

**a**) Representation of the six-pole magnet of the encoder that is attached to the motor shaft and the two fixed hall-effect sensors, HA and HB, placed at a 90° phase offset. (

**b**) Logical quadrature output signals generated by the rotation of the encoder and the edges detected by the microcontroller using the input capture module.

**Figure 7.**Open-loop wheel speed measurement deduced from the raw time-elapsed edge measurements gathered from the magnetic encoder of the BDCM for the different PWM duty cycles applied: (

**a**) 20% or low-speed example; (

**b**) 50% or medium-speed example; (

**c**) 100% or full-speed example.

**Figure 8.**Corrected open-loop wheel speed measurement deduced from the raw time-elapsed edge measurements gathered from the magnetic encoder of the BDCM for the different PWM duty cycles applied and the correction coefficients displayed in Table 1: (

**a**) 20% PWM case; (

**b**) 50% PWM case; (

**c**) 100% PWM case.

**Figure 9.**(

**a**) PWM and RPM relationship in different load scenarios. (

**b**) Motor current consumption depending on the applied PWM duty cycle in different load scenarios.

**Figure 12.**Calibration data required for model calculation: (

**a**) PWM duty cycle sequence applied to the motor; (

**b**) measured angular rotational velocity of the output shaft (gray line) and generated by the continuous-time (blue dotted line) and discrete-time (red dotted) models found by the SIT Toolbox.

**Figure 14.**Open-loop motor step response comparison: real motor speed gathered from the encoder (blue line), continuous-time (red line) model simulation, and discrete-time (brown line) model simulation.

**Figure 15.**Histogram of the encoder’s time-elapsed ($\Delta {t}_{k}$) values obtained with different PWM duty cycles (cases represented in Figure 9a with no load), colored in order to differentiate the cases analyzed.

**Figure 18.**BDCM output in a closed-loop PID control: real evolution of the angular rotational velocity measured from the information gathered by the magnetic quadrature encoder (blue line) and simulated motor velocity (yellow line). Response to steps with target speeds of 5, 10, 20, 40, and 60 rpm.

**Figure 19.**Evaluation of the NIAE values for different sampling periods (${T}_{s}$) and different target speeds: 10 (blue line), 30 (green line), and 60 (yellow line) rpm.

**Figure 20.**A 3D representation of the NIAE of the PID controller according the planes defined by the ${K}_{p}$, ${K}_{i}$ and ${K}_{d}$ parameters. The white point depicts the location of the baseline values proposed by the FRB PID Tuner procedure. The leftmost plane is for ${K}_{i}=0{\mathrm{s}}^{-1}$ and the bottom plane is for ${K}_{d}=0\mathrm{s}$.

**Figure 21.**Details of the two horizontal planes defined in Figure 20. The white point depicts the location or projection of the NIAE baseline values obtained with the FRB PID tuner procedure while the red point depicts the location of the minimum NIAE in each plane. The values of the NIAE are also displayed for reference: (

**a**) plane with ${K}_{d}=0.0182\mathrm{s}$; (

**b**) plane with ${K}_{d}=0\mathrm{s}$.

**Figure 22.**Step overshoot results measured in the real motor using the reference PID parameters obtained with the FRB PID tuner procedure (yellow line) and the best PID parameters, which minimize the NIAE. The target speed is 30 rpm.

K1 | K2 | K3 | K4 | K5 | K6 | K7 | K8 | K9 | K10 | K11 | K12 |
---|---|---|---|---|---|---|---|---|---|---|---|

1.092197 | 0.886583 | 1.106404 | 0.941402 | 1.089113 | 0.892923 | 1.110171 | 0.934642 | 1.156358 | 0.839371 | 1.145867 | 0.949867 |

PWM | Wheel rpm | Time Elapsed [ms] | Update Frequency [Hz] | Value Counted | Counts per Revolution |
---|---|---|---|---|---|

10% | 3.7 | 21.11 | 47.36 | 1,773,649 | 1,362,162,432 |

20% | 10.8 | 7.23 | 138.24 | 607,639 | 466,666,752 |

30% | 17.6 | 4.44 | 225.28 | 372,869 | 286,363,392 |

40% | 24.5 | 3.19 | 313.60 | 267,857 | 205,714,176 |

50% | 31.5 | 2.48 | 403.20 | 208,333 | 159,999,744 |

60% | 38.6 | 2.02 | 494.08 | 170,013 | 130,569,984 |

70% | 45.5 | 1.72 | 582.40 | 114,231 | 110,769,408 |

80% | 52.8 | 1.48 | 675.84 | 124,290 | 95,454,720 |

90% | 60.0 | 1.30 | 768.00 | 109,375 | 84,000,000 |

100% | 64.4 | 1.21 | 824.32 | 101,902 | 78,260,736 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Bitriá, R.; Palacín, J. Optimal PID Control of a Brushed DC Motor with an Embedded Low-Cost Magnetic Quadrature Encoder for Improved Step Overshoot and Undershoot Responses in a Mobile Robot Application. *Sensors* **2022**, *22*, 7817.
https://doi.org/10.3390/s22207817

**AMA Style**

Bitriá R, Palacín J. Optimal PID Control of a Brushed DC Motor with an Embedded Low-Cost Magnetic Quadrature Encoder for Improved Step Overshoot and Undershoot Responses in a Mobile Robot Application. *Sensors*. 2022; 22(20):7817.
https://doi.org/10.3390/s22207817

**Chicago/Turabian Style**

Bitriá, Ricard, and Jordi Palacín. 2022. "Optimal PID Control of a Brushed DC Motor with an Embedded Low-Cost Magnetic Quadrature Encoder for Improved Step Overshoot and Undershoot Responses in a Mobile Robot Application" *Sensors* 22, no. 20: 7817.
https://doi.org/10.3390/s22207817