# Neural Network Control-Based Drive Design of Servomotor and Its Application to Automatic Guided Vehicle

Authors: Ming-Shyan Wang; Seng-Chi Chen; Po-Hsiang Chuang; Shih-Yu Wu; Fu-Shung Hsu
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

An automatic guided vehicle (AGV) is extensively used for productions in a flexible manufacture system with high efficiency and high flexibility. A servomotor-based AGV is designed and implemented in this paper. In order to steer the AGV to go along a predefined path with corner or arc, the conventional proportional-integral-derivative (PID) control is used in the system. However, it is difficult to tune PID gains at various conditions. As a result, the neural network (NN) control is considered to assist the PID control for gain tuning. The experimental results are first provided to verify the correctness of the neural network plus PID control for 400 W-motor control system. Secondly, the AGV includes two sets of the designed motor systems and CAN BUS transmission so that it can move along the straight line and curve paths shown in the taped videos.


---

## Body

## 1. Introduction

There is no doubt about the importance and popularity of an automatic guided vehicle (AGV) in a flexible manufacture system and an automatic warehousing system. There are many research topics on AGV, such as an inductive power transfer (IPT) system [1] that transfers power from one circuit to another through electromagnetic induction without any physical contact, wireless position tracking by radio frequency identification (RFID) method [2] that is cost-effective, precise docking maneuvers to pick up or deliver the transport load by control techniques—fuzzy, vector pursuit, and flatness-based control to satisfy the robustness requirements [3], and landmark-based localization techniques to receive considerable attention in providing accurate location estimates [4], and so forth. The AGV based on an electric actuation system will provide a very important advantage during carriage transportation, free of air pollution.Based on the back electromotive forces (EMFs), there are two types of servomotors, the permanent magnet synchronous motor (PMSM) with sinusoidal waveform, and the brushless DC motor (BLDCM) with trapezoidal one. They are more widely applied than before in the servo-control-systems. Comparing with the traditional DC motor and induction motor, the BLDCM provides the merits of no brushes, low consumption, low volume, better stability, and larger torque. Furthermore, BLDCM uses the Hall-effect sensors as position sensors for feedback control rather than the expensive encoders used by PMSM. As a result, BLDCMs are popular in industrial automation systems, such as modern electric vehicles [5], automotive returnless fuel pumps [6], appliances, computers, automatic office machines, manufactory robots for automation, drives of many electronics and minuteness machines.In this paper, two BLDCMs are adopted in the designed AGV prototype.However, due to using low-cost Hall-effect sensors, BLDCMs are driven by using six-step commutation strategy, which nevertheless accompanies larger torque ripple and less smoothing rotation. On speed computing, the simplest and most popular one is M method that counts the number of the Hall-effect sensors’ outputs in a fixed speed sampling period to estimate the averaged speed. T method measures the velocity by counting high-frequency clock pulses in one Hall-effect sensor’s output interval time [7]. M method is only suitable at very high speed. T method is usable at medium speed area. These problems have motivated research in the area of motor design [5] and sinusoidal exciting algorithm [8]. In spite of sinusoidal excitation, we will adopt the neural network control to compensate the traditional proportional-integral-derivative (PID) gains for speed adjustment such that we can regulate the speed around the predefined path with corner and/or arc.Recently, artificial neural networks (ANNs) have attracted much attention to their possible use in a wide range of engineering applications like power electronics and motor drives [9–14]. The use of ANNs is motivated by their useful features such as parallel distributed architecture, ability to identify nonlinear system dynamics, and the ability to learn, generalize, and adapt. All of these features justify the use of ANNs for motor drive applications.The motor speed will be regulated through the pulse-width modulation (PWM) which is generated by dsPIC33EP64MC506 [15], a product from Microchip Technology Inc. This microcontroller includes the enhanced controller area network (ECAN) bus for communication. CAN was developed by Bosch to overcome the limitations of conventional control device linkage and vehicle optimization for future developments. It has also been standardized internationally (ISO 11898) and has been “cast in silicon” by several semiconductor manufacturers. Two sets of motors and drives with a central control unit which handles all of the commands of motion constitute the designed AGV prototype. The proposed AGV system can stably go along the straight line and across the corner with the appropriate speed.This paper presents a neural network based approach to the speed control of the BLDC motor. The basic premise of the method is that an ANN provides a very efficient mapping structure for the nonlinear BLDC motor. By measuring the speed and excitation by PID control to apply them as inputs to the NN, exciting signal is adjusted, thereby facilitating the elimination of the speed variation. The paper is organized as follows for further discussion. Section2 introduces system description including BLDCM modeling and speed control by PID and ANN. Section 3 consists of experimental results. Finally, conclusions are given in Section 4.


## 2. Servosystem Design

There are three parts for the proposed servo-control-system design, PMSM modeling, sliding-mode observer (SMO) with LMS approach, and PI speed control compensated by neural networks.


