System Parameters and Frequency Response MAE 433 Spring 2012 Lab 2

Similar documents
Rotary Motion Servo Plant: SRV02. Rotary Experiment #01: Modeling. SRV02 Modeling using QuaRC. Student Manual

Lab 3: Quanser Hardware and Proportional Control

State Feedback MAE 433 Spring 2012 Lab 7

Quanser NI-ELVIS Trainer (QNET) Series: QNET Experiment #02: DC Motor Position Control. DC Motor Control Trainer (DCMCT) Student Manual

Laboratory 11 Control Systems Laboratory ECE3557. State Feedback Controller for Position Control of a Flexible Joint

SRV02-Series Rotary Experiment # 1. Position Control. Student Handout

ME 3210 Mechatronics II Laboratory Lab 4: DC Motor Characteristics

Lab 6a: Pole Placement for the Inverted Pendulum

3 Lab 3: DC Motor Transfer Function Estimation by Explicit Measurement

State Feedback Controller for Position Control of a Flexible Link

Department of Mechanical Engineering

Lab 1: Dynamic Simulation Using Simulink and Matlab

DC Motor Position: System Modeling

Example: DC Motor Speed Modeling

SRV02-Series Rotary Experiment # 7. Rotary Inverted Pendulum. Student Handout

Example: Modeling DC Motor Position Physical Setup System Equations Design Requirements MATLAB Representation and Open-Loop Response

Rotary Motion Servo Plant: SRV02. Rotary Experiment #11: 1-DOF Torsion. 1-DOF Torsion Position Control using QuaRC. Student Manual

Lab 5a: Pole Placement for the Inverted Pendulum

Model of a DC Generator Driving a DC Motor (which propels a car)

FEEDBACK CONTROL SYSTEMS

THE REACTION WHEEL PENDULUM

2.004 Dynamics and Control II Spring 2008

EXPERIMENT 7: ANGULAR KINEMATICS AND TORQUE (V_3)

Mechatronics Engineering. Li Wen

Manufacturing Equipment Control

Mechatronic System Case Study: Rotary Inverted Pendulum Dynamic System Investigation

Modeling and Simulation Revision III D R. T A R E K A. T U T U N J I P H I L A D E L P H I A U N I V E R S I T Y, J O R D A N

System Modeling: Motor position, θ The physical parameters for the dc motor are:

Overview of motors and motion control

EE 410/510: Electromechanical Systems Chapter 4

Rotational Motion. Figure 1: Torsional harmonic oscillator. The locations of the rotor and fiber are indicated.

ECE 5670/6670 Lab 8. Torque Curves of Induction Motors. Objectives

ECEN 420 LINEAR CONTROL SYSTEMS. Lecture 6 Mathematical Representation of Physical Systems II 1/67

Mo de ling, Ide nti cat ion, and Control of a DC-Servomotor

Mechatronics Modeling and Analysis of Dynamic Systems Case-Study Exercise

Digital Control Semester Project

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Physics Spring Experiment 5: Faraday s Law

Linear Experiment #11: LQR Control. Linear Flexible Joint Cart Plus Single Inverted Pendulum (LFJC+SIP) Student Handout

Lab Partner(s) TA Initials (on completion) EXPERIMENT 7: ANGULAR KINEMATICS AND TORQUE

SHM Simple Harmonic Motion revised May 23, 2017

(Refer Slide Time: 00:01:30 min)

PARAMETER IDENTIFICATION, MODELING, AND SIMULATION OF A CART AND PENDULUM

UNIVERSITY OF WASHINGTON Department of Aeronautics and Astronautics

2.010 Fall 2000 Solution of Homework Assignment 1

CONTROL SYSTEMS LABORATORY ECE311 LAB 1: The Magnetic Ball Suspension System: Modelling and Simulation Using Matlab

MAE106 Homework 2 - Solution DC Motors & Intro to the frequency domain

Texas A & M University Department of Mechanical Engineering MEEN 364 Dynamic Systems and Controls Dr. Alexander G. Parlos

Modeling and Simulation Revision IV D R. T A R E K A. T U T U N J I P H I L A D E L P H I A U N I V E R S I T Y, J O R D A N

ECE3510 Lab #5 PID Control

