# Low-Cost Implementation of an Adaptive Neural Network Controller for a Drive with an Elastic Shaft

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Description of the Plant and the Controller

**x**—the input vector, ${\mu}_{j}$—the center vector of the j-th neuron, $\left|\right|\xb7\left|\right|$—euclidean distance, ${\sigma}_{j}$—the width of the activation function. The output of the RBF neural network can then be calculated as:

## 3. Simulation Results

## 4. Low-Cost Implementation of the Control Algorithm

## 5. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## Abbreviations

DAC | Digital-to-Analog Converter |

DSP | Digital Signal Processor |

e | error signal |

FPGA | Field Programmable Gate Array |

GPIO | General-Purpose Input/Output |

HMI | Human–Machine Interface |

HIL | Hardware-in-the-Loop |

${m}_{e}$ | electromagnetic torque |

${m}_{L}$ | load torque |

${m}_{s}$ | torsional torque |

ppr | pulses per revolution |

p.u. | per unit |

PWM | Pulse Width Modulation |

RBF | Radial Basis Function |

RBFNN | Radial Basis Function Neural Network |

rpm | revolutions per minute |

${T}_{1}$ | time constant of the motor machine |

${T}_{2}$ | time constant of the load machine |

${T}_{c}$ | time constant of the shaft |

${T}_{mod}$ | reference speed time constant |

w | weights of a neural network |

$\gamma $ | learning rate of center and widths of neurons |

$\xi $ | damping coefficient |

$\eta $ | learning rate of weights of the neural network |

$\mu $ | center of the neuron |

$\sigma $ | width of the neuron |

${\omega}_{0}$ | resonant frequency of the system |

${\omega}_{1}$ | speed of the motor |

${\omega}_{2}$ | speed of the load |

${\omega}_{refm}$ | model reference speed |

## References

