The present invention relates to a sensor for detecting that a dynamically input detected signal has been changed to a signal of a desired pattern, and a sensor program storage mediumwhich stores a sensor program executed in an information processing device for executing a program and operating the information processing device as such a sensor.
Conventionally, various processing styles have been used in processing a sensor. One type of the processing styles, a neural network is used in processing a sensor (for example, refer to Patent Documents 1 to 3). A neural network request referred to in this document is a artificial neural network generated by modeling a network of neurons of a person, etc., and can be classified into two major types, that is, a layered neural network where there is a distinction between upstream signals and downstream signals, but there is no loop of signal streams, and a recurrent neural network where there is a loop of signal streams.
In this model, neurons are arranged in each layer of an input layer, an intermediate layer, and an output layer. The input to the LNN is all received by the neurons of the input layer, the output of each neuron of the input layer is transmitted to each neuron of the intermediate layer, and the output of each neuron of the intermediate layer is transmitted to the neuron of the output layer, and the output of the neuron of the output layer is the output of the LNN.
As shown in
With the neuron, the output Y=f(X) following the sigmoid function shown in
Relating to the LNN, it is necessary to determine the value of each coefficient called the coupling strength W1, W2, W3, . . . , Wi. There is a well-known BP method (back propagation method) as a method of determining the coefficient, and there are various learning methods such as a learning method with a teacher, a learning method without a teacher, etc.
The LNN is to basically apply a filter to input and output it, and a coefficient (the coupling strength W1, W2, W3, . . . , Wi above) of the filter can be set in the BP method.
Another well-known model of a neural network is a recurrent neural network (RNN).
In the LNN shown in
The RNN is actively studied, and there are some propositions of a method of learning an RNN such as the BP method in the LNN described above (refer to the Patent Documents 1 to 3).
A neural network used in processing a sensor such as the Patent Documents 1 to 3 is based on the nonlinear effect of the neural network, and has the disadvantage of requiring a long time in learning and is not practical. Although there is an attempt to shorten the time required in learning (refer to the Patent Document 4), it is impossible to remarkably shorten the learning time.
The present invention has been developed to solve the problems and aims at providing a low-cost sensor and a sensor program storage medium which stores a sensor program requiring only a low development cost.
The sensor according to the present invention to attain the objectives is a sensor which detects a change of a dynamically input detected signal to a signal of a desired pattern. The sensor includes; a signal input section which inputs a detected signal: and a pattern generator having plural neurons containing at least one neuron for generating output accompanied by an analog delay based on the input signal, and having a configuration of a recurrent neural network including a loop of a signal stream. When the pattern generator fetches a detected signal input from the signal input section, and the detected signal is changed to a signal of a desired pattern, an output different from an output obtained when the detected signal has a pattern other than a desired pattern is generated.
The “analog delay” refers to a delay accompanied by a phenomenon of an output value changing with delay in response to a change of an input value.
The sensor according to the present invention is provided with a pattern generator using a recurrent neural network having a loop of signals explained with reference to
The pattern generator according to the present invention is to be configured to generate an output other than an output obtained when a detected signal has a desired cyclical signal or generate when a matching non-cyclical signal is detected an output different from an output obtained when non-matching signal is detected. If a desired cyclical function or a non-cyclical function is known, learning corresponding to the “learning” in the conventional neural network is not required.
Otherwise, in the case of the sensor of the present invention, various cycles of trigonometric functions can be realized using the delay neurons or functions represented by various orders of polynomials can be realized. Therefore, although it is uncertain what degree of cyclical function or non-cyclical function is required, coefficients can be determined in order from lower order terms (from a longer-cycle trigonometric function in the case of a cyclical function, and from a lower-order term in the case of a polynomial). When a cyclical function or a non-cyclical function with necessary accuracy is realized, a higher order term can be ignored (not incorporated into a pattern generator). Thus, when “learning” the necessary accuracy of a desired cyclical function or non-cyclical function, the learning time can be shortened in the example explained later by the time represented by an enormously large value of 1057 times shorter the time required in the “learning” in the conventional neural network in which all coefficients are simultaneously determined. As a result, a sensor which can be configured in a short time can be realized as a very low-cost sensor including the development cost.
In the sensor according to the present invention, it is desired that the pattern generator includes a neuron for generating output V1 basically by the following equation (3)
where V0 indicates an input, V1 indicates an output, and ε1 indicates a delay.
In this example, the neuron is represented as shown in the equation (3), but it is desired that the following variation can be allowed. That is:
(a) An output accompanied by an analog delay is generated based on a total of plural inputs after receiving the plural inputs.
(b) A weight is applied to an input, and an output accompanied by an analog delay is generated based on the weighted input.
(c) When the neuron applies a weight to an input, the weight is changed depending on the output of another neuron.
(d) The delay of a neuron is changed depending on the output of another neuron.
(e) When an input exceeds a threshold, the threshold is used for the input.
The “analog delay” in the definition above which is represented by the simplest possible equation can be the equation (3) above. In representing the “analog delay” in the definition, it is not necessary to use an equation more complicated than the equation (3) above. Therefore, the definition of a neuron for generating an output accompanied by an “analog delay” can be made using the equation (3).
“When an input exceeds a threshold” indicate plural cases. That is, there can be a case where an input is effective when the input is smaller than a threshold, and when the input exceeds from a threshold of a small value to a large value, the threshold is effective, that is, the threshold is an upper limit. On the other hand, there can be a case where an input is effective when the input is larger than a threshold, and when the input exceeds from a threshold of a large value to a small value, the threshold is effective, that is, the threshold is a lower limit.
By allowing the variations, a wider cyclical function or non-cyclical function can be freely generated.
In the sensor of the present invention, the pattern generator may generate an output for discriminating whether or not a detected signal is a signal of a desired pattern by using an inner product of a signal generated in the pattern generator and a detected signal, or the pattern generator may generate an output for discriminating whether or not the detected signal is a signal of a desired pattern by using a coefficient drive.
Furthermore, in the sensor of the present invention, the pattern generator may generate a cyclical function in the pattern generator based on the nature of the detected signal (whether the signal of a desired pattern to be detected is a cyclical signal or a non-cyclical signal, etc.), or may generate a non-cyclical function represented by a polynomial in the pattern generator.
The sensor program storage medium according to the present invention to attain the objective of the invention stores a sensor program which is executed in an information processing device for executing a program, operates the information processing device as a sensor for detecting whether or not a dynamically input detected signal is a signal of a desired pattern, and operates the information processing device as a sensor including; a signal input section which inputs a detected signal: and a pattern generator having plural neurons containing at least one neuron for generating output accompanied by an analog delay based on the input signal, and having a configuration of a recurrent neural network including a loop of a signal stream. When the pattern generator fetches a detected signal input from the signal input section, and the detected signal is changed to a signal of a desired pattern, an output different from an output obtained when the detected signal has a pattern other than a desired pattern is generated.
In the sensor program storage medium according to the present invention, it is desired that the pattern generator includes a neuron for generating output V1 basically by the following equation (3)
where V0 indicates an input, V1 indicates an output, and ε1 indicates a delay.
Also in the sensor program storage medium_according to the present invention, the pattern generator may use an inner product of the signal generated in the pattern generator and a detected signal, and the pattern generator may use a coefficient drive.
Additionally, in the sensor program storage medium according to the present invention, the pattern generator may generate a cyclical function in the pattern generator, or the pattern generator may generate a non-cyclical function represented by a polynomial in the pattern generator.
An embodiment of the present invention is explained below.
A sensor according to an embodiment of the present invention explained below is configured by a computer and a sensor program operated in the computer as an embodiment of the present invention.
Described below first is the hardware of the computer configuring the sensor as an embodiment of the present invention.
A computer is provided with a CPU (central processing unit), RAM (random access memory), a hard disk, a body section 101 having a built-in communication board, etc., a display device 102 for displaying an image and a character string on a display screen 102a at an instruction from the body section 101, a keyboard 103 for inputting an instruction of an operator to a computer 100, a mouse 104 for inputting an instruction depending on an icon, etc. displayed in a position when an arbitrary position on the display screen 102a is specified, and an antenna 105 for communication with a robot 200.
The body section 101 further includes an FD slot 101a for insertion of a flexible disk (not shown) and a CD-ROM slot 101b for insertion of CD-ROM 300. They also include an FD drive and a CD-ROM drive for driving and accessing the flexible disk (FD) and the CD-ROM 300 inserted respectively through the slots 101a and 101b.
On the other hand, the robot 200 takes the shape like a person, has joints at the positions corresponding to the joints of a person and formed by two adjacent members capable of making freely adjustable angles, and is provided with a camera at the positions of the eyes of a person, a microphone at the positions of the ears of a person, contact sensors at the positions corresponding to the tips of the fingers of a person, etc. Thus, various detecting sections are provided for the robot. The robot also has built-in communication equipment, communicates with the computer 100, transmits signals of various kinds to the computer 100, receives a control signal from the computer 100, and performs an operation such as bipedalism, etc. according to the control signal.
The computer 100 has a built-in robot structured in algorithm corresponding to the robot 200, and the control algorithm for control of the operation of the robot 200 structured using the computer 100 is not directly used in controlling the operation of the robot 200, but an operation simulation is performed by first operating using the control algorithm the robot as an algorithm structured in the computer 100. After confirming the intended operation, the control algorithm is applied to the robot 200 produced as hardware.
Relating to the control of the robot 200, for example, a conventionally used ZMP method (Zero Momentum Point method) can be adopted.
When the robot is standing still, the robot can keep the standing posture by raising the body upright with the barycenter of the robot kept right above its feet.
On the other hand, if the robot is, for example, moving forward, it will fall backward with the barycenter kept above its feet.
It is because the ZMP (dynamic barycenter point) is positioned backward. To prevent the robot from falling backward, the body is to lean forward and with an increasing speed to generate recovery power, and the leaning degree, etc. of the body can be adjusted such that the ZMP can be positioned at the target point with the rebound from the floor and the barycenter point of the robot taken into account. Thus, by controlling the ZPM (dynamic barycenter point) to be constantly located at the target position, the robot of bipedalism can move forward.
Otherwise, in controlling the robot 200, it is desired that the control system proposed by the Applicant of the present invention is used (refer to PCT/JP02/10622). This control system is to control the robot 200 according to signals generated as various cyclical signals and non-cyclical signals using a delayed neuron in the equation (3) above as a core, and it is an effective control system by sharing a number of common points with the sensor explained below.
The control algorithm of the robot 200 is not the subject of the present invention, but the subject as an embodiment of the present invention is to perform the process of detecting whether or not, after receiving a detected signal obtained by various detection sections provided for the robot 200 through communication equipment, the detected signal matches a signal of a desired pattern (this process is referred to as a sensor in the present invention). Therefore, the control systemof the robot is not referred to anymore, and the process of detecting a signal will be explained below.
This configuration of the hardware includes a CPU 111, RAM 112, a hard disk controller 113, an FD drive 114, a CD-ROM drive 115, a mouse controller 116, a keyboard controller 117, a display controller 118, and a communication board 119 for communication with the robot 200 (refer to
The FD drive 114 and the CD-ROM drive 115 are used in accessing an FD 310 and the CD-ROM 300 inserted respectively through the FD slot 101a and the CD-ROM slot 101b as explained by referring to
In
The sensor program 400 is stored in the CD-ROM 300 in this embodiment, but it is not necessary that it is stored in the CD-ROM. For example, it can be stored on other portable storage media such as an FD, etc. and installed on the computer 100, or can be installed on the computer 100 through a communication network (not shown in the attached drawings) from other devices, etc. It can also be stored in a hard disk (refer to
The sensor program 400 shown in
A sensor 410 is realized in the computer 100 shown in
The sensor 410 shown in
The sensor 410 shownin
The signal input section 411 configuring the sensor 410 shown in
The pattern generator 412 configuring the sensor 410 shown in
The neuron which generates an output of an analog delay contained in the pattern generator is defined as a neuron which generates an output V1 by the following equation (3).
where V0 indicates an input, V1 indicates an output, and ε1 indicates a delay basically in the present embodiment.
The equation (3) can also be expressed by the equation (4) as follows by integrating the equation (3).
The neuron is configured by program modules described to satisfy the equation (3) (or the equation (4) equivalent to the equation (3)).
The pattern generator 412 can include a neuron expressed by the equation (3) (or the equation (4) equivalent to the equation (3)), variations of the neuron, and others. The neurons, etc. that can be included in the pattern generator 412 in the present embodiment are listed as follows.
(a) A basic neuron according to the equation (3) (or equation (4))
(b) A neuron generating an output accompanied by an analog delay including a delay 0 based on the total of plural inputs in response to the plural inputs
(c) A neuron generating an output accompanied by an analog delay based on the weighted input after applying a weight to an input
(d) A neuron for which the weight is changed depending on the output of another neuron
(e) A neuron whose delay is changed depending on the output of another neuron
(f) A neuron using a threshold in place of an input when the input exceeds the threshold
(g) A switch communicating/disconnecting the coupling between two neurons depending on the output of another neuron
These neurons, etc. are formed by program modules as explained by referring to the equation (3) or (4). The pattern generator 412 shown in
For the following explanation, a neuron and the description in the drawing of the neuron will be explained first.
Parts (A) to (E) of
Part (B) of
Part (C) of
Part (D) of
Part (E) of
Part (A) of
Part (B) of
Part (C) of
Then, using the descriptions shown in
The equation (3) is displayed again below.
When a delay ε1 is set to zero, the equation (3) is expressed as follows.
V1=V0 (5)
That is, when a delay ε1=0, the output V1 is the input V0 as shown in
In this case, the delay ε1 in the equation (3) above is processed with ε1≠0. The equation (3) is integrated and expressed as the equation (4) above. The equation (4) is shown again below.
where the integration constant C in the equation (4) depends on the initial value of V10, and the following equation holds.
C=V0−V10 (6)
The first term of the equation (4) above shows that the output V1, is delayed in time, and is gradually changed as shown in
In this case, plural input Vj(j=0, 1, . . . , n) is weighted by each weight Cij (j=0, 1, . . . , n) corresponding to each input, and a total of weighted inputs is processed as corresponding to the input V0 of the equation (3). That is, when an equation is prepared using the symbols shown in
In this example, when the output of the neuron 1 is smaller than the threshold θ, the output of the neuron 1 is input as is to the neuron 2. When the input of the neuron 1 is equal to or larger than the threshold θ, the output of the neuron 1 is replaced with the threshold θ and processed as an input in the neuron 2.
In the neuron 2, an arithmetic operation according to the equation (3) (or (4) is performed after the threshold θ is processed as an input depending on the value of the output of the neuron 1.
In this example, when the output of the neuron 1 is larger than the threshold θ, the output of the neuron 1 is input as is to the neuron 2. When the output of the neuron 1 is equal to or smaller than the threshold θ, the neuron 2 processes the threshold θ as an input.
In this example again, as in the case shown in
The equation describing the relationship of the input and the output of the neuron j shown in
where Vj (j=1, 2, . . . , n, . . . m, . . . N) is an output of the neuron j, Cij is a weight corresponding to the coupling line from the neuron j to the neuron i, θmaxj is a threshold for determination of the maximum value and corresponding to the coupling line from the neuron j to the neuron i, θminj is a threshold for determination of the minimum value and corresponding to the coupling line from the neuron j to the neuron i, min (x, y) is a function using the value of x or y whichever is smaller, and max (x, y) is a function using the value of x or y whichever is larger.
The neuron i can be one of the neurons 1 to N (in this case, as shown by Part (C) of
The neurons 1 and 2 are coupled through a switch. The switch can be connected/disconnected depending on the output of another neuron 3. In this example, when the output of the neuron 3 is smaller than the threshold θ, the switch is connected to make the output of the neuron 1 as the input of the neuron 2. When the output of the neuron 3 is equal to or larger than the threshold θ, the switch is disconnected to prevent the output of the neuron 1 from entering the neuron 2.
When the symbol “<θ” shown in
Part (A) of
As in the case shown in
The pattern generator 412 configuring the sensor 410 shown in
Described below is the function generated when plural neurons are combined.
When two neurons are combined as shown in
The following equation (10) holds for the lower neuron.
where V2 indicates the output of the lower neuron.
When the equations (9) and (10) are combined, the two-story linear constant coefficient differential equation is generated as follows.
A common solution to the two-story linear constant coefficient differential equation is expressed as follows.
When the input V0 rises as a step function, the output V1 changes as shown by Parts (a), (b), (c), and (d) of FIG. 24 depending on 1<C12C21, C12C21=1, 0<C12C21<1, C12C21<0. The noticeable point is that the output V1 fluctuates depending on the values of the weights C12 and C21 although the input V0 is a constant, and that there is an output obtained by superposing integration on a delay (refer to Part (b) of
The output V1 shown in
When the equation (13) above is integrated, the following equation (14) is obtained.
That is, the equation (13) or (14) expresses a trigonometric function of an angular frequency ω, and the output V1 changing in the form of a sine wave.
Based on the equations (13) and (14), it is understood that when the values of the weight C and the delay ε are changed, the angular frequency of the sine wave output V1 can be changed, and when the weight C, delay ε, and the initial values V10 and V20 are changed, the coefficients C1 and S1 in the equation (14) are changed, thereby possibly changing the phase and the amplitude of the sine wave.
One rightmost neuron shown in
The function realized by the network shown in
V1=c0+c1 cos ωt+s1 sin ωt
+c2 cos 2ωt+s2 sin 2ωt
+c3 cos 3ωt+s3 sin 3ωt
+ (15)
The constant term c0 and c1, s1, c2, s2, . . . , etc. are determined depending on the delay ε of each neuron, the weights C, 2C, 3C, . . . , the initial value (not shown in
The equation (15) indicates the Fourier series. An arbitrary cyclical function can be developed to the Fourier series, and therefore any sigmoid function can be structured as shown in
The output V1 generated by combining 3-neurons as shown in
When the equation (17) holds, the equation (16) can be solved as follows.
where C1, C2, and C3 are integral constants determined by the initial value (not shown in the attached drawings), etc.
When looking at the equation about V1 in the equation (18) above, the first term indicates quick attenuation, and the second and third terms indicate sine transients.
Therefore, the combination of the neurons shown in
The output V1 of the addition neuron is expressed below.
V1=C0+C1t+C2t2+ . . . +Cntn (19)
When plural trigonometric function generators are combined as shown in
The switch described above is used in switching the two types of generated signals. It is a pattern generator shown in
As described above, almost all cyclical signals and non-cyclical signals can be practically generated by defining a neuron. Described below is detection of a signal based on the description above, that is, the pattern generator 412 shown in
A signal f (t) is received from the signal input section 411 shown in
In the three neurons shown in
One right neuron shown in
V2=∫0TV1·f(t)dt (19)
where T indicates a sufficiently long time as compared with the cycle determined by the angular frequency ω.
The equation (19) shows an inner product of the sine wave signal V1 and the signal f (t) received from the signal input section 411 shown in
When f (t) is the same sine wave signal, the output signal V2 expressed by the equation (19) indicates a large value. When f (t) is a cyclical signal having a frequency different from the frequency of V1 or when it is a non-cyclical signal, the output signal V2 indicates a small value.
Therefore, according to the pattern generator having the configuration shown in
The signal f (t) is received from the signal input section 411 shown in
The output V1 shown in
The equation (20) includes the term of ω2(1+f(t)), and this corresponds to a change of a spring constant. That is, it is an equation showing the coefficient drive, and when f (t) is a sine wave having an angular frequency (half cycle) twice as high as the basic sine wave (sine wave of the angular frequency ω) generated by the pattern generator, a large output V1 is generated.
Using the pattern generator with the configuration shown in
The sine wave of a single frequency has been explained, and an arbitrary cyclical function can be generated by combining the patterns of generating a sine wave of a different frequency as described above. Therefore, a pattern generator having a large output when the signal f (t) is an arbitrary cyclical signal can be structured.
In this example, a signal received from the signal input section 411 shown in
V1=∫0Tf(t)dt +∫0Tt·f(t)dt +∫0Tt2·f(t)dt (21)
In the lower partial pattern, the following equation is generated.
V2=C0+tC1+t2C2 (22)
Therefore, the output V3 is expressed as follows.
V3=[∫0Tf(t)dt−C0]+[∫T0t·f(t)dt−tC1]+[∫0Tt2·f(t)dt−t2C3] (23)
That is, in the pattern generator shown in
integral value of f(t): C0
integral value of t·f(t): t·C1
integral value of t2·f(t): t2·C2
When the output V3 is close to zero, it indicates that a signal of a desired pattern has been detected.
In this example, a polynomial having only three terms is shown, but it can be a higher-order polynomial. When it is uncertain what order of polynomial is enough for detection with required accuracy, the lowest-order term is moved, while inputting a signal to be detected as a signal f (t), the output V3 is evaluated to determine the coefficient C0, then the coefficients C0, C1, C2, etc. are determined while sequentially adding higher-order terms until a desired evaluation can be obtained. Thus, sequentially more accurate detection can be performed, the order required for a polynomial can be determined, and the values of the coefficients C0, C1, C2, etc. can be determined.
When the process of determining these coefficients C0, C1, C2, etc. is regarded as the “learning” in the conventional neural network and called “learning”, there can be a case where the “learning” is required in structuring the pattern generator 412 also in the present invention. However, the “learning” in the present invention refers to determining a coefficient one by one while sequentially adding each term from a lower order term to a higher order term. On the other hand, the “learning” in the conventional neural network simultaneously and little by little adjusts a number of coefficients, which is a definite different from the present invention. In this example, a polynomial is shown, but the same holds true with a cyclical function. In the present invention, a method of sequentially determining a coefficient while sequentially adding a term from a lower frequency term to a higher frequency term can be adopted.
Explained below is the comparison between the method of sequentially obtaining the coefficient of a pattern generator described above from a lower order to a higher order (hereinafter referred to as a method according to the present invention) and the method of simultaneously obtaining coefficients of the pattern generator using what is called a genetic algorithm (hereinafter referred to as a conventional method). A genetic algorithm refers to a technique of changing and evaluating the value of a coefficient using a model of heredity of creatures to finally determine an appropriate value by evaluating the value by assigning a slightly different value to a coefficient, by evaluating the value by assigning a completely different value to a coefficient to simulate a break, by evaluating the value by assigning an intermediate value between two values obtained with good evaluation to simulate heredity to a child, etc.
In the conventional method, all coefficients can be simultaneously obtained. Therefore, all coefficients are related to one another. It is anticipated that, when a movement is to be changed only a little, all coefficients have the influence, and take a long time to complete the change. The most apparent difference is briefly described below by referring to the case where all solutions are searched for. When the resolution of a neuron and the resolution of a coupling weight are set to n, and a total of the final number of neurons and the number of couplings between neurons is set to m, the amount of calculation when a total search is performed requires nm times of performance. If a division to j orders is made in the present invention, the amount of calculation is approximately jxnm/j. Practically, the values nm=1.15×1073, jxnm/j=1.4×1016 are about 1057 times as large as the values n=16, m=60, and j=5 respectively.
Thus, according to the present invention, coefficients can be determined in a much shorter time by exceedingly large number than the conventional method.
Therefore, the pattern generator generated by adopting the method according to the present invention can considerably reduce the development period and cost.
As shown in
This application is a continuation application, filed under 35 USC 111(a), of International Application PCT/JP03/06264, filed May 20, 2003.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP03/06264 | May 2003 | US |
Child | 11269542 | Nov 2005 | US |