120 likes | 350 Views
DC Motor Neurocontroller. ECE 504: Supervisory Control & Critical Infrastructures University of Idaho Udhay Ravishankar. Objectives. Build DC Motor control circuit Control DC Motor via PC/Laptop using serial communication
E N D
DC Motor Neurocontroller ECE 504: Supervisory Control & Critical Infrastructures University of Idaho UdhayRavishankar
Objectives • Build DC Motor control circuit • Control DC Motor via PC/Laptop using serial communication • Build a GUI that sends control commands to the DC Motor circuit and displays real-time RPM sensor data • Acquire data from GUI and train a Neurocontroller • Use Neurocontroller to control DC Motor’s RPM at user-defined RPM set point
DC Motor Circuit • Built using • Microchip’s PIC18f2331 microcontroller (PIC: Programmable Interrupt Controller) • Allegro Microsystem’s AS3953SB-T full bridge PWM driver. • Hanseng DC Motor • US Digital QME-01 optical encoder
Serial Communication • Microchip’s PIC18f2331 microcontroller has EUSART pins that enable serial communication. (EUSART: Enhanced Universal Synchronous Asynchronous Receiver Transmitter) • Baud Rate of 9600 bps was selected
Control Commands • PC to DC Motor Circuit: • [PWM Duty Cycle, Phase] • DC Motor Circuit to PC: • [Start Byte, Timer High Byte, Timer Low Byte, Checksum Byte] • Example Commands: • PC to DC Motor: • [005 000] <5% PWM Duty Cycle, Clockwise> • [020 001] <20% PWM Duty Cycle, Counterclockwise> • DC Motor to PC: • [128 0 205 179] <RPM = 60/(120*(256*0+205)*0.5e-6) = 4878.05>
GUI • Matlab’s GUI GUIDE Tool was used to build the GUI.
Training Data Acquisition • A ‘Log Training Data’ button was embedded on the GUI. • On the click of the button, the GUI will begin to send control commands that vary the PWM Duty Cycle between 60% to 0% and back and acquire the RPM data. All data was logged into a file called ‘MotorData0.mat’. • The Neurocontroller was trained from this data.
Conclusion • An example SCADA system was built for the DC Motor circuit. This system sent control commands as well as acquired data. • A Neurocontroller was trained from data acquired and then used to control the DC Motor hardware.