A method and system for realizing taboo learning neuron circuit based on FPGA

By using fourth-order Longguta method and floating-point operation IP cores in the FPGA development environment, a modular taboo learning neuron system was solved, and the problem of difficulty in simulating taboo search neuron model in the existing technology was solved, and the neural network was achieved Real-time simulation and high-precision simulation of metadynamic behavior provide core components for brain-like computing.

CN113705139BActive Publication Date: 2024-12-06南京若吉电子有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111104680.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-22
Publication Date
2024-12-06
Estimated Expiration
2041-09-22

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively simulate and study neuronal models based on taboo search ideas, which limits the engineering application of brain-like scientific research.

Method used

Using the FPGA development environment, the differential equations of the taboo learning model are deformed using the fourth-order Longguta method, and a numerical solution model is constructed through floating-point operation IP cores to realize a modularly designed dual-neuron system to simulate taboo learning neurons dynamic behavior.

Benefits of technology

Real-time simulation of the dynamic behavior of taboo learning neurons is realized, providing core functional components for brain-like computing and the development of complex robots, and improving computing accuracy and controllability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113705139B_ABST
    Figure CN113705139B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of brain-like neuron science and technology, and in particular to a method and system for realizing taboo learning neuron circuits based on FPGA. By defining vectors and vectorized functions, the differential equations of the taboo learning dual neuron model are deformed using the fourth-order Runge-Kutta method, a numerical solution model based on an iteration method is established, and the model functions required in the numerical solution model are constructed using the floating-point operation IP core of FPGA, and a dual neuron system is established using a modular design approach. The method and system for realizing taboo learning neuron circuits based on FPGA proposed in the present invention realize the electronic neurons of the taboo learning model, and use FPGA to simulate the dynamic behavior of neurons, which helps to promote the engineering application of taboo learning models in the field of artificial intelligence. Researchers can use the present invention to simulate various dynamic behaviors of brain neurons in real time, and provide core functional components for the development of brain-like computing and complex robots.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of brain-like neuron science and technology, and in particular to a method and system for realizing a taboo learning neuron circuit based on FPGA. Background Art

[0002] Scientific research shows that the human brain is composed of countless neurons connected into a neural network through synapses. Scientists have proposed a variety of neuron models based on differential equations based on experimental data. Multiple neuron models coupled together in a certain way can present dynamic behaviors such as chaos, periodic oscillations, stable points, and bifurcations. These dynamic behaviors are closely related to the brain's memory, thinking, association and other activities. Among them, the taboo learning neuron model is proposed based on the idea of ​​taboo search. The neural network constructed by the taboo search idea is mainly used to solve the traveling salesman problem and the maximum independent set problem. Using FPGA to implement electronic neurons of the taboo learning model can promote the engineering application of brain-like scientific research results. Summary of the invention

[0003] The purpose of the present invention is to provide a method and system for realizing a taboo learning neuron circuit based on FPGA, using FPGA to simulate the dynamic behavior of taboo learning neurons for the research of brain-like circuits.

[0004] To achieve the above object, the present invention provides the following technical solution: a method and system for realizing taboo learning neuron circuit based on FPGA, comprising the following steps:

[0005] S1: Define vector X = [u1, u2, J1, J2] T and vectorized function F(X)=[f u1 , f u2 , f J1 , f J2 ] T , where the four sub-functions are defined as follows, namely the right side of the above differential equation:

[0006]

[0007] S2: The differential equations of the taboo learning model are transformed using the fourth-order Runge-Kutta method, and a numerical solution model based on the iterative method is established:

[0008]

[0009] Set the initial value of vector X. The value of vector X will be continuously updated during the iterative calculation process. n Indicates the value of the vector X at the current nth step, X n+1 It represents the value of vector X at step n+1 after one iteration, and h is the iteration step length;

[0010] S3: In the FPGA development environment, using the exponential function of single-precision floating-point IP z , addition, subtraction and division operations and the following formula to construct the single-precision floating-point tanh function program required in the model:

[0011]

[0012] S4: Based on the constructed floating-point tanh function and other floating-point operations, construct the PL-side vectorized numerical solution model function F(X), which will be called repeatedly during the iterative calculation process;

[0013] S5: Build the Runge-Kutta parameter module on the PL side to calculate X k1 =X n +ΔX1·h / 2,X k2 =X n +ΔX2·h / 2,X k3 =X n +ΔX3·h and other input parameters of F(X) function;

[0014] S6: Construct an update module for vector X to calculate the new vector:

[0015] X n+1 =X n +(ΔX1+2ΔX2+2ΔX3+ΔX4)·h / 6; (4)

