Disclosure of Invention
The invention aims to provide an intelligent robot based on fuzzy logic, which has better control performance.
In order to achieve the purpose, the invention provides an intelligent robot based on fuzzy logic, which comprises a vehicle body and a control system, wherein the vehicle body at least comprises a left wheel and a right wheel, and the control system is used for providing speed control signals for the left wheel and the right wheel; the fuzzy logic module generates an estimated value for adjusting the parameters of the neural network module according to the parameters of the neural network module, the learning rate and a filtering vector consisting of error estimation signals.
Preferably, the neural network module includes an input layer, a function layer, a fault judgment layer, a rule layer, and an output layer, wherein,
the input layer outputs an error signal e of an error estimation module 1 Error signal e 2 And their derivatives e' 1 And e' 2 Transmitting to the function layer;
the output of the function layer is:
in the formula:
respectively the central point and the bandwidth of the Gaussian function; x is the number of
i (n)={e
1 (n) e
2 (n) e′
1 (n) e′
2 (n)};
For the last function layer output, i is 1, …, n
i ;j=1,…,n
j ,n
i For the number of input signals of the function layer, n
j The number of transitions for each input signal for the functional layer;
is a structural weight value;
the decision layer decides whether the functional layer output is delivered to the regular layer according to:
wherein β is a constant;
the signals output by the rule layer are:
in the formula (I), the compound is shown in the specification,
the weight between the rule layer and the judgment layer; k is 1, …, n
y ,n
y Is the number of regular layer neurons;
the output signal of the output layer is:
in the formula:
is the weight between the output layer and the rule layer; and a is r, l is the number of output signals of the output layer, and is written in a matrix form as follows:
wherein W ═ W
r W
l ]
T ,
Preferably, the fuzzy logic module adjusts parameters of the neural network according to the following rules:
if it is used
Or (a)
And is
) Then using the estimated adjustment parameters
Adjusting W of the neural network module;
if it is not
And is
Then use the estimated tuning parameters
Adjusting the W of the whole neural network module;
if it is not
Or (a)
And is provided with
) Then using the estimated adjustment parameters
Adjusting M of the data neural network module;
if it is not
And is
Then using the estimated tuning parameters
Adjusting M of the data neural network module;
if it is not
Or (a)
And is
Then using the estimated tuning parameters
Adjusting S of the neural network module;
if it is not
And is
Then using the estimated tuning parameters
Adjusting S of the neural network module;
if it is not
Or
And is
Then the tuning parameters are estimated
Adjusting alpha of the neural network module;
if it is not
And is
Then the tuning parameters are estimated
The alpha of the whole neural network module is,
in the formula (I), the compound is shown in the specification,
η
m 、η
w 、η
s 、η
α is the learning rate; b
m 、b
w 、b
s 、b
α Is the upper bound of the parameter;
E=[e
1 e
2 e′
1 e′
2 ]
T (ii) a A is a constant matrix;
and
are respectively W
r And W
l An estimate of the ideal value;
and
are respectively s
r And s
l An estimate of the value of the ideal value,
and
are each alpha
r And alpha
l An estimate of the value of the ideal value,
an estimation matrix of L.
Preferably, the servo mechanism comprises at least a first motor and a second motor, said first motor and second motor being arranged inside the magnetic cylinder with both ends open.
Preferably, the rotor a of the first motor is provided with a plurality of first permanent magnets at equal intervals on the periphery of the rotor core, and all the first permanent magnets are provided with N poles facing outwards and S poles facing inwards; a rotor of the second motor is provided with a plurality of second permanent magnets at equal intervals on the periphery of a rotor core, the S poles of the second permanent magnets face the outer side, and the N poles of the second permanent magnets face the inner side; the rotor shaft of the first motor and the rotor shaft of the second motor are coupled to each other so as to rotate independently of each other, and are rotatable independently of each other.
Preferably, an adjusting coil is arranged on the rotor shaft between the rotor of the first electrical machine and the rotor of the second electrical machine
Compared with the prior art, the fuzzy logic intelligent robot provided by the invention has better control performance and low cost.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly stated or limited, the terms "connected" and "connected" should be interpreted broadly, and for example, they may be fixedly connected, detachably connected, or integrally connected, directly connected, indirectly connected through an intermediate medium, or communicated between two elements, and those skilled in the art may understand the specific meaning of the terms in the present invention according to specific situations.
The intelligent robot based on the neural network comprises a vehicle body servo mechanism and a control system, wherein the control system is used for providing a control signal for the vehicle body servo mechanism so as to enable the vehicle body servo mechanism to operate according to the control signal.
Fig. 1 is a schematic diagram of a vehicle body of an intelligent robot provided by the present invention, and as shown in fig. 1, the vehicle body includes two driving wheels (a left wheel and a right wheel) and an auxiliary wheel, where the left wheel and the right wheel are respectively driven by two independent servo motors or by a combined motor provided by the present invention, a distance between the two driving wheels is 2b, a radius of the left wheel and the right wheel is r, and C is a centroid position of the vehicle body. In the invention, a vehicle body coordinate system XPY is set, wherein an X axis passes through a centroid C and is perpendicular to a wheel axle connecting a left wheel and a right wheel, a Y axis is coincident with the wheel axle, and an origin P is an intersection point of the X axis and the Y axis. Assuming that the environment coordinate system of the environment where the robot is located is UOV, the environment coordinate system and the vehicle body coordinate system are in the same plane, and the position of the robot vehicle body in the environment coordinate system can be expressed as p ═ u v θ] T 。
The dynamic equation of the robot car body in the environment coordinate system can be expressed as:
wherein the content of the first and second substances,
in the formula, p is the position of the robot in an environment coordinate system; v. of r ,v l Speed of the left and right wheels of the vehicle body, d 1 ,d 2 ,d 3 Respectively, as an external disturbance.
For ease of analysis, the following transformation matrix is multiplied by the dynamic equation:
the dynamic equation then translates into:
fig. 2 is a block diagram of a control system of an intelligent robot based on fuzzy logic according to the present invention, as shown in fig. 1, the control system includes an error estimation module 400, a neural network module 100 and a fuzzy logic module 300, the error estimation module 400 generates an error estimation signal according to the position and direction of the robot, the neural network module 100 generates speed control signals for controlling the left wheel and the right wheel of a servo of a robot body 200 according to the error estimation signal and a differential signal thereof; the fuzzy logic module 300 generates an estimate of the parameters of the adaptive neural network module 100 based on the neural network module parameters, the learning rate, and a filter vector comprised of the error estimation signals.
The error vector and the corresponding filter vector output by the error estimation module 400 are:
in the formula u
d ,v
d The reference position of the vehicle body in the environment coordinate system;
according to the subponol function:
wherein the constant matrix G is selected such that
Is a positive definite matrix, the differential over time is:
for stable operation of the system, the control commands are as follows:
κ is a constant, so:
due to V 1 ' is negative, the control system is asymptotically stable. However, the precise value of the unknown interference term is difficult to obtain, so the invention adopts the fuzzy control module to adjust the parameters of the neural network module by using the subsequent rule so as to achieve good control performance.
Fig. 3 is a block diagram of a neural network module provided in the present invention, and as shown in fig. 3, the neural network module 100 includes: the neural network module comprises an input layer, a function layer, a fault judging layer, a rule layer and an output layer, wherein,
the input layer outputs the error estimation moduleDerived error signal e 1 Error signal e 2 And their derivatives e' 1 And e' 2 Transmitting to the function layer;
the output of the function layer is:
in the formula:
respectively the central point and the bandwidth of the Gaussian function;
is a structural weight value; x is the number of
i (n)={e
1 (n) e
2 (n) e′
1 (n) e′
2 (n)};
For the last function layer output, i is 1, …, n
i ;j=1,…,n
j ,n
i For the number of input signals of the function layer, n
j The number of transitions per input signal for the functional layer;
the decision layer decides whether the functional layer output is delivered to the regular layer according to:
in the formula (I), the compound is shown in the specification,
beta is a constant.
The signals output by the rule layer are:
in the formula (I), the compound is shown in the specification,
the weight between the rule layer and the judgment layer; k is 1, …, n
y ,n
y Is the number of regular layer neurons;
the output signal of the output layer is:
in the formula:
is the weight between the output layer and the rule layer; a ═ r, l is the number of output layer output signals, the output of the output layers is represented in a matrix:
wherein the content of the first and second substances,
the operation of the fuzzy logic module 300 is described below, which includes:
s01: the estimation error is found using the following equation:
in the formula, w
* ,m
* ,s
* ,α
* Ideal parameter values of w, m, s and alpha respectively,
are respectively w
* ,m
* ,s
* ,α
* The estimated parameter value of (2);
is a high order term of Taylor expansion; ε is an infinitesimal quantity;
s02 utilization of
De-approximation of v
sc I.e. by
Let the estimated value of the control force of the neural network be:
the estimated error is then:
in the formula (I), the compound is shown in the specification,
s03, adjusting parameters of the neural network according to the following rules:
if it is used
Or (a)
And is
) Then using the estimated adjustment parameters
Adjusting a neural networkW of the module;
if it is not
And is
Then using the estimated tuning parameters
Adjusting W of the whole neural network module;
if it is not
Or (a)
And is provided with
) Then use the estimated tuning parameters
Adjusting M of the data neural network module;
if it is not
And is
Then using the estimated tuning parameters
Adjusting M of the data neural network module;
if it is not
Or (a)
And is
) Then using the estimated adjustment parameters
Adjusting S of the neural network module;
if it is not
And is
Then using the estimated tuning parameters
Adjusting S of the neural network module;
if it is not
Or
And is
Then the tuning parameters are estimated
Adjusting alpha of the neural network module;
if it is used
And is
Then using the estimated tuning parameters
The alpha of the neural network module is adjusted,
in the formula (I), the compound is shown in the specification,
preferably, the first and second electrodes are formed of a metal,
η
m 、η
w 、η
s 、η
α learning rate and greater than zero; b
m 、b
w 、b
s 、b
α Is the parameter upper bound and is greater than zero;
E=[e
1 e
2 e′
1 e′
2 ]
T (ii) a A is a constant matrix;
and
are respectively W
r And W
l An estimate of the ideal value;
and
are respectively s
r And s
l An estimate of the value of the ideal value,
and
are each alpha
r And alpha
l An estimate of the value of the ideal value,
an estimation matrix of L(ii) a | | | represents the euclidean norm of a matrix or vector.
Fig. 4 is a block diagram of a servo mechanism of a robot car body provided by the invention, as shown in fig. 4, the servo mechanism of the robot car body 200 at least comprises a motor 203a, a motor 203b, a reduction box 202a, a reduction box 202b, a reduction box 202a, a driving wheel 201a and a driving wheel 201b, wherein an output shaft of the motor 203a is connected to a shaft of the driving wheel 201a through the reduction box 202a for driving the driving wheel 201a to rotate; the output shaft of the motor 203b is connected to the shaft of the driving wheel 201b via the reduction box 202b, and is used for driving the driving wheel 201b to rotate. The driving wheels 201a and 201b are driven by the motors 203a and 203b independently from each other, and therefore, no differential gear is provided. The reduction gear boxes 202a and 202b may be provided as needed, or may be omitted.
In the present invention, the rotor shafts of the motor 203a and the motor 203b are disposed close to each other at one end in a magnetic cylinder made of a steel plate or the like having both open ends, and are disposed in contact with or close to the cylinder to form a combined motor, and the cylinder forms a magnetic path between the stators of the motor 203a and the motor 203 b.
In the present invention, each of the motors 203a and 203b has the same structure, and includes a cylindrical stator core formed by stacking a plurality of pieces in the axial direction, and, for example, three-phase stator coils are fitted to the inner peripheral portion of the stator core. A rotor is arranged in the cylindrical iron core and comprises a rotor shaft and a rotor iron core fixed on the rotor shaft, and the radius of the rotor iron core is smaller than that of the stator iron core. The following describes the rotor of the motor according to the present invention in detail with reference to fig. 5.
FIG. 5 is a schematic structural diagram of a rotor of a driving wheel driving motor provided by the present invention; as shown in fig. 5, the rotor 220a of the motor 203a is provided with a plurality of permanent magnets at equal intervals on the periphery of the rotor core, all of which have N poles facing outward and S poles facing inward; the rotor 220b of the motor 203b has a plurality of permanent magnets, all of which have S poles facing outward and N poles facing inward, provided at equal intervals on the periphery of the rotor core. The rotor shaft of the motor 203a and the rotor shaft of the motor 203b are coupled to rotate independently of each other, and rotate independently of each other.
In the present invention, the adjustment coil 210, which may be a coil only or an excitation coil of a generated magnetic field, is provided on the outer periphery of the rotor shaft between the rotor of the motor 203a and the rotor of the motor 203 b. In order to increase the magnetic flux, an appropriate exciting coil is wound around the cylindrical magnetic core 209, and a direct current exciting current is applied to the coil to generate an axial magnetic field in the axial direction of the motors 203a and 203 b.
In the present invention, rotation sensors are provided on the rotor shafts of the motor 203a and the motor 203b, respectively, and detect the magnetic pole positions of the motor 203a and the motor 203b, respectively. The motor 203a and the motor 203b are respectively provided in a three-phase motor structure, and three-phase ac currents are supplied from a three-phase inverter 206 and a three-phase inverter 207, respectively, and the three-phase inverter 206 and the three-phase inverter 207 are used to convert dc currents supplied from the ac/dc power supply 204 into three-phase ac currents.
In the present invention, the two-phase power supply 208 provides positive, negative or zero dc current to the regulating coil 210. The function of the adjustment coil 210 is described below. For example, when the voltage of at least one or both of the motor 203a and the motor 203b is close to and higher than the power supply voltage (battery voltage), the adjustment coil 210 performs current control to weaken the excitation motion of the motor 203a and the motor 203 b.
When a positive current is applied to the adjustment coil 210, the magnetic path of the magnetic field generated by the current applied to the adjustment coil reaches the rotor shaft of the motor 203b, the rotor shaft of 203a, and finally the rotor core of 203a from the permanent magnets on the N-pole side on the rotor of the motor 203a, through the stator of the motor 203a, the magnetic cylinder, the stator of the motor 203b, and the permanent magnet bodies on the S-pole side on the rotor of the motor 203 b. The magnetic flux output from the N-pole of the rotor of the motor 203a crosses the armature coil of the stator thereof, and the magnetic flux input from the S-pole of the rotor of the motor 203b crosses the armature coil. The magnetic body portion between the two S-polarity permanent magnets of the rotor 220b is equivalent to the N-pole; since the magnetic body portion between the two N-polarity permanent magnets of the rotor 220a is equivalent to the S-pole, and the magnetic flux of the permanent magnet body on the rotors 220a, 220b is enhanced by the influence of the field coil magnetic flux, the rotors 220a, 220b rotate in a state where the N-pole and the S-pole are alternately arranged, and the rotational speed and the torque are those of the rotors 220a, 220b, respectively, as in the rotor of the conventional synchronous motor, the arrangement of such a configuration can reduce the number of permanent magnets, thereby reducing the cost. When a negative current is applied to the adjustment coil 210, the magnetic path of the magnetic field generated by the current applied to the adjustment coil passes from the permanent magnets on the S-pole side on the rotor of the motor 203b to the permanent magnet bodies on the N-pole side on the rotor of the motor 203a, the rotor shaft of the motor 203b, and the rotor core of the motor 203b through the stator of the motor 203b, the magnetic cylinder, the stator of the motor 203 a. The magnetic flux output by the N-pole of the rotor of the motor 203a crosses the armature coil of the stator thereof, and the magnetic flux input by the two S-poles crosses the armature coil. The magnetic body portion between the two S-polarity permanent magnets of the rotor 220b is equivalent to an S-pole; the magnetic body portion between the two N-polarity permanent magnets of the rotor 220a is equivalent to an N-pole, and as a result, the permanent magnet flux on the rotors 220a, 220b is weakened by the influence of the field coil flux.
The above description is only for the detailed description of the embodiments of the present invention, and it should be noted that, for those skilled in the art, many modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.