MAE106 Laboratory Exercises Lab # 5 - PD Control of DC motor position

Similar documents
MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

MAE106 Laboratory Exercises Lab # 3 Open-loop control of a DC motor

Open Loop Frequency Response

7 Lab: Motor control for orientation and angular speed

EE 42/100: Lecture 8. 1 st -Order RC Transient Example, Introduction to 2 nd -Order Transients. EE 42/100 Summer 2012, UC Berkeley T.

The Discussion of this exercise covers the following points: Angular position control block diagram and fundamentals. Power amplifier 0.

Experiment VI: The LRC Circuit and Resonance

Physics 132 Quiz # 23

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

Experiment 1 LRC Transients

Lab 11. Speed Control of a D.C. motor. Motor Characterization

Oscillations II: Damped and/or Driven Oscillations

ME 461 Laboratory #5 Characterization and Control of PMDC Motors

Motomatic Servo Control

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

Motor Modeling and Position Control Lab 3 MAE 334

EECS40 RLC Lab guide

The period is the time required for one complete oscillation of the function.

Sensors and Sensing Motors, Encoders and Motor Control

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

Introduction to Servo Control & PID Tuning

EXPERIMENT 8: LRC CIRCUITS

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

CHAPTER 6 INTRODUCTION TO SYSTEM IDENTIFICATION

Rectilinear System. Introduction. Hardware

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

#8A RLC Circuits: Free Oscillations

Lab 9 - AC Filters and Resonance

Fundamentals of Servo Motion Control

Active Vibration Isolation of an Unbalanced Machine Tool Spindle

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

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

Brett Browning and. Spring 2011

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

, answer the next six questions.

STUDY OF RC AND RL CIRCUITS Venue: Microelectronics Laboratory in E2 L2

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

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

GE 320: Introduction to Control Systems

CSE 3215 Embedded Systems Laboratory Lab 5 Digital Control System

Sensors and Sensing Motors, Encoders and Motor Control

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

5 Lab 5: Position Control Systems - Week 2

elevation drive. The best performance of the system is currently characterized by 3 00 steps.

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

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

Teaching Mechanical Students to Build and Analyze Motor Controllers

Lab 9 AC FILTERS AND RESONANCE

Tracking Position Control of AC Servo Motor Using Enhanced Iterative Learning Control Strategy

Electronics and Instrumentation Name ENGR-4220 Fall 1999 Section Modeling the Cantilever Beam Supplemental Info for Project 1.

ECE212H1F University of Toronto 2017 EXPERIMENT #4 FIRST AND SECOND ORDER CIRCUITS ECE212H1F

Dynamic Vibration Absorber

sin(wt) y(t) Exciter Vibrating armature ENME599 1

Exam Signal Detection and Noise

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

Resonance in Circuits

Characterizing the Frequency Response of a Damped, Forced Two-Mass Mechanical Oscillator

Software Operational Manual

Simple Oscillators. OBJECTIVES To observe some general properties of oscillatory systems. To demonstrate the use of an RLC circuit as a filter.

Application Note #2442

EE 42/100 Lecture 18: RLC Circuits. Rev A 3/17/2010 (3:48 PM) Prof. Ali M. Niknejad

6.270 Lecture. Control Systems

CONTENTS. Cambridge University Press Vibration of Mechanical Systems Alok Sinha Table of Contents More information

This manuscript was the basis for the article A Refresher Course in Control Theory printed in Machine Design, September 9, 1999.

Where: (J LM ) is the load inertia referred to the motor shaft. 8.0 CONSIDERATIONS FOR THE CONTROL OF DC MICROMOTORS. 8.

Integrators, differentiators, and simple filters

FREQUENCY RESPONSE AND PASSIVE FILTERS LABORATORY

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

AE2610 Introduction to Experimental Methods in Aerospace

Laboratory Assignment 5 Digital Velocity and Position control of a D.C. motor

Effective Teaching Learning Process for PID Controller Based on Experimental Setup with LabVIEW


UNIVERSITY OF JORDAN Mechatronics Engineering Department Measurements & Control Lab Experiment no.1 DC Servo Motor

Lab Exercise 9: Stepper and Servo Motors

A Do-and-See Approach for Learning Mechatronics Concepts

Lab 1: Steady State Error and Step Response MAE 433, Spring 2012