[0016] S7: Using the loop counter, a central control module is constructed to control the operation order and the number of operation clock cycles of the function module, parameter module, and update module; at the same time, the central control module also receives information such as variable initial values, excitation gradients, and iteration restarts from the PS side through the GPIO interface of the PL side and the PS side;

[0017] S8: Build the output module on the PL side, convert the floating-point operation value into a fixed-point number, and send it to the DAC together with the accompanying clock.

[0018] S9: Use the software logic analyzer in the FPGA development environment to build a debugging module for online observation of intermediate variables in each module;

[0019] S10: Build a PS-side program to receive variable initial values, excitation gradients, iterative restarts and other information sent by the host computer through Ethernet UDP data communication, and send this information to the central control module on the PL side through the GPIO interface to achieve online resetting of variable initial values ​​and iterative restart.

[0020] Preferably, an electronic neuron with full floating-point operations constructed using a floating-point operation IP core at the PL end of an FPGA is used to ensure higher operation accuracy and controllable operation time.

[0021] Preferably, the PS end (ARM processor) of the FPGA is used to construct a channel for electronic neurons to exchange data with the outside world.

[0022] Preferably, the initial value of the electronic neuron model is reset online using a host computer and the iteration process is restarted.

[0023] Preferably, in step S3, in Xilinx FPGA development environment Vivado, a Verilog program of a PL-side floating-point tanh function is constructed using IP cores of 32-bit floating-point exponential function, addition, subtraction and division operations and formula (3).

[0024] Preferably, in step S7, the main clock of all modules on the PL side is 100 MHz, and the F(X) function is called four times in each iteration. Each call of the F(X) function uses 25 clock cycles, and the update module is also allocated 25 clock cycles.

[0025] Preferably, in step S8, the 32-bit floating point values ​​of u1 and u2 are converted into 14-bit fixed point numbers and sent to a dual-channel 14-bit DAC together with the accompanying clock (0.8 MHz).

[0026] Preferably, in step S8, the DAC converts the digital signal into an analog signal, and the two analog signals obtained by the DAC conversion are respectively connected to two input channels of the oscilloscope.

[0027] Preferably, in step S9, an ILA debugging module is constructed, the storage depth of the ILA and the number of variables to be observed and the bit width of each variable are set, and the intermediate variables to be observed are added in the Verilog program.

[0028] Preferably, in step S10, the Ethernet UDP data packet sent by the host computer is received by software interrupt mode. Once the PS side receives the UDP data packet and parses the data packet content, the parsed information is sent to the central control module of the PL side through the GPIO interface simulating the SPI bus.

[0029] Compared with the prior art, the present invention has the following beneficial effects:

[0030] The present invention uses the fourth-order Runge-Kutta method to transform the differential equations of the taboo learning dual neuron model and establish a numerical iterative solution model. The floating-point operation IP core of FPGA is used to construct the model functions required in the numerical solution model, and a modular design concept is used to establish a dual neuron system. Researchers can use the present invention to simulate various dynamic behaviors of brain neurons in real time, providing core functional components for the development of brain-like computing and complex robots. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 This is a block diagram of the electronic neuron composition based on FPGA of the present invention;

[0032] Figure 2 This is a flow chart of implementing the tanh function at the PL end of the present invention;

[0033] Figure 3 The PL end of the present invention realizes f u1 Flowchart of the function;

[0034] Figure 4 It is a flow chart of iterative calculation at the PL end of the present invention;

[0035] Figure 5 When g = 5 and initial value = [1, -1, 0, 0], the phase trajectory diagram of u1 and u2 obtained on the oscilloscope using the XY display mode (the neuron is in a periodic oscillation state);

[0036] Figure 6 g = 5, initial value = [10 -6 , 0, 0, 0], the phase trajectory diagram of u1 and u2 obtained on the oscilloscope using the XY display mode (the neuron is in a chaotic state). DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] A method and system for implementing a taboo learning neuron circuit based on FPGA, comprising the following steps:

[0039] S1: Define vector X = [u1, u2, J1, J2] T and vectorized function F(X)=[f u1 , f u2 , f J1 , f J2 ] T, where the four sub-functions are defined as follows, namely the right side of the above differential equation:

[0040]

[0041] S2: The differential equations of the taboo learning model are transformed using the fourth-order Runge-Kutta method, and a numerical solution model based on the iterative method is established:

[0042]

[0043] Set the initial value of vector X. The value of vector X will be continuously updated during the iterative calculation process. n Indicates the value of the vector X at the current nth step, X n+1 It represents the value of vector X at step n+1 after one iteration, and h is the iteration step length;

