EECS 192: Mechatronics Design Lab Discussion 10: Control Responses - - PowerPoint PPT Presentation

eecs 192 mechatronics design lab
SMART_READER_LITE
LIVE PREVIEW

EECS 192: Mechatronics Design Lab Discussion 10: Control Responses - - PowerPoint PPT Presentation

EECS 192: Mechatronics Design Lab Discussion 10: Control Responses & Tuning GSI: Justin Yim 3 & 4 Apr 2019 (Week 10) 1 Dynamical Systems Review 2 Control Response 3 Summary Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019


slide-1
SLIDE 1

EECS 192: Mechatronics Design Lab

Discussion 10: Control Responses & Tuning GSI: Justin Yim 3 & 4 Apr 2019 (Week 10)

1 Dynamical Systems Review 2 Control Response 3 Summary

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 1 / 12

slide-2
SLIDE 2

Dynamical Systems Review

Dynamical Systems Review

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 2 / 12

slide-3
SLIDE 3

Dynamical Systems Review

Dynamical Systems

◮ The car’s behavior is

described by state variables (e.g. position, velocity)

◮ Actuators accept inputs and

sensors read outputs (e.g. PWM, camera line) Car System

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 3 / 12

slide-4
SLIDE 4

Dynamical Systems Review

Dynamical Systems

◮ The car’s behavior is

described by state variables (e.g. position, velocity)

◮ Actuators accept inputs and

sensors read outputs (e.g. PWM, camera line) Car System

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 3 / 12

slide-5
SLIDE 5

Dynamical Systems Review

Dynamical Systems

◮ The car’s behavior is

described by state variables (e.g. position, velocity)

◮ Actuators accept inputs and

sensors read outputs (e.g. PWM, camera line)

◮ It should follow a reference

(lateral displacement & track, velocity & setpoint) Reference

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 3 / 12

slide-6
SLIDE 6

Dynamical Systems Review

Dynamical Systems

◮ The car’s behavior is

described by state variables (e.g. position, velocity)

◮ Actuators accept inputs and

sensors read outputs (e.g. PWM, camera line)

◮ It should follow a reference

(lateral displacement & track, velocity & setpoint)

◮ Our controller feeds inputs

to the system to achieve this (servo angle, motor PWM) Closed Loop System

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 3 / 12

slide-7
SLIDE 7

Dynamical Systems Review

Dynamical Systems

◮ It is often nice to work with Linear Time-Invariant Systems

˙ x(t) = Ax(t) + Bu(t) y(t) = Cx(t) + Du(t)

◮ When systems are nonlinear, we can create linear approximations

about operating points (what is ¨ y = −V 2

L δ(t) − V ˙

δ(t)?)

◮ Keep in mind the approximations get worse as we get further from

  • ur operating point

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 4 / 12

slide-8
SLIDE 8

Dynamical Systems Review

Control Tuning

◮ We’d like to tune our controller to keep

the car close to the track while it runs as fast as possible.

◮ How do we systematically examine how

it’s doing? What to do about my crazy car?

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 5 / 12

slide-9
SLIDE 9

Dynamical Systems Review

Control Tuning

◮ We’d like to tune our controller to keep

the car close to the track while it runs as fast as possible.

◮ How do we systematically examine how

it’s doing?

◮ Frequency response ◮ Impulse response ◮ Step response

What to do about my crazy car?

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 5 / 12

slide-10
SLIDE 10

Control Response

Control Response

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 6 / 12

slide-11
SLIDE 11

Control Response

Responses

◮ Impulse response is very useful for

analyzing the system

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 7 / 12

slide-12
SLIDE 12

Control Response

Responses

◮ Impulse response is very useful for

analyzing the system

◮ Time trace after Dirac delta input ◮ Time-domain equivalent to Laplace

domain transfer function

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 7 / 12

slide-13
SLIDE 13

Control Response

Responses

◮ Impulse response is very useful for

analyzing the system

◮ Time trace after Dirac delta input ◮ Time-domain equivalent to Laplace

domain transfer function

◮ But we can’t give our car an infinite

input (and if we could we wouldn’t want to)

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 7 / 12

slide-14
SLIDE 14

Control Response

Responses

◮ Impulse response is very useful for

analyzing the system

◮ Time trace after Dirac delta input ◮ Time-domain equivalent to Laplace

domain transfer function

◮ But we can’t give our car an infinite

input (and if we could we wouldn’t want to)

◮ Instead, we often use step responses

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 7 / 12

slide-15
SLIDE 15

Control Response

Step Response

◮ We can use the step response to tell

how we should adjust PID gains

◮ General tips:

◮ Often easiest to begin with only

proportional feedback, then add other terms later

◮ Higher gains improve tracking, but ... ◮ Extremely high gains cause jittering

and shaking (or even instability)

◮ Time delay causes instability Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 8 / 12

slide-16
SLIDE 16

Control Response

Step Response

Time (s) Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 9 / 12

slide-17
SLIDE 17

Control Response

Step Response

◮ Note the steering

  • saturation. Is the linear

approximation good?

Time (s) Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 9 / 12

slide-18
SLIDE 18

Control Response

Step Response

◮ Note the steering

  • saturation. Is the linear

approximation good?

◮ P is too high

Time (s) Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 9 / 12

slide-19
SLIDE 19

Control Response

Step Response

Time (s) Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 10 / 12

slide-20
SLIDE 20

Control Response

Step Response

◮ Note the jittery steering

input

◮ P 1/2 of before, but D is

too high

Time (s) Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 10 / 12

slide-21
SLIDE 21

Control Response

Step Response

Time (s) Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 11 / 12

slide-22
SLIDE 22

Control Response

Step Response

◮ Looking better ◮ P 3/4 of original, D 1/3

  • f earlier

Time (s) Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 11 / 12

slide-23
SLIDE 23

Summary

Summary

◮ Save telemetry data! ◮ Look at step responses and control signals

Ducky (UCB EECS) Mechatronics Design Lab 3 & 4 Apr 2019 (Week 10) 12 / 12