Open Loop Frequency Response

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

Magnetic Levitation System

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

MEM01: DC-Motor Servomechanism

Motor Modeling and Position Control Lab 3 MAE 334

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

, answer the next six questions.

Class #16: Experiment Matlab and Data Analysis

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

Motomatic Servo Control

EEL2216 Control Theory CT2: Frequency Response Analysis

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

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

Practical Assignment 1: Arduino interface with Simulink

Lab 2: Introduction to Real Time Workshop

Laboratory 5: RC Circuits and Filtering

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

Laboratory 7: Active Filters

Penn State Erie, The Behrend College School of Engineering

Brushed DC Motor Microcontroller PWM Speed Control with Optical Encoder and H-Bridge

Lab 1: Simulating Control Systems with Simulink and MATLAB

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

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

7 Lab: Motor control for orientation and angular speed

ECE 5671/6671 Lab 3. Impedance Measurement and Parameter Estimation of a DC Motor

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

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

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

Activity P52: LRC Circuit (Voltage Sensor)

EXPERIMENT 14 Variable-frequency networks

Use of the LTI Viewer and MUX Block in Simulink

EE 210 Lab Exercise #3 Introduction to PSPICE

Rectilinear System. Introduction. Hardware

Frequency Response Analysis and Design Tutorial

EES42042 Fundamental of Control Systems Bode Plots

Lab 4 An FPGA Based Digital System Design ReadMeFirst

LAB 8: Activity P52: LRC Circuit

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

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

SAMPLE: EXPERIMENT 2 Series RLC Circuit / Bode Plot

SECTION 7: FREQUENCY DOMAIN ANALYSIS. MAE 3401 Modeling and Simulation

Example Data for Electric Drives Experiment 6. Analysis and Control of a Permanent Magnet AC (PMAC) Motor

UNIT 2: DC MOTOR POSITION CONTROL

Lab 1: First Order CT Systems, Blockdiagrams, Introduction

Electric Drives Experiment 5 Four-Quadrant Operation of a PMDC Motor

GE 320: Introduction to Control Systems

Digital Control Lab Exp#8: PID CONTROLLER

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

Introduction to Modeling of Switched Mode Power Converters Using MATLAB and Simulink

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

Lab 2: Quanser Hardware and Proportional Control

Analysis on Modeling and Simulink of DC Motor and its Driving System Used for Wheeled Mobile Robot

Fig. 1. NI Elvis System

Modelling and Simulation of a DC Motor Drive

LESSONS Lesson 1. Microcontrollers and SBCs. The Big Idea: Lesson 1: Microcontrollers and SBCs. Background: What, precisely, is computer science?

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

George Mason University Signals and Systems I Spring 2016

E x p e r i m e n t 3 Characterization of DC Motor: Part 1

Bode and Log Magnitude Plots

A COMPARISON STUDY OF THE COMMUTATION METHODS FOR THE THREE-PHASE PERMANENT MAGNET BRUSHLESS DC MOTOR

Engineering Discovery

Lab 6 rev 2.1-kdp Lab 6 Time and frequency domain analysis of LTI systems

Position Control of AC Servomotor Using Internal Model Control Strategy

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

DC and AC Circuits. Objective. Theory. 1. Direct Current (DC) R-C Circuit

EE 482 : CONTROL SYSTEMS Lab Manual

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

Study of Analog Phase-Locked Loop (APLL)

ENSC327 Communication Systems Fall 2011 Assignment #1 Due Wednesday, Sept. 28, 4:00 pm

ME 375. HW 7 Solutions. Original Homework Assigned 10/12, Due 10/19.

Lab 12 Laboratory 12 Data Acquisition Required Special Equipment: 12.1 Objectives 12.2 Introduction 12.3 A/D basics

An Introductory Guide to Circuit Simulation using NI Multisim 12

Memorial University of Newfoundland Faculty of Engineering and Applied Science. Lab Manual

BME/ISE 3511 Laboratory One - Laboratory Equipment for Measurement. Introduction to biomedical electronic laboratory instrumentation and measurements.

EXPERIMENT 4 INTRODUCTION TO AMPLITUDE MODULATION SUBMITTED BY

dspace DS1103 Control Workstation Tutorial and DC Motor Speed Control Project Report

Modeling and System Identification for a DC Servo

EE 560 Electric Machines and Drives. Autumn 2014 Final Project. Contents

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

User Guide IRMCS3041 System Overview/Guide. Aengus Murray. Table of Contents. Introduction

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

DC MOTOR SPEED CONTROL USING PID CONTROLLER. Fatiha Loucif

