design of a control workstation for controller algorithm testing aaron mahaffey dave tastsides dr....
Post on 21-Dec-2015
221 views
TRANSCRIPT
![Page 1: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/1.jpg)
Design of a Control Workstation for Controller Algorithm Testing
Aaron Mahaffey
Dave Tastsides
Dr. Dempsey
![Page 2: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/2.jpg)
Presentation Preview
Project Summary and Objective Hardware Controller Application
DC Motor Model Power Amplifier F/V Converter Modeling Summer Circuit Hardware Controller Design Experimental Results
![Page 3: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/3.jpg)
Presentation Preview
Software Controller Application Level Shifting Circuit BSP/Core Functions User Interface Command Signal Sampling Period Summer F/V Converter Digital Controller Digital Controller Results
![Page 4: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/4.jpg)
Presentation Preview
Demonstration Work Final Parts List Future Project Work
![Page 5: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/5.jpg)
Project Summary
Design of a control workstation to test control algorithms for a Pittman DC motor
Provide insight to classical and digital control system theory through practical applications
First apply control system with all hardware components, then implement as much as possible into software
![Page 6: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/6.jpg)
Project Summary
Quansar Consulting currently develops control workstations for $5,000
Each station requires a PC with an internal A/D and D/A converter
Goal is to develop a system at a much lower cost of $400 based on the 8051 development board
![Page 7: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/7.jpg)
System Block Diagram
![Page 8: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/8.jpg)
Motor Model
Gp(s) = 1949166 _
s2 + 920s + 114133
Poles at s= -148 and s= -772 rad/sec DC Gain of 17.08
![Page 9: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/9.jpg)
Power Amplifier
Discrete Component Design Internal Controller for Stability
Passive Lag Network Internal Feedback Loop Open Loop Crossover Distortion ±27.5 Volt Output Range
![Page 10: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/10.jpg)
Power Amplifier
![Page 11: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/11.jpg)
Power Amplifier Model
Closed Loop Gain = 11 Results from Matlab after observing open
loop frequency response in PSpice:o Time Constant = 10 uso Pole = 628000 rad/sec
G(s) = 11 _ s/628000 + 1
![Page 12: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/12.jpg)
F/V Converter Modeling
Desire Output of 2.5 V for Maximum RPM of 762o 762 RPM Corresponds to 38.4 kHzo Desired Gain = 2.5/38400 = .0000652
Experimentally Measured Results:o Time Delay = 5 mso Pole at 388 rad/sec
![Page 13: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/13.jpg)
F/V Converter Modeling
G(s) = .0000652*e-.005s
s/388 + 1
![Page 14: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/14.jpg)
Summer Circuit
Produces Error Signal from Difference of Command and Feedback Signals
Design using LF412 Operational Amplifier and precision resistors.
Experimental Transfer Function Vo = .9945V1 - .9895V2
![Page 15: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/15.jpg)
Hardware System Controller
Motor Tracking System Motor shaft velocity follows analog
command signal All subsystems designed with hardware Drive up to 762 RPM in positive direction Command signal of 0 - 2.5 volts Controller Phase Margin of 60º Steady State Error of zero (integrator)
![Page 16: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/16.jpg)
Hardware Controller Design
PI Controller Proportional Gain
Locates necessary crossover frequency to meet 60º phase margin specification
Obtained using Frequency Domain Design Integrator
Drives Steady State Error to zero
![Page 17: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/17.jpg)
Hardware Controller Design
Design for crossover frequency and adjust gain to get correct PM
Final Frequency Design Results from Matlab:o K = 37.6o PM = 59.6ºo wc = 34 rad/seco Overshoot = 7.06 %
![Page 18: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/18.jpg)
Experimental Results
![Page 19: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/19.jpg)
Experimental Results
Experimental Overshoot = 33 % Why such a large deviation? D/A phase lag
o Sampling Period (T) = 2 mso Phase lag = -wcT = -3.5 º
Motor and F/V time delayo Added time delay = 6.1 mso Phase lag = -wcTd = -11 º
![Page 20: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/20.jpg)
Experimental Results
Experimental Gain = 40o Could account for -5º phase lag
New phase margin = 40.5º New expected overshoot = 26 % New deviation = 7 %
![Page 21: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/21.jpg)
Presentation Preview
Software Controller Application Level Shifting Circuit BSP/Core Functions User Interface Command Signal Sampling Period Summer F/V Converter Digital PI Controller Digital Controller Results
![Page 22: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/22.jpg)
Level Shifting Circuit
In all applications, a signal is sent from the EMAC D/A Converter
D/A Converter Output is 0-5 Volts Desired Signal is ±2.5 Volts for
Bidirectional Drive in Software Application
D/A Converter Output must be shifted by -2.5 Volts
![Page 23: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/23.jpg)
Board Support Package (BSP)
Supports all Devices on Board Timer 0 Timer 2 D/A converter A/D converter Keypad LCD
![Page 24: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/24.jpg)
Core
Contains Functions Common in all Applications Summer Conversion routines RPM measurement F/V calculation
![Page 25: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/25.jpg)
User Interface
Communicates with User Ask for sampling period Ask for Proportional Gain Ask if Integration Desired Ask for step magnitude (+ or -) Verify all entries Display current motor RPM
![Page 26: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/26.jpg)
Command Signal
Command Signal Magnitude and sign provided by user
interface routine Value entered is level shifted Value is written to the D/A:
0 – 2.5 Volts -> Negative 2.5 – 5 Volts -> Positive
Support for step inputs only
![Page 27: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/27.jpg)
Sampling Period
Sampling Period Entered by user in terms of microseconds Value is converted to a timer reload value Timer 0 is setup with calculated reload
value All sample driven functions are called
from Timer 0 interrupt service routine
![Page 28: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/28.jpg)
Summer
Summer Subtracts value of F/V converter
feedback signal from command signal Software version allows for bidirectional
error signal by determining motor direction from encoder signals
Called at sampling rate by Timer 0 interrupt service routine
![Page 29: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/29.jpg)
F/V Converter
Timer 2 initialized to auto reload on negative encoder transition and capture on positive transition
Capture value in timer 2 registers holds cycles per encoder pulse width
RPM and F/V output calculated from measured pulse width
Continuously measures pulse width, but calculation occurs once every sampling rate
![Page 30: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/30.jpg)
Digital P/PI Controller
Proportional gain entered by user in 1/255 increments
User chooses between P or PI control Integrator mapped in software as:
Z _
Z - 1
![Page 31: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/31.jpg)
Digital Controller Model
Zero-OrderHold
z
1
Unit DelayStep1/628000s+1
11
Power amp
1
K
s +920s+1141332
1949166
Gp
1/5.9
GearRatio
z
z-1
Gc
.0005655
F/V GainExecution Time
81.5
Encoder Gain
1/51.2
D/A Gain
![Page 32: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/32.jpg)
Digital Controller Results
For Simulated K = 1 Overshoot = 15.15% tp ≈ 55 ms
For Experimental K = 1 Overshoot = 16.4% tp ≈ 60 ms
For Simulated/Experimental K = 0.2 No overshoot
For Simulated/Experimental K = 5 Unstable
![Page 33: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/33.jpg)
Digital Controller Results (K=1)
![Page 34: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/34.jpg)
Digital Controller Results (K=0.2)
![Page 35: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/35.jpg)
Digital Controller Results (K=5)
![Page 36: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/36.jpg)
Demonstration Work
Model wheel loader demonstrates effectiveness of controller
DC generator shaft connected to controlled motor shaft provides voltage to power wheel loader motor
Moving bucket arm creates a variable load on the generator
![Page 37: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/37.jpg)
Demonstration Work
Controller maintains constant motor velocity
DC generator maintains constant voltage
Bucket arm velocity remains constant for moderately varying loads
![Page 38: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/38.jpg)
Demonstration Work
Separate EMAC controls bucket arm movement
Two different operation modes Auto - bucket arm moves up and down
continuously one second at a time Manual - pressing and holding buttons
on keypad moves bucket arm
![Page 39: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/39.jpg)
Final Parts List
Pittman DC Motor 2 x GM9236C534-R2
EMAC x 2 Operational Amplifiers
2 x LF412 Transistors
2 x TIP30 4 x TIP31
![Page 40: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/40.jpg)
Final Parts List
Diodes 2 x 1N5617
D Flip-Flop 7474
![Page 41: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/41.jpg)
Future Project Work
Implement more complex controllers Multiple poles and zeroes
Add provisions for ramp or impulse commands
Use control workstation to test other devices and types of control Different plants and position control
![Page 42: Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey](https://reader030.vdocuments.site/reader030/viewer/2022032521/56649d585503460f94a37b59/html5/thumbnails/42.jpg)
Design of a Control Workstation for Controller Algorithm Testing
Questions?