ECE 4951 Lecture 5: PID Control of Motorized Processes.

Slides:



Advertisements
Similar presentations
PID Controllers and PID tuning
Advertisements

Discrete Controller Design
Ch3 Basic RL and RC Circuits
Lect.3 Modeling in The Time Domain Basil Hamed
Chapter 4: Basic Properties of Feedback
Lecture 5: Motors and Control of Motorized Processes.
ECE 8443 – Pattern Recognition ECE 3163 – Signals and Systems Objectives: Review Resources: Wiki: State Variables YMZ: State Variable Technique Wiki: Controllability.
Lect.2 Modeling in The Frequency Domain Basil Hamed
ELECTRIC DRIVES Ion Boldea S.A.Nasar 1998 Electric Drives.
AC modeling of quasi-resonant converters Extension of State-Space Averaging to model non-PWM switches Use averaged switch modeling technique: apply averaged.
ECE 4951 Lecture 5: PID Control of Processes. PID Control A closed loop (feedback) control system, generally with Single Input-Single Output (SISO) A.
ECE53A RLC Circuits W. Ku 11/29/2007
1 Midterm statistics – On campus students only ECEN 5817 Midterm Exam, Spring 2008 On-campus students Average = 86.3 % Averages by problem: / 35.
ECE 201 Circuit Theory I1 Natural Response of an RC Circuit.
Examples of Control Systems Application. Modeling the Ball and Beam Experiment.
ECE 4951 Lecture 2: Power Switches and PID Control of Motorized Processes.
12/6/04BAE Advanced Embedded Systems Design Lecture 14 Implementation of a PID controller BAE Fall 2004 Instructor: Marvin Stone Biosystems.
Lynbrook Robotics Team, FIRST 846 Control System Miniseries - Summary of Lecture /03/2012.
Lect.2 Modeling in The Frequency Domain Basil Hamed
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Dynamic analysis of switching converters
A Mathematical Analysis of a Sun Tracking Circuit for Photovoltaic Systems Dr. S. Louvros and Prof. S. Kaplanis T.E.I. of Patra, Greece.
ECE 4115 Control Systems Lab 1 Spring 2005
Ch. 6 Single Variable Control
Chapter 3 mathematical Modeling of Dynamic Systems
Modified by Albert W.J. Hsue,
ME 335 Boğaziçi University A Study on Motor Speed Control.
Introduction to ROBOTICS
Session 6 - Sensor Modelling
Motivation Thus far we have dealt primarily with the input/output characteristics of linear systems. State variable, or state space, representations describe.
Feedback Control Systems (FCS) Dr. Imtiaz Hussain URL :
Feedback Control system
o Problem Reconsider Problem
Design Realization lecture 22
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.
Lecture 25: Implementation Complicating factors Control design without a model Implementation of control algorithms ME 431, Lecture 25.
ELEC 3105 Basic EM and Power Engineering Rotating DC Motor PART 2 Electrical.
Lecture 9: PID Controller.
Introduction to Linear System Theory and simple feedback PID Controllers EE125 Ruzena Bajcsy.
Intelligent Robot Lab Pusan National University Intelligent Robot Lab Chapter 7. Forced Response Errors Pusan National University Intelligent Robot Laboratory.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Exercise 1 Suppose we have a simple mass, spring, and damper problem. Find The modeling equation of this system (F input, x output). The transfer function.
Lesson 14: Transfer Functions of Dc Motors
Lesson 16: Basic Control Modes
EEN-E1040 Measurement and Control of Energy Systems Control I: Control, processes, PID controllers and PID tuning Nov 3rd 2016 If not marked otherwise,
Digital Control CSE 421.
Salman Bin Abdulaziz University
Lesson 12: Transfer Functions In The Laplace Domain
Teknik kendali.
ELEC 3105 Basic EM and Power Engineering
Advanced Control Systems (ACS)
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.
Automatic Control Theory CSE 322
PID Controllers Jordan smallwood.
DC MOTOR SPEED CONTROL 1. Introduction
CSCI1600: Embedded and Real Time Software
Basic Design of PID Controller
Digital Control Systems Waseem Gulsher
Recall Lecture 11 DC Analysis and Load Line
Digital Control Systems (DCS)
Digital Control Systems (DCS)
Digital and Non-Linear Control
Homework 1: Electrical System
System models Time domain models
Robotics System Lecture 9: PID Control
Chapter 4. Time Response I may not have gone where I intended to go, but I think I have ended up where I needed to be. Pusan National University Intelligent.
Transfer Function and Stability of LTI Systems
Recall Lecture 11 DC Analysis and Load Line
By: Nafees Ahamad, AP, EECE, Dept. DIT University, Dehradun
Presentation transcript:

ECE 4951 Lecture 5: PID Control of Motorized Processes

PID Control A closed loop (feedback) control system, generally with Single Input-Single Output (SISO) A portion of the signal being fed back is: –Proportional to the signal (P) –Proportional to integral of the signal (I) –Proportional to the derivative of the signal (D)

When PID Control is Used PID control works well on SISO systems of 2 nd Order, where a desired Set Point can be supplied to the system control input PID control handles step changes to the Set Point especially well: –Fast Rise Times –Little or No Overshoot –Fast settling Times –Zero Steady State Error PID controllers are often fine tuned on- site, using established guidelines

Control Theory Consider a DC Motor turning a Load: –Shaft Position, Theta, is proportional to the input voltage

Looking at the Motor: Electrically ( for Permanent Magnet DC ):

Looking at the Motor Mechanically:

Combining Elect/Mech Torque is Conserved: Tm = Te 1 and 2 above are a basis for the state-space description

This Motor System is 2 nd Order So, the “plant”,G(s) = K / (s 2 + 2as + b 2 ) –Where a = damping factor, b = undamped freq. And a Feedback Control System would look like:

Physically, We Want: A 2 nd Order SISO System with Input to Control Shaft Position:

Adding the PID: Consider the block diagram shown: C(s) could also be second order….(PID)

PID Block Diagram:

PID Mathematically: Consider the input error variable, e(t): –Let p(t) = Kp*e(t) {p proportional to e (mag)} –Let i(t) = Ki* ∫ e(t)dt {i integral of e (area)} –Let d(t) = Kd* de(t)/dt {d derivative of e (slope)} AND let Vdc(t) = p(t) + i(t) + d(t) Then in Laplace Domain: Vdc(s) = [Kp + 1/s Ki + s Kd] E(s)

PID Implemented: Let C(s) = Vdc(s) / E(s) (transfer function) C(s) = [Kp + 1/s Ki + s Kd] = [Kp s + Ki + Kd s 2 ] / s (2 nd Order) THEN C(s)G(s) = K [Kd s 2 + Kp s + Ki] s(s 2 + 2as + b 2 ) AND Y/R = Kd s 2 + Kp s + Ki s 3 + (2a+Kd)s 2 + (b 2 +Kp) s + Ki

Implications: Kd has direct impact on damping Kp has direct impact on resonant frequency In General the effects of increasing parameters is: Parameter: Rise Time Overshoot Settling Time S.S.Error Kp Decrease Increase Small Change Decrease Ki Decrease Increase Increase Eliminate Kd Small Change Decrease Decrease None

Tuning a PID: There is a fairly standard procedure for tuning PID controllers A good first stop for tuning information is Wikipedia:

Deadband In noisy environments or with energy intensive processes it may be desirable to make the controller unresponsive to small changes in input or feedback signals A deadband is an area around the input signal set point, wherein no control action will occur

Time Step Implementation of Control Algorithms (digital controllers) Given a continuous, linear time domain description of a process, it is possible to approximate the process with Difference Equations and implement in software Time Step size (and/or Sampling Rate) is/are critical to the accuracy of the approximation

From Differential Equation to Difference Equation: Definition of Derivative: dU = lim U(t + Δ t) – U(t) dt Δt  0 Δ t Algebraically Manipulate to Difference Eq: U(t + Δ t) = U(t) + Δ t*dU dt (for sufficiently small Δt) Apply this to Iteratively Solve First Order Linear Differential Equations (hold for applause)