ENGG4420 LECTURE 7. CHAPTER 1 BY RADU MURESAN Page 1. September :29 PM

Rotational Dynamics Smart Pulley

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Electric Machines

ES205 Analysis and Design of Engineering Systems: Lab 1: An Introductory Tutorial: Getting Started with SIMULINK

Driven Harmonic Oscillator

Lab 3: Model based Position Control of a Cart

Rotary Flexible Joint

Department of Electrical and Computer Engineering. EE461: Digital Control - Lab Manual

Appendix A Prototypes Models

King Saud University

ET3-7: Modelling I(V) Introduction and Objectives. Electrical, Mechanical and Thermal Systems

Step Motor Modeling. Step Motor Modeling K. Craig 1

DC-motor modelling and parameter identification

MATHEMATICAL MODELING OF OPEN LOOP PMDC MOTOR USING MATLAB/SIMULINK

EE 476 DC Motor Control Lab

Laboratory handouts, ME 340

Control of an Induction Motor Drive

Experiment 5. Simple Harmonic Motion

The Control of an Inverted Pendulum

Stepping Motors. Chapter 11 L E L F L D

Two-Mass, Three-Spring Dynamic System Investigation Case Study

Lab #2: Digital Simulation of Torsional Disk Systems in LabVIEW

ECE 320 Linear Control Systems Winter Lab 1 Time Domain Analysis of a 1DOF Rectilinear System

Double Inverted Pendulum (DBIP)

Homework Assignment 4 Root Finding Algorithms The Maximum Velocity of a Car Due: Friday, February 19, 2010 at 12noon

Lab 1g: Horizontally Forced Pendulum & Chaotic Motion

Modeling and Experimentation: Compound Pendulum

Dynamics of the synchronous machine

Introduction to Controls

Lab 11 - Free, Damped, and Forced Oscillations

EDEXCEL NATIONALS UNIT 5 - ELECTRICAL AND ELECTRONIC PRINCIPLES. ASSIGNMENT No. 3 - ELECTRO MAGNETIC INDUCTION

IfA Fachpraktikum - Experiment 3.7A : Flexible Shaft A

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Physics 8.02 Spring 2003 Experiment 17: RLC Circuit (modified 4/15/2003) OBJECTIVES

DOUBLE ARM JUGGLING SYSTEM Progress Presentation ECSE-4962 Control Systems Design

Rotary Flexible Link. Workbook FLEXGAGE. Student Version

Inverted Pendulum System

Encoders. Understanding. November design for industry: Help clean up the ocean. Horizon failure forensics

1. Write the symbolic representation and one possible unit for angular velocity, angular acceleration, torque and rotational inertia.

School of Mechanical Engineering Purdue University. ME375 ElectroMechanical - 1

Automatic Control Systems. -Lecture Note 15-

EXPERIMENTALLY DETERMINING THE TRANSFER FUNCTION OF A SPRING- MASS SYSTEM

Line following of a mobile robot

MAE106 Laboratory Exercises Lab # 6 - Vibrating systems

The basic principle to be used in mechanical systems to derive a mathematical model is Newton s law,

Transient DC motor performance

Rotational Motion. 1 Purpose. 2 Theory 2.1 Equation of Motion for a Rotating Rigid Body

The control of a gantry

State space control for the Two degrees of freedom Helicopter

PID Control. Objectives

Motion in Two Dimensions: Centripetal Acceleration

Position Control Experiment MAE171a

Transcription:

System Parameters and Frequency Response MAE 433 Spring 2012 Lab 2 Prof. Rowley, Prof. Littman AIs: Brandt Belson, Jonathan Tu Technical staff: Jonathan Prévost Princeton University Feb. 21-24, 2012 1 Overview In this lab we examine the dynamics of the motor-tachometer system. In the first part we briefly describe a simplified model for the system dynamics. The parameters of this model are estimated by making measurements. Using this model, we determine the frequency response using Matlab (we will learn how to find the frequency response analytically later in the semester). In the second part, we obtain the frequency response of the motor-tachometer system directly by providing the motor with sinusoidal voltage inputs and observing the tachometer outputs. We will find that if the input to the system is sinusoidal, then the response (after transients decay) is also sinusoidal, but with a different amplitude and phase that depend on the forcing frequency. Lastly, we compare the frequency response of the model with the actual system. 2 Goals Our hands-on goals for today are to: Learn about the important physical parameters that characterize the motor-tachometerflywheel system Become familiar with the Matlab bode (pronounced, boe-dee ) command which plots the system gain (in db) and phase (in degrees) versus the log of the frequency Learn that for sinusoidal forcing one must wait for all transients to decay before true sinusoidal response is observed. The time that one must wait is equal to the time that it takes to establish steady state in a step response. Compare theoretical predictions of the frequency to empirical measurements. There is a brief, one-page lab report that you will hand in before leaving the lab. 1

