Sie sind auf Seite 1von 6

287

DC Servo Motor Controllers Based on a Neural Network

C K Lee, T H M Chow, D K W Cheng

Hong Kong Polytechnic, Hong Kong.

Abstracl 5.,V Therefore, output transistors Q2 and Q4 do not


conduct while V1 is within this region. Nonlinear
This paper presents a methodology of developing a inputloutput element of which the characteristic is
neural network based discrete time position servo motor shown in Fig. lb, will unavoidablybe introduced into the
controller. The motor driving circuit is non-linear in system. The introduction of such nonlinear elements
nature and it is characterised by "dead-zone"and "satura- violates the linear control theories which have been
tion" features. Firstly, we analyse how motor operations developed for this system.
are affected when the system is operated in closed-loop
with such kind of undesirable phenomena. Secondly, we Vmotor
illustrate this system being controlled by a neural net-
work based servo motor controller.

Simulation results show that the steady-state error of the


closed-loop system is related to the "dead zone" of the
motor driving circuit. For the neural controller system,
the steady-state error is not affected by the "dead zone"
of the motor driving circuit.
1. Introduction

Fast position servo systems require rapid acceleration


and deceleration capabilities from the motors, which in
turn need a driver that can provide bidirectional driving
voltages. Different control algorithms are used to implement the
motor controller. Control algorithms like the PID, vari-
+VCC
able structure, self-tuning and model reference have
been employed for various applications. However, in
order to get a satisfactory result, the system designer
needs to know clearly and excatly the plant dynamics.
But, due to the fact that usually, the dynamics of many
plants are not completelyknown, very often, their control
methods can only be vaguely formulated. In fact, there is
nostandard method to solve the motor control problems
when uncertainties occur.

In recent years, research works in artificial neural net-


works increase rapidly, mainly because their learning
and recalling capabilities attract much attentions from
researchers in various fields. Neural networks are
trained with examples. Trained neural networks know to
respond in a way that it was taught in the past lessons.
This raises the interests of the control people as control-
lers based on neural networks can learn to control a plant
by past experiences. Besides, as neural networks are built
with neurons that usually modelled by a nonlinear sig-
Fig. l a Linear bidirectional motor driver mod function, they can sometimes perform very compli-
cated operations and hence, they can be adopted to
The configuration of one of such linear bidirectional control some nonlinear systems [2,3].
motor drivers [l]is shown in Fig. la. As voltage V1 U
varied, neither 01nor Q3conducts so long as -V, 5 Vi
288

To control a position servo system of the above men- To model the nonlinear driving circuit, a MATLAB .m
tioned bidirectional driver, we need to divide the task function is written while its function is written as shown
into two stages. They are in the Box 1.
1. to analyse how motor operations are affected by such
if VI > Vmax-input, VI = Vmax-input;
a nonlinear motor driver; and
2. to control the same system by a neural network based
if VI < -Vmax-input, VI = Vmax-input;
controller.
This paper describes our procedures to carry out the if VI > Vdead-zone, Vmntnr (VI - Vdead-zone)*gain;
,
~

work for these two stages. Generally speaking, we have end


adopted the method from Li and Slotine (21 in the second i
stage. ifvl < -Vdead-znne, vmolnr = (VI + Vdead-zone)*gain"
2. Experimental system

Fig. 2 shows a system configuration of the motor together


with the bidirectional motor driver. The characteristic of
the motor driver is already shown in Fig. lb. Box 1 .m function to simulate the nonlinear drive

3.2 Sbiiulation results


The system shown in Fig. 3 was simulated under the
MATLAB environment. Fig. 4a depicts the step
response of the system. Fig. 4b shows the corresponding
error input to the nonlinear drivingcircuit and its output.

Fig. 2 Motor drive system

As shown in Fig. lb, the amplifier outputs a zero voltage


when the input is Less than ZVdead zone. The linear gain
of the amplifier is ?gain. The supply voltages to the
amplifier are fmed at ?Vcc. Fig. 3 Closed-loop operation of the system
3. Closed-loop operation of the system
In Fig. 4a, the response of the system shows that the
Here, we analyse the effects of the motor when the system is underdamped and there is a steady state error
nonlinear motor driver and motor are in closed-loop. of 0.1703 rad. in shaft position. In Figure 4b, we observe
that the error input when the time equals 0.21 sec. or
3.1 Planf modelling onwards, is within the dead zone of the non-linear driv-
ing circuit, so the output of the driving circuit is zero.
Fig. 3 shows the block diagram of the system in a closed-
loop form. We model the motor using the state-transition 4. Motor control by a neural network based motor con-
equation [4] and its response is given by Equ. (1). troller
X(l) = @(t - tO)X(lO) Here, we describe our approach to control the system by
using a neural network based motor controller. We
employ a neural network using backpropagation learn-
ing method.

A backpropagation neural network system, as shown in


where @(r) = L-'[(sl - A)-'], Fig. 5, consists of multiple inputs and outputs neurons
W(r) is the disturbance. which are simple and similar processing elements. By
changing the weights in the network the behaviour of the
289

