# Low-Cost Implementation of an Adaptive Neural Network Controller for a Drive with an Elastic Shaft  
[PERSON]  
[PERSON], [PERSON], [PERSON]; [PERSON], [PERSON]; [PERSON], [PERSON] Low-Cost Implementation of an Adaptive Neural Network Controller for a Drive with an Elastic Shaft. [PERSON]  
[PERSON], [PERSON], [PERSON]; [PERSON], [PERSON] the improvement in processing power, new ways of programming embedded devices have been developed. Instructions of low-level programming languages, such as Assembly, strongly correspond to the hardware design of the microcontroller. Although this feature gives developers the ability to manually assign resources to a given task, higher-level languages gain more popularity due to better code readability and reuse. Recently, visual programming languages have been used to synthesize control structures and perform Hardware-in-the-Loop verifications [14; 15; 16; 17]. Among programming environments that offer such a possibility, Simulink and LabVIEW can be listed. They include code generators that use the created model to produce high-level language code. After compilation, the code can be loaded into a DSP. The additional advantage of visual programming languages is a possibility for program development without high user expertise [18]. The high precision and dynamics of the drive are one of the most basic requirements of modern electrical drives. The two interconnected machines with a long shaft are seen in many industrial applications, such as rolling mills [19; 20], wind turbines [21], or industrial robots [22; 23]. Due to the complexity of their mechanical construction, it can sometimes be difficult to achieve the aforementioned conditions [24]. Forces acting on the elastic shaft lead to a difference between the speeds of the two motors and the oscillations of the state variables [25; 26; 27]. To overcome these phenomena, many strategies have been developed. PI control schemes with a combination of feedbacks from different state variables have been proposed [28; 29]. It has been shown that additional feedback loops can reduce the oscillations of state variables in two-mass drives by setting a desired value of the damping coefficient. The state controllers have also been implemented with great success [30]. The state-space controller is promising when the drive parameters do not change over time. The controller should be updated continuously with new gains suitable for the time constant of the drive. Such an approach requires an additional observer [31] that calculates the new value of the time constant. On the other hand, an adaptive state-space controller can be employed. The gains of the state controller are repeatedly updated [32; 33; 34]. Adaptive controllers are growing in popularity because they can operate well under different conditions of the drive. The presently most advanced adaptive algorithms include neural network structures [35]. They can be divided into multiple groups. The most basic distinction is based on the learning process -- online neural networks [36] work by continuously updating weights based on the data from the previous sample time. Data are constantly fed to the network, and weights and the output are updated based on the chosen learning algorithm. Offline networks [37] work based on large previously gathered data sets. These sets are fed into the network which finds the correlation between the points, and finally, weights can be adjusted. The points provided for offline learning should cover all possible states of the drive so that the output can be generated for different operating points. Another distinction can be made regarding the activation function of the network. The most common neural networks employ sigmoidal transfer functions [38], whose output range can vary based on the application. Wavelet neural networks [39] consist of neurons with wavelet activation functions in the hidden layers of the network. It can be used in different applications as estimators [40] or controllers [41].