- Liu, Z.-H.; Nie, J.; Wei, H.-L.; Chen, L.; Li, X.-H.; Lv, M.-Y. Switched PI Control Based MRAS for Sensorless Control of PMSM Drives Using Fuzzy-Logic-Controller. IEEE Open J. Power Electron.
**2022**, 3, 368–381. [Google Scholar] [CrossRef] - Hussain, H.A. Tuning and Performance Evaluation of 2DOF PI Current Controllers for PMSM Drives. IEEE Trans. Transp. Electrif.
**2021**, 7, 1401–1414. [Google Scholar] [CrossRef] - Stojic, D.; Tarczewski, T.; Niewiara, L.J.; Grzesiak, L.M. Improved Fixed-Frequency SOGI Based Single-Phase PLL. Energies
**2022**, 15, 7297. [Google Scholar] [CrossRef] - Salgado-Plasencia, E.; Carrillo-Serrano, R.V.; Toledano-Ayala, M. Development of a DSP Microcontroller-Based Fuzzy Logic Controller for Heliostat Orientation Control. Appl. Sci.
**2020**, 10, 1598. [Google Scholar] [CrossRef] [Green Version] - Liu, T.-H.; Ahmad, S.; Mubarok, M.S.; Chen, J.-Y. Simulation and Implementation of Predictive Speed Controller and Position Observer for Sensorless Synchronous Reluctance Motors. Energies
**2020**, 13, 2712. [Google Scholar] [CrossRef] - Ortega-García, L.E.; Rodriguez-Sotelo, D.; Nuñez-Perez, J.C.; Sandoval-Ibarra, Y.; Perez-Pinal, F.J. DSP-HIL Comparison between IM Drive Control Strategies. Electronics
**2021**, 10, 921. [Google Scholar] [CrossRef] - Mossa, M.A.; Echeikh, H.; Iqbal, A.; Do, T.D.; Al-Sumaiti, A.S. A Novel Sensorless Control for Multiphase Induction Motor Drives Based on Singularly Perturbed Sliding Mode Observer-Experimental Validation. Appl. Sci.
**2020**, 10, 2776. [Google Scholar] [CrossRef] [Green Version] - Luo, G.; Zhang, R.; Chen, Z.; Tu, W.; Zhang, S.; Kennel, R. A Novel Nonlinear Modeling Method for Permanent-Magnet Synchronous Motors. IEEE Trans. Ind. Electron.
**2016**, 63, 6490–6498. [Google Scholar] [CrossRef] - Mishra, P.; Banerjee, A.; Ghosh, M. FPGA-Based Real-Time Implementation of Quadral-Duty Digital-PWM-Controlled Permanent Magnet BLDC Drive. IEEE/ASME Trans. Mechatron.
**2020**, 25, 1456–1467. [Google Scholar] [CrossRef] - Zhang, D.; Li, H. A Stochastic-Based FPGA Controller for an Induction Motor Drive with Integrated Neural Network Algorithms. IEEE Trans. Ind. Electron.
**2008**, 55, 551–561. [Google Scholar] [CrossRef] - Wongkhead, S.; Tunyasrirut, S.; Permpoonsinsup, W.; Puangdownreong, D. State Space Model for BLDC Motor Based on Digital Sigal Processors TMS320F28335 for Speed Control by Using Proportional Integral Controller. In Proceedings of the 2019 7th International Electrical Engineering Congress (iEECON), Hua Hin, Thailand, 6–8 March 2019; pp. 1–4. [Google Scholar] [CrossRef]
- Derugo, P.; Zychlewicz, M. Reproduction of the control plane as a method of selection of settings for an adaptive fuzzy controller with Petri layer. Arch. Electr. Eng.
**2020**, 69, 609–624. [Google Scholar] [CrossRef] - Frieske, B.; Stieler, S. The “Semiconductor Crisis” as a Result of the COVID-19 Pandemic and Impacts on the Automotive Industry and Its Supply Chains. World Electr. Veh. J.
**2022**, 13, 189. [Google Scholar] [CrossRef] - Gopinath, M.; Yuvaraja, T.; Jeykumar, S. Implementation of Four Quadrant Operation of BLDC Motor Using Model Predictive Controller. Mater. Proc.
**2018**, 15, 1666–1672. [Google Scholar] [CrossRef] - Xu, H.; Hinostroza, M.A.; Guedes Soares, C. Modified Vector Field Path-Following Control System for an underactuated Autonomous surface ship model in the presence of static obstacles. J. Mar. Sci. Eng.
**2021**, 9, 652. [Google Scholar] [CrossRef] - McCarthy, D.; McMorrow, D.; O’Dowd, N.P.; McCarthy, C.T.; Hinchy, E.P. A Model-Based Approach to Automated Validation and Generation of PLC Code for Manufacturing Equipment in Regulated Environments. Appl. Sci.
**2022**, 12, 7506. [Google Scholar] [CrossRef] - Mihalič, F.; Truntič, M.; Hren, A. Hardware-in-the-Loop Simulations: A Historical Overview of Engineering Challenges. Electronics
**2022**, 11, 2462. [Google Scholar] [CrossRef] - Ivanov, E.; Karsakov, A. Visual programming language for data visualization based on visual grammar. Procedia Comput. Sci.
**2021**, 193, 402–406. [Google Scholar] [CrossRef] - Michael, C.A.; Safacas, A.N. Dynamic and Vibration Analysis of a Multimotor DC Drive System with Elastic Shafts Driving a Tissue Paper Machine. IEEE Trans. Ind. Electron.
**2007**, 54, 2033–2046. [Google Scholar] [CrossRef] - Michael, C.; Safacas, A. Behavior of a drive system consisting of two DC motors with elastic shafts driving the Yankee drying cylinder of a tissue paper machine. In Proceedings of the 4th International Power Electronics and Motion Control Conference, Xi’an, China, 14–16 August 2004; Volume 3, pp. 1460–1465. [Google Scholar]
- Gaidi, A.; Lehouche, H.; Belkacemi, S.; Tahraoui, S.; Loucif, M.; Guenounou, O. Adaptive Backstepping control of wind turbine two mass model. In Proceedings of the 2017 6th International Conference on Systems and Control (ICSC), Batna, Algeria, 7–9 May 2017; pp. 168–172. [Google Scholar] [CrossRef]
- Li, X.; Zhu, Y.; Yang, K.-m. Self-adaptive composite control for flexible joint robot based on RBF neural network. In Proceedings of the 2010 IEEE International Conference on Intelligent Computing and Intelligent Systems, Xiamen, China, 29–31 October 2010; pp. 837–840. [Google Scholar] [CrossRef]
- Xin, X.; Liu, Y.; Wu, J. Global stabilization control for a two-link underactuated robot with a flexible elbow joint. In Proceedings of the 32nd Chinese Control Conference, Xi’an, China, 26–28 July 2013; pp. 1520–1525. [Google Scholar]
- Goubej, M. Fundamental performance limitations in PID controlled elastic two-mass systems. In Proceedings of the 2016 IEEE International Conference on Advanced Intelligent Mechatronics, Banff, AB, Canada, 12–15 July 2016; pp. 828–833. [Google Scholar] [CrossRef]
- Wang, C.; Yang, M.; Zheng, W.; Long, J.; Xu, D. Vibration Suppression With Shaft Torque Limitation Using Explicit MPC-PI Switching Control in Elastic Drive Systems. IEEE Trans. Ind. Electron.
**2015**, 62, 6855–6867. [Google Scholar] [CrossRef] - Szabat, K.; Pajchrowski, T.; Tarczewski, T. Modern Electrical Drives: Trends, Problems, and Challenges. Energies
**2022**, 15, 160. [Google Scholar] [CrossRef] - Derugo, P.; Szabat, K.; Pajchrowski, T.; Zawirski, K. Fuzzy Adaptive Type II Controller for Two-Mass System. Energies
**2022**, 15, 419. [Google Scholar] [CrossRef] - Szabat, K.; Orlowska-Kowalska, T. Vibration Suppression in a Two-Mass Drive System Using PI Speed Controller and Additional Feedbacks—Comparative Study. IEEE Trans. Ind. Electron.
**2007**, 54, 1193–1206. [Google Scholar] [CrossRef] - Zhang, G.; Furusho, J. Speed control of two-inertia system by PI/PID Control. IEEE Trans. Ind. Electron.
**2000**, 47, 603–609. [Google Scholar] [CrossRef] - Wongkhead, S. State Space Model for Speed Control BLDC Motor Tuning by Combination of PI—Artificial Neural Network Controller. In Proceedings of the 2021 18th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON), Chiang Mai, Thailand, 19–22 May 2021; pp. 874–877. [Google Scholar] [CrossRef]
- Dróżdż, K. Estimation of the mechanical state variables of the two-mass system using fuzzy adaptive Kalman filter—Experimental study. In Proceedings of the 2015 IEEE 2nd International Conference on Cybernetics (CYBCONF), Gdynia, Poland, 24–26 June 2015; pp. 455–459. [Google Scholar] [CrossRef]
- Nikolov, N.; Alexandrova, M. Adaptive state controller with suspension of the recurrent estimation process. In Proceedings of the 2021 International Conference Automatics and Informatics (ICAI), Varna, Bulgaria, 30 September–2 October 2021; pp. 1–4. [Google Scholar] [CrossRef]
- Malarczyk, M.; Zychlewicz, M.; Stanislawski, R.; Kaminski, M. Speed Control Based on State Vector Applied for Electrical Drive with Elastic Connection. Automation
**2022**, 3, 337–363. [Google Scholar] [CrossRef] - Szczepanski, R.; Tarczewski, T.; Grzesiak, L.M. Application of optimization algorithms to adaptive motion control for repetitive process. ISA Trans.
**2021**, 115, 192–205. [Google Scholar] [CrossRef] - Gil, P.; Oliveira, T.; Cardoso, A.; Palma, L. Adaptive State-Space Neuro Fuzzy Control. In Proceedings of the 2018 15th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON), Chiang Rai, Thailand, 18–21 July 2018; pp. 45–48. [Google Scholar] [CrossRef]
- Fei, J.; Chen, Y.; Liu, L.; Fang, Y. Fuzzy Multiple Hidden Layer Recurrent Neural Control of Nonlinear System Using Terminal Sliding-Mode Controller. IEEE Trans. Cybern.
**2022**, 52, 9519–9534. [Google Scholar] [CrossRef] - Skowron, M.; Orlowska-Kowalska, T.; Kowalski, C.T. Detection of Permanent Magnet Damage of PMSM Drive Based on Direct Analysis of the Stator Phase Currents Using Convolutional Neural Network. IEEE Trans. Ind. Electron.
**2022**, 69, 13665–13675. [Google Scholar] [CrossRef] - Chu, Y.; Fei, J.; Hou, S. Adaptive Global Sliding-Mode Control for Dynamic Systems Using Double Hidden Layer Recurrent Neural Network Structure. IEEE Trans. Neural Netw. Learn. Syst.
**2020**, 31, 1297–1309. [Google Scholar] [CrossRef] - Duan, J.; Jiang, Y.; Zhao, J.; Tang, Y. Design of wavelet neural network controller based on genetic algorithm. In Proceedings of the 2017 IEEE 3rd Information Technology and Mechatronics Engineering Conference (ITOEC), Chongqing, China, 3–5 October 2017; pp. 1109–1112. [Google Scholar] [CrossRef]
- El-Sousy, F.F.M.; Abuhasel, K.A. Self-organizing recurrent fuzzy wavelet neural network-based mixed H2/H∞ adaptive tracking control for uncertain two-axis motion control system. In Proceedings of the 2015 IEEE Industry Applications Society Annual Meeting, Addison, TX, USA, 18–22 October 2015; pp. 1–14. [Google Scholar] [CrossRef]
- Zawarczyński, Ł.; Stefański, T. Damping of torsional vibrations in electric drive with AC motor. In Proceedings of the 2018 International Interdisciplinary PhD Workshop (IIPhDW), Swinoujscie, Poland, 9–12 May 2018; pp. 74–80. [Google Scholar] [CrossRef]
- Qu, C.; Hu, Y.; Guo, Z.; Han, F.; Wang, X. New Sliding Mode Control Based on Tracking Differentiator and RBF Neural Network. Electronics
**2022**, 11, 3135. [Google Scholar] [CrossRef] - Nalepa, R.; Najdek, K.; Wróbel, K.; Szabat, K. Application of D-Decomposition Technique to Selection of Controller Parameters for a Two-Mass Drive System. Energies
**2020**, 13, 6614. [Google Scholar] [CrossRef] - Chen, X.; Shen, W.; Dai, M.; Cao, Z.; Jin, J.; Kapoor, A. Robust Adaptive Sliding-Mode Observer Using RBF Neural Network for Lithium-Ion Battery State of Charge Estimation in Electric Vehicles. IEEE Trans. Veh. Technol.
**2016**, 65, 1936–1947. [Google Scholar] [CrossRef] - Sun, Y.; Wang, X.; Wu, Q.; Sepheri, N. Calculation of Lyapunov exponents using Radial Basis Function networks for stability analysis of nonlinear control systems. In Proceedings of the 2011 American Control Conference, San Francisco, CA, USA, 29 June–1 July 2011; pp. 1978–1983. [Google Scholar] [CrossRef]
- Serkies, P.; Szabat, K. Predictive Control of the Two-Mass Drive with an Induction Motor for a Wide Speed Range. In Proceedings of the 2018 IEEE 18th International Power Electronics and Motion Control Conference (PEMC), Budapest, Hungary, 26–30 August 2018; pp. 750–755. [Google Scholar] [CrossRef]
- Lukichev, D.V.; Demidova, G.L.; Brock, S. Fuzzy adaptive PID control for two-mass servo-drive system with elasticity and friction. In Proceedings of the 2015 IEEE 2nd International Conference on Cybernetics (CYBCONF), Gdynia, Poland, 24–26 June 2015; pp. 443–448. [Google Scholar] [CrossRef]
- Szabat, K.; Tran-Van, T.; Kamiński, M. A Modified Fuzzy Luenberger Observer for a Two-Mass Drive System. IEEE Trans. Ind. Inform.
**2015**, 11, 531–539. [Google Scholar] [CrossRef] - Kamiński, M.; Szabat, K. Adaptive Control Structure with Neural Data Processing Applied for Electrical Drive with Elastic Shaft. Energies
**2021**, 14, 3389. [Google Scholar] [CrossRef] - Cychowski, M.; Delaney, K.; Szabat, K. Low-cost high-performance Predictive Control of drive systems with elastic coupling. In Proceedings of the 2008 13th International Power Electronics and Motion Control Conference, Poznan, Poland, 1–3 September 2008; pp. 2241–2247. [Google Scholar] [CrossRef]
- Nandana, J.; Anas, A.S. An efficient speed control method for two mass drive systems using ADALINE. In Proceedings of the 2015 International Conference on Smart Technologies and Management for Computing, Communication, Controls, Energy and Materials (ICSTM), Avadi, India, 6–8 May 2015; pp. 418–423. [Google Scholar] [CrossRef]
- Yakub, F.; Mori, Y. Intelligent control method for two-mass rotary positioning systems. In Proceedings of the SICE Annual Conference 2013, Nagoya, Japan, 14–17 September 2013; pp. 2524–2529. [Google Scholar]
- Lin, C.K. Radial basis function neural network-based adaptive critic control of induction motors. Appl. Soft Comput.
**2011**, 11, 3066–3074. [Google Scholar] [CrossRef] - Brandstetter, P.; Kuchar, M. Sensorless control of variable speed induction motor drive using RBF neural network. J. Appl. Log.
**2017**, 24, 94–108. [Google Scholar] [CrossRef] - Wu, H.; Chen, C.; Weng, K. An Energy-Efficient Strategy for Microcontrollers. Appl. Sci.
**2021**, 11, 2581. [Google Scholar] [CrossRef] - DS1103 PPC Controller Board, Hardware Installation and Configuration; dSPACE GmbH: Paderborn, Germany, 2014.