ET 304A Laboratory Tutorial-Circuitmaker For Transient and Frequency Analysis

EE 462G Laboratory #1 Measuring Capacitance

Lab Report 4: Root Locus and Proportional Controller

Figure C-1 (p. 907) MATLAB window showing how to access Simulink. The Simulink Library Browser button is shown circled.

Lab 4 Rev. 1 Open Lab Due COB Friday April 6, 2018

BME/ISE 3512 Bioelectronics Laboratory Two - Passive Filters

ME 3200 Mechatronics I Laboratory Lab 8: Angular Position and Velocity Sensors

12.2 ALTERNATING CURRENT 12.3 TRANSMISSION OF ELECTRICAL POWER HW/Study Packet

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

Modeling, Simulation and Implementation of Speed Control of DC Motor Using PIC 16F877A

CHAPTER 6 UNIT VECTOR GENERATION FOR DETECTING VOLTAGE ANGLE

ME 461 Laboratory #5 Characterization and Control of PMDC Motors

Experiment 8: An AC Circuit

EE233 Autumn 2016 Electrical Engineering University of Washington. EE233 HW7 Solution. Nov. 16 th. Due Date: Nov. 23 rd

Teaching Mechanical Students to Build and Analyze Motor Controllers

ECE317 Homework 7. where

Lab 23 Microcomputer-Based Motor Controller

HILINK REAL-TIME HARDWARE-IN-THE-LOOP CONTROL PLATFORM FOR MATLAB/SIMULINK

Transcription:

TAKE HOME LABS OKLAHOMA STATE UNIVERSITY Open Loop Frequency Response by Carion Pelton 1 OBJECTIVE This experiment will reinforce your understanding of the concept of frequency response. As part of the experiment, you will find the open loop frequency response of a DC motor with an attached load. You will find the frequency response by applying a sinusoidal voltage, for multiple frequencies, into the motor. For each frequency, you will record the motor s output position and velocity. You will compare the magnitude of the output position and velocity waveforms to the magnitude of the input voltage, and you will generate Bode magnitude plots for both output position and velocity. Then you will estimate the motor s first order transfer function from the experimental velocity Bode plot. Finally, you will generate Bode plots for the estimated transfer functions and compare them to the experimental Bode plots. The comparison will give you insights into the strengths and limitations of linear models of practical physical systems. 2 SETUP 2.1 REQUIRED MATERIALS 2.1.1 HARDWARE The hardware materials required for this experiment are the same materials used in the Open Loop Step Response experiment. Matlab/Simulink 2013a or later 2.1.2 SOFTWARE 1

The steps and images related to Matlab/Simulink for this experiment were created using Matlab/Simulink 2013a. Therefore some steps and images may be a little different if you are not using this version. If you are in fact using a different version, make sure you know the steps for running models onto the Arduino for your version of Simulink. Matlab files 3-D Printer files Open Loop Step Response 2.1.3 PREREQUISITE EXPERIMENTS 2.2 SOFTWARE SETUP The necessary software files that are needed for this experiment can be downloaded from the Take Home Labs webpage. One method for downloading the files is shown in the steps below. 1. Open your internet browser and navigate to thl.okstate.edu 2. On the left side of the Homepage, select Courses" 3. In the middle section of the Courses page select System Dynamics" 4. In the middle section of the System Dynamics page find and select Open Loop Frequency Response. 5. On the Open Loop Frequency Response page select Software/Code" in the rightmost section. A zipfile named Experiment_OLFR should download. 6. Right-click the file and choose Extract All...", or any other method of extracting files on your PC. 7. Extract this folder somewhere convenient, and remember the location. This will be the folder where all of the files and plots created for this experiment are saved. 2.3 HARDWARE SETUP The hardware for this experiment was used in the Open Loop Step Response experiment. 3 EXPERIMENTAL PROCEDURES The exercises in this section will demonstrate how to find the transfer function of a Linear Time-Invariant system (LTI) using its frequency response. Frequency response is the steadystate response of a system to a sinusoidal input. The DC motor is the system that will be used. The first order model of the motor will be estimated using the experimental results of 2