[0044] S3: In Xilinx FPGA development environment Vivado, use the 32-bit floating-point exponential function, addition, subtraction and division IP cores and the following formula to build the PL-side floating-point tanh function Verilog program. The implementation flow chart is as follows: Figure 2 Shown

[0045]

[0046] S4: Based on the constructed floating-point tanh function and other floating-point operations, construct the PL-side vectorized numerical solution model function F(X). The F(X) function will be called repeatedly during the iterative calculation process. As an example, f u1 The implementation flow chart of the sub-function is as follows Figure 3 As shown;

[0047] S5: Build the Runge-Kutta parameter module on the PL side to calculate X k1 =X n +ΔX1·h / 2,X k2 =X n +ΔX2·h / 2,X k3 =X n +ΔX3·h and other input parameters of F(X) function, h is 0.01, and the calling sequence of F(X) function is as follows Figure 4 As shown;

[0048] S6: Construct an update module for vector X to calculate the new vector:

[0049] X n+1 =X n +(ΔX1+2ΔX2+2ΔX3+ΔX4)·h / 6; (4)

[0050] S7: Using the loop counter, a central control module is constructed to control the operation order and the number of operation clock cycles of the function module, parameter module, and update module. The main clock of all modules on the PL side is 100MHz. The F(X) function is called four times in each iteration. Each call of the F(X) function uses 25 clock cycles. In addition, the update module is also allocated 25 clock cycles. Therefore, each update of vector X uses 125 clock cycles, that is, the update frequency of vector X is 0.8MHz=100MHz / 125. At the same time, the central control module also receives information such as variable initial values, excitation gradients, and iteration restarts from the PS side through the GPIO interfaces of the PL side and the PS side.

[0051] S8: Build the output module on the PL side, convert the 32-bit floating-point values ​​of u1 and u2 into 14-bit fixed-point numbers, and send them to the dual-channel 14-bit DAC together with the accompanying clock (0.8MHz). The two analog signals obtained after DAC conversion are connected to the two input channels of the oscilloscope respectively, so that the waveform can be observed on the oscilloscope.

[0052] S9: Use the integrated logic analyzer (ILA) in the FPGA development environment Vivado to build an ILA debugging module, set the ILA storage depth and the number of variables to be observed and the bit width of each variable, and add the intermediate variables to be observed in the Verilog program for online observation of the intermediate variables in each module;

[0053] S10: Build a PS-side program and use software interrupts to receive Ethernet UDP data packets sent from the host computer. The data format of the UDP packet is agreed upon. The data format contains information such as variable initial values, excitation gradients, and iterative restarts. Once the PS receives the UDP data packet and parses the data packet content, it sends this information to the central control module on the PL side through the GPIO interface to simulate the SPI bus based on the content contained in the data packet, so as to realize online resetting and iterative restart of variables such as variable initial values ​​and excitation gradients.

[0054] S11: Use the XY display mode of the Agilent oscilloscope to observe the phase trajectory diagram of u1-u2, as shown in Figure 5 and Figure 6 .

[0055] In this embodiment, an electronic neuron with full floating-point number operations constructed by a floating-point operation IP core at the PL end of the FPGA is used to ensure high operation accuracy and controllable operation time.

[0056] In this embodiment, the PS end (ARM processor) of the FPGA is used to construct a channel for the electronic neuron to exchange data with the outside world.

[0057] In this embodiment, the initial value of the electronic neuron model is reset online by the host computer and the iteration process is restarted.

[0058] Among them, the dual neuron taboo learning model can be expressed by the following differential equation:

[0059]

[0060]

[0061]

[0062]

[0063] Among them, u i is the voltage of the ith neuron, J i is the self-feedback synapse of the ith neuron, λ represents the excitation gradient, and tanh is the hyperbolic tangent function. The electronic neuron based on FPGA consists of two parts: the PL side (logic circuit) program that implements the model calculation and the PS side (ARM processor) program that implements the external interface.

[0064] In summary, the present invention uses the fourth-order Runge-Kutta method to transform the differential equations of the taboo learning dual neuron model and establish a numerical iterative solution model, uses the floating-point operation IP core of FPGA to construct the model function required in the numerical solution model, and adopts a modular design idea to establish a dual neuron system. Researchers can use the present invention to simulate various dynamic behaviors of brain neurons in real time, and provide core functional components for the development of brain-like computing and complex robots.

