PID Control Systems (Proportional, Integral, Derivative)

Slides:



Advertisements
Similar presentations
PID Control for Embedded Systems
Advertisements

Lecture 20 Dimitar Stefanov. Microprocessor control of Powered Wheelchairs Flexible control; speed synchronization of both driving wheels, flexible control.
PID Controllers and PID tuning
Modern Control Systems (MCS)
ABS Control Project Ondrej Ille Pre-bachelor Project.
Control Architectures: Feed Forward, Feedback, Ratio, and Cascade
Objectives Control Terminology Types of controllers –Differences Controls in the real world –Problems –Response time vs. stability.
Add and Use a Sensor & Autonomous For FIRST Robotics
Navigating the BOE-BOT
Introduction to Control: How Its Done In Robotics R. Lindeke, Ph. D. ME 4135.
LECTURE#11 PID CONTROL AUTOMATION & ROBOTICS
Book Adaptive control -astrom and witten mark
Closed-loop Control of DC Drives with Controlled Rectifier
Course Review Part 3. Manual stability control Manual servo control.
David GiandomenicoFeedback Control for your FIRST Robot’s DrivetrainDec 2010 WRRF Workshops #1 David Giandomenico Team mentor for Lynbrook Robotics – Team.
20/10/2009 IVR Herrmann IVR:Control Theory OVERVIEW Control problems Kinematics Examples of control in a physical system A simple approach to kinematic.
Estun Servo parameter adjustment methods
CLOSED LOOP CONTROL OF DC DRIVES. Controller Requirements  Fast tracking capability  Less steady state error  Robust to load disturbance during steady.
Observer-Based Robot Arm Control System Nick Vogel, Ron Gayles, Alex Certa Advised by: Dr. Gary Dempsey.
PID. The proportional term produces an output value that is proportional to the current error value. Kp, called the proportional gain constant.
IVR 30/10/2009 Herrmann1 IVR: Control Theory Overview: PID control Steady-state error and the integral method Overshoot and ringing in system with time.
CSCI1600: Embedded and Real Time Software Lecture 12: Modeling V: Control Systems and Feedback Steven Reiss, Fall 2015.
Control systems KON-C2004 Mechatronics Basics Tapio Lantela, Nov 5th, 2015.
ME 431 System Dynamics Dept of Mechanical Engineering.
Lecture 25: Implementation Complicating factors Control design without a model Implementation of control algorithms ME 431, Lecture 25.
Digital Control CSE 421.
Control 3 Keypoints: PID control
Get your software working before putting it on the robot!
BIRLA VISHWAKARMA MAHAVIDHYALAYA ELECTRONICS & TELECOMUNICATION DEPARTMENT o – ANKUR BUSA o – KHUSHBOO DESAI UNDER THE GUIDENCE.
Announcements Next class is the course evaluation
Introduction to Motors, servos and steppers
Digital Control CSE 421.
PID Control for Embedded Systems
Automatic control systems I. Nonlinearities in Control System
Deriving Consistency from LEGOs
Presentation at NI Day April 2010 Lillestrøm, Norway
ANTI LOCK BRAKING SYSTEM
5 - Simulating Bloodhound’s Speed Trial
PID Controllers Jordan smallwood.
UNITS 12 AND 13.
DC MOTOR SPEED CONTROL 1. Introduction
Chapter 3 Cruise Control
Design via Root Locus (Textbook Ch.9).
Lec 14. PID Controller Design
Control Loops Nick Schatz FRC 3184.
CSCI1600: Embedded and Real Time Software
Balanduino Supervisor: Dr. Raed Al-Qadi Prepared by: Nadeen Kalboneh Nardeen Mabrouk.
PID Controller.
6: Processor-based Control Systems
Josh Switkes Eric J. Rossetter Ian A. Coe J. Christian Gerdes
Basic Design of PID Controller
Electronic Control Systems Week 7 – PID Control
Interactive Basic Tuning for the SERVOSTAR 300
Interactive Basic Tuning for the SERVOSTAR 600
Better Line Following with PID
Process Control Engineering
Features of PID Controllers
Brief Review of Control Theory
Digital Control Systems Waseem Gulsher
Motors and Position Determination
Dynamical Systems Basics
Control.
Introduction to Motors
Advanced LabVIEW
PID Controller Design and
Introduction to Motor Drives
EEM476 Power Electronics II
The Design of Feedback Control Systems
Chapter 7 Inverse Dynamics Control
PID Line Follower.
Presentation transcript:

PID Control Systems (Proportional, Integral, Derivative) A presentation to the Robotics Society of Southern California May 11, 2013 By Alex Brown rbirac@cox.net

Introduction PID is a method of controlling a dynamic system. It consists of 3 simple calculations which are added together to generate a control signal to make your system track to a reference value. A tuned system gives the fastest response to an error. It doesn’t take a lot of math. Just testing to determine gains. It really only works well for simple linear systems; but its concepts can be applied to more complex systems.

Closed Loop Control System Signal Controller Process Reference E.g. motor, arm, temp, etc. E.g. PID Feedback

Control System for Robot Drive Motors PWM MOTOR Reference Forward Speed PID Feedback Tachometer or position encoder

Motor characteristics No Load “Normal” load Speed Heavy load Stall PWM 100% PWM No load with load Motor Speed Friction Inertia

P term (Proportional) PWM Reference MOTOR Forward Speed + Kp MOTOR _ Feedback (Actual Speed) Bump 8 8 Speed Ref Speed Ref Step change 4 4 2 PWM PWM 1 8 Actual Speed Actual Speed 4 2 4 1 Hits bump

I term (Integral) Reference MOTOR Forward Speed Error PWM Reference Forward Speed + + KP MOTOR _ + KI Feedback (Actual Speed) 8 Turn integrator on here 8 Speed Ref Speed Ref 4 4 Error 2 Error 2 Integrator Integrator PWM PWM Actual Speed Actual Speed 4 2 4 2 Hits bump

Integrator Windup Speed Ref Integ PWM Actual Speed Kp 4 300+ 50 100 50 Kp Integ 300+ 50 PWM 100 50 Actual Speed 4 2

Integrator Windup (cont.) Rate KD _ PWM Reference Forward Speed + KP + MOTOR _ + KI Stop LOGIC Example logic: stop if total PWM is >= 100 and error is polarity to increase integrator. Stop if actual speed is converging with reference value stop if it is known that integrator will cause subsequent error.

D term (Derivative) Reference MOTOR Forward Speed Rate KD _ PWM Reference Forward Speed + KP + MOTOR _ + KI 8 Speed Ref 4 Feedback (Actual Speed) Error 2 Kp Rate PWM Actual Speed 4 2

PID PROs CONs Kp KI KD PID Removes short term errors quickly Doesn’t remove long term errors Kp Has a fixed time constant Removes long term errors Removes errors very slowly. May cause integrator windup. KI KD Improves short term stability. Sometimes is NECESSARY depending on what is being controlled. PID Acts as above providing optimally fast response to errors Don’t have to use all the terms. We don’t always want optimally fast responses.

Is that all there is? In theory, a PID controller can succeed for any system that is linear. However, it may not perform just the way we would like. A pure PID system works best on a linear system with a slow moving reference or small reference changes. That’s no fun! We want our robots to respond quickly but smoothly to large changes of command. And our robot systems usually have many non-linearities. I worked on autopilot design for 30 years and never heard the word “PID” until I retired and started on robots. Our autopilots used one or more of the three PID terms at appropriate times usually with logic and/or other devices to achieve good performance in the real world.