the frequency response. In the first exercise you will derive the motor s first order transfer function, sketch the theoretical Bode Plot, and find the transient response. In Exercise 2 you will find the frequency response of the motor by applying a sinusoidal input voltage for a range of frequencies. For each sine wave input, you will find the output position and velocity of the motor. For each frequency, the peak to peak magnitude of the output position and velocity will be compared to the peak to peak magnitude of the input sinusoidal voltage. The magnitudes will be recorded and used to construct Bode plots for position vs. input, and velocity vs. input. The transfer functions of the motor will be estimated in Exercise 3 using the velocity vs. input experimental Bode plot. The Bode plot of the estimated transfer functions will then be simulated and compared to the experimental Bode plots. 3.1 EXERCISE 1: THE MOTOR TRANSFER FUNCTION This first exercise will use the physical characteristics of the motor to derive the transfer function of the motor. Figure 3.1 shows the circuit diagram of the motor: e + - R a + e b - i Figure 3.1: DC Motor Circuit Diagram J, The motor s equations of motion can be found from the circuit diagram. The equations are shown below: e = R a i + e b (3.1) J ω = τ βω (3.2) τ = K t i (3.3) e b = K b ω (3.4) where J is the inertia of the armature and the load, K t is the torque constant, R a is the armature resistance, K b is the back emf constant, τ is the torque, i is the armature current, e is the voltage applied to the motor, ω is the angular velocity of the motor, and e b is the motor back emf. 8. Using Equations (3.1) - (3.4), solve for the blocks G 1, G 2, G 3, and G 4 in Figure 3.2. 3

e + - i G 1 G 2 G 3 e b G 4 Figure 3.2: Empty Block Diagram for Motor 9. Use block diagram reduction to find the overall open loop transfer function ω(s) e(s) for the K motor. Simplify the transfer function to match the form of m τ m s+1, where K m and τ m are constants. K 10. Sketch the Bode magnitude plot for m τ m s+1. Label the key points in the plot as functions of K m and τ m. 11. Using partial fraction expansions, find the time response of the system, G(s) = K m τ m s+1, given an input e(t) = Asi n(ωt). (Your solution will not be numerical.) What is the steady state portion of the time response (e.g., the part that is remaining as time goes to infinity)? 3.2 EXERCISE 2: EXPERIMENTAL FREQUENCY RESPONSE In this exercise you will find the frequency response of the motor with the load attached by using the Arduino and Simulink. You will apply a sinusoidal input voltage, for multiple frequencies, into the motor. For each frequency, you will need to record the peak to peak steady-state output position and peak to peak steady-state output velocity, and compare these magnitudes to the peak to peak amplitude of the input sine wave voltage. The required frequencies for the sine wave input voltage are provided in Table 3.1. Once the table is complete, the values will be used to generate Bode plots for the output position vs input voltage and output velocity vs input voltage. Using the velocity vs input Bode plot, you will estimate K m and τ m. 12. Open Matlab and set the Matlab Current Folder" location to the Experiment_OLFR folder you extracted in the software setup section. The files SerialPlotData.m and Bode- PlotData.m should show in the Current Folder" section. 13. Open your Sampling_NM model used in the Sampling and Data Acquisition experiment, and save it as OpenLoopFreqResponse. Your model should now resemble the model in Figure 3.3. 4

Figure 3.3: Existing Simulink Model 14. Add a Gain" block to the model (Commonly Used Blocks Gain), and change the gain value to 2*pi/1336. 15. Delete the connection between the QuadEncoder" block and the Serial Send single Port0", and connect the QuadEncoder", Gain", and Serial Send single Port0" blocks as in Figure 3.4. Figure 3.4: Simulink Model Changes 16. Ensure your model looks like the model in Figure 3.5, then save it. 5

Figure 3.5: Final Simulink Model 17. Double-click the sine wave block and change the Amplitude:" to 4, and the Frequency (rad/sec):" to 2*pi*fs. 18. In the Matlab Command Window, type Ts = 0.01; and press enter. Then type fs = 1; and press enter. 19. Connect the Arduino to the PC, and download the Simulink model to the Arduino. 20. Once the model is successfully downloaded to the Arduino, select the Plot Data single " text. 21. In the pop-up window, change the COM port to the port your Arduino is using, and set the number of samples to plot to 500. Press OK" to start plotting the data. 22. Check to see if the plot data is out of sync by manually moving the load left and right. If the data is in sync, it should resemble Figure 3.6. If your plot does not look similar to this, press Byte Adjust" and manually move the load again. If the data is still incorrect, repeat this step a few more times if needed. After a few attempts, if the data is still incorrect, press Stop" and close the plot window. Initiate the plotting process again by selecting the Plot Data single " text and entering the number of samples to plot. Repeat this step until the data is correct. Additional techniques for troubleshooting the serial data can be found in steps 79-82 of the Sampling and Data Acquisition experiment. 6

