類神經網路係使用相互連結的神經元來模仿生物神經網路的特性,其本身為一平行運算的架構。在動態的即時性預測和控制的問題中,類神經網路的運算速度是一大關鍵。因此本論文採用FPGA方式開發硬體類神經網路,充份利用硬體電路的平行處理與高速的特性,完成類神經網路學習及回想的運算過程。本論文採用串列環形硬體架構為基礎,進行三層與四層倒傳遞類神經及回饋型類神經網路的運算,並且透過硬體設計方式實現片段線性活化函數計算。活化函數包含雙彎曲函數與雙曲線正切函數可供使用者自行選擇。在逆向運算中的輸出層誤差運算則利用管線方式設計以提高速度,在隱藏層誤差運算則採用串列環形硬體架構。利用分段計算設計,可使控制器以固定運算單元陣列下,合成出龐大的網路。本論文以Nios II作為下達指令、網路架構參數的控制器,透過控制器分配權重設計及控制流程,使其不需要重新規劃整個系統。由於是在硬體上完成開發,因此在移植性方面及運算速度上都比軟體上開發來的便利及快速,適用於低階嵌入式系統內。本論文透過應用在曲線擬合、電池放電曲線以及預測問題等實驗,驗證本論文所提的架構可達到高效率及精準度的需求。
Artificial Neural Networks (ANN) is a highly parallel computing system architecture. It utilizes many interconnecting neurons to simulate the properties of organic neural network. The processing speed of the neural network is the key issue in the dynamic real-time forecast and control. This thesis implements the Artificial Neural Network (ANN) in hardware using FPGA. The proposed architecture performs parallel forward and backward calculation during learning process for three or four-layer Back Propagation Artificial Neural Networks and Recurrent Neural Networks. Activation function based on Piece Wise Linear function (PWL) is implemented in hardware. The hardware-based activation function not only includes Sigmoid Function but also contains Hyperbolic Tangent Function. Users are able to choose from these two functions. Backward calculation of output layer error is implemented in pipeline structure which improves efficiency. The backward calculation of hidden layer error is implemented in Torodial structure which is also used during forward calculation in order to save the hardware resources. Segmentation calculation is also implemented in this thesis. By using segmentation calculation, a larger ANN structure can be formed by a piece of hardware with limited number of PEs. Since the number of neurons in the synthesized ANN can be dynamically changed, the proposed ANN structure can be easily applied to different applications, especially in the low-end embedded systems. Finally, three cases, e.g. curve fitting, battery dis-charge curve and predict problems were used to evaluate the performance and valid the results.