31
Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of Computer Science University of Miami March 9, 2017

Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

  • Upload
    vuanh

  • View
    234

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

ControlCSC752: Autonomous Robotic Systems

Ubbo Visser

Department of Computer ScienceUniversity of Miami

March 9, 2017

Page 2: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Outline

1 Control system

2 PID controller

Page 3: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Controller

Open loop:

Feed-forward:

Closed loop / feedback:

Images from http://en.wikipedia.org/wiki/Feed-forward

Page 4: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Controller

Open loop:

Feed-forward:

Closed loop / feedback:

Images from http://en.wikipedia.org/wiki/Feed-forward

Page 5: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Controller

Open loop:

Feed-forward:

Closed loop / feedback:

Images from http://en.wikipedia.org/wiki/Feed-forward

Page 6: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Controller

Open loop:

Feed-forward:

Closed loop / feedback:

Images from http://en.wikipedia.org/wiki/Feed-forward

Page 7: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Controller

Controller → Actuator → Effect → Feedback

Measureable output: process variable (PV)

Reference: setpoint (SP)

System input: manipulated variable (MV)

Error e = SP-PV

Page 8: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Controller

Controller → Actuator → Effect → Feedback

Measureable output: process variable (PV)

Reference: setpoint (SP)

System input: manipulated variable (MV)

Error e = SP-PV

Page 9: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Examples for feedback control

Feedback controller can be used to regulate e.g. temperature, pressure,flow rate, speed ...

Refridgerator

Oven temperature

Car velocity

...

Page 10: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Example: Car velocity control

Controller for the speed of a car.

Simple on-off design:

Velocity

Controller Output

Desired Speed

Hysteresis to avoid unbounded oscillations.

Following slides based on material from http://www4.cs.umanitoba.ca/ jacky/Teaching/Courses/

Page 11: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Example: Car velocity control

Controller for the speed of a car.

Simple on-off design:

Velocity

Controller Output

Desired Speed

Hysteresis to avoid unbounded oscillations.

Following slides based on material from http://www4.cs.umanitoba.ca/ jacky/Teaching/Courses/

Page 12: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Example: Car velocity control - Proportional control

Controller sets throttle proportional to the output.

u(t) = MV (t) = KPe(t), where KP is the controller gain.

In the end PV 6= SP, since MV is 0 is for the error 0.

Page 13: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Example: Car velocity control - Proportional control

Controller sets throttle proportional to the output.

u(t) = MV (t) = KPe(t), where KP is the controller gain.

In the end PV 6= SP, since MV is 0 is for the error 0.

Page 14: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Example: Car velocity control - Proportional control

Controller sets throttle proportional to the output.

u(t) = MV (t) = KPe(t), where KP is the controller gain.

In the end PV 6= SP, since MV is 0 is for the error 0.

Page 15: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Example: Car velocity control - Derivative control

Derivative term avoids oscillations of high gains.

u(t) = KPe(t) + KDd e(t)dt

Page 16: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Example: Car velocity control - Derivative control

Derivative term avoids oscillations of high gains.

u(t) = KPe(t) + KDd e(t)dt

Page 17: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Example: Car velocity control - Integral control

Integral term avoids the steady state error.

u(t) = KPe(t) + KI

t∫0

e(t)dt + KDd e(t)dt

Page 18: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Example: Car velocity control - Integral control

Integral term avoids the steady state error.

u(t) = KPe(t) + KI

t∫0

e(t)dt + KDd e(t)dt

Page 19: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

PID controller

PID controller / three term controller

u(t) = KPe(t) + KI

t∫0

e(t)dt + KDd e(t)dt

Effects of increasing the gains KP , KI and KDParameter Rise time Overshoot Settling time Steady state error

KP Decrease Increase Small change DecreaseKI Decrease Increase Increase EliminateKD Small change Decrease Decrease Small change

Trade off between response time and stability.

Page 20: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Problem with PID controllers

Integral wind-up

Physical limits of the actuator let the integral term accumulate ahigh error.

What if the controller tries to drive faster than the maximumvelocity of the car?

The error never reaches 0 and the integral term continues toincrease.