### 2.1. BLDCM Modeling

The voltage equation and mechanic equation of a BLDCM are given as follows [5–7]: (1)vuvvvw=R000R000Riuiviw+ddtL-M000L-M000L-Miuiviw+euevew,dωrdt=1JT-TL-Bωr,where vu, vv, and vw are voltages of phases of u, v, and w;  iu, iv, and iw are currents of phases of u, v, and w; eu, ev, and ew are back electromagnetic forces of phases of u, v, and w; TL and T are load torque and the output torque of the motor; ωr is the motor speed; and R, L, and M are the resistance, phase inductance and mutual inductance; and J and B are the inertia of momentum and viscous coefficient. Figure 1 shows the general block diagram of control system for BLDCM with an inverter which consists of six power MOSFETs as switching devices for commutation. Three Hall-effect sensors are also shown.Figure 1
Block diagram of the BLDC motor control system.


### 2.2. Speed Control Design

The PID control is first considered in the system,(2)Gss=Kp+Kis+Kds,where Kp, Ki, and Kd are the proportional gain, integral gain, and derivative gain, respectively. PID control is widely used in the industrial applications. However, it cannot cope with the load variation or parameter variation well. In the paper, the radial basis function network (RBFN) is utilized to compensate the PID control quantities.Artificial neural networks are similar to biological NNs in the sense that they are based on the same principle of operation of highly parallel structure and acquiring knowledge through a learning process [16]. The building blocks of an ANN are simple computational nodes, called neurons. They are connected into a network structure by weighted connections, much like the synaptic connections in the human brain. Although the components of an NN are simple and few, the structure and type of these networks vary greatly, determined by the ever increasing interest in this research field. RBFN always includes three layers: the input layer, the hidden layer, and the output layer as shown in Figure 2. The input vector is(3)x=Δu(k)yp(k)yp(k-1)T,where yp(k) is the motor speed at the instant of k and Δu(k) is the difference between the actuating signals at the instants of k and k-1. The activation function is(4)hj=exp⁡-x-cj22bj2,where cj=[cj1cj2⋯cjn]T and bj are the center of the jth neuron at the hidden layer and bias, respectively. And the output of the RBFN is given as(5)yRBFN=w1h1+w2h2+⋯+wmhm=∑j=1mwjhj,where wj is the weighting factor of the jth neuron at the hidden layer. The experimental block diagram of the BLDCM control system with RBFN is shown in Figure 3.Figure 2
Architecture of the RBFN.Figure 3
Block diagram with RBFN.


### 2.3. Motion Control of AGV

On rotation of AGV with the centerO, in Figure 4, point Q stands for the center between left and right driving wheels, point Q′ for the new position of Q after vehicle traveling Δt and b for the half distance between two wheels, respectively. The distances of left wheel, right wheel, and Q to Q′ after vehicle traveling Δt are denoted by dl, dr, and d0, respectively, and can be expressed as follows [17]:(6)dl=rl·Δθ=Vl·Δt,(7)dr=rr·Δθ=Vr·Δt,(8)d0=r·Δθ=Vavg·Δt,where Vl and Vr are the speeds of left and right driving wheels and Vavg is their average value, rl, rr, and r are the radii of the rotation along O, and Δθ is a rotating angle. As a result, we have the angular speed of the AGV and the displacements in x and y axes:(9)ω=ΔθΔt=Vr-Vl2b,Δx=r·cos⁡Δθ-r,Δy=r·sinΔθ,where (10)r=Vr+Vl·bVr-Vl.With the above information, we can direct the rotating motion of the AGV.Figure 4
Rotating motion.


## 2.1. BLDCM Modeling

The voltage equation and mechanic equation of a BLDCM are given as follows [5–7]: (1)vuvvvw=R000R000Riuiviw+ddtL-M000L-M000L-Miuiviw+euevew,dωrdt=1JT-TL-Bωr,where vu, vv, and vw are voltages of phases of u, v, and w;  iu, iv, and iw are currents of phases of u, v, and w; eu, ev, and ew are back electromagnetic forces of phases of u, v, and w; TL and T are load torque and the output torque of the motor; ωr is the motor speed; and R, L, and M are the resistance, phase inductance and mutual inductance; and J and B are the inertia of momentum and viscous coefficient. Figure 1 shows the general block diagram of control system for BLDCM with an inverter which consists of six power MOSFETs as switching devices for commutation. Three Hall-effect sensors are also shown.Figure 1
Block diagram of the BLDC motor control system.


## 2.2. Speed Control Design