**Figure 2.**The control structure with the adaptive RBFNN speed controller applied to the two-mass drive.

**Figure 4.**Operation of the drive under nominal conditions—electromagnetic (${m}_{e}$) and torsional (${m}_{s}$) torques.

**Figure 5.**Operation of the drive with an increase in the inertia of the load machine (${T}_{2}=2{T}_{2n}$) (

**a**), with a zoom (

**b**).

**Figure 6.**Change in the adaptive parameters of the RBF neural network: weights (

**a**), centers (

**b**), widths (

**c**).

**Figure 7.**Impact of initial weights randomization: complete simulation (

**a**), initial part of the simulations (

**b**).

**Figure 8.**Influence of initial widths randomization (of radial activation functions) (

**a**), close-up of the beginning of the simulation (

**b**).

**Figure 9.**Effect of initial centers randomization (of radial activation functions) (

**a**), close-up for the beginning of the simulation (

**b**).

**Figure 10.**Different values of weight-related learning rate $\eta $ (

**a**), zoom of a selected part of simulation (

**b**).

**Figure 11.**Impact of the center-width-related learning rate $\gamma $ (

**a**), zoom of a selected part of simulation (

**b**).

**Figure 12.**Comparison of the load speed for different reference signal filters (

**a**), zoom of the selected part of simulation (

**b**).