3 Modeling of the Motor The motor can be modeled with an electrical and a mechanical component, see Figure 1. For the electrical model, we have according to Kirchoff s voltage law L di a dt + R i a + e = v a, (1) where R is the resistance, L the inductance, and e is the voltage generated as a result of the rotation of the motor (electromotive force, or EMF). We also have the law of the generator which relates the angular speed ω to the voltage induced by the motor e, where K e is a constant: e = K e ω. (2) R L θ m θ l + i a v a e J m J l k b Figure 1: Schematic for the electrical and mechanical model of an electrical motor. The mechanical equations follow from Newton s law for the rotational moment of inertia J m θm + b( θ m θ l ) + k(θ m θ l ) = T, J l θl + b( θ l θ m ) + k(θ l θ m ) = 0, (3a) (3b) where k, b are the rotational spring and damping constant respectively, and the driving torque T is given by T = K T i a. (4) This is the law of the motor and relates the motor torque T to the current i a through the motor, where K T is a constant. Note that internal friction of the motor, stick-slip friction due to the brushes and other couplings present in the motor test stand, is not modeled. For simplicity we introduce two more assumptions: 1. Assume a rigid connection between motor and load (flywheel). 2. Neglect the influence of induction. The combined set of equations simplifies then to i a R + K e ω = v a, J ω = K T i a, (5a) (5b) where J = J m + J l. Recall that the moment of inertia for a cylinder about its axis of symmetry is given by J = 1 2 mr2, where m is the mass and r is the radius. We will be using equations 5a and 5b throughout this lab and estimating the parameters R, K e, J, and K T. 2

4 Laboratory measurements Estimate the rotational inertia of the motor and flywheel As mentioned, the moment of inertia of a cylinder is J = 1 2 mr2, where we will use m in kg and r in meters. We will use this formula to estimate the moment of inertia of the motor s spinning components, J m, and of the flywheel, J l, to find the total needed in equation 5b. Measure J m 1. Measure the mass of the spinning components of the motor (kg). You will need a disassembled motor, which might be in use by another group. Feel free to skip ahead to measuring J l and come back to this step. 2. Measure the radius of the spinning components of the motor (meters). There are calipers available with the other tools. Remember, radius, not diameter! 3. Compute J m. This estimate of the moment of inertia only accounts for the motor. It is not complete because it does not include the moment of inertia of the shaft, couplings, or the encoder. 4. Verify that your J m is in good agreement with the one specified by the manufacturer. Refer to the motor datasheet that lists the manufacturer s specifications in the back of this notebook. The motor that we use is the Canon CKT26-T5. Note that the column heading indicating rotor inertia is incorrect the units should be oz-in-sec 2 10 4. The units of oz-in-sec 2 are converted to kg-m 2 by the multiplicative constant 7.06155 10 3 kg-m2 oz-in-s 2. Measure J l 1. Measure the mass of the flywheel (kg). Do not disassemble your motor setup. There are extra flywheels in the lab for you to use. You will need a flywheel of the same size as your own. 2. Measure the radius of the flywheel (meters). There are calipers available with the other tools. Remember, radius, not diameter! 3. Compute J l. 3