35 , . I I 3 , 1 ,
r~.... Weights ---,

3- ..................................
................................................. I8

i
! 1)
6 15
x

0
Dabred positions

Controlled pos!tions
Inputs

05 lnprt k v r H i " layer mpu layer


Fig. 5 Neural network structure
Ol.'0 005
'
01 015
' '
02 025
'
03
'
035
' '
04 045
' 1
05
5. Training the Neural Motor Controller
lime (sec )
Fig. 4a Undamped system response To train the neural motor controller, we need togenerate
training data. The training data is the information of the
3 , . . . . . . . . motor and driver dynamics. The following points need to
be considered when preparing the data.
25
1. Since neural networks are capable of performing
actions similar to what it has learned before, the
designer should decide the types of operations and
to what extent the controller is required to carry out
the control.
In our case, the controller was trained to control the
motor up to a shaft position of 2n rad.

; ot
a
: .. ...................................
t ................. i
.&* 2. In order to reduce the training time, the amount of
training data should be as small as possible. How-
-051

I1
0 005
6* '
'=='
01 015
'
02
'
025
'
03
'
035
'
Ok
'
045
'
1'
05
ever, insufficient amount of data or informaton
about the plant will definitely affect the performance
of the trained controller.
Time (sec.) T o solve this, the designer should find out
Fig. 4b Error signal beforehand what sorts of operations are required for
the motor, which depend on its applications. Thus,
whole network will be altered. The goal is to change the he can then generate training data at or near these
weights of the network so that a desired inputloutput operating regions.
relationship is achieved. This process is known as train-
ing the network. 5.1 Neural network control method

4.1 Training of neural networks The neural network control method from Li and Slotine
[2] is adopted in this paper. Its characteristics are briefly
The training of the neural network is that, given a set of described as follows.
input training patterns, a set of weights is found so that a 1. State-space representation is used for the nonlinear
prefined objective can be achieved within minimal error. plant model. Fig. 6a is a state-space representation
The training of neural networks usually involves two of the nonlinear plant. The next states of the plant
steps. ZI, + 1 are determined from the present states of the
Step 1. The input training patterns are sent to the input plant, zk,the present inputs,Uk, and the time dura-
of the network. tion, dt.
Step 2. Based on the errors of the neuron outputs and 2. Each set of Uk, zk and Zk+1 describes the dynamics
the desired outputs, the weights are updated of the plant at a certain operating conditions. If the
according to an adopted learning rule. states and inputs of the plant are rearranged as
shown in Fig. 6b, then it is a discrete time controller
which is capable of calculating the present inputs
when it is given the present states and the desired
next states.
290

resent states no.1 Next states no. 1


(Input to train the controller) I
I
Random input no. 1
(Desired output from the controller) 1
I
Iresent states no.2 Next states no.2 I
I (Input to train the controller) ~

Random input no. 2


(Desired output from the controller)

Fig. 6a Nonlinear plant state space representation

Box 2 Arrangement of the training data

5. Training the controller

The training was carried out using a neural networks


simulation software, Neuralworks Professional 11, in a
Discrete time 80386 computer system. 650 pairs of data were used to
-
~

controller L - U, train a 10 hidden neurons backpropagation neural net-