Figure 3.6: Serial Data Sync Test 23. Once the data is in sync, move the load back to the 0 position and plug in the power supply. 24. Press Autoscale" once the motor starts rotating, if the values are not visible. Let the experiment run until you see at least 2 cycles of the output sine wave before pressing Stop". 25. After pressing stop in the serial plot window, open the SerialPlotData.m file in the Matlab Current Folder section, and run velocity vs time plots. the file to generate the position vs time and 26. Find the steady state peak to peak magnitudes for each plot, and record the values in the first row of Table 3.1. Also, in the table, record the peak to peak magnitude of the input sine wave, and the position vs input ( θ ω ) and velocity vs input ( ) magnitudes in decibels (db), using 20log 10. 27. In the Matlab Command Window, type clear all; close all; clc; and press enter. 28. Repeat steps 18-26 for each frequency provided in Table 3.1. When returning to step 18, always set Ts = 0.01;, and set fs equal to the frequencies listed in the table. The extra rows in the table can be used for additional frequencies. Take as many readings as you need to get an accurate frequency response. 7

Frequency Response Number of Points Frequency (Hz) (peak to peak volts) θ (rad) ω (rad/s) θ (db) ω (db) 50,000 0.005 25,000 0.01 5,000 0.05 2500 0.1 1000 0.5 500 1 Table 3.1: Open Loop Frequency Response 29. Open the BodePlotData.m from the Matlab Current Folder" location. Input the θ values from your table inside the brackets of the GpdB variable. For example, if all of the θ values were equal to 1, and no additional frequencies were used, GpdB = []; would become GpdB = [1, 1, 1, 1, 1, 1];. The order you enter the magnitude values depends on the order of the frequencies in the variable f. The frequencies are in numerical order from smallest to largest. Therefore, if you find output magnitudes for any additional frequencies, you will need to add the additional frequencies, in the correct order, to the variable f. For example, if additional frequencies of 0.25 Hz and 2 Hz are used and the output magnitudes equal 1.5 and 2, the frequency variable in the BodePlotData.m file needs to be changed to f = [0.005, 0.01, 0.05, 0.1, 0.25, 0.5, 1, 2];, and the magnitude variable should be changed to GpdB = [1, 1, 1, 1, 1.5, 1, 1, 2];. 30. Input the ω values from your table inside the brackets of the GvdB variable, and run the file to produce the two Bode plots. 31. Comparing the experimental output velocity vs input voltage Bode plot with your theoretical sketch from step 10, estimate K m and τ m. 32. Save the plots for your lab report, and leave them open. 3.3 EXERCISE 3: SIMULATION AND EXPERIMENTAL RESULTS COMPARISON In this subsection, you will use the velocity vs input Bode plot from Exercise 2 to estimate K m and τ m. Then you will use Matlab to compute the Bode plots for ω(s) e(s) = K m θ(s) τ m s+1 and e(s) = K m (τ m s+1)s and compare them to the experimental Bode plots. 8

33. With the Matlab function tf, create the transfer functions Gv(s) = K m τ m s+1 and Gp(s) = K m (τ m s+1)s using the values you estimated for K m and τ m in Exercise 2. Figure 3.7 shows the code you need to type in the Matlab Command Window in order to create the transfer functions. Change the variables Km and tm to equal your values for K m and τ m. Figure 3.7: Matlab Transfer Function 34. Plot the Bode plot for your estimated θ on top of the experimental Bode plot from Exercise 2 by typing figure(1);bodemag(gp,w, --r ) and pressing enter. Type grid on and press enter, then type legend( Experimental, Simulated ) and press enter. Your Matlab Figure 1 should now show both the experimental and simulated Bode plots, with a legend in the top right corner. 35. Plot the Bode plot for your estimated ω on top of the experimental Bode plot from Exercise 2 by typing figure(2);bodemag(gv,w, --r ) and press enter. Type grid on and press enter, then type legend( Experimental, Simulated ) and press enter. 36. Save both figures for your lab report as different names from what you saved them as in Exercise 2. 37. How well do your simulated Bode plots match your experimental Bode plots? Explain possible reasons for any differences. Remember that the motor model you are using is linear. Are there nonlinear effects operating on the motor? Discuss any nonlinear effects, and how they might change the frequency response. 9

4 CONCLUSION The open loop frequency response of a DC motor was used to demonstrate the importance of frequency response. The motor s frequency response was found by inputting sine wave voltages, of varying frequencies, into the motor and recording the output positions and velocities for each frequency. The motor s theoretical first order model was estimated using the experimental frequency response data. The response of the estimated model was then compared to experimental response, demonstrating how well the first order transfer function of a system can be estimated using the experimental frequency response of that system. 10