The PID control is first considered in the system,(2)Gss=Kp+Kis+Kds,where Kp, Ki, and Kd are the proportional gain, integral gain, and derivative gain, respectively. PID control is widely used in the industrial applications. However, it cannot cope with the load variation or parameter variation well. In the paper, the radial basis function network (RBFN) is utilized to compensate the PID control quantities.Artificial neural networks are similar to biological NNs in the sense that they are based on the same principle of operation of highly parallel structure and acquiring knowledge through a learning process [16]. The building blocks of an ANN are simple computational nodes, called neurons. They are connected into a network structure by weighted connections, much like the synaptic connections in the human brain. Although the components of an NN are simple and few, the structure and type of these networks vary greatly, determined by the ever increasing interest in this research field. RBFN always includes three layers: the input layer, the hidden layer, and the output layer as shown in Figure 2. The input vector is(3)x=Δu(k)yp(k)yp(k-1)T,where yp(k) is the motor speed at the instant of k and Δu(k) is the difference between the actuating signals at the instants of k and k-1. The activation function is(4)hj=exp⁡-x-cj22bj2,where cj=[cj1cj2⋯cjn]T and bj are the center of the jth neuron at the hidden layer and bias, respectively. And the output of the RBFN is given as(5)yRBFN=w1h1+w2h2+⋯+wmhm=∑j=1mwjhj,where wj is the weighting factor of the jth neuron at the hidden layer. The experimental block diagram of the BLDCM control system with RBFN is shown in Figure 3.Figure 2
Architecture of the RBFN.Figure 3
Block diagram with RBFN.


## 2.3. Motion Control of AGV

On rotation of AGV with the centerO, in Figure 4, point Q stands for the center between left and right driving wheels, point Q′ for the new position of Q after vehicle traveling Δt and b for the half distance between two wheels, respectively. The distances of left wheel, right wheel, and Q to Q′ after vehicle traveling Δt are denoted by dl, dr, and d0, respectively, and can be expressed as follows [17]:(6)dl=rl·Δθ=Vl·Δt,(7)dr=rr·Δθ=Vr·Δt,(8)d0=r·Δθ=Vavg·Δt,where Vl and Vr are the speeds of left and right driving wheels and Vavg is their average value, rl, rr, and r are the radii of the rotation along O, and Δθ is a rotating angle. As a result, we have the angular speed of the AGV and the displacements in x and y axes:(9)ω=ΔθΔt=Vr-Vl2b,Δx=r·cos⁡Δθ-r,Δy=r·sinΔθ,where (10)r=Vr+Vl·bVr-Vl.With the above information, we can direct the rotating motion of the AGV.Figure 4
Rotating motion.


## 3. Experimental Results

The rated parameters of BLDC motor are power of 400 W, input voltage of 24 V, current of 16 A, speed of 2500 rpm, torque of 1.53 Nm, and 8 poles. After training, the chosen topology is given to achieve good performance with minimal resources. After PID gain tuning [18] at speed of 300 rpm, we have the values for Kp=0.1, Ki=0.01, and Kd=0.001. Figure 5 displays speed responses of 300 rpm at no load (blue curve) and the load of 500 g disc (red one). It is easy to find the accuracy by PID control and very small difference under loading. The step speed responses of 1200 rpm are shown in Figure 6 with the same conditions in Figure 5. The speed difference of both cases increases. Figure 7 depicts those at 2000 rpm. The shortcoming of PID control is easily found. With RBFN adopted in the system, Figure 8 shows the speed response of 2000 rpm at the load of 500 g disc, which is very approaching that of no load in Figure 7.Figure 5
Step responses of 300 rpm by PID control without (blue curve) and with loading (red one).Figure 6
Step responses of 1200 rpm by PID control without (blue curve) and with loading (red one).Figure 7
Step responses of 2000 rpm by PID control without (blue curve) and with loading (red one).Figure 8
Step response of 2000 rpm by PID control compensated by RBFN with loading.The pictures of the AGV prototype are shown in Figure9, which consists of two BLCDM systems mentioned above, two batteries, and the third microcontroller for control center. The communication among these three microcontrollers is by CAN bus whose architecture is displayed in Figure 10. The block diagram of the AGV prototype is shown in Figure 11. Figure 12 displays the simultaneous speed responses of 300 rpm for left (red) and right (blue) wheels. We can find that the speed differences are small so that the vehicle is able to move along a straight line. Figures 13(a)–13(n) are the taped videos to show the motion along the line and arc. The experimental results have verified the designed AGV prototype with fundamental functions for real situations.Figure 9
The pictures of the AGV prototype.Figure 10
The architecture of CAN bus.Figure 11
The block diagram of the AGV prototype.Figure 12
The simultaneous speed responses of 300 rpm for left (red) and right (blue) wheels.Figure 13
The taped videos to show the motion along the line and arc.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
(n)


## 4. Conclusions

This paper presents an approach based on neural networks to compensate PID control gains for speed control of BLDCMs. The suggested method is useful for applications to reduce cost. The experimental results show that the controlled system is capable of achieving excellent speed response with loading and at full speed range within acceptable limits for many applications.



---

*Source: 612932-2015-10-11.xml*