Compute J = J l + J m For comparison, the value suggested for the total rotational inertia for the thin flywheel in your problem set was J = 2.38 10 5 kg-m 2. The calculated moments of inertia and suggested values are to be included in your lab report. Be sure to check with an AI to make sure your values are correct. Estimate the torque constant of the motor, K T Having found the parameter J, we will now determine the torque constant K T. Equation 5b, which is repeated here for convenience: We will use J ω = K T i a. We will apply a constant current i a = 0.5 A to the motor and record its angular speed, ω(t), as it increases linearly in time. Then we will use the slope of this line to solve for K T, since J and i a are known. 1. Create a Simulink model as shown below in Figure 2. The scope will record the angular speed in units of rad/s. This model will output the angular speed, but doesn t use the Quanser board for the input applied voltage like in last week s lab. Quanser MultiQ-PCI ENC Encoder Input 2*pi / 4096 Gain 100s s+100 Transfer Fcn Angular Speed Figure 2: Block diagram for angular speed of the motor in rad/s. 2. Configure the Simulink model by setting the WinCon solver Simulation to ODE5 (Dormond-Prince), as in the previous lab. 3. Connect the motor to the current-regulated DC power supply (GW Instek), then... (a) Before you switch on the power supply, check that both sides of the power supply are set to independent tracking, and have your setup checked by an AI or lab technician. (b) Switch on the power supply, slide the display switch to AMPS and turn the current knob fully clockwise. (c) Slide the display switch to VOLTS and set the voltage to 12 V (the motor should be spinning). (d) Slide the display switch to AMPS again and turn off the power supply. (e) Start your Simulink model and open up a Scope to plot the angular speed of the motor. (f) Hold the flywheel so that the motor cannot spin, and turn on the power supply. Do not hold the motor at stall for longer than about 15 seconds at a time or you could damage it. 4

(g) Rotate the Current Control knob until the meter reads 0.5 amps, then release. You will see the angular speed increase linearly (constant acceleration), following Equation 5b. Stop after a few seconds. (h) Save the Scope data to Matlab. (i) Determine the slope of the line (after initial transients are gone) from current to angular speed. The slope is the angular acceleration in rad/s 2. 4. Compute K T from Equation 5b, using your estimated value of J. 5. Compare your measured value with the one in the datasheet. Check with an AI to make sure your value is reasonable. To convert the table value in oz-in/a to N-m/A, multiply by 7.06155 10 3 N-m oz-in. Your agreement should be good. Estimate the back EMF constant K e and resistance R We found the J and K T parameters, now we need K e and R to complete Equations 5a and 5b. These values are given to you, and require no extra work. The value of this constant for a permanent-magnet motor is numerically equal to the value of K T (in theory), but with the units volts/(rad/sec). The value of R is listed in the data sheet in Ohms. A brief set of equations showing your calculation of all of the paramters, as well as the comparison with suggested values, should be included in your lab report. System Model in Matlab Now we are ready to model the system using Matlab. The dynamic model for the angular speed can be obtained from Equation 5a and Equation 5b by eliminating the current, i a, via substitution. The result is ω + K 1 ω = K 2 v a, where K 1 = K T K e JR and K 2 = K T JR. To make the model complete, we also need a measurement equation. Our measurement will be the tachometer voltage, as in Lab 1. Since the model is formulated in terms of ω in units of rad/s, Tach Voltage we need the tachometer constant to convert to voltage. Recall from lab 1: K tach = Angular speed in units of Volts/RPM. 1. Restate the equations of motion in state space form: ẋ = Ax + Bu y = Cx + Du, where x = ω, u = v a, and y = v tach. These calculations must be included in your lab report. Make sure to double-check your expressions for A, B, C, D in terms of the variables and constants before you proceed with numerical calculation. Be careful about the units in C and y (rad/s vs. RPM). 5

2. Create a state-space model in Matlab by defining A, B, C, D and using the command sys = ss(a, B, C, D). 3. Compute the step response by running the command step(sys). This creates a plot of the step response, and it should look like your open-loop response from last week s lab. 4. Run the command bode(sys) to see what the frequency response looks like. You don t have to do anything with this yet, just observe that you can find the frequency response with this model using this built-in Matlab command. Collecting experimental frequency response data We will now find the same frequency response you saw in the Bode plot of the model, but we will do it experimentally by inputting several sine waves of different frequencies and observing the magnitude and phase of the output. 1. Build the Simulink model in Figure 3 with the subsystem shown in Figure 4. There are multiple sine wave blocks. Use the one from the Sources library. Vin Vout Sine Wave Motor - Tachometer Tach Voltage Input Figure 3: Block diagram for experimental frequency response of the motor-tachometer system. 1 Vin Coulomb & Viscous Friction Quanser MultiQ-PCI DAC Analog Output to Motor Quanser MultiQ-PCI ADC Analog Input from Tachometer 1 Vout Figure 4: Motor - Tachometer subsystem of the block diagram in Figure 3. 2. Set the range of the Quanser Analog Input module to 10. 3. Set the amplitude of the sine wave to 6 V. 4. Set the Coulomb & Viscous Friction block as you did last week. 5. For each frequency in the set {0.5, 1, 2, 5, 10, 20, 50, 100} rad/s, capture 20 seconds of data and save the results in files resp to freq0p5.m, resp to freq1.m, resp to freq2.m, etc. Notice these are.m files, not.mat. Be sure to save both the input signal and your motor 6