**Figure 16.**Rotational speed of the load machine achieved with the proposed control structure—experimental results.

Parameter | Discovery Board | dSpace DS1103 |
---|---|---|

Microprocessor | Single-core CortexM4F @ 168 MHz | Single-core PowerPC 750GX @ 1 GHz |

RAM size | 192 kB | 32 MB |

Analog-to-Digital converter | 3 × 12 bit | 16 × 16 bit |

Digital-to-Analog converter | 2 × 12 bit | 8 × 16 bit |

Serial port | 4 × UART | 1 × UART |

GPIO ports | 75 | 32 |

Timers | 12 × 16 bit + 2 × 32 bit | 2 × 32 bit + 1 × 64 bit |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 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**

Malarczyk, M.; Zychlewicz, M.; Stanislawski, R.; Kaminski, M.
Low-Cost Implementation of an Adaptive Neural Network Controller for a Drive with an Elastic Shaft. *Signals* **2023**, *4*, 56-72.
https://doi.org/10.3390/signals4010003

**AMA Style**

Malarczyk M, Zychlewicz M, Stanislawski R, Kaminski M.
Low-Cost Implementation of an Adaptive Neural Network Controller for a Drive with an Elastic Shaft. *Signals*. 2023; 4(1):56-72.
https://doi.org/10.3390/signals4010003

**Chicago/Turabian Style**

Malarczyk, Mateusz, Mateusz Zychlewicz, Radoslaw Stanislawski, and Marcin Kaminski.
2023. "Low-Cost Implementation of an Adaptive Neural Network Controller for a Drive with an Elastic Shaft" *Signals* 4, no. 1: 56-72.
https://doi.org/10.3390/signals4010003