[0065] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0066] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for implementing a taboo learning neuron circuit based on FPGA, characterized in that: The steps include: S1: Define vector X = [u1, u2, J1, J2] T and vectorized function F(X)=[f u1 , f u2 , f J1 , f J2 ] T , where u1 and u2 are the voltage of the first neuron and the voltage of the second neuron, J1 and J2 are the self-feedback synapses of the first neuron and the self-feedback synapses of the second neuron, respectively, and λ represents the excitation gradient. The four sub-functions are defined as follows: S2: The differential equations of the taboo learning model are transformed using the fourth-order Runge-Kutta method, and a numerical solution model based on the iterative method is established: Set the initial value of vector X. The value of vector X will be continuously updated during the iterative calculation process. n Indicates the value of the vector X at the current nth step, X n+1 It represents the value of vector X at step n+1 after one iteration, and h is the iteration step length; S3: In the FPGA development environment, using the exponential function of single-precision floating-point IP z , addition, subtraction and division operations and the following formula to construct the single-precision floating-point tanh function program required in the model: S4: Based on the constructed floating-point tanh function and other floating-point operations, construct the PL-side vectorized numerical solution model function F(X), which will be called repeatedly during the iterative calculation process; S5: Build the Runge-Kutta parameter module on the PL side to calculate X k1 =X n +ΔX1·h / 2,X k2 =X n +ΔX2·h / 2,X k3 =X n +ΔX3·h is the input parameter of the F(X) function; S6: Construct an update module for vector X to calculate the new vector: X n+1 =X n +(ΔX1+2ΔX2+2ΔX3+ΔX4)·h / 6; (4) S7: Using the loop counter, a central control module is constructed to control the operation order and the number of operation clock cycles of the function module, parameter module, and update module; at the same time, the central control module also receives variable initial values, excitation gradients, and iteration restart information from the PS side through the GPIO interface of the PL side and the PS side; S8: Build the output module of the PL side, convert the floating-point operation value into a fixed-point number, and send it to the DAC together with the accompanying clock; S9: Use the software logic analyzer in the FPGA development environment to build a debugging module for online observation of intermediate variables in each module; S10: Build a PS-side program to receive variable initial values, excitation gradients, and iterative restart information sent by the host computer through Ethernet UDP data communication, and send this information to the central control module on the PL side through the GPIO interface to achieve online resetting of variable initial values ​​and iterative restart.

2. The method for implementing a taboo learning neuron circuit based on FPGA according to claim 1, characterized in that: The electronic neuron with full floating-point operation built by the floating-point operation IP core of the PL side of the FPGA ensures high operation accuracy and controllable operation time.

3. The method for implementing a taboo learning neuron circuit based on FPGA according to claim 1, characterized in that: The PS side of FPGA is used to build a channel for electronic neurons to interact with the outside world for data.

4. The method for implementing a taboo learning neuron circuit based on FPGA according to claim 1, characterized in that: The initial value of the electronic neuron model is reset online using the host computer and the iteration process is restarted.

5. The method for implementing a taboo learning neuron circuit based on FPGA according to claim 1, characterized in that: In step S3, in the Xilinx FPGA development environment Vivado, a Verilog program for a PL-side floating-point tanh function is constructed using the IP cores of a 32-bit floating-point exponential function, addition, subtraction and division operations, and formula (3).

6. The method for implementing a taboo learning neuron circuit based on FPGA according to claim 1, characterized in that: In step S7, the main clock of all modules on the PL side is 100 MHz, and the F(X) function is called four times in each iteration. Each call of the F(X) function uses 25 clock cycles, and the update module is also allocated 25 clock cycles.

7. The method for implementing a taboo learning neuron circuit based on FPGA according to claim 1, characterized in that: In step S8, the 32-bit floating point values ​​of u1 and u2 are converted into 14-bit fixed point numbers and sent to the dual-channel 14-bit DAC together with the accompanying clock.

8. The method for implementing a taboo learning neuron circuit based on FPGA according to claim 1, characterized in that: In step S8, the DAC converts the digital signal into an analog signal, and the two analog signals obtained by the DAC conversion are respectively connected to two input channels of the oscilloscope.

9. The method for implementing a taboo learning neuron circuit based on FPGA according to claim 1, characterized in that: In step S9, an ILA debugging module is constructed, the storage depth of the ILA, the number of variables to be observed, and the bit width of each variable are set, and the intermediate variables to be observed are added in the Verilog program.

10. The method for implementing a taboo learning neuron circuit based on FPGA according to claim 1, characterized in that: In step S10, the Ethernet UDP data packet sent by the host computer is received by software interruption. Once the PS side receives the UDP data packet and parses the data packet content, the parsed information is sent to the central control module of the PL side through the GPIO interface simulating the SPI bus.

Citation Information

Patent Citations

  • Chay model electronic neuron and simulation platform

    CN110414083A

  • Method for displaying Izhikevich neuron model

    CN110598857A