Slow response to speed reference change As indicated earlier, a PI drive motor system will not quickly achieve the new reference speed until the integrator runs long enough to command the necessary additional PWM. We know that under normal conditions, there is a proportion between speed and PWM. Hence another term may be added (a “FeedForward” term) that approximates the PWM required at any commanded speed. This will usually provide much faster approach to the new reference and leave the integrator to only pick up any residual error . KFF Rate KP _ + PWM Reference Forward Speed + KP + MOTOR _ + KI

KP + KI + KFF KP Only KP + KI KFF 8 Speed 4 Reference error 100 error 100 Integrator 40 100 KFF 40 100 PWM

Loops within Loops Outer loop Middle loop Servo loop or inner loop. PID PID PID Motor Motor feedback feedback E.g. Navigation This may be the slowest response loop. Maneuvers vehicle smoothly. E.g speed and steering. Can be slower than servo loop. Fastest loop. Moves motor/actuator to desired speed/position quickly.

Trapezoidal Speed Profile PID tracking Speed Reference Stopped Constant acceleration Constant speed Constant deceleration Stopped You can eliminate much of the PID tracking lag by adding an acceleration feed-forward term. Acceleration using this method works well. Deceleration is challenging due to the difficulty of determining when to begin slowing at a constant acceleration to stop at a target distance. My method is to continuously calculate the accel required to stop by the target distance. When that accel is >= desired deceleration, switch to controlling to the calculated accel and vary plus or minus to stop at target distance.

Application to real robots. Differential: MOTOR Reference Forward Speed PWM PID MOTOR Actual Speed Average PWM PID MOTOR Reference Forward Speed PWM PID MOTOR Both will work to hold forward speed, but both will have poor directional control with nothing to keep them in sync.

Or, a downstream “equalization” system as below Need an upstream steering system like the below Reference Forward Speeds PWM PID MOTOR Reference Fwd Speed + Steering Left wheel PWM PID MOTOR Right wheel Or, a downstream “equalization” system as below MOTOR _ Reference Forward Speed PWM + PID _ + MOTOR Actual Speed Average But, it is still going to require steering someday.

Ackerman Steering forward speed control PID Reference Forward Speed PWM PID MOTOR Actual Speed Forward speed control is independent of steering

Or, as I prefer, an upstream steering system AND modifying the PID loop to control position (or distance) rather than speed. Reference Forward Distance PWM Common Reference Fwd Dist + Steering PID MOTOR Left wheel PWM PID MOTOR Right wheel Advantages: Simple PID loop. Only requires Kp. Very accurate dead reckoning of distance and steering. No integrator windup concerns. Minor distance offset will supply any PWM needed up to 100% Disadvantages: Requires feedback to Distance loop to ensure distance commands do not exceed motors ability to follow.

Generate Trapezoidal speed profile Reference Forward Distance Speed and Accel Left wheel AccelRef KFFacc _ + Common Reference Fwd Dist + Steering DistRef + PWM Kp + MOTOR + SpeedRef KFFspd Right wheel PWM Same as above MOTOR Maximum accel Reference accel Reference speed Reference distance Speed error Target fwd speed Accel limiter Generate Trapezoidal speed profile Calculate accel to stop at target distance Logic to begin decel

Steering Control We have two type of steering systems commonly used. Differential Drive Ackerman Steering

Steering Task Wall Following Target distance Target distance Measured Error Error

+/- commands to L & R motor control loops Lateral KP Error KD Lateral Steering displacement +/- commands to L & R motor control loops Lateral Error KP + Rate KD Steering displacement _ Lateral Error KP + Angle command to steering servo

Steering displacement Lateral Error Limiter 45 deg + KP Error

Rate KD ? _ Lateral Error KP + Error

Conclusion Pure PID is best for inner loop where you want fast response. Even there just use the terms necessary to get the performance you want. Use the P, I & D terms freely in designing outer loop navigation when you want your control to converge on a steady reference exponentially. For more info on pure pid, google pid tutorials For more of my slant on it, try abrobotics.tripod.com. It includes a simulation program written by (ex) clubmember Lior Elazary.