
Application Of Neural Network On PLC-based Automation Systems For Better Fault Tolerance And Error Detection By Bhargav Joshi A thesis submitted to the Graduate Faculty of Auburn University in partial fulfillment of the requirements for the Degree of Master of Computer Science and Software Engineering Auburn, Alabama August 3, 2019 Keywords: PLC, neural, network, automation, ladder, python Approved by David Umphress, Chair, Professor of CSSE Bo Liu, Assistant professor of CSSE Anh Nguyen, Assistant professor of CSSE ABSTRACT Neural networks have a wide range of applications such as building complex equations using the input and output characteristics of functions, predictions of outputs, error detections, monitoring complex systems, etc. Neural network’s capabilities of monitoring the system, error detection, and predictions merged with Programmable Logic Controllers (PLC) can improve the fault tolerance and error detections in automation systems. While the PLC program is being tested in the simulated environment before it is implemented in the automation system, the values of PLC’s I/O ports, timers and critical variables during the execution of the program can be used to train a neural network and prepare it to monitor the system. Execution of the trained neural network in parallel with the PLC’s execution where the inputs and the outputs to the PLC are also supplied to the trained neural network, adds an artificial intelligence inspired system monitor. A neural network based system monitor learns the characteristics of the automation system using PLC’s port values and internal variables during the training. A successfully trained neural network can detect a malfunction or abnormal behavior in the automation system when the outputs to the automation system generated by the PLC and the outputs generated by the neural network are compared. The abnormal behavior of an automated system could have been caused by intrusions in which the PLC code has been altered by external entities, hardware faults, malfunctions on PLC’s I/O ports, mishandling of the system by the operators, etc. Addition of AI-based monitor to the automation system provides an additional layer of security and helps the system run efficiently since neural network’s prediction capability can alert the operators if abnormal behavior in the system starts to take place before it is too late to recover. ii TABLE OF CONTENTS ABSTRACT .......................................................................................................................... II TABLE OF CONTENTS ....................................................................................................... III LIST OF FIGURES ................................................................................................................ V LIST OF TABLES ............................................................................................................... VII 1. CHAPTER-1: PROBLEM DESCRIPTION ........................................................................... 1 2. CHAPTER-2: PREVIOUS WORK ....................................................................................... 3 2.1 PROTOCOLS: ...................................................................................................................... 3 2.2 SIGNAL FEEDBACKS FROM EDGE DEVICES: ...................................................................... 4 2.3 HUMAN MACHINE INTERFACE (HMI): ............................................................................... 4 2.4 MACHINE LEARNING: ........................................................................................................ 5 2.4.1 ARTIFICIAL NEURAL NETWORKS(ANN): .................................................................... 6 2.5 MERGING NEURAL NETWORKS TO PLC OPERATIONS: ..................................................... 8 3. CHAPTER-3: SOLUTION .................................................................................................. 9 3.1 THE CONCEPTUAL DESIGN: ............................................................................................... 9 3.1.1 NNPLC IN TRAINING CONFIGURATION: .................................................................. 10 3.1.2 NNPLC IN DEPLOYED CONFIGURATION: ................................................................. 11 3.2 TACKLING KEY CHALLENGES TO IMPLEMENT THE CONCEPT DESIGN: ........................ 12 3.3 CHALLENGE#1: ................................................................................................................. 12 3.3.1 CONTENTS OF TRAINING DATA SET: ....................................................................... 13 3.3.2 HARVESTING DIGITAL VALUES: ............................................................................... 15 3.3.2 HARVESTING ANALOG VALUES: .............................................................................. 20 3.3.3 HARVESTING TIMER VALUES: .................................................................................. 22 3.4 CHALLENGE#2: ................................................................................................................. 22 3.4.1 ERROR BACKPROPAGATION ALGORITHM (EBP): .................................................... 28 3.4.2 LEVENBERG-MARQUARDT ALGORITHM (LM): ........................................................ 31 3.4.3 NEURON-BY-NEURON ALGORITHM (NBN): ............................................................. 33 3.4.4 SCALED CONJUGATE GRADIENT: ............................................................................. 35 3.4.5 CHOOSING TRAINING ALGORITHMS FOR NNPLC: .................................................. 37 3.5 CHALLENGE#3: ................................................................................................................. 38 3.5.1 DYNAMICALLY DEPLOYED: ...................................................................................... 39 3.5.2 STATICALLY DEPLOYED: .......................................................................................... 39 3.5.3 COMPARISON: ........................................................................................................... 40 3.6 TESTING PLATFORMS FOR NEURAL NETWORKS: ........................................................... 41 iii 4. CHAPTER-4: SOLUTION VALIDATION .......................................................................... 43 4.1 APPARATUS AND SOFTWARE USED FOR NNPLC: ........................................................... 43 4.2 VALIDATION OF THE CONCEPT: ..................................................................................... 44 4.2.1 LADDER LOGIC IMPLEMENTED IN THE PLC: ........................................................... 45 4.2.2 GATHERING TRAINING DATA: ................................................................................. 47 4.2.3 TRAINING THE NEURAL NETWORK: ........................................................................ 48 4.2.4 TESTING NNPLC WITH A PREDICTION MODEL: ...................................................... 57 5. CHAPTER-5: CONCLUSION AND FUTURE WORK ......................................................... 62 5.1 CONCLUSION: ................................................................................................................... 62 5.2 FUTURE WORK: ................................................................................................................. 63 REFERENCES ..................................................................................................................... 65 APPENDIX-A ..................................................................................................................... 68 APPENDIX-B ...................................................................................................................... 74 APPENDIX-C ...................................................................................................................... 90 ACKNOWLEDGMENTS .................................................................................................... 100 VITA ................................................................................................................................ 102 iv LIST OF FIGURES Figure 1: HMI of an automated turbine system (example)[10] ...................................................... 5 Figure 2: Machine Learning methodology [21] ............................................................................. 6 Figure 3: Number of input neurons for one-step-ahead forecasting [19] ..................................... 7 Figure 4: Block diagram of training configuration ...................................................................... 10 Figure 5: Block diagram of the deployed configuration .............................................................. 11 Figure 6: Harvest Digital IO values using shift registers ............................................................. 15 Figure 7: E-boot LM2596 buck converter [30] ............................................................................. 16 Figure 8: Logic diagram of SN74HC165 Parallel-in/Shift-out [23] .............................................. 17 Figure 9: Timing Diagram of SN74HC165 [23] ............................................................................ 18 Figure 10: Harvesting analog values ........................................................................................... 20 Figure 11 Voltage divider ...........................................................................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages110 Page
-
File Size-