EECS 192: Mechatronics Design Lab Discussion 6: Velocity Control - - PowerPoint PPT Presentation

eecs 192 mechatronics design lab
SMART_READER_LITE
LIVE PREVIEW

EECS 192: Mechatronics Design Lab Discussion 6: Velocity Control - - PowerPoint PPT Presentation

EECS 192: Mechatronics Design Lab Discussion 6: Velocity Control written by: Richard Ducky Lin Spring 2015 1 & 2 Mar 2017 (Week 6) 1 Velocity Sensing 2 Feedback Control 3 Summary Ducky (UCB EECS) Mechatronics Design Lab 1 & 2


slide-1
SLIDE 1

EECS 192: Mechatronics Design Lab

Discussion 6: Velocity Control written by: Richard ”Ducky” Lin Spring 2015 1 & 2 Mar 2017 (Week 6)

1 Velocity Sensing 2 Feedback Control 3 Summary

Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 1 / 11

slide-2
SLIDE 2

Velocity Sensing

Velocity Sensing

Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 2 / 11

slide-3
SLIDE 3

Velocity Sensing Basics

Brainstorm!

What are some ways to sense velocity?

pros and cons of your methods? Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 3 / 11

slide-4
SLIDE 4

Velocity Sensing Simple Encoder

Optical Encoders

Optical encoders...

◮ Detects when sensor lit up ◮ Reflective sensor: light up codewheel,

sensor detects reflection

◮ Photointerruptors: direct light beam from

transmittor to detector, interrupt by object

◮ Simple designs vulnerable to ambient light

Hamamatsu S6986...

◮ High-pass filter and LED modulation for

background light rejection

◮ Open-collector output

Hopefully a fairly readable schematic

Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 4 / 11

slide-5
SLIDE 5

Velocity Sensing Simple Encoder

Software Techniques

Two simple ways to measure speed: Pulse width measurement

◮ Measure width between transitions

Pulse counting

◮ Count number of transitions in timespan

Advantages and disadvantages of both? Hopefully a fairly readable schematic

Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 5 / 11

slide-6
SLIDE 6

Velocity Sensing Simple Encoder

Live Demo!

Low speed demo

see blinking LEDs!

High speed demo

what waveforms should you expect to see?

Issues

skipped pulses, inconsistent pulse lengths Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 6 / 11

slide-7
SLIDE 7

Velocity Sensing Issues

Uh-oh!

What are some ways to deal with inconsistent pulse sizing / other issues?

pros and cons of your methods? Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 7 / 11

slide-8
SLIDE 8

Velocity Sensing Issues

Moving Average Filter

◮ Average pulse widths over a entire

revolution Hopefully a fairly readable schematic

Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 8 / 11

slide-9
SLIDE 9

Feedback Control

Feedback Control

Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 9 / 11

slide-10
SLIDE 10

Feedback Control PID control

PID

◮ Proportional Control

◮ Change output by p ∗ ( difference between sensor input and data) ◮ Very intuitive- part of almost every PID scheme.

◮ Integral Control

◮ Change output by i ∗ (integration of error over time) ◮ Overcomes offset errors (example: friction)

◮ Derivative Control

◮ Change output by d ∗ (instantaneous derivative of the error) ◮ Helps prevent oscillation (example: steering)

◮ Video about PID control on vehicle

◮ https://www.youtube.com/watch?v=4Y7zG48uHRo ◮ Video courtesy of MIT Aerospace Controls Lab Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 10 / 11

slide-11
SLIDE 11

Summary

Summary

◮ Optical Encoders ◮ The way you process data affects how you acquire data. Be aware of

the effects of errors/noise

◮ PID control overview

Ducky (UCB EECS) Mechatronics Design Lab 1 & 2 Mar 2017 (Week 6) 11 / 11