work.
zd@+i,+ k ' ( ' ,'d,k+l) Pdt) I The neural controller has four inputs. Two of them are
the present motor position and speed, while the other
two are the desired motor position and speed after one
time duration. 5,000,000trainings were carried out using
Fig. 6b Discrete time neural controller these 650 pairs of data. It took approximately 24 hours to
complete the training.
6. Testing
5.2 Generatioil of rlie trainiiig dala
The controller and the plant was simulated under MAT-
Fig. 7 is the block diagram showing the process of data LAB environment. To simulate the controller, the
generation. Random inputs of positive and negative weights from the trained controller were used. In Feed-
values were generated, but they were limited in the range forward (or Recall) operations of the controller, output
of kmu-input. The two present states are the present of the of the controller is calculated using Equ. (2) to (5).
position and present speed of the motor.
111 = (WIH * IdT (2)
OH = Sigmod(1H) (3)
10 = OH * WHO (4)
00 = Sigmod(l0) (5)
where IH E R'"' (Inputs to Hidden layer);
WIH € R'0'4 (Weights, from Input layer to Hid-
den layer);
I[E R4" (Inputs to Input layer);
OH E R"" (Outputs from Hidden layer);
Io E R"' (Inputs to Output layer);
WHO E R'O" (Weights, from Hidder layer to
Output layer);
Fig. 7 Training data generation 00 E R"' (Output from Output layer);
Sigmod(x) = (1 + e-')-'.
The two next states are the motor position and motor
speed after one time duration. The generated training To test the controller, different sets of desired motor
data were arranged as s h o w in Box 2. positions/speedsdatawere prepared. Note that since the
controller was trained to control motor positions up to
291

2n radians only, the desired motor positions should not


exceed 2n radians.
7. Results and discussions

Fi.8a shows the desired and controlled motor shaft


positions. Fig.8b shows the neural motor controller and
nonlinear driver output. Note that v&d-mm and V, of
the driver were set at 20.25V and 1OV. respectively, I Desired wsdimr
andthegainoftheamplifierwereset at 240.Figs.9aand
o Coddled p l s n r
9b show similar outputs but there is no overshoot in the
desired motor shaft positions.
Stew-%le error = 0 03847 rod
4 . . . . . I . , .

351 .; 0 0.05 0.1 0.15 0.2 0.25 03 0.35 04 045 05

h e (sec )
Fig. 9a Motor shaft position

*
..I ' ' ' ' ' ' ' ' :
I
i
i - 05 i
t9 t
+ + + t i

05- I

I
1
j
D 005 01 015 02 025 05 035 04 045 05

h e (sec j
2 02
Fig. 9b Motor controller and driver ouptuts

< -02-
t
t Cmlrollet e/p
generate approximately correct outputs to the sys-
tem; and
-01-
+ I I h\mpllW o/p(/iO) 3. the controller cannot cope with the changes in sys-
U
0
-0.6. tem parameters, such as changes in the payload,
friction, damping,
8. Conclusions
0 005 01 015 02 025 03 035 04 045 05
A discrete time position servo motor controller based on
Time (sec) a neural network was developed. The motor driving
Fig. 8b motor controller and driver outputs circuit is nonlinear in nature and is characterised by
"dead zone" and "saturation". It reveals that when the
From the results, we found that driver and motor are operated in a closed-loop form, the
steady-state error is related to the "dead-zone" of the
1. the steady-state error of the system is not affected by motor driving circuit. However, for the neural motor
the vdead-mne of the motor driving circuit; controller controlled system, the steady-stateerror is not
2. even though some of the motor dynamics were not affected by the "dead-zone"of the motor driving circuit.
taught to the controller before, when it is required to The control actions are based on the plant dynamics
carry out these actions, the controller can still learned beforehand. A small steady-state is always
292

resulted regardless of the magnitude of the motor driving


circuit dead-zone.
References
1. R. Schmidt, "LinearDC Servo Amplifiers",edited by
B. C. Kuo, in Incremental Motion Control: volume
1, SRL Publishing Company, 1978, pp. 152-179.
2. Weiping Li and Jean-Jacques E. Slotine, "Neural
Network Control of unknown Nonlinear Systems",
Proceedings of the 1989 American Control Con-
ference, Pittsburgh, USA, June 21-23,1989, pp.1136-
1141.
3. Derrick H. Nguyen, Bernard Widrow, "Neural Net-
works for Self-learning control control systems",
IEEE Control Systems Magazine, Vol.10, No.3,
April 1990, pp.18-23.
4. B. C. Kuo, Automatic Control Systems, Prentice-
Hall, 6/e, 1991, pp.211-217.

Das könnte Ihnen auch gefallen