+ + G c (s G p (s. a) What is overall transfer closed-loop transfer function θ(s)

Experiment Number 2. Revised: Fall 2018 PLECS RC, RL, and RLC Simulations

Penn State Erie, The Behrend College School of Engineering

LC Resonant Circuits Dr. Roger King June Introduction

Experiment Number 2. Revised: Summer 2013 PLECS RC, RL, and RLC Simulations

Chapter 14 Oscillations. Copyright 2009 Pearson Education, Inc.

MEM01: DC-Motor Servomechanism

LABORATORY 4. Palomar College ENGR210 Spring 2017 ASSIGNED: 3/21/17

Filter Design, Active Filters & Review. EGR 220, Chapter 14.7, December 14, 2017

EE 233 Circuit Theory Lab 3: First-Order Filters

Load Observer and Tuning Basics

(1.3.1) (1.3.2) It is the harmonic oscillator equation of motion, whose general solution is: (1.3.3)

Laboratory Seven Stepper Motor and Feedback Control

Physics 303 Fall Module 4: The Operational Amplifier

Lecture 18 Stability of Feedback Control Systems

Mechatronics. Analog and Digital Electronics: Studio Exercises 1 & 2

Week 15. Mechanical Waves

Part 2: Second order systems: cantilever response

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Physics 8.02 Spring Experiment 11: Driven RLC Circuit

ω d = driving frequency, F m = amplitude of driving force, b = damping constant and ω = natural frequency of undamped, undriven oscillator.

EE 3TP4: Signals and Systems Lab 5: Control of a Servomechanism

Robot Actuators. Motors and Control. Stepper Motor Basics. Increased Resolution. Stepper motors. DC motors AC motors. Physics review: Nature is lazy.

1. To study the influence of the gain on the transient response of a position servo. 2. To study the effect of velocity feedback.

Phys Lecture 5. Motors

Transcription:

MAE106 Laboratory Exercises Lab # 5 - PD Control of DC motor position University of California, Irvine Department of Mechanical and Aerospace Engineering Goals Understand how to implement and tune a PD controller to control the position of a DC motor. Explore the frequency response of the PD controller by testing how it responds to sinusoidal inputs of different frequencies. Parts & equipment Qty Part/Equipment 1 Seeeduino board 1 Motor driver 1 DC motor with encoder Introduction The most common controller used by engineering designers to control the movement of a motorized part is the PD (proportional-derivative) controller (sometimes and integral control term is added, to create a PID controller, but we will not explore I control in this lab). In this lab you will implement a PD position controller. You can use the position controller code from this lab for your steering system for your final project. Such controllers are also used robot arms, radars, numerically controlled milling machines, manufacturing systems, and control surfaces on aerospace vehicles. The PD control law is: τ = K p (θ θ d ) K d (θ θ d ) where: θ d desired motor angular position τ desired motor torque θ d desired motor angular velocity K p proportional gain θ actual motor angular position K d derivative gain θ actual motor angular velocity

Note that the controller has two terms one proportional to the position error (the P part), and one proportional to the derivative of position (i.e. velocity, the D part). Thus, it is called a PD controller. The implementation of this controller for a DC motor with inertia, J, is shown in Figure 2. Figure 1. Block diagram that you will implement to make the PD controller for the motor. J is the inertia of the motor shaft. Part I: Step response of the actual system Construct the Arduino circuit in Figure 2. Download and run the code for this lab from the web site and run it on the Arduino. As in previous labs, when you open the Serial Port Monitor (or when you press the 'reset' button on the Arduino), the code will re-initialize, then run a step response and send time, position, and desired position of the motor to the monitor for the response. You can copy and paste this into Excel to display the step response. Use the template provided on the class website for Excel so that you can quickly see the motor s response. To understand how the actual system behaves we need to first understand its dynamics. First, let's look at the dynamical equation that describes how θ evolves with time when the controller is attached to the motor. Dynamics of the motor and shaft: τ = Jθ Dynamics of the controller system: τ = Jθ = K p (θ θ d ) K d (θ θ d ) Re-writing to make input-output clear: Jθ + K d θ + K p θ = K d θ d + K p θ d

This differential equation has similar dynamics to a mass-spring-damper system with Force as the input and Position as the output. That is, it follows the same equations of motion. This allows us to use our intuition about mass-spring-damper systems when designing and tuning a PD controller. Recall that the differential equation of motion for a mass-spring-damper system is given by: mx + Bx + Kx = F and thus using the analogy to the PD controller we have that: mass-spring-damper system PD controller m mass J motor inertia B damper K d derivative control term K spring K p proportional control term F input force τ desired motor torque In a mechanical system, if you wanted to the system to respond more quickly, you would increase the natural frequency (ω n ) by picking a stiffer spring (higher K p ). Which variable would you change in your differential equation for the PD system to make your system respond more quickly (i.e. increase its natural frequency)? Note: there is a limit to how big you can make this variable because of the time delays in this sampled data system. By adding the derivative gain (K d ) to control the position of the motor we must now take into account the concept of damping when designing and implementing the controller. With damping in the controller we can have four types of behaviors: Undamped (i.e. zero damping): The system oscillates at its natural frequency. These oscillations are a function of the controller's K p gain. Underdamped: The system will move to its desired position and oscillate about this position with is oscillations gradually decreasing to zero. Critically damped: The system will move to its desired position as quickly as possible without oscillating. Overdamped: The system will move asymptotically towards its desired position without oscillating. Suppose you didn t want your motor to oscillate too much. This is an important issue! PD controllers are used in many applications such as NC milling machines, plotters, and for your final project steering. You usually want your motor to go to a desired value quickly and accurately without oscillating. Change the derivative gain K d until you get the system to be critically damped.

Figure 2. Schematic of connections to motor driver. Same as in the previous lab. To control your motor you will have to go through a process of tuning the gains of the controller. You tune a PD controller based on the response that you want to get from your system (i.e. how fast do you want it to reach its desired position? Do you want to allow oscillations around the desired position?) You can follow a procedure such as this one: 1. Set the derivative gain, Kd, to zero and only change the proportional gain Kd. Change Kp so that you have an acceptable response in regards to how fast your system reaches its desired position. Note that since Kd is zero you will get oscillations around the desired position (undamped system). For your motor a good place to start is with a Kp value of 100. Then start increasing it until you get a rise time (defined in Figure 3) close to 0.038 seconds. 2. Once you have an acceptable response in terms of how fast your system reaches its desired position, you can now begin to add damping so that the oscillations will decrease (underdamped system). Because you are now adding damping to your controller, you can expect your system to react slower. 3. You can keep increasing the derivative gain until your system no longer oscillates as it reaches its desired position. This will give you a critically damped system. What happens if you keep increasing the damping gain past this point? For your code to control the motor you will need to write the control law, u, in the Arduino program provided.

Position (radians) Position (radians) 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 Trial 1 B A 0 0.05 0.1 0.15 0.2 0.25 A -10%ϴ ss B - 90%ϴ ss Position Desired Position Rise time Time (seconds) Figure 3. Underdamped system. The rise time is the time it takes for your system to go from 10% to 90% of the desired position. This figure was made using values derived from the code that was provided to you (i.e you should be able to obtain a similar figure). Practical Exam I Show your TA that your system is critically damped and that it has a rise time close to 0.038 seconds (your system should respond very similar to Figure 4). What is the time constant at these settings? What is the value of Kp and Kd that you used? Trial 3 1.2 1 0.8 0.6 0.4 0.2 Position Desired Position 0 0 0.05 0.1 0.15 0.2 0.25 Time (seconds) Figure 4. Expected output for the critically damped system.

Part II: Frequency response of the actual system The goal of this part of the lab is to characterize the frequency response of the system. In particular, you will explore how well the system tracks the desired input position when the input is a sinusoid, across a range of frequencies. Remember, you can view linear systems such as this one as filters. The PD controller acts like a lowpass filter, although it has a resonant peak if the damping is not great enough. To characterize the frequency response of the system, follow the steps below. REMEMBER: DO NOT LET YOUR MOTOR OVERHEAT. 1. Set Kp equal to the value that you found in Part I for a rise time close to 0.038 seconds and Kd = 0. Also set the variable delaytotakedata = 2.0 (this will allow the controller to run for 2 seconds before saving data to the virtual oscilloscope in the code, allowing initial transients to die out). 2. Change the Arduino code to input a sinusoid. To do this, go to the function desiredposition() and comment the lines that define a square wave input and uncomment those for a sine wave. Record the output amplitude and phase shift at 1, 2, 4, 8, 12, 16Hz (you will need these for your write-up) a. Does the system have a resonant frequency? Note, you may have to search between the frequencies suggested above to find it. What should the phase difference between desired and actual position be at the resonant frequency? (Answer: 90 degrees). b. Which signal should be larger at the resonant frequency? (Answer: The actual position of the motor). c. What is the resonant frequency? Do you notice any high frequency oscillations in your output signal? What do you think might be causing those? Practical Exam II: Show your TA that you can find the resonant frequency of your system. What is the frequency, in Hz, at which resonance occurs? Pre-lab assignment 1. What is the control law that you will implement in this week's lab? How does this control law related to the differential equation of motion of a massspring-damper system? 2. Draw the behavior for an underdamped, critically damped, and overdamped system as you change the position of the motor from 0 degrees to 90 degrees. How do you expect that the time constant will change as you move from underdamped to critically damped, and finally to overdamped?

Write-Up 1. Following the procedure in Part I for tuning the PD gains, make 3 plots of your system for when it is Underdamped, Critically Damped, and Overdamped. Label the values for Kp and Kd that you used to obtain these behaviors. 2. Make two Bode plots of the frequency response of the system: a. Set K d = 0 b. Set K d = value you found that made the system critically damped. To make each Bode plot you will plot: - 20log(output amplitude/input amplitude) vs. input frequency (on a log scale), and - phase shift vs. input frequency (on a log scale}. Last hour of lab Controls team members need to stay in the lab and perform the following exercise. 1. Make the LED onboard the Seeeduino board blink at a rate of 1Hz while your motor follows a sinusoidal input (as in Part II) of 1Hz and an amplitude of 90 degrees. This is also your time to work one-on-one with the TAs to get better at programming the microcontroller. If you have questions about programming this is your opportunity to receive feedback and instruction on its use.