Implementing Difference Eqs: Consider the following RC Circuit, with 5 Volts of initial charge on the capacitor: KVL around the loop: -Vs + Ic*R + Vc = 0, Ic = C*dVc/dt OR dVc/dt = (Vs –Vc)/RC

Differential to Difference with Time-Step, T: Differential Equation: dVc/dt = (Vs –Vc)/RC Difference Equation by Definition: Vc(kT+T) = Vc(kT) + T*dVc/dt Substituting: Vc(kT+T) = Vc(kT) + T*(Vs –Vc(kT))/RC

Coding in SciLab: R=1000 C=1e-4 Vs=10 Vo=5 //Initial Value of Difference Equation (same as Vo) Vx(1)=5 //Time Step dt=.01 //Initialize counter and time variable i=1 t=0 //While loop to calculate exact solution and difference equation while i<101, Vc(i)=Vs+(Vo-Vs)*exp(-t/(R*C)), Vx(i+1)=Vx(i)+dt*(Vs-Vx(i))/(R*C), t=t+dt, i=i+1, end

Results:

Integration by Trapezoidal Approximation: Definition of Integration (area under curve): Approximation by Trapezoidal Areas

Trapezoidal Approximate Integration in SciLab: //Calculate and plot X=5t and integrate it with a Trapezoidal approx. //Time Step dt=.01 //Initialize time and counter t=0 i=2 //Initialize function and its trapezoidal integration function X(1)=0 Y(1)=0 //Perform time step calculation of function and trapezoidal integral while i<101,X(i)=5*t,Y(i)=Y(i-1)+dt*X(i-1)+0.5*dt*(X(i)-X(i-1)), t=t+dt, i=i+1, end //Plot the results plot(X) plot(Y)

Results:

Coding the PID Using Difference Equations, it is possible now to code the PID algorithm in a high level language p(t) = Kp*e(t)  P( kT ) = Kp*E( kT ) i(t) = Ki* ∫ e(t)dt  I( kT+T ) = Ki*[I( kT )+T*E( kT+T )+.5(E( kT+T )-E( kT ))] d(t) = Kd* de(t)/dt  D( kT+T ) = Kd*[E( kT+T )-E( kT )]/T

Example: Permanent Magnet DC Motor State-Space Description of the DC Motor: 0. θ’ = ω (angular frequency) 1. Jθ’’ + Bθ’ = KtIa  ω’ = -Bω/J + KtIa/J 2.LaIa’ + RaIa = Vdc - Kaθ’  Ia’ = -Kaω/La –RaIa/La +Vdc/La In Matrix Form:

Scilab Emulation of PM DC Motor using State Space Equations

DC Motor with PID control //PID position control of permanent magnet DC motor //Constants Ra=1.2;La=1.4e-3;Ka=.055;Kt=Ka;J=.0005;B=.01*J;Ref=0;Kp=5;Ki=1;Kd=1 //Initial Conditions Vdc(1)=0;Theta(1)=0;Omega(1)=0;Ia(1)=0;P(1)=0;I(1)=0;D(1)=0;E(1)=0 //Time Step (Seconds) dt=.001 //Initialize Counter and time i=1;t(1)=0 //While loop to simulate motor and PID difference equation approximation while i<1500, Theta(i+1)=Theta(i)+dt*Omega(i), Omega(i+1)=Omega(i)+dt*(-B*Omega(i)+Kt*Ia(i))/J, Ia(i+1)=Ia(i)+dt*(-Ka*Omega(i)-Ra*Ia(i)+Vdc(i))/La, E(i+1)=Ref-Theta(i+1), P(i+1)=Kp*E(i+1), I(i+1)=Ki*(I(i)+dt*E(i)+0.5*dt*(E(i+1)-E(i))), D(i+1)=Kd*(E(i+1)-E(i))/dt, Vdc(i+1)=P(i+1)+I(i+1)+D(i+1), //Check to see if Vdc has hit power supply limit if Vdc(i+1)>12 then Vdc(i+1)=12 end t(i+1)=t(i)+dt, i=i+1, //Call for a new shaft position if i>5 then Ref=10 end

Results:

References: Phillips and Nagle, Digital Control System Analysis and Design, Prentice Hall, 1995, ISBN-10: X WAKE UP!!