response. Set the buffer to 25 seconds in the Update pull-down menu. This is most easily accomplished by plotting both signals on the same Quanser scope, which you can do by selecting both the Input and Tach Voltage variables for the Scope. Comparison of frequency responses: model versus measurement We are going to compare the model frequency response (computed using bode) to the frequency response data you just collected manually at a range of frequencies. First we will determine the magnitude and phase change for each frequency you tested with a function provided to you called motorbodepoints.m (this can be downloaded from Blackboard). 1. Download motorbodepoints.m to your working directory. Open this function in the Matlab editor to see how it works. 2. For each frequency data set, do the following. It s not required, but it may save time to write a Matlab script which loops over this procedure. (a) Run the m-file of the frequency response for a particular frequency. We will be graphically extracting data from this plot. It may be helpful to turn on the grid by typing grid on in the Matlab command window. (b) In the plot window, zoom in on a section of the data representative of the settled response containing 2-3 periods. This should be after a delay of approximately 2s. Recall from the open-loop step response last week that the system s initial transients were completely gone after about 2s. (c) Enter [x, y] = ginput(3) in Matlab. This will turn your mouse pointer into crosshairs on the plot. This allows you to click on the plot 3 times, and the x and y values will be recorded to the x and y variables, each having three entries. (d) Click on the plot three times: first where the input crosses the x-axis (from negative to positive), second where the motor response first crosses the x-axis after the input crosses (from negative to positive), and third where the input period ends, again crossing the x-axis (from negative to positive). The input period ends on its third crossing of the x-axis. As a check, display the vectors x and y and check that the values of y are all essentially zero and x values are in ascending order. (e) Before closing the plot, enter [u, v] = ginput(1), and click on the apex of one of the motor response curves. As a check, display the value of v and check that it is the amplitude of your motor response. (f) Set the applied voltage to 6 by entering vapp = 6;. (g) Run [magpoint, phasepoint] = motorbodepoints(x, v, vapp). This is computing one point on the Bode magnitude and phase plots. (h) Record magpoint and phasepoint so we can use them later. This is best done by entering the points into Matlab arrays. If you re unfamiliar with how to do this, ask an AI. 7

3. Recreate your state space model from before and have Matlab compute the frequency response of your model with the following commands. sys = ss(a,b,c,d); [sysmag, sysphase, w] = bode(sys); sysmag = mag2db(squeeze(sysmag)); sysphase = squeeze(sysphase); You need the four values that characterize your motor system (A, B, C, D) in your Matlab workspace. Note that we again converted to db, this time using the built-in Matlab function, mag2db. Feel free to use this in the future. 4. Make a Bode plot of your experimentally measured and model-based frequency responses on. Do they match? If not, which one is right? Discuss with an AI before moving on. Remember, a Bode plot contains a magnitude plot and a separate phase plot. For both, plot the input frequency on the x-axis using log-scale. You can do this easily using semilogx. The model sysmag and sysphase lines should be solid, with measured data overlayed as discrete marks of a different color (for instance, using hollow circles). The experimental data points should match the theoretical model curves. An example plotting command could be semilogx(w, sysmag, k-,freqs, magpoints, bx ). Use help plot or doc plot to see many other options. 5 Deliverables You need to include all calculations mentioned above: The moments of inertia and comparison to the manufacturer s values The torque and back EMF constants and comparison to the manufacturer s values The state space matrices A, B, C, D (scalars in this case) All results should be expressed in SI-units. Comparison of the theoretical and experimental frequency responses. Two plots are to be included: one for magnitude and one for phase. One report per group is fine. 8