A variable forgetting rate circuit based on memristor
By designing a variable forgetting rate circuit based on memristor, simulating the changes in biological synapse weights, the simulation of associative memory and conditioned reflexes is realized, which solves the problem in the existing technology that the relationship between forgetting rate and unconditioned stimulation interval has not been effectively realized. Prolongs the disappearance time of conditioned reflexes.
Patent Information
- Application Number
- CN202410423173.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-09
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-04-09
AI Technical Summary
The existing technology cannot effectively realize the hardware circuit of the biological function of associative memory, especially the inverse relationship between the extinction rate of conditioned reflex and the interval of unconditioned stimulation has not been effectively simulated.
A memristor-based variable forgetting rate circuit is designed, including a neuron module, a synaptic module and a forgetting voltage control module. By changing the resistance of the memristor, the change in biological synaptic weight is simulated to achieve different forgetting rates. Simulate the extinction process of conditioned reflexes.
The realization of learning and three types of forgetting functions is realized. The forgetting rate changes according to the interval length of unconditioned stimulation, which improves the associative memory neural network circuit and prolongs the disappearance time of conditioned reflex.
Smart Images

Figure CN118278478B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of analog digital circuits, and in particular to a variable forgetting rate circuit based on a memristor. Background Art
[0002] Memristors, as emerging nanoscale two-terminal electronic devices, have been widely used in artificial neural networks, memory, secure communications, artificial intelligence computers, and biological simulation. Due to the adjustability and non-volatility of memristors, memristors are very suitable as biological synapses. Therefore, in neuromorphic systems, memristors are usually used as core devices. Using memristors to simulate biological synapses to build neuromorphic circuits can realize the associative memory function of organisms.
[0003] Pavlov's classical conditioning is a basic method for animals to learn by association, which can establish a connection between a conditioned stimulus (CS) and a conditioned response (CR). The most famous classical conditioning experiment is Pavlov's dog experiment. When a dog sees food (US), it salivates, which is an unconditioned response (UR). In Pavlov's experiment, each time the dog is given food, there is a bell (CS). After a period of training, the dog will salivate when it hears the bell alone (CR). At this time, the dog's salivation when hearing the bell is a process of associative memory.
[0004] Babkin expanded on the above experiment and explored the extinction rate of the conditioned response (CR). If the dog is stimulated by meat powder, it will take 15 minutes for the CR to disappear if it is demonstrated every 2 minutes; it will take 20 minutes for the CR to disappear if it is demonstrated every 4 minutes; it will take 54 minutes for the CR to disappear if it is demonstrated every 8 minutes. Therefore, Babkin concluded that "the extinction rate of conditioned reflexes is inversely proportional to the interval between unconditioned stimuli." However, there is still a problem that the hardware circuit of the biological function of associative memory has not been realized and needs to be further solved. Summary of the invention
[0005] The technical problem solved by the present invention is that the problem that the hardware circuit of the associative memory biological function has not been realized in the related art needs to be further solved.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a variable forgetting rate circuit based on a memristor, comprising a neuron module, a synapse module, and a forgetting voltage control module; the neuron module comprises a food neuron NF, an auditory neuron NR, one or more logic gates, and a salivary neuron NS, and the food neuron NF and the auditory neuron NR are respectively connected to each logic gate; the logic gate selects a corresponding synapse module or a forgetting voltage control module by judging the activation state of the food neuron NF and the auditory neuron NR, and the synapse module and the forgetting voltage control module output voltage by changing the resistance value of the memristor M1 and M2, and the salivary neuron NS receives different input voltages, and the input voltage value is greater than the threshold value of the salivary neuron NS, indicating that the salivary neuron is activated.
[0007] As a preferred solution of the variable forgetting rate circuit based on memristor described in the present invention, the food neuron NF and the auditory neuron NR are respectively connected to the input ends of the synaptic module and the forgetting voltage control module, the salivary neuron NS is connected to the input port of the synaptic module, and the salivary neuron generates a corresponding output voltage according to the size of the input voltage of the synaptic module.
[0008] As a preferred solution of the variable forgetting rate circuit based on memristor described in the present invention, wherein: the output signal NF of the food neuron NF is respectively connected to the eighth resistor R8 of the first reverse amplifier of the synaptic module, the first AND gate AND1, the second NOT gate NOT2 and the second AND gate AND2 of the forgetting voltage control module, wherein the output signal NF is input to the input end of the second NOT gate NOT2, and the fifth AND gate AND5 of the forgetting voltage control module is controlled through the output end of the second NOT gate NOT2.
[0009] As a preferred solution of the variable forgetting rate circuit based on a memristor according to the present invention, wherein: the output signal NR of the auditory neuron NR is connected to the input end of the first AND gate AND1 of the synaptic module, the input end of the sixth AND gate AND6 of the salivary neuron, the first NOT gate NOT1, the fourth AND gate AND4 of the forgetting voltage control module, and the input end of the fifth AND gate AND5;
[0010] The output signal NR of the auditory neuron NR is used to input the input end of the first NOT gate NOT1, and the second AND gate AND2 and the fourth AND gate AND4 of the forgetting voltage control module are controlled through the output end of the first NOT gate.
[0011] As a preferred solution of the variable forgetting rate circuit based on a memristor described in the present invention, wherein: the salivary neuron NS includes a fifth in-phase comparator, a sixth AND gate AND6 and a first OR gate OR1, and the input ports of the salivary neuron N are respectively the input ends of the fifth in-phase comparator, the sixth AND gate AND6 and the first OR gate OR1, wherein the input port of the fifth in-phase comparator is connected to the output port of the fourth inverting hysteresis comparator of the synaptic module, the two input ports of the sixth AND gate AND6 are respectively connected to the output end of the auditory neuron NR and the output end of the fourth inverting hysteresis comparator, and the two input ports of the first OR gate OR1 are respectively connected to the output port of the mathematical operation unit ABS1 of the synaptic module and the output port of the sixth AND gate AND6;
[0012] The output of the salivary neuron NS is controlled by the output terminal of the first OR gate OR1.
[0013] As a preferred solution of the variable forgetting rate circuit based on memristor described in the present invention, wherein: the synaptic module includes a first inverting amplifier, a first AND gate AND1, a mathematical operation unit ABS1, a second in-phase adder, a third inverting amplifier, a mathematical operation unit ABM1 and a fourth inverting hysteresis comparator;
[0014] The output port of the food neuron NR is connected to the positive end of the eighth resistor R8 of the first inverting amplifier of the synaptic module, and the output port of the first inverting amplifier is connected to the input end of the mathematical operation unit ABS1, the input port of the first OR gate OR1 of the salivary neuron is connected to the output port of the mathematical operation unit ABS1, the input port of the first AND gate AND1 is respectively connected to the output ports of the food neuron NF and the auditory neuron NR, the first resistor R1 and the second resistor R2 of the second in-phase adder are respectively connected to the output port of the first AND gate AND1 and the output port of the tenth in-phase adder of the forgetting voltage control module. The positive end of the memristor M1 of the third inverting amplifier is connected to the output end of the second in-phase adder and the first input port IN1 of the mathematical operation unit ABM1, the second output port IN2 of the mathematical operation unit ABM1 is connected to the output port of the third inverting amplifier, and the input end of the fourth inverting hysteresis comparator is connected to the output port OUT of the mathematical operation unit, and the output port of the fourth inverting hysteresis comparator is connected to the input port of the fifth in-phase comparator.
[0015] As a preferred solution of the variable forgetting rate circuit based on memristor described in the present invention, wherein: the forgetting voltage control module is divided into a separate feeding forgetting unit, a separate ringing forgetting unit and a natural forgetting unit;
[0016] The separate feeding forgetting unit is composed of a second AND gate AND2, a third AND gate AND3, a first monostable trigger S1, a sixth in-phase adder, a seventh inverting comparator, an eighth inverting amplifier, a mathematical operation unit ABS and an NMOS tube. The input end of the second AND gate AND2 is connected to the output end of the food neuron NF and the first NOT gate NOT1 respectively, the input port of the first monostable trigger S1 is connected to the output port of the second AND gate AND2, the input port of the third AND gate AND3 is connected to the output port of the fourth AND gate AND4 of the natural forgetting unit, and the other input port of the third AND gate AND3 is connected to a voltage of 5V, the positive end of the memristor M2 of the eighth inverting amplifier is connected to the output port of the third AND gate AND3, and the input port of the mathematical operation unit ABS2 is connected to the output port of the eighth inverting amplifier. The positive ends of the fourteenth resistor R14 and the fifteenth resistor R15 of the sixth in-phase adder are respectively connected to the output ports of the mathematical operation unit ABS and the first monostable trigger S1, and the input end of the seventh inverting amplifier is respectively connected to the output end of the sixth inverting amplifier and the source of the first NMOS tube T1. The gate of the first NMOS tube T1 is connected to the output end of the seventh inverting comparator, and the drain of the first NMOS tube T1 is respectively connected to the positive end of the nineteenth resistor R19 and the positive end of the twenty-third resistor R23 of the tenth positive phase adder.
[0017] As a preferred solution of the variable forgetting rate circuit based on memristor described in the present invention, wherein: the natural forgetting unit includes a fourth AND gate AND4 and a ninth inverting amplifier. The two input ports of the fourth AND gate AND4 are respectively connected to the output port of the first NOT gate NOT1 and the output port of the second AND gate NOT2, and the positive end of the twentieth resistor R20 of the ninth inverting amplifier is connected to the output port of the fourth AND gate AND4, and the output end of the ninth inverting amplifier is connected to the positive end of the twenty-fourth resistor R24 of the tenth in-phase adder;
[0018] The separate ring forgetting unit includes a fifth AND gate AND5, two input ports of the fifth AND gate are respectively connected to the second NOT gate NOT2 and the output port of the auditory neuron NR, and the positive end of the twenty-fifth resistor R25 of the tenth in-phase adder is connected to the output port of the fifth AND gate AND5.
[0019] As a preferred solution of the variable forgetting rate circuit based on memristor of the present invention, wherein: by outputting the food stimulation signal NF and the ringing stimulation signal NR to each NOT gate and AND gate, each module is controlled to be turned on and off by each NOT gate and AND gate, and the first memristor M1 and the second memristor M2 have different resistance change rates as the voltage varies;
[0020] The change in the resistance of the first memristor M1 represents the change in the synaptic weight between the auditory neuron and the salivary neuron. Specifically, the smaller the resistance of M1, the greater the synaptic weight.
[0021] The change in the resistance of the second memristor M2 indicates the change in the length of the time interval of the individual feeding stimulation when individual feeding is performed, that is, the longer the stimulation time interval;
[0022] The longer the second memristor M2 is subjected to the voltage, the smaller the resistance value of the second memristor M2 is;
[0023] After passing through the mathematical operation unit ABS, the output voltage is smaller;
[0024] The mathematical operation unit ABS2 is used to convert the input voltage value into the absolute value output of the voltage value, and to control the output of the entire circuit by controlling the change of the resistance value of the memristor M1 and M2 to judge whether drooling occurs.
[0025] As a preferred solution of the variable forgetting rate circuit based on memristor of the present invention, wherein: if the food neuron NF or the auditory neuron NR outputs a high level, it indicates that the neuron is activated and a salivation reaction occurs;
[0026] If the output of the salivary neuron NS is low, it means that the neuron is not activated and a salivation reaction occurs.
[0027] Beneficial effects of the present invention: The variable forgetting rate circuit based on a memristor of the present invention can not only realize the functions of learning and three types of forgetting, but the forgetting rate can also be changed accordingly according to the different stimulation intervals of unconditioned stimulation to the organism. In the forgetting stimulation effect of feeding alone, the longer the time interval of the forgetting stimulation, the slower the forgetting rate, which further improves the associative memory neural network circuit. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic diagram of a memristor-based variable forgetting rate circuit is provided for a memristor-based variable forgetting rate circuit according to an embodiment of the present invention.
[0029] Figure 2 The present invention provides a Psipice simulation result of a variable forgetting rate circuit based on a memristor during the test phase according to an embodiment of the present invention.
[0030] Figure 3 The following is a PSpice simulation result of a circuit learning phase of a variable forgetting rate circuit based on a memristor provided in an embodiment.
[0031] Figure 4The following is a PSpice simulation result of a memristor-based variable forgetting rate circuit when the stimulation interval of food forgetting is 2S, provided in one embodiment.
[0032] Figure 5 An embodiment provides a memristor-based variable forgetting rate circuit and a Pspice simulation result when the stimulation interval of food forgetting is 4S after learning. DETAILED DESCRIPTION
[0033] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, but not all of the embodiments.
[0034] Example 1
[0035] Reference Figure 1 -5, is an embodiment of the present invention, providing a variable forgetting rate circuit based on a memristor, including a neuron module, a synapse module, and a forgetting voltage control module;
[0036] The neuron module includes a food neuron NF, an auditory neuron NR, one or more logic gates and a salivary neuron NS, wherein the food neuron NF and the auditory neuron NR are respectively connected to the logic gates;
[0037] The logic gate selects the corresponding synaptic module or forgetting voltage control module by judging the activation state of the food neuron NF and the auditory neuron NR, and changes the resistance value of the memristor M1 and M2, and the synaptic module and the forgetting voltage control module output voltage. The salivary neuron NS receives different input voltages, and the input voltage value is greater than the threshold value of the salivary neuron NS, indicating that the salivary neuron is activated.
[0038] The neuron module includes food neuron NF, auditory neuron NR, and salivary neuron NS modules. When food neuron NF or auditory neuron NR is activated, NF and NR output high-level pulse voltages, which are judged by the logic gate, select the corresponding learning or forgetting function, and activate the corresponding module. The salivary neuron NS is composed of the fifth in-phase comparator, the sixth AND gate AND6, and the first OR gate OR1. The fifth in-phase comparator is mainly used to receive the size of the synaptic weight between the auditory neuron and the salivary neuron. If the synaptic weight is higher, the voltage value output by the synaptic module is higher. Once the voltage output by the synaptic module is higher than the threshold voltage Vth1 of the fifth in-phase comparator of the salivary neuron module NS, it means that the synaptic weight of the auditory neuron NR can activate the salivary neuron NS, that is, it means that the associative memory between neurons has been formed. At this time, the fifth in-phase comparator outputs a high-level voltage, which is input to the input port of the sixth AND gate AND6. When the auditory neuron NR outputs a high level, the sixth AND gate AND6 outputs a high level. The high level is input to a pin of the first OR gate OR1, which is used to determine whether the associative memory between the ringing sound and salivation has been formed. When the sixth AND gate outputs a high level, the first OR gate OR1 outputs a high level, which indicates that the salivary neuron is activated. The other pin is used to receive the synaptic weight between the food neuron NF and the salivary neuron NS. Since food-induced salivation is congenital, as long as the food neuron NF is activated, the salivary neuron NS will generate a high-level pulse voltage.
[0039] The synaptic module includes a synaptic module between food neurons NF and salivary neurons NS and a synaptic module between auditory neurons NR and salivary neurons NS. The synaptic module between food neurons NF and salivary neurons NS is composed of a first inverting amplifier and a mathematical operation unit ABS1. Since food causes animals to salivate naturally, that is, food is an unconditioned stimulus, the synaptic weight between food neurons and salivary neurons is large and a fixed value. In the first inverting amplifier, an eighth resistor R8 is used to represent the synaptic weight between food neurons and salivary neurons. The resistor passes through the first inverting amplifier and the mathematical operation unit ABS1, which can satisfy that as long as the food neurons NF are activated, the salivary neurons will also be activated, wherein ABS1 performs an absolute value operation on the input voltage value. The synaptic module between auditory neurons NR and salivary neurons NS is composed of a first AND gate, a second in-phase adder, a third inverting amplifier, a mathematical operation unit ABM1, and a fourth in-phase hysteresis comparator. When the food neuron NF and the auditory neuron NR are activated at the same time, the first AND gate AND1 is turned on and outputs a positive voltage to the second in-phase adder. The calculation formula of the adder (the three adders involved in the overall circuit, the second in-phase adder, the sixth in-phase adder, and the eighth in-phase adder are all applicable to the following formula:
[0040]
[0041]
[0042]
[0043] The resistors in the adder satisfy R1=R2=R3=R4=2kΩ, R5=1kΩ. The three adders involved in the overall circuit, the second in-phase adder, the sixth in-phase adder, and the eighth in-phase adder, are all applicable to the above formula. When the pulse voltage reaches the positive end of the memristor M1 after passing through the second in-phase adder, the output of the third inverting amplifier Where Vi is the positive terminal voltage of M1, R9 = 1kΩ, and the voltage VOP3 enters the IN2 pin of the mathematical operation unit ABM1, the voltage Vi enters the IN1 pin of the mathematical operation unit ABM1, and the mathematical operation expression of the mathematical operation unit ABM1 is: Substitute the values of Vi, VOP3, and R9 into the expression. The function of this expression can be to convert the memristor resistance value into a voltage to express it. For example, when M1 is 1kΩ, the output voltage is 1V. Therefore, the function of the combination of the third inverting amplifier and the mathematical operation unit AB1 is mainly to convert the memristor resistance value of M1 into a voltage value, so that the memristor resistance value can be expressed more intuitively, and the prominent weight at this time can be converted into a voltage value and input into the fourth inverting hysteresis comparator. The comparison voltage of the fourth inverting hysteresis comparator includes Among them, V11=10V, V12=2V, resistor R11=R12=20kΩ, and Vth11=5V, Vth12=1V are obtained. When the output of the mathematical operation unit ABM1 is greater than Vth11, the fourth inverting hysteresis comparator OP4 outputs a low-level voltage. When the output of the mathematical operation unit ABM1 is less than Vth12, the fourth hysteresis comparator OP4 outputs a high-level voltage. When the output of the mathematical operation unit ABM1 is between Vth11 and Vth12, the output of the hysteresis comparator will maintain the previous state. For example, when the output of ABM1 is less than Vth12=1V, the hysteresis comparator outputs a high level. As the voltage continues to rise, when the voltage is between 1V and 5V, the output of the hysteresis comparator still maintains a high level. When the output of ABM1 is greater than 5V, the output of the hysteresis comparator becomes a low level. The function of the fourth inverting hysteresis comparator is mainly to imitate the biological forgetting in the learned state, and the biological will not forget immediately, and the biological will maintain the learned state for a period of time. Similarly, when an organism is in a state of forgetting and learning, it will not immediately be in a state of learning. In a circuit, a hysteresis comparator can well imitate this behavior.
[0044] The forgetting voltage control module is divided into a single feeding forgetting unit, a single ringing forgetting unit, a natural forgetting unit and a voltage control module. The single feeding forgetting unit includes an F1 forgetting module and a second AND gate AND2, a first monostable trigger S1, a sixth in-phase adder, a seventh inverting comparator, and a first NMOS tube T1. When the dog is given food, the food neuron NF is activated and the auditory neuron is not activated. The second AND gate AND2 is turned on and outputs a high-level voltage. The pulse voltage is output to the first monostable trigger S1, and the monostable trigger S1 is triggered by the falling edge level and generates a voltage of -12V with a duration of 2S. The voltage is controlled by the voltage control module, which includes a third AND gate AND3, an eighth inverting amplifier and a mathematical operation unit ABS2. When the food neuron NF and the auditory neuron NR are not activated, that is, in the stimulation interval of the single feeding forgetting stimulation, the voltage control module is activated. At this time, the third AND gate AND3 outputs a high-level voltage Vi and outputs it to the eighth inverting amplifier. The expression of the amplifier is Where R29 = 1kΩ, M2 is the memristor resistance. As the stimulation interval of the single feeding forgetfulness stimulation becomes longer, the voltage value output by the eighth inverting amplifier becomes negative and becomes smaller and smaller. After the voltage passes through the mathematical operation unit ABS2, the output voltage becomes positive and becomes larger and larger. The function of ABS2 is to perform an absolute value operation on the input voltage value. The output of the mathematical operation unit ABS2 as the voltage control module enters the sixth in-phase adder together with the output of the first monostable trigger S1 for addition operation: V OP3 =S1+|V OP8 |, as the stimulation interval of forgetting stimulation by feeding alone becomes longer, the resistance of the second memristor M2 becomes smaller, and the output voltage |V OP8 The larger the value of |, the voltage value output by the monostable trigger S1 remains unchanged at -12V, so the voltage of the sixth in-phase adder output voltage VOP6 is negative and becomes larger and larger. The larger the voltage, the slower the forgetting rate, thus satisfying the requirement that the disappearance rate of the conditioned reflex to be achieved by the present invention is inversely proportional to the interval between unconditioned stimuli. The main function of the circuit composed of the seventh inverting comparator and the first NMOS tube T1 in the single-feeding forgetting unit is to perform filtering. Since the change of the synaptic module's salient weight is only affected by the learning and forgetting conditions, and is not affected by the stimulation interval of the single-feeding forgetting stimulus, the voltage output by the voltage control module |V OP8 | can only act on the individual forgetting unit but not on the synaptic module. The function of the seventh inverting comparator and the first NMOS tube T1 is to filter out |V OP8 |Separate output part. The specific implementation steps are as follows: when the voltage of the voltage control module |V OP8|When inputted to the seventh inverting comparator alone, the threshold voltage of the comparator Vth2=0.01V. Only when the input voltage is less than Vth2, the seventh inverting comparator will output the high level voltage Vcc to turn on the first NMOS tube T1 and output the voltage at the input end of the seventh inverting comparator. OP8 |The voltages of all are greater than Vth2, so the voltage of the voltage control module cannot pass through the seventh inverting comparator alone, thereby achieving the function of preventing the voltage control module from being input to the synapse module alone.
[0045] The food neuron NF and the auditory neuron NR are respectively connected to the input ends of the synaptic module and the forgetting voltage control module, the salivary neuron NS is connected to the input port of the synaptic module, and the salivary neuron generates a corresponding output voltage according to the size of the input voltage of the synaptic module.
[0046] The output signal NF of the food neuron NF is respectively connected to the eighth resistor R8 of the first reverse amplifier of the synaptic module, the first AND gate AND1, the second NOT gate NOT2 and the second AND gate AND2 of the forgetting voltage control module, wherein the output signal NF is input to the input end of the second NOT gate NOT2, and the fifth AND gate AND5 of the forgetting voltage control module is controlled through the output end of the second NOT gate NOT2.
[0047] The output signal NR of the auditory neuron NR is connected to the input end of the first AND gate AND1 of the synaptic module, the input end of the sixth AND gate AND6 of the salivary neuron, the first NOT gate NOT1, the input ends of the fourth AND gate AND4 and the fifth AND gate AND5 of the forgetting voltage control module;
[0048] The output signal NR of the auditory neuron NR is used to input the input end of the first NOT gate NOT1, and the second AND gate AND2 and the fourth AND gate AND4 of the forgetting voltage control module are controlled through the output end of the first NOT gate.
[0049] The salivary neuron NS comprises a fifth in-phase comparator, a sixth AND gate AND6 and a first OR gate OR1, and the input ports of the salivary neuron N are respectively the input ports of the fifth in-phase comparator, the sixth AND gate AND6 and the first OR gate OR1, wherein the input port of the fifth in-phase comparator is connected to the output port of the fourth inverting hysteresis comparator of the synapse module, the two input ports of the sixth AND gate AND6 are respectively connected to the output port of the auditory neuron NR and the output port of the fourth inverting hysteresis comparator, and the two input ports of the first OR gate OR1 are respectively connected to the output port of the mathematical operation unit ABS1 of the synapse module and the output port of the sixth AND gate AND6;
[0050] The output of the salivary neuron NS is controlled by the output terminal of the first OR gate OR1.
[0051] The synapse module includes a first inverting amplifier, a first AND gate AND1, a mathematical operation unit ABS1, a second in-phase adder, a third inverting amplifier, a mathematical operation unit ABM1 and a fourth inverting hysteresis comparator;
[0052] The output port of the food neuron NR is connected to the positive end of the eighth resistor R8 of the first inverting amplifier of the synaptic module, and the output port of the first inverting amplifier is connected to the input end of the mathematical operation unit ABS1, the input port of the first OR gate OR1 of the salivary neuron is connected to the output port of the mathematical operation unit ABS1, the input port of the first AND gate AND1 is respectively connected to the output ports of the food neuron NF and the auditory neuron NR, the first resistor R1 and the second resistor R2 of the second in-phase adder are respectively connected to the output port of the first AND gate AND1 and the output port of the tenth in-phase adder of the forgetting voltage control module. The positive end of the memristor M1 of the third inverting amplifier is connected to the output end of the second in-phase adder and the first input port IN1 of the mathematical operation unit ABM1, the second output port IN2 of the mathematical operation unit ABM1 is connected to the output port of the third inverting amplifier, and the input end of the fourth inverting hysteresis comparator is connected to the output port OUT of the mathematical operation unit, and the output port of the fourth inverting hysteresis comparator is connected to the input port of the fifth in-phase comparator.
[0053] The forgetting voltage control module is divided into a separate feeding forgetting unit, a separate ringing forgetting unit and a natural forgetting unit;
[0054] The separate feeding forgetting unit is composed of a second AND gate AND2, a third AND gate AND3, a first monostable trigger S1, a sixth in-phase adder, a seventh inverting comparator, an eighth inverting amplifier, a mathematical operation unit ABS and an NMOS tube. The input end of the second AND gate AND2 is connected to the output end of the food neuron NF and the first NOT gate NOT1 respectively, the input port of the first monostable trigger S1 is connected to the output port of the second AND gate AND2, the input port of the third AND gate AND3 is connected to the output port of the fourth AND gate AND4 of the natural forgetting unit, and the other input port of the third AND gate AND3 is connected to a voltage of 5V, the positive end of the memristor M2 of the eighth inverting amplifier is connected to the output port of the third AND gate AND3, and the input port of the mathematical operation unit ABS2 is connected to the output port of the eighth inverting amplifier. The positive ends of the fourteenth resistor R14 and the fifteenth resistor R15 of the sixth in-phase adder are respectively connected to the output ports of the mathematical operation unit ABS and the first monostable trigger S1, and the input end of the seventh inverting amplifier is respectively connected to the output end of the sixth inverting amplifier and the source of the first NMOS tube T1. The gate of the first NMOS tube T1 is connected to the output end of the seventh inverting comparator, and the drain of the first NMOS tube T1 is respectively connected to the positive end of the nineteenth resistor R19 and the positive end of the twenty-third resistor R23 of the tenth positive phase adder.
[0055] The natural forgetting unit includes a fourth AND gate AND4 and a ninth inverting amplifier. Two input ports of the fourth AND gate AND4 are respectively connected to the output port of the first NOT gate NOT1 and the output port of the second AND gate NOT2, and the positive end of the twentieth resistor R20 of the ninth inverting amplifier is connected to the output port of the fourth AND gate AND4, and the output end of the ninth inverting amplifier is connected to the positive end of the twenty-fourth resistor R24 of the tenth in-phase adder;
[0056] The separate ring forgetting unit includes a fifth AND gate AND5, two input ports of the fifth AND gate are respectively connected to the second NOT gate NOT2 and the output port of the auditory neuron NR, and the positive end of the twenty-fifth resistor R25 of the tenth in-phase adder is connected to the output port of the fifth AND gate AND5.
[0057] By outputting the food stimulation signal NF and the ring tone stimulation signal NR to each NOT gate and AND gate, each module is controlled to be turned on and off through each NOT gate and AND gate. With the different voltages, the resistance values of the first memristor M1 and the second memristor M2 change at different rates.
[0058] The change in the resistance of the first memristor M1 represents the change in the synaptic weight between the auditory neuron and the salivary neuron. Specifically, the smaller the resistance of M1, the greater the synaptic weight.
[0059] The change in the resistance of the second memristor M2 indicates the change in the length of the time interval of the individual feeding stimulation when individual feeding is performed, that is, the longer the stimulation time interval;
[0060] The longer the second memristor M2 is subjected to the voltage, the smaller the resistance value of the second memristor M2 is;
[0061] After passing through the mathematical operation unit ABS, the output voltage is smaller;
[0062] The mathematical operation unit ABS2 is used to convert the input voltage value into the absolute value output of the voltage value, and to control the output of the entire circuit by controlling the change of the resistance value of the memristor M1 and M2 to judge whether drooling occurs.
[0063] If the food neuron NF or the auditory neuron NR outputs a high level, it means that the neuron is activated and a salivation reaction occurs;
[0064] If the output of the salivary neuron NS is low, it means that the neuron is not activated and a salivation reaction occurs.
[0065] The natural forgetting unit includes a fourth AND gate AND4 and a ninth inverting amplifier. When neither food is given to the dog nor a bell is rung, that is, when neither the food neuron NF nor the auditory neuron NR is activated, natural forgetting occurs. Since the dog forgets slowly during natural forgetting, the fourth AND gate AND4 is turned on and outputs a small positive pulse voltage Vi, which is input to the ninth inverting amplifier. The expression of the inverting amplifier is: Wherein R22=R20=1kΩ. The single bell-ringing forgetting unit includes the fifth AND gate AND5. When the dog is not given food but only rings the bell, that is, the food neuron NF is not activated and the auditory neuron NR is activated, the fifth AND gate AND5 is turned on and outputs a pulse voltage to the tenth in-phase adder. The function of the adder is that when the dog forgets the food alone or the bell ringing alone, the stimulation interval of the forgetting stimulation of the feeding alone or the forgetting stimulation of the bell ringing alone will also be naturally forgotten. Therefore, the function of the tenth in-phase adder is to integrate the three types of forgetting voltages.
[0066] In another embodiment of the present invention, referring to Figure 2 When only food or ringtone is given to the dog, that is, only food neuron NF or auditory neuron NR is activated, the activation state of salivary neuron NS is tested. When only food is given, food neuron NF will output a high level voltage Vfood, which will be input to the first in-phase amplifier and mathematical operation unit ABS1. Since food causing dog salivation is an unconditioned reflex, the input terminal of the in-phase comparator is connected to resistor R8 and the output of ABS1 is This voltage can directly cause salivation through the OR gate OR1 of the salivary neuron NS. When only the bell is given, the auditory neuron NR will output a high-level voltage Vring. At this time, the fifth AND gate AND5 will be activated, and after Vring is input to the eleventh in-phase adder and the second in-phase adder, the voltage acts on M1. Since the initial value of M1 is high and the input Vring is a negative value, at the beginning, when the bell is ringing alone, the salivary neuron will not be activated.
[0067] In another embodiment of the present invention, referring to Figure 3 , food and bell signals are given to the dog at the same time, that is, the food neuron NF and the auditory neuron NR are activated at the same time. At this time, the first AND gate AND1 is turned on and outputs a high-level learning voltage Va. This voltage passes through the second in-phase adder. Since the voltage at the positive end of the resistor is 0, the voltage output by the second in-phase adder is Va. The voltage Va acts on the memristor M1 and the mathematical operation unit ABM1. Since the expression of the combination of the third inverting amplifier and the mathematical operation unit ABM1 is Therefore, as the voltage Va acts on the memristor M1 and the resistance of M1 continues to decrease, Vout also continues to decrease. When the output voltage passes through the fourth inverting hysteresis comparator, the two comparison voltages of the comparator are: Vth11=1V, Vth12=5V. As the resistance of the memristor M1 decreases to 1kΩ, Vout=1V. At this time, the fourth inverting hysteresis comparator outputs a high-level voltage V11. Since V11 is greater than the threshold voltage Vth1 of the salivary neurons, the fifth in-phase comparator outputs a high-level voltage, indicating that the associative memory between the ringtone and the saliva has been established. When the ringtone signal is input alone, the salivary neurons will generate a high-level voltage. Figure 4 The simulation results show that the dog learned the conditioned reflex process of producing saliva when the bell was rung at 26S, and the resistance of the memristor M1 at this time is about 1kΩ, and the output voltage VOP5 jumps from a low level to a high level. This change indicates that the associative memory between the auditory neuron NR and the salivary neuron NS has been formed.
[0068] In another embodiment of the present invention, referring to Figure 4 , a simulation diagram of the forgetting process when the interval between giving food to the dog is 2S. When the dog is already in the learned state, food is given alone, that is, the food neuron NF will be activated alone and output the forgetting voltage Vfood. At this time, the second AND gate AND2 is turned on, and the voltage Vfood causes the first monostable trigger S1 to generate a voltage of -12V, 2S. During the food stimulation interval, the third AND gate AND3 and the fourth AND gate AND4 are turned on and generate a high-level voltage Vi, which acts on the memristor M2, passes through the eighth inverting amplifier and the mathematical operation unit ABS2, and the expression of the combination of the two components is: From the expression, we can see that as the food stimulation interval gets longer, the voltage Vi acts on M2 for a longer time, the memristor resistance decreases faster, and the output voltage becomes larger. The output voltage Vout of the mathematical operation unit ABS and the output voltage S1 of the first monostable trigger S1 act on the sixth in-phase adder, and the output of the adder is V OP6 =S1+Vout. From this expression, we can see that as the voltage of Vout increases, the output of VOP6 increases. This voltage passes through the circuit composed of the seventh inverting comparator and the first NMOS tube T1. Since the function of this circuit is to prevent Vout from being output alone, when the voltage of VOP6 is greater than Vth2, the seventh inverting comparator outputs a high-level voltage Vcc to act on the NMOS tube T1. Since the NMOS tube T1 is in the on state due to the high level, and outputs the VOP6 voltage to the tenth in-phase adder and the second in-phase adder and then acts on the memristor M1. Since the voltage value of Vout is negative, the memristor value continues to rise. When the memristor value rises to 5kΩ, the mathematical operation unit ABM1 outputs a 5V voltage, which passes through the fourth inverting hysteresis comparator to output a low-level voltage. This indicates that the associative memory between the ringing sound and drooling has disappeared. When the bell is rung again, the salivary neurons will no longer be activated. Figure 4 It can be seen that when the stimulation interval of food alone is 2S, it takes about 74S to complete the forgetting process, and the resistance of the memristor is about 5kΩ at this time. The output of VOP5 changes from high level to low level, indicating that the forgetting process has been completed. After that, the test phase verifies that the associative memory between the ringing sound and salivation has disappeared.
[0069] In another embodiment of the present invention, referring to Figure 5 , is a simulation diagram of the forgetting process when the interval between food stimulation is 4S. Figure 3 The simulation process is similar. By controlling the time when the high-level voltage acts on the memristor M2, the mathematical operation unit ABS2 outputs different voltages. Figure 3 The stimulation interval of the simulation process is 2S, which is longer. Therefore, the voltage output by the mathematical operation unit ABS2 is larger. However, the output voltage of the first monostable trigger in the two types of simulation processes is the same. Therefore, the output voltage of the sixth in-phase adder is Figure 4 Therefore, when the voltage acts on the memristor M1 through the tenth in-phase adder and the second in-phase adder, the speed at which the memristor value of M1 decreases is faster than that of Figure 3 The simulation process is slow, so Figure 4 The forgetting rate of the simulation process is slow. Figure 4The simulation results show that when the stimulation interval of food stimulation is 4S, it takes about 108S for the dog to complete the forgetting process. Figure 3 When the stimulus interval between food stimuli was 2S, it took longer to complete forgetting.
[0070] It should be appreciated that embodiments of the present invention may be implemented or implemented by a combination of computer hardware and software, or by computer instructions stored in a non-transitory computer-readable memory. The method may be implemented in a computer program using standard programming techniques, including a non-transitory computer-readable storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner, according to the methods and drawings described in the specific embodiments. Each program may be implemented in a high-level procedural or object-oriented programming language to communicate with a computer system. However, if desired, the program may be implemented in assembly or machine language. In any case, the language may be a compiled or interpreted language. In addition, the program may be run on a programmed dedicated integrated circuit for this purpose.
[0071] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A variable forgetting rate circuit based on a memristor, characterized in that: Including neuron module, synapse module, and forgetting voltage control module; The neuron module includes a food neuron NF, an auditory neuron NR, one or more logic gates and a salivary neuron NS, wherein the food neuron NF and the auditory neuron NR are respectively connected to the logic gates; The logic gate selects the corresponding synaptic module or forgetting voltage control module by judging the activation state of the food neuron NF and the auditory neuron NR, and changes the resistance value of the memristor M1 and M2, and the synaptic module and the forgetting voltage control module output voltage. The salivary neuron NS receives different input voltages, and the input voltage value is greater than the threshold value of the salivary neuron NS, indicating that the salivary neuron is activated; The salivary neuron NS comprises a fifth in-phase comparator, a sixth AND gate AND6 and a first OR gate OR1, and the input ports of the salivary neuron N are respectively the input ports of the fifth in-phase comparator, the sixth AND gate AND6 and the first OR gate OR1, wherein the input port of the fifth in-phase comparator is connected to the output port of the fourth inverting hysteresis comparator of the synapse module, the two input ports of the sixth AND gate AND6 are respectively connected to the output port of the auditory neuron NR and the output port of the fourth inverting hysteresis comparator, and the two input ports of the first OR gate OR1 are respectively connected to the output port of the mathematical operation unit ABS1 of the synapse module and the output port of the sixth AND gate AND6; The output of the salivary neuron NS is controlled by the output end of the first OR gate OR1; By outputting the food stimulation signal NF and the ring tone stimulation signal NR to each NOT gate and AND gate, each module is controlled to be turned on and off through each NOT gate and AND gate. With the different voltages, the resistance values of the first memristor M1 and the second memristor M2 change at different rates. The change in the resistance of the first memristor M1 represents the change in the synaptic weight between the auditory neuron and the salivary neuron. Specifically, the smaller the resistance of M1, the greater the synaptic weight. The change in the resistance of the second memristor M2 indicates the change in the length of the time interval of the individual feeding stimulation when individual feeding is performed, that is, the longer the stimulation time interval; The longer the second memristor M2 is subjected to the voltage, the smaller the resistance value of the second memristor M2 is; After passing through the mathematical operation unit ABS, the output voltage is smaller; The mathematical operation unit ABS2 is used to convert the input voltage value into the absolute value output of the voltage value, and to control the output of the entire circuit by controlling the change of the resistance value of the memristor M1 and M2 to judge whether drooling occurs.
2. The variable forgetting rate circuit based on a memristor as claimed in claim 1, characterized in that: The food neuron NF and the auditory neuron NR are respectively connected to the input ends of the synaptic module and the forgetting voltage control module, the salivary neuron NS is connected to the input port of the synaptic module, and the salivary neuron generates a corresponding output voltage according to the size of the input voltage of the synaptic module.
3. The variable forgetting rate circuit based on memristor as claimed in claim 2, characterized in that: The output signal NF of the food neuron NF is respectively connected to the eighth resistor R8 of the first reverse amplifier of the synaptic module, the first AND gate AND1, the second NOT gate NOT2 and the second AND gate AND2 of the forgetting voltage control module, wherein the output signal NF is input to the input end of the second NOT gate NOT2, and the fifth AND gate AND5 of the forgetting voltage control module is controlled through the output end of the second NOT gate NOT2.
4. The variable forgetting rate circuit based on memristor as claimed in claim 3, characterized in that: The output signal NR of the auditory neuron NR is connected to the input end of the first AND gate AND1 of the synaptic module, the input end of the sixth AND gate AND6 of the salivary neuron, the first NOT gate NOT1, the input ends of the fourth AND gate AND4 and the fifth AND gate AND5 of the forgetting voltage control module; The output signal NR of the auditory neuron NR is used to input the input end of the first NOT gate NOT1, and the second AND gate AND2 and the fourth AND gate AND4 of the forgetting voltage control module are controlled through the output end of the first NOT gate.
5. The variable forgetting rate circuit based on memristor as claimed in claim 4, characterized in that: The synapse module includes a first inverting amplifier, a first AND gate AND1, a mathematical operation unit ABS1, a second in-phase adder, a third inverting amplifier, a mathematical operation unit ABM1 and a fourth inverting hysteresis comparator; The output port of the food neuron NR is connected to the positive end of the eighth resistor R8 of the first inverting amplifier of the synaptic module, and the output port of the first inverting amplifier is connected to the input end of the mathematical operation unit ABS1, the input port of the first OR gate OR1 of the salivary neuron is connected to the output port of the mathematical operation unit ABS1, the input port of the first AND gate AND1 is respectively connected to the output ports of the food neuron NF and the auditory neuron NR, the first resistor R1 and the second resistor R2 of the second in-phase adder are respectively connected to the output port of the first AND gate AND1 and the output port of the tenth in-phase adder of the forgetting voltage control module, the positive end of the memristor M1 of the third inverting amplifier is connected to the output end of the second in-phase adder and the first input port IN1 of the mathematical operation unit ABM1, the second output port IN2 of the mathematical operation unit ABM1 is connected to the output port of the third inverting amplifier, and the input end of the fourth inverting hysteresis comparator is connected to the output port OUT of the mathematical operation unit, and the output port of the fourth inverting hysteresis comparator is connected to the input port of the fifth in-phase comparator.
6. The variable forgetting rate circuit based on memristor as claimed in claim 5, characterized in that: The forgetting voltage control module is divided into a separate feeding forgetting unit, a separate ringing forgetting unit and a natural forgetting unit; The separate feeding forgetting unit is composed of a second AND gate AND2, a third AND gate AND3, a first monostable trigger S1, a sixth in-phase adder, a seventh inverting comparator, an eighth inverting amplifier, a mathematical operation unit ABS and an NMOS tube. The input end of the second AND gate AND2 is connected to the output end of the food neuron NF and the first NOT gate NOT1 respectively, the input port of the first monostable trigger S1 is connected to the output port of the second AND gate AND2, the input port of the third AND gate AND3 is connected to the output port of the fourth AND gate AND4 of the natural forgetting unit, and the other input port of the third AND gate AND3 is connected to a voltage of 5V, and the positive terminal of the memristor M2 of the eighth inverting amplifier is connected to the output port of the second AND gate AND2. The positive end of the fourteenth resistor R14 and the fifteenth resistor R15 of the sixth in-phase adder are respectively connected to the output port of the mathematical operation unit ABS and the first monostable trigger S1, the input end of the seventh inverting amplifier is respectively connected to the output end of the sixth inverting amplifier and the source of the first NMOS tube T1, the gate of the first NMOS tube T1 is connected to the output end of the seventh inverting comparator, and the drain of the first NMOS tube T1 is respectively connected to the positive end of the nineteenth resistor R19 and the positive end of the twenty-third resistor R23 of the tenth positive adder.
7. The variable forgetting rate circuit based on memristor as claimed in claim 6, characterized in that: The natural forgetting unit includes a fourth AND gate AND4 and a ninth inverting amplifier, wherein two input ports of the fourth AND gate AND4 are respectively connected to the output port of the first NOT gate NOT1 and the output port of the second AND gate NOT2, and a positive end of a twentieth resistor R20 of the ninth inverting amplifier is connected to the output port of the fourth AND gate AND4, and an output end of the ninth inverting amplifier is connected to a positive end of a twenty-fourth resistor R24 of the tenth in-phase adder; The separate ring forgetting unit includes a fifth AND gate AND5, two input ports of the fifth AND gate are respectively connected to the second NOT gate NOT2 and the output port of the auditory neuron NR, and the positive end of the twenty-fifth resistor R25 of the tenth in-phase adder is connected to the output port of the fifth AND gate AND5.
8. The variable forgetting rate circuit based on memristor as claimed in claim 7, characterized in that: If the food neuron NF or the auditory neuron NR outputs a high level, it means that the neuron is activated and a salivation reaction occurs; If the output of the salivary neuron NS is low, it means that the neuron is not activated and a salivation reaction occurs.
