6: Processor-based Control Systems

Slides:



Advertisements
Similar presentations
PID Control for Embedded Systems
Advertisements

PID Controllers and PID tuning
Discrete Controller Design
Chapter 4: Basic Properties of Feedback
Loop Shaping Professor Walter W. Olson
CHE 185 – PROCESS CONTROL AND DYNAMICS
CHE 185 – PROCESS CONTROL AND DYNAMICS
Feedback Controllers Chapter 8
Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey.
CONTROL SYSTEM INSTRUMENTATION
Feedback Controllers Chapter 8.
LECTURE#11 PID CONTROL AUTOMATION & ROBOTICS
Proportional/Integral/Derivative Control
Lecture 5: PID Control.
Computer Control: An Overview Wittenmark, Åström, Årzén Computer controlled Systems The sampling process Approximation of continuous time controllers Aliasing.
Ch. 6 Single Variable Control
Book Adaptive control -astrom and witten mark
Agenda Path smoothing PID Graph slam.
System/Plant/Process (Transfer function) Output Input The relationship between the input and output are mentioned in terms of transfer function, which.
5: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey.
Dr. Tamer Samy Gaafar.   Teaching Assistant:- Eng. Hamdy Soltan.
Low Level Control. Control System Components The main components of a control system are The plant, or the process that is being controlled The controller,
Page 1 Lecture 12 AO Control Theory Claire Max with many thanks to Don Gavel and Don Wiberg UC Santa Cruz February 14, 2013.
Feedback Controllers Chapter 7.
Mechanical Engineering Department Automatic Control Dr. Talal Mandourah 1 Lecture 1 Automatic Control Applications: Missile control Behavior control Aircraft.
Control Theory Control System Objectives  Establish a final condition  Provide safe operation  Eliminate the human element  Assure economical operation.
PID and Fuzzy Logic Control Systems John Limroth, Software Engineer Yiannis Pavlou, Applications Engineer Tues, 10:15a and 11:30a Wed.
EEB5213 / EAB4233 Plant Process Control Systems Digital Implementation of PID Controller.
PID CONTROLLERS By Harshal Inamdar.
CSCI1600: Embedded and Real Time Software Lecture 12: Modeling V: Control Systems and Feedback Steven Reiss, Fall 2015.
ERT 210/4 Process Control Hairul Nazirah bt Abdul Halim Office: CHAPTER 8 Feedback.
Chapter 8 Feedback Controllers 1. On-off Controllers Simple Cheap Used In residential heating and domestic refrigerators Limited use in process control.
Control systems KON-C2004 Mechatronics Basics Tapio Lantela, Nov 5th, 2015.
Lecture 25: Implementation Complicating factors Control design without a model Implementation of control algorithms ME 431, Lecture 25.
Digital Control CSE 421.
Features of PID Controllers
Embedded Control Systems Dr. Bonnie Heck School of ECE Georgia Tech.
Lecture 9: PID Controller.
ECE 192: NATCAR Team (Triton X) Sponsored by IEEE ( Vincent Bantigue, Joseph Formanes,
BIRLA VISHWAKARMA MAHAVIDHYALAYA ELECTRONICS & TELECOMUNICATION DEPARTMENT o – ANKUR BUSA o – KHUSHBOO DESAI UNDER THE GUIDENCE.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
6: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey.
INTRODUCTION TO ELECTRONIC INSTRUMENTATION
Digital Control CSE 421.
PID Control for Embedded Systems
Automatic Control Theory
Chapter 1: Overview of Control
Feedback Controllers Chapter 8
EE 319K Introduction to Embedded Systems
Process Control & Instrumentation MAPUA INSTITUTE OF TECHNOLOGY
Chapter 7 The Root Locus Method The root-locus method is a powerful tool for designing and analyzing feedback control systems The Root Locus Concept The.
Embedded Microcontroller Systems
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
PID Controllers Jordan smallwood.
Embedded Systems Design
DC MOTOR SPEED CONTROL 1. Introduction
CSCI1600: Embedded and Real Time Software
Electronic Control Systems Week 5 – Closed Loop Control
Dynamic Controllers for Wind Turbines
Linear Control Systems
Basic Design of PID Controller
Process Control Engineering
Features of PID Controllers
Brief Review of Control Theory
Digital Control Systems Waseem Gulsher
Digital and Non-Linear Control
Control Systems Prof Swanson MECH 3550.
Electronic Control Systems Week 7 – Closed Loop Control
Jetson-Enabled Autonomous Vehicle
Control Systems Prof Swanson MECH 3550.
Presentation transcript:

6: Processor-based Control Systems 6: Interrupt-Driven I/O & Buffering 9: Processor-based Control Systems6: Interrupt-Driven I/O & Buffering 6: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey CET360 Microprocessor Engineering CET360 Microprocessor EngineeringCET360 Microprocessor Engineering 1

Control Systems def: collection of mechanical and electrical devices that controls the operation of a physical plant requires ≥1 output devices (open loop) and ≥1 input devices (closed loop) originally: elec. circuits & mech. devices now: µP-based with control algorithm in software

“Control Theory”† various models our main interest here is with PID finite state machines fuzzy logic / neural networks linear systems PID (classical) our main interest here is with PID † http://en.wikipedia.org/wiki/Control_theory

Block Diagram text…

Components - 1 1. Real state variables, X(t) – properties of the physical plant being controlled requires sensor(s) and state estimator to produce estimated state variables, X’(t) 2. Desired state variables, X*(t) – what the system seeks for X(t)

Components - 2 3. Control outputs, U(t) – output commands to devices that affect the physical plant typically control actuators which produce driving forces, V(t) 4. Control algorithm – generates U(t) based on error: E(t) = X*(t) – X’(t) goal of a control system: minimize E(t) 6

Control System Effectiveness determined by 3 properties: 1. steady-state error: average value of E(t) 2. transient response: how long it takes system to reach 99% of final output after X’ or X* is changed 3. stability: if a steady state is reached after a change in X’ or X* i.e., no oscillations

Open-loop Systems no feedback, no state estimator examples: toaster – fixed amount of time traffic light – ditto. Must be closed-loop if goal is to maximize traffic flow! OL stepper motor controller – no encoder 8

Closed-loop Systems includes feedback/state estimator examples: robot arm incremental control – U(t) is incremented, decremented, or left alone temperature control – add heat or not (bang bang), assumes passive heat loss can add hysteresis with 2 set points: TH, TL 9

Example Closed-loop System†: a "bang-bang" temperature controller Flowchart: Interface: Algorithm/response: † from "Embedded Microcomputer Systems", J. Valvano, 2007

PID Systems from linear control theory faster, more accurate, better control the k's are design parameters, aka gains determined using control theory and Laplace / Laplace-1 transforms the I term addresses steady state error, the D term addresses transient error 11

PID Controller Block Diagram ideal / parallel form: PID controller SP = Set Point MV = Manipulated Value PV = Present Value P (present) E(t) U(t) Y(t) + "SP" + I (past) + "the Plant" - + "MV" D ("future") "PV" (feedback) E(t) = SP – PV (desired – current)

Types of PID Controllers consider values of the gains: Type Kp Ki Kd P PI PID PD

Digital PID Implementation break U(t) into separate terms & convert to discrete time discrete time: fixed period, like DSP (Δt) U(t)=P(t) + I(t) + D(t) P(t)=kP·E(t)  P(n)=kP·E(n)

Digital PID Implementation noise-prone, better to use average of 2 derivatives over different time spans

Digital PID Implementation combining, we now have: ∆t can be factored into ki & kd, so:

Digital PID Implementation this can easily be implemented in code based on the 3 gains & 2 "history" (state) variables: accumulated error ("istate"): I(n)=I(n-1)+E(n) previous error ("dstate"): E(n-1) however: this requires precision in acquiring y(t) and processing u(n) at exact ∆t intervals hence: our task scheduler!

PID Implementation: Data structure /* * Abstraction of a PID controller as a C structure */ typedef struct { // gain factors float pGain, // proportional iGain, // integral dGain; // derivative // allowable range of integrator state values to prevent windup float iMax, // max allowed iMin; // min allowed // running state variables float iState; // integrator state float dState; // derivative state } Spid;

PID Implementation: "update" function /* implementation of discretized version of parallel form of PID controller */ float PID_Update(Spid *pid, float current, float desired) { float error, pTerm, iTerm, dTerm; // calculate error error = desired - current; // calculate the proportional term pTerm = pid->pGain * error; // calculate integral of error as running total pid->iState += error; // perform limiting of integral state to prevent windup if (pid->iState < pid->iMin) pid->iState = pid->iMin; if (pid->iState > pid->iMax) pid->iState = pid->iMax; // calculate the integral term iTerm = pid->iGain * pid->iState; // calculate the derivative term from delta-error dTerm = pid->dGain * (error - pid->dState); // remember current value for next update pid->dState = error; // calculate & return PID result return pTerm + iTerm + dTerm; }

References PID process control, a “Cruise Control” example PID Theory http://www.codeproject.com/Articles/36459/PID-process-control-a-Cruise-Control-example PID Theory http://pcbheaven.com/wikipages/PID_Theory Understanding PID Control (toilet ex.) http://www.controleng.com/index.php?id=483&cHash=081010&tx_ttnews[tt_news]=15561 PID Controller http://en.wikipedia.org/wiki/PID_controller