Hands-on Lab. PID Closed-Loop Control

Similar documents
GE420 Laboratory Assignment 8 Positioning Control of a Motor Using PD, PID, and Hybrid Control

Figure 1: Unity Feedback System. The transfer function of the PID controller looks like the following:

ME 5281 Fall Homework 8 Due: Wed. Nov. 4th; start of class.

Introduction to PID Control

Root Locus Design. by Martin Hagan revised by Trevor Eckert 1 OBJECTIVE

ME 375 System Modeling and Analysis

Frequency Response Analysis and Design Tutorial

PERSONALIZED EXPERIMENTATION IN CLASSICAL CONTROLS WITH MATLAB REAL TIME WINDOWS TARGET AND PORTABLE AEROPENDULUM KIT

Application Note #2442

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING BANGLADESH UNIVERSITY OF ENGINEERING & TECHNOLOGY EEE 402 : CONTROL SYSTEMS SESSIONAL

LECTURE 2: PD, PID, and Feedback Compensation. ( ) = + We consider various settings for Zc when compensating the system with the following RL:

Observer-based Engine Cooling Control System (OBCOOL) Project Proposal. Students: Andrew Fouts & Kurtis Liggett. Advisor: Dr.

Ver. 4/5/2002, 1:11 PM 1


Figure 1.1: Quanser Driving Simulator

Rotary Motion Servo Plant: SRV02. Rotary Experiment #02: Position Control. SRV02 Position Control using QuaRC. Student Manual

5 Lab 5: Position Control Systems - Week 2

EE 308 Spring Preparation for Final Lab Project Simple Motor Control. Motor Control

Rotary Motion Servo Plant: SRV02. Rotary Experiment #03: Speed Control. SRV02 Speed Control using QuaRC. Student Manual

Students: Andrew Fouts Kurtis Liggett. Advisor: Dr. Dempsey

ME375 Lab Project. Bradley Boane & Jeremy Bourque April 25, 2018

Dr Ian R. Manchester Dr Ian R. Manchester Amme 3500 : Root Locus Design

AC : A STUDENT-ORIENTED CONTROL LABORATORY US- ING PROGRAM CC

VECTOR CONTROL SCHEME FOR INDUCTION MOTOR WITH DIFFERENT CONTROLLERS FOR NEGLECTING THE END EFFECTS IN HEV APPLICATIONS

STABILITY IMPROVEMENT OF POWER SYSTEM BY USING PSS WITH PID AVR CONTROLLER IN THE HIGH DAM POWER STATION ASWAN EGYPT

Embedded Control Project -Iterative learning control for

PID Controller tuning and implementation aspects for building thermal control

Module 08 Controller Designs: Compensators and PIDs

Design of a Simulink-Based Control Workstation for Mobile Wheeled Vehicles with Variable-Velocity Differential Motor Drives

Design of Compensator for Dynamical System

ECE 5670/ Lab 5. Closed-Loop Control of a Stepper Motor. Objectives

Readings: FC: p : lead compensation. 9/9/2011 Classical Control 1

EE 482 : CONTROL SYSTEMS Lab Manual

EE 370/L Feedback and Control Systems Lab Section Post-Lab Report. EE 370L Feedback and Control Systems Lab

MEM01: DC-Motor Servomechanism

MTE 360 Automatic Control Systems University of Waterloo, Department of Mechanical & Mechatronics Engineering

DC Motor Speed Control for a Plant Based On PID Controller

Compensation of a position servo

Control Design for Servomechanisms July 2005, Glasgow Detailed Training Course Agenda

Comparative Analysis of P, PI, PD, PID Controller for Mass Spring Damper System using Matlab Simulink.

EE 461 Experiment #1 Digital Control of DC Servomotor

ECE 5670/6670 Lab 7 Brushless DC Motor Control with 6-Step Commutation. Objectives

AN EXPERIMENTAL INVESTIGATION OF THE PERFORMANCE OF A PID CONTROLLED VOLTAGE STABILIZER

CDS 101/110: Lecture 8.2 PID Control

Designing PID for Disturbance Rejection

SECTION 6: ROOT LOCUS DESIGN

ME451: Control Systems. Course roadmap

Brett Browning and. Spring 2011

Comparative Study of PID and Fuzzy Controllers for Speed Control of DC Motor

of harmonic cancellation algorithms The internal model principle enable precision motion control Dynamic control

Engine Control Workstation Using Simulink / DSP. Platform. Mark Bright, Mike Donaldson. Advisor: Dr. Dempsey

Position Control of DC Motor by Compensating Strategies

