ece 504: supervisory control & critical infrastructures university of idaho udhay ravishankar

9
DC Motor Neurocontroller ECE 504: Supervisory Control & Critical Infrastructures University of Idaho Udhay Ravishankar

Upload: darrell-waters

Post on 22-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ECE 504: Supervisory Control & Critical Infrastructures University of Idaho Udhay Ravishankar

DC Motor Neurocontroller

ECE 504: Supervisory Control & Critical Infrastructures

University of Idaho

Udhay Ravishankar

Page 2: ECE 504: Supervisory Control & Critical Infrastructures University of Idaho Udhay Ravishankar

ObjectivesBuild DC Motor control circuitControl DC Motor via PC/Laptop using serial

communicationBuild 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

Page 3: ECE 504: Supervisory Control & Critical Infrastructures University of Idaho Udhay Ravishankar

DC Motor CircuitBuilt using

Microchip’s PIC18f2331 microcontroller (PIC: Programmable Interrupt Controller)

Allegro Microsystem’s AS3953SB-T full bridge PWM driver.

Hanseng DC MotorUS Digital QME-01 optical encoder

Page 4: ECE 504: Supervisory Control & Critical Infrastructures University of Idaho Udhay Ravishankar

Serial CommunicationMicrochip’s PIC18f2331 microcontroller has

EUSART pins that enable serial communication. (EUSART: Enhanced Universal Synchronous Asynchronous Receiver Transmitter)

Baud Rate of 9600 bps was selected

Page 5: ECE 504: Supervisory Control & Critical Infrastructures University of Idaho Udhay Ravishankar

Control CommandsPC 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>

Page 6: ECE 504: Supervisory Control & Critical Infrastructures University of Idaho Udhay Ravishankar

GUIMatlab’s GUI GUIDE Tool was used to build

the GUI.

Page 7: ECE 504: Supervisory Control & Critical Infrastructures University of Idaho Udhay Ravishankar

Training Data AcquisitionA ‘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.

Page 8: ECE 504: Supervisory Control & Critical Infrastructures University of Idaho Udhay Ravishankar

Neurocontroller Demonstration

Page 9: ECE 504: Supervisory Control & Critical Infrastructures University of Idaho Udhay Ravishankar

ConclusionAn 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.