Top Banner
Introductory Control Theory I400/B659: Intelligent robotics Kris Hauser
31

Introductory Control Theory I400/B659: Intelligent robotics Kris Hauser.

Mar 30, 2015

Download

Documents

Ethan Culling
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • Slide 1

Introductory Control Theory I400/B659: Intelligent robotics Kris Hauser Slide 2 Slide 3 Control Theory The use of feedback to regulate a signal Controller Plant Desired signal x d Signal x Control input u Error e = x-x d (By convention, x d = 0) x = f(x,u) Slide 4 What might we be interested in? Controls engineering Produce a policy u(x,t), given a description of the plant, that achieves good performance Verifying theoretical properties Convergence, stability, optimality of a given policy u(x,t) Slide 5 Agenda PID control Feedforward + feedback control Control is a huge topic, and we wont dive into much detail Slide 6 Model-free vs model-based Two general philosophies: Model-free: do not require a dynamics model to be provided Model-based: do use a dynamics model during computation Model-free methods: Simpler Tend to require much more manual tuning to perform well Model-based methods: Can achieve good performance (optimal w.r.t. some cost function) Are more complicated to implement Require reasonably good models (system-specific knowledge) Calibration: build a model using measurements before behaving Adaptive control: learn parameters of the model online from sensors Slide 7 PID control Proportional-Integral-Derivative controller A workhorse of 1D control systems Model-free Slide 8 Proportional term u(t) = -K p x(t) Negative sign assumes control acts in the same direction as x x t Gain Slide 9 Integral term x t Residual steady-state errors driven asymptotically to 0 Integral gain Slide 10 Instability For a 2 nd order system (momentum), P control x t Divergence Slide 11 Derivative term u(t) = -K p x(t) K d x(t) x Derivative gain Slide 12 Putting it all together Slide 13 Slide 14 Slide 15 Parameter tuning Slide 16 Example: Damped Harmonic Oscillator Second order time invariant linear system, PID controller x(t) = A x(t) + B x(t) + C + D u(x,x,t) For what starting conditions, gains is this stable and convergent? Slide 17 Stability and Convergence System is stable if errors stay bounded System is convergent if errors -> 0 Slide 18 Example: Damped Harmonic Oscillator x = A x + B x + C + D u(x,x) PID controller u = -K p x K d x K i I x = (A-DK p ) x + (B-DK d ) x + C - D K i I Assume K i =0 Slide 19 Homogenous solution Instable if A-DK p > 0 Natural frequency 0 = sqrt(DK p -A) Damping ratio =(DK d -B)/2 0 If > 1, overdamped If < 1, underdamped (oscillates) Slide 20 Example: Trajectory following x des (t) x(t) Slide 21 Controller Tuning Workflow Hypothesize a control policy Analysis: Assume a model Assume disturbances to be handled Test performance either through mathematical analysis, or through simulation Go back and redesign control policy Mathematical techniques give you more insight to improve redesign, but require more work Slide 22 Example Slide 23 Feedforward control If we know a model for a system and know how it should move, why dont we just compute the correct control? Ex: damped harmonic oscillator x = A x + B x + C + D u Calculate a trajectory x(t) leading to x(T)=0 at some point T Compute its 1 st and 2 nd derivatives x(t), x(t) Solve for u(t) = 1/D*(x(t) - A x(t) + B x(t) + C) Would be perfect! Slide 24 Feedforward control If we know a model for a system and know how it should move, why dont we just compute the correct control? Ex: damped harmonic oscillator x = A x + B x + C + D u Calculate a trajectory x(t) leading to x(T)=0 at some point T Compute its 1 st and 2 nd derivatives x(t), x(t) Solve for u(t) = 1/D*(x(t) - A x(t) + B x(t) + C) Problems Control limits: trajectory must be planned with knowledge of control constraints Disturbances and modeling errors: open loop control leads to errors not converging to 0 Slide 25 Handling errors: feedforward + feedback Idea: combine feedforward control u ff with feedback control u fb e.g., u fb computed with PID control Feedback term doesnt have to work as hard (= 0 ideally) Plant u ff Feedforward calculation x(0) + u fb Feedback controller u x(t) x des Slide 26 Application: Feedforward control Feedback control: let torques be a function of the current error between actual and desired configuration Problem: heavy arms require strong torques, requiring a stiff system Stiff systems become unstable relatively quickly Slide 27 Application: Feedforward control Solution: include feedforward torques to reduce reliance on feedback Estimate the torques that would compensate for gravity and achieve desired accelerations (inverse dynamics), send those torques to the motors Slide 28 Handling errors: feedforward + feedback Idea: combine feedforward control u ff with feedback control u fb e.g., u fb computed with PID control Feedback term doesnt have to work as hard (= 0 ideally) Plant u ff Feedforward calculation x(0) + u fb Feedback controller u x(t) x des Model based Model free Slide 29 Model predictive control (MPC) Idea: repeatedly compute feedforward control using model of the dynamics In other words, rapid replanning Plant Feedforward calculation u=u ff x(t) x des Slide 30 MPC to avoid moving obstacles Slide 31 Next class: Sphero Lab You will design a feedback controller for the move command