Once the speed is reduced, the integral term will still increase thespeed.

Page 21: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Problem with PID controllers

Integral wind-up

Physical limits of the actuator let the integral term accumulate ahigh error.

What if the controller tries to drive faster than the maximumvelocity of the car?

The error never reaches 0 and the integral term continues toincrease.

Once the speed is reduced, the integral term will still increase thespeed.

Page 22: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Problem with PID controllers

Integral wind-up

Physical limits of the actuator let the integral term accumulate ahigh error.

What if the controller tries to drive faster than the maximumvelocity of the car?

The error never reaches 0 and the integral term continues toincrease.

Once the speed is reduced, the integral term will still increase thespeed.

Page 23: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Example: Car velocity control - Integral wind-up

Solution: Max/min values for the integral. Stop summation onsaturation.

Page 24: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

RoboCup examples

A humanoid robot can use controllers for several tasks:

Move joint to a given angle.

Desired joint angle, controller sets voltage, motor moves joint,current joint angle is measured.

Balancing (inverted pendulum).

Desired torso angle, controller sets walk command, walk motionmoves robot, torso angle is measured.

Walk to position.

Desired position, controller sets walk command, walk motion movesrobot, robot position is measured.

...

Page 25: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

RoboCup examples

A humanoid robot can use controllers for several tasks:

Move joint to a given angle.

Desired joint angle, controller sets voltage, motor moves joint,current joint angle is measured.

Balancing (inverted pendulum).

Desired torso angle, controller sets walk command, walk motionmoves robot, torso angle is measured.

Walk to position.

Desired position, controller sets walk command, walk motion movesrobot, robot position is measured.

...

Page 26: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

RoboCup examples

A humanoid robot can use controllers for several tasks:

Move joint to a given angle.

Desired joint angle, controller sets voltage, motor moves joint,current joint angle is measured.

Balancing (inverted pendulum).

Desired torso angle, controller sets walk command, walk motionmoves robot, torso angle is measured.

Walk to position.

Desired position, controller sets walk command, walk motion movesrobot, robot position is measured.

...

Page 27: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

RoboCup examples

A humanoid robot can use controllers for several tasks:

Move joint to a given angle.

Desired joint angle, controller sets voltage, motor moves joint,current joint angle is measured.

Balancing (inverted pendulum).

Desired torso angle, controller sets walk command, walk motionmoves robot, torso angle is measured.

Walk to position.

Desired position, controller sets walk command, walk motion movesrobot, robot position is measured.

...

Page 28: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

RoboCup examples

A humanoid robot can use controllers for several tasks:

Move joint to a given angle.

Desired joint angle, controller sets voltage, motor moves joint,current joint angle is measured.

Balancing (inverted pendulum).

Desired torso angle, controller sets walk command, walk motionmoves robot, torso angle is measured.

Walk to position.

Desired position, controller sets walk command, walk motion movesrobot, robot position is measured.

...

Page 29: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

RoboCup examples

A humanoid robot can use controllers for several tasks:

Move joint to a given angle.

Desired joint angle, controller sets voltage, motor moves joint,current joint angle is measured.

Balancing (inverted pendulum).

Desired torso angle, controller sets walk command, walk motionmoves robot, torso angle is measured.

Walk to position.

Desired position, controller sets walk command, walk motion movesrobot, robot position is measured.

...

Page 30: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

RoboCup examples

A humanoid robot can use controllers for several tasks:

Move joint to a given angle.

Desired joint angle, controller sets voltage, motor moves joint,current joint angle is measured.

Balancing (inverted pendulum).

Desired torso angle, controller sets walk command, walk motionmoves robot, torso angle is measured.

Walk to position.

Desired position, controller sets walk command, walk motion movesrobot, robot position is measured.

...

Page 31: Control - CSC752: Autonomous Robotic Systemsvisser/csc752-files/4_control.pdf · Control system PID controller Control CSC752: Autonomous Robotic Systems Ubbo Visser Department of

Control system PID controller

Acknowledgement

Acknowledgement

The slides for this lecture have been prepared by Andreas Seekircher.