ANNA UNIVERSITY :: CHENNAI MODEL QUESTION PAPER(V-SEMESTER) B.E. ELECTRONICS AND COMMUNICATION ENGINEERING EC334 - CONTROL SYSTEMS

JNTUWORLD. 6 The unity feedback system whose open loop transfer function is given by G(s)=K/s(s 2 +6s+10) Determine: (i) Angles of asymptotes *****

SRV02-Series Rotary Experiment # 3. Ball & Beam. Student Handout

Lecture 7:Examples using compensators

EVALUATION ALGORITHM- BASED ON PID CONTROLLER DESIGN FOR THE UNSTABLE SYSTEMS

Fundamentals of Servo Motion Control

Experiment 9. PID Controller

(1) Identify individual entries in a Control Loop Diagram. (2) Sketch Bode Plots by hand (when we could have used a computer

TCS3 SERVO SYSTEM: Proposed Design

MEM 01 DC MOTOR-BASED SERVOMECHANISM WITH TACHOMETER FEEDBACK

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

1. Consider the closed loop system shown in the figure below. Select the appropriate option to implement the system shown in dotted lines using

Introduction. Example. Table of Contents

Elmo HARmonica Hands-on Tuning Guide

Designing PID controllers with Matlab using frequency response methodology

Magnetic Levitation System

Motor Modeling and Position Control Lab 3 MAE 334

Penn State Erie, The Behrend College School of Engineering

*Engineering and Industrial Services, TATA Consultancy Services Limited **Professor Emeritus, IIT Bombay

A Comparison And Evaluation of common Pid Tuning Methods

6.270 Lecture. Control Systems

Design of stepper motor position control system based on DSP. Guan Fang Liu a, Hua Wei Li b

ECE317 : Feedback and Control

4 Experiment 4: DC Motor Voltage to Speed Transfer Function Estimation by Step Response and Frequency Response (Part 2)

Comparative Analysis of a PID Controller using Ziegler- Nichols and Auto Turning Method

DEGREE: Biomedical Engineering YEAR: TERM: 1

CHAPTER 4 PID CONTROLLER BASED SPEED CONTROL OF THREE PHASE INDUCTION MOTOR

Equipment and materials from stockroom:! DC Permanent-magnet Motor (If you can, get the same motor you used last time.)! Dual Power Amp!

Comparative Study of PID and FOPID Controller Response for Automatic Voltage Regulation

PYKC 7 March 2019 EA2.3 Electronics 2 Lecture 18-1

Using Root Locus Modeling for Proportional Controller Design for Spray Booth Pressure System

Lab 23 Microcomputer-Based Motor Controller

MCE441/541 Midterm Project Position Control of Rotary Servomechanism

Magnetic Suspension System Control Using Position and Current Feedback. Senior Project Proposal. Team: Gary Boline and Andrew Michalets

Sfwr Eng/TRON 3DX4, Lab 4 Introduction to Computer Based Control

Lab 2: Introduction to Real Time Workshop

Spacecraft Pitch PID Controller Tunning using Ziegler Nichols Method

Sensors and Sensing Motors, Encoders and Motor Control

Lecture 2 Exercise 1a. Lecture 2 Exercise 1b

SxWEB PID algorithm experimental tuning

Design of Different Controller for Cruise Control System

Basic Tuning for the SERVOSTAR 400/600

Rectilinear System. Introduction. Hardware

Linear Motion Servo Plants: IP01 or IP02. Linear Experiment #0: Integration with WinCon. IP01 and IP02. Student Handout

Chapter 10 Digital PID

Digital Control of MS-150 Modular Position Servo System

DC MOTOR SPEED CONTROL USING PID CONTROLLER. Fatiha Loucif

EE 4314 Lab 3 Handout Speed Control of the DC Motor System Using a PID Controller Fall Lab Information

Transcription:

Hands-on Lab PID Closed-Loop Control Adding feedback improves performance. Unity feedback was examined to serve as a motivating example. Lectures derived the power of adding proportional, integral and derivatives (PID) of the error. Such additions result in further moving the poles and zeros of the closed-loop system to more desirable locations (as seen by root locus plots); the designer tunes PID gains in order to achieve desired performance (i.e. rise time) and stability (i.e. overshoot). In essence, PID adds or decreases the closed-loop system type (e.g. Type 0). Depending on the input (e.g. a step or ramp signal), one needs to tune PID gains accordingly. Preamble: Step Response of NXT DC motor with PID Continuing our example, the NXT DC motor, the open-loop transfer function (OLTF) was given by 7.83 8.33 (1) The rise time was observed to be 0.12sec. Commanding the motor at 75%, yielding a steady-state velocity is 70.5 RPM. We also see that the NXT Motor is a Type 0 system. From lecture, recall that a PID controller is depicted in Figure A Figure A: Block diagram of a typical PID controller with a plant (denoted by the open-loop transfer function From lecture, we said the following: For Type 0 systems (like DC motor speed): Hypothesis A: For step response, if 1 and 0 and 0 there will always be a discrete error. This is because simply adding proportional gain does NOT increase system type. Hypothesis B: For step response, if 0, then we expect zero error (but may have stability issues)

Concept 1: Use Simulink to test Hypotheses A and B for NXT DC motor Step 1: Launch Simulink and create the following model given in Figure 1-1 Figure 1-1: Baseline model of PID control with NXT motor using equation (1) Exercises: 1-1. Execute the Simulink simulation with 1, 10, 100 and 1000 (and make sure 0 Contrast the plots for error, motor command and motor speed. What do you notice and what can you say about Hypothesis A? Hint: What is the impact of on rise time and error? 1-2. Execute the Simulink simulation with 0 but now set 1, 10, 100. Contrast plots for error, motor command and motor speed. What do you notice and what can you say about Hypothesis B? Hint: What is the impact of on rise time and error? 1-3. Execute the Simulink simulation with various combinations of,, and (example, try 100, 10and 10. What do you notice about the rise time and error? From your motor command scope observations, can such a controller be implemented for real? 1-4. Repeat 1-1, 1-2 and 1-3 but replace the plant with your own open-loop transfer function of the NXT DC motor.

Concept 2: Implement PID in NXC Step 1: Re-run an open-loop step response (motor command of 75%) and determine the steadystate velocity (recall code from past: nxtmotorolsr1_0.nxc) Make a note of the steady-state RPM and the rise-time Step 2: Write NXC code to implement PID control. Define some PID related variables // PID related variables float Kp, Ki, Kd; // PID gains float desiredrpm; // desired motor speed (e.g. open-loop steady-state RPM) float error; // difference between desired RPM and actual RPM float preverror; // needed for derivative control float deltaerror; // needed for derivative control float derivativeoferror; float integraloferror; float motorcommand; // calculated PID motor command Step 3: Initialize desired RPM (to perhaps your open-loop steady-state value) and error-related variables. // Initialize variables elapsedtimeinseconds = 0.0; // set elapsed time to zero prevangleindegrees = 0; // motor initially motionless so set angle to zero motorrpm = 0.0; desiredrpm = 70.5; // this was our motor's open-loop steady-state RPM error = 0.0; deltaerror = 0.0; preverror = 0.0; derivativeoferror = 0.0; integraloferror = 0.0; Step 4: Set PID gains // Set PID gains Kp = 100.0; Ki = 0.0; Kd = 0.0; Step 5: Calculate error, its derivative and integral. Calculate resulting motor command // Calculate error error = desiredrpm - motorrpm; deltaerror = error - preverror; derivativeoferror = (deltaerror)/elapsedtimeinseconds; integraloferror = preverror + error; // Update motor command motorcommand = Kp*error + Ki*integralOfError + Kd*derivativeOfError; if(motorcommand >= 100.0) motorcommand = 100.0; if(motorcommand <= 0.0) motorcommand = 0.0; charmotorcommand = motorcommand; OnFwd(MOTOR, charmotorcommand);

NXT DC Motor PID Last updated 11/17/12 Step 6: Update variables // Update current tic value and angle prevtick = curtick; prevangleindegrees = curangleindegrees; preverror = integraloferror; Wait(25); // update loop every 25 milliseconds } while( elapsedtimeinseconds <= 2.0); // collect 2 sec of data Sample Results Figure 2A: OLSR shows steady-state RPM of about 54 RPM Figure 2B: 1; 0; 0 to 70.5 desired RPM. Illustrates that will have discrete error Figure 2C: 100; 0; 0 to 70.5 desired RPM. Illustrates discrete error 1 decreases if 100; 10; 10 to 70.5 Figure 2D: desired RPM. Illustrates discrete error going to zero.

Figure 2E: 0; 1; 1 to 70.5 desired RPM. Illustrates discrete error going to zero. Exercises: 2-1 Execute your NXC PID program and capture your own versions of Figure 2A-2E 2-2 Based on Figure 2A, calculate rise-time and steady-state velocity. Implement the resulting transfer function in your Simulink model (i.e. Figure 1-1). Run simulations and capture figures for the various gains 2-3 Compare experimental results (2-1) and Simulink simulations (2-2). Show that the results are similar. Try to explain any differences.