Demonstrating in the Classroom Ideas of Frequency Response

Similar documents
Use of the LTI Viewer and MUX Block in Simulink

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

Class #16: Experiment Matlab and Data Analysis

1 PeZ: Introduction. 1.1 Controls for PeZ using pezdemo. Lab 15b: FIR Filter Design and PeZ: The z, n, and O! Domains

EEL 4350 Principles of Communication Project 2 Due Tuesday, February 10 at the Beginning of Class

Introduction to Simulink Assignment Companion Document

Magnitude and Phase Measurements. Analog Discovery

PYKC 13 Feb 2017 EA2.3 Electronics 2 Lecture 8-1

Bode plot, named after Hendrik Wade Bode, is usually a combination of a Bode magnitude plot and Bode phase plot:

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

An Introductory Guide to Circuit Simulation using NI Multisim 12

Chapter 12: Electronic Circuit Simulation and Layout Software

SIGNALS AND SYSTEMS: 3C1 LABORATORY 1. 1 Dr. David Corrigan Electronic and Electrical Engineering Dept.

Lab 1: Simulating Control Systems with Simulink and MATLAB

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

3.2 Measuring Frequency Response Of Low-Pass Filter :

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

Pole, zero and Bode plot

Lab #2 First Order RC Circuits Week of 27 January 2015

Laboratory Experiment #1 Introduction to Spectral Analysis

Instruction Manual for Concept Simulators. Signals and Systems. M. J. Roberts

Open Loop Frequency Response

Lab 1B LabVIEW Filter Signal

Wireless Communication Systems Laboratory Lab#1: An introduction to basic digital baseband communication through MATLAB simulation Objective

Frequency Response Analysis and Design Tutorial

Drawing Bode Plots (The Last Bode Plot You Will Ever Make) Charles Nippert

EEL2216 Control Theory CT2: Frequency Response Analysis

Exercise 8: Frequency Response

Introduction to Signals and Systems Lecture #9 - Frequency Response. Guillaume Drion Academic year

DEPARTMENT OF ELECTRONIC ENGINEERING PRACTICAL MANUAL CONTROL SYSTEMS 3 CSYS 302

Introduction to Lab Instruments

Class #7: Experiment L & C Circuits: Filters and Energy Revisited

Laboratory 5: RC Circuits and Filtering

Fig. 1. NI Elvis System

Introduction to Simulink

Lab 4 An FPGA Based Digital System Design ReadMeFirst

Lab S-9: Interference Removal from Electro-Cardiogram (ECG) Signals

Fall Music 320A Homework #2 Sinusoids, Complex Sinusoids 145 points Theory and Lab Problems Due Thursday 10/11/2018 before class

Excel Lab 2: Plots of Data Sets

Dr Ian R. Manchester

Lab 6: Building a Function Generator

Excel Tool: Plots of Data Sets

LTSpice Basic Tutorial

George Mason University Signals and Systems I Spring 2016

Lab Report #10 Alex Styborski, Daniel Telesman, and Josh Kauffman Group 12 Abstract

Lecture 9. Lab 16 System Identification (2 nd or 2 sessions) Lab 17 Proportional Control

Bode Plots. Hamid Roozbahani

DO NOT REMOVE FROM LABORATORY Operating Instructions for the Vibration Experiment

ASN Filter Designer Professional/Lite Getting Started Guide

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

EE 462G Laboratory #1 Measuring Capacitance

16.30 Learning Objectives and Practice Problems - - Lectures 16 through 20

Fourier Signal Analysis

ME451: Control Systems. Course roadmap

SMS045 - DSP Systems in Practice. Lab 1 - Filter Design and Evaluation in MATLAB Due date: Thursday Nov 13, 2003

ECE 4670 Spring 2014 Lab 1 Linear System Characteristics

Boise State University Department of Electrical and Computer Engineering ECE 212L Circuit Analysis and Design Lab

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

Course Outline. Time vs. Freq. Domain Analysis. Frequency Response. Amme 3500 : System Dynamics & Control. Design via Frequency Response

AN294. Si825X FREQUENCY COMPENSATION SIMULATOR FOR D IGITAL BUCK CONVERTERS

The Signals and Systems Toolbox: Comparing Theory, Simulation and Implementation using MATLAB and Programmable Instruments

Lecture 17 z-transforms 2

Use Linear Regression to Find the Best Line on a Graphing Calculator

CHAPTER 6 INTRODUCTION TO SYSTEM IDENTIFICATION

Lab week 4: Harmonic Synthesis

Student + Instructor:

DESIGN AND ANALYSIS OF FEEDBACK CONTROLLERS FOR A DC BUCK-BOOST CONVERTER

AC : FIR FILTERS FOR TECHNOLOGISTS, SCIENTISTS, AND OTHER NON-PH.D.S

Basic Signals and Systems

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

ECE 3155 Experiment I AC Circuits and Bode Plots Rev. lpt jan 2013

Experiment 1 Introduction to MATLAB and Simulink

Products of Linear Functions

ECE 2111 Signals and Systems Spring 2009, UMD Experiment 3: The Spectrum Analyzer

ECE411 - Laboratory Exercise #1

Digital Video and Audio Processing. Winter term 2002/ 2003 Computer-based exercises

Fourier Series and Gibbs Phenomenon

EE 233 Circuit Theory Lab 3: First-Order Filters

EES42042 Fundamental of Control Systems Bode Plots

Using SigLab with the Frequency Domain System Identification Toolbox

EE 482 : CONTROL SYSTEMS Lab Manual

PHYSICS 330 LAB Operational Amplifier Frequency Response

The object of this experiment is to become familiar with the instruments used in the low noise laboratory.

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

DEGREE: Biomedical Engineering YEAR: TERM: 1

Lab 8. Signal Analysis Using Matlab Simulink

MLAB - Matlab: Fundamentals And/Or Applications

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

14:332:223 Principles of Electrical Engineering I Instructions for using PSPICE Tools Sharanya Chandrasekar February 1, 2006

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

Sound synthesis with Pure Data

ELEC3104: Digital Signal Processing Session 1, 2013 LABORATORY 3: IMPULSE RESPONSE, FREQUENCY RESPONSE AND POLES/ZEROS OF SYSTEMS

ISET Selecting a Color Conversion Matrix

ECE4902 Lab 5 Simulation. Simulation. Export data for use in other software tools (e.g. MATLAB or excel) to compare measured data with simulation

MATLAB and Simulink in Mechatronics Education*

EE 210 Lab Exercise #3 Introduction to PSPICE

ijdsp Workshop: Exercise 2012 DSP Exercise Objectives

A filter is appropriately described by the transfer function. It is a ratio between two polynomials

SmartCtrl. User s Guide. Powersim Inc.

Lab S-8: Spectrograms: Harmonic Lines & Chirp Aliasing

Transcription:

Rochester Institute of Technology RIT Scholar Works Presentations and other scholarship 1-7 Demonstrating in the Classroom Ideas of Frequency Response Mark A. Hopkins Rochester Institute of Technology Follow this and additional works at: http://scholarworks.rit.edu/other Recommended Citation Hopkins, M.A. (7), Demonstrating in the classroom ideas of frequency response. Paper presented at 7 ASEE Engineering Teaching and Learning Practices, Toronto, Canada, October, 7 This Conference Proceeding is brought to you for free and open access by RIT Scholar Works. It has been accepted for inclusion in Presentations and other scholarship by an authorized administrator of RIT Scholar Works. For more information, please contact ritscholarworks@rit.edu.

Demonstrating in the Classroom the Ideas of Frequency Response Dr. Mark A. Hopkins, Assoc. Prof. Electrical Engineering Dept., Rochester Institute of Technology Abstract One of the most persistently difficult concepts to communicate to students is that of frequency response, because it spans both the frequency-domain and the time-domain. This paper presents a Matlab -based graphical method of demonstrating several important relationships among pole/zero locations, Bode plot (i.e., Fourier transform), and time-domain sinusoidal response. The author has been using this method successfully for several years in a variety of systemsrelated courses to help students understand these relationships. The software is also easily available to students, so they may reconstruct classroom demonstrations, and do much more. In the demonstrations, Bode magnitude and phase plots are programmatically linked to plots of the pole/zero map and of the time-domain sinusoidal response. The frequency of the stimulus sinusoid can easily be changed in any one of the plots, with the change automatically propagated to all the other plots. All of the plots have interactive capability, and display much more information than simple line graphs. These plots are used to enhance discussion of (1) minima and maxima in the Bode magnitude plot and their relationship to pole/zero locations, (2) graphical (vector) analysis of the Fourier transform, (3) steady-state response versus transient response, (4) steady-state magnitude and phase and their relationship to the Bode plots, and (5) phase-lead and phase-lag. Complete details of the method are presented. The software is available on the web, and is free if used only for educational purposes. 1. Introduction The ability to use computers at the lectern, enabled by relatively cheap projection equipment, has tremendous potential for computer-aided teaching. This is not a reference to being able to present PowerPoint slides, using computers in essentially the same way we once used overhead projectors to show transparencies. Rather, we now have the ability to create accurate mathematical plots on-the-fly, and dynamically manipulate graphical content to emphasize points of discussion. This paper is about realizing that potential for the purpose of teaching frequency-response concepts. This is an area that requires a teacher to present several different types of plots time-

domain response plots, frequency-response (e.g., Bode) plots, and pole/zero maps in the s-plane and z-plane and to discuss their inter-relatedness. Here are some of the problems using computers to create plots on-the-fly in the classroom: delays result from taking time to create plots, delays result from making mistakes while creating plots, plots are not readable from everywhere in a classroom, plots are not interactively modifiable, or it is not easy to modify them, plots do not clearly and easily illustrate the points of a lecture, and the lecture is difficult, or even impossible, for students to re-create from their notes. This paper presents a Matlab add-on toolbox, named pzgui, that helps overcome these difficulties, and gives teachers a unified graphical environment in which to demonstrate many valuable insights into the difficult topic of frequency response. The name pzgui is the (copyright-protected) acronym of "pole/zero graphical user interface". 2. Plots Used in Teaching Frequency-Response Concepts In linear system analysis, frequency-response is fundamental. The plots typically used to demonstrate most of the concepts are: a pole/zero map that, together with the gain, specifies the model of a linear system, a time-domain plot showing the sinusoidal response of a linear system, and steady-state magnitude and phase of sinusoidal response, versus frequency (Bode plots). Examples of these plot types were generated using the pzgui toolbox, and are shown in Fig. 1 through Fig. 4, which have been manipulated so that there are not any obvious "linkages" among them, and only a few of the pzgui user controls are shown. Fig. 5 through Fig. 8 show the same set of plots after a new frequency, 3 Hz, has been selected. The selected frequency can be changed in any one of the four plots, as discussed below. Also, in Fig. 5 through Fig. 8, all of the pzgui user controls are visible. Figure 1. Pole/zero map showing the model of a linear system (not including gain). 5 Pole & Zero Map 4 3 Imag(s), rad/s 1-1 - -3-4 -5-15 -1-5 5 Real(s), rad/s

Figure 2. Time-domain plot of the sinusoidal response to a 2.4 Hz sinusoid. 4 Continuous-Time Open-Loop Time Response Sinusoidal Input Sine Input (green) and Response (red) 3 2 1-1 +45.777 o o -36 2.581 (6.269 db) -2-3.2.4.6.8 1 1.2 1.4 1.6 1.8 2 Time, seconds Figure 3. Bode magnitude plot of the system. Continuous-Time Open-Loop Bode Magnitude 15 1 5 Magnitude(dB) -5-1 -15-1 1 1 1 2 1 3 Frequency (rad/s) Figure 4. Bode phase plot of the system. Continuous-Time Open-Loop Bode Phase 4 Phase, degrees - -4-6 -8 1 1 1 1 2 1 3 Frequency (rad/s)

2.1. The Pole/Zero GUI The models in Figs. 1 and 5 are in zero/pole/gain (Z/P/K) format, H( s) = K( s z1) ( s z m). ( s p ) ( s p ) 1 n Fig. 5 shows the full set of controls in the pole/zero GUI. Some of the controls are not germane to this discussion, but most are. The controls along the bottom allow the user to easily create various open-loop (O.L.) and closed-loop (C.L.) plots related to the system being modeled. In particular, notice that there are checkmarks in the boxes labeled "O.L.Resp" and "O.L.Bode". Left-clicking on those controls creates the three plots shown in Fig. 6 through Fig. 8. Figure 5. Pole/zero map with 3 Hz (18.85 rad/s) selected, and all pzgui controls visible. 5 Pole & Zero Map 4 3 Imag(s), rad/s 1-1 - -3-4 -5-15 -1-5 5 Real(s), rad/s Notice the pole/zero map in Fig. 5 is annotated with vectors that terminate at a selected frequency on the jω-axis and originate at the various poles and zeros in the model. A different frequency may easily be selected by left-clicking on some other point along the jω-axis. When a different frequency is selected, the other plots are automatically updated accordingly, too. The vector annotations help demonstrate the relationship between Laplace and Fourier transforms, the meaning of the Fourier transform, in terms of frequency response plots, why an extremum occurs in the magnitude plot when a pole (zero) is near the imaginary axis, and why the extremum occurs near the imaginary part of that pole (zero), and

the concept that a rational polynomial is a product of complex-plane vectors in the numerator and in the denominator. In Fig. 5, the location of a pole can be changed easily, in either of two ways. If the mouse cursor is positioned above a pole, then it may be dragged-and-dropped at a new location by rightclicking on it. A more accurate change may be made by entering the new pole location numerically in the box labeled "s-plane location" in the frame marked "POLES", and then leftclicking on the button labeled "Move". The pole that will be moved is the one currently selected in the drop-down menu, which lists all of the poles in the model. A similar description applies to changing the location of a zero, except those controls are in the frame labeled "ZEROS". In Z/P/K form, the gain parameter K is usually not equal to the DC-gain of the model. When poles and zeros are moved, added, or deleted, if K is held constant, then the DC-gain typically changes. In the pzgui, the user has an option to maintain the same DC-gain when poles and zeros are changed. This option is put into force by checking the box labeled "Fix DC", just below the "ZEROS" frame. This option is checked by default, when the pole/zero GUI is created. When DC-gain is fixed, the parameter K is recomputed so as to maintain the same DCgain, any time poles or zeros are changed (unless the DC-gain is infinite or zero). In Fig. 5, poles and zeros can easily be added to or deleted from the model, except that the number of zeros is not allowed to exceed the number of poles. The "Delete" button deletes the selected pole (or zero). The "Add Pole" and "Add Zero" buttons use the numerical entry from the corresponding "s-plane location" window (in their respective frames) to place a new pole or zero. Complex-conjugate pairing is automatically enforced in all changes to the poles and zeros. 2.2. The Time-Response Plot Fig. 6 shows the GUI controls associated with the time-response plot. The frequency of the sinusoid is shown in the display window labeled "Freq (Hz)". This is an interactive element, by means of which a different frequency may be specified. When the frequency is changed, the other plots are automatically updated accordingly. The simulation input is always a unit-magnitude sine-function, plotted in green. The output (system response) is plotted in red. The maximum simulation time may be changed using the editable window labeled "Max Time". The user controls below the "Max Time " window are related to time-domain performance measures, typically applied to a system's step-response (i.e., not usually related to frequency response). Provided that the simulation time extends far enough into the steady-state condition, annotations of steady-state magnitude and phase automatically will be shown in the plot, as in Figs. 2 and 6. In Fig. 6, the magnitude annotations (lines and text) are designed to help demonstrate the concept of output steady-state, the magnitude relationship of the steady-state output sinusoid to the input sinusoid, the relationship between the steady-state output and the Bode-magnitude plot, and the relationship between raw magnitude and decibels. In Fig. 6, the phase annotations (lines and text) are designed to help demonstrate the phase relationship of the steady-state output sinusoid to the input sinusoid,

the meaning of phase-lead and phase-lag, the meaning of 36 degrees in terms of elapsed-time, and the relationship between the steady-state output and the Bode-phase plot. 2.3. The Bode Magnitude and Phase Plots Fig. 7 shows the Bode magnitude plot with annotations related to the selected frequency, which is indicated by a small cyan-colored circle, and a text description in the frequency-axis label. The selected frequency can easily be changed, by positioning the cursor over the magnitude plot line at the desired frequency, and left-clicking the mouse. When the selected frequency is changed, the other plots are automatically updated accordingly. Figure 6. Simulated response to a 3 Hz sine wave, with all pzgui controls visible. 4 3 o Continuous-Time Open-Loop Time Response Sinusoidal Input +47.391 o -36 2.6551 (8.481 db) Sine Input (green) and Response (red) 2 1-1 -2-3 -4.2.4.6.8 1 1.2 1.4 1.6 1.8 2 Time, seconds The three controls at the lower-left allow the plot to be used to help demonstrate the relationship between raw magnitude and decibels, the reasons why frequency response magnitude is usually plotted in decibels, the difference between plotting frequency in hertz and plotting it in radians/second, and the reasons why frequency response is usually plotted versus the log of frequency. Fig. 8 shows the Bode phase plot with annotations related to the selected frequency, which is indicated by a small cyan-colored circle, and a text description in the frequency-axis label. The selected frequency can easily be changed, by positioning the cursor over the phase plot line at the desired frequency, and left-clicking the mouse. When the selected frequency is changed, the other plots are automatically updated accordingly.

The two controls at the lower-left allow the plot to be used to help demonstrate the difference between plotting frequency in hertz and plotting it in radians/second, and to switch between linear and log frequency-axis. Figure 7. The Bode magnitude of the Z/P/K model, with all pzgui controls visible. Continuous-Time Open-Loop Bode Magnitude 15 1 5 Magnitude (db) -5-1 -15-1 1 1 1 2 1 3 Select=18.85 rad/s Freq (rad/s) In Fig. 7 or 8, when the user changes the frequency-axis scaling (log or linear) or "zooms" to a different range of frequency, the same change is made to the scaling or range of the other figure. That way, the magnitude plot and the phase plot are always directly comparable because they display the same frequency range, and use the same scaling along the frequency axis. This linkage of Fig. 7 and Fig. 8 saves time during discussion of the relationships between the magnitude and phase plots. 3. Conclusion In order to create the plots of Fig. 1 through 4 "on-the-fly", ultimately, program instructions must be entered into a computer. Although applications such as Matlab have made plot creation fairly easy, it is nevertheless challenging to quickly create and format plots in such a way that they are easily readable in a classroom, and also easily and clearly demonstrate important points of a discussion. Making those plots dynamically and easily recomputable, as in Fig. 5 through 8, is even more challenging. The pzgui toolbox quickly and unobtrusively handles the low-level programming details of creating and updating the interlinked plots of Fig. 5 through 8, and servicing their user controls. Taken altogether, these four dynamically interactive plots provide a rich set of tools that can be effectively used to illustrate all of the essential ideas in discussions of frequency response. Furthermore, students can produce the same plots on their own computers, or in a school's computer labs, if they have the pzgui toolbox and access to Matlab and the Matlab Controls Toolbox. Provided with a simple "script", students can even re-create an entire interactive

demonstration. Perhaps equally important, pzgui provides a "playground" in which students are able to do much more than brief classroom demonstrations can show. The pzgui toolbox comprises a set of m-files that are available at people.rit.edu/maheee in a zip-file. This toolbox is free to faculty and students (provided that it's used only for educational purposes), and it runs on Matlab ver.6.5., and all later versions. The zip-file also includes a brief User s Manual in PDF format. The required software infrastructure for pzgui is quite accessible. The Student Version of Matlab (which includes the Controls Toolbox, Simulink, and several other toolboxes) is available directly from its publisher, The Mathworks, for about $1 US, and is also stocked in some university bookstores. The Mathworks also provides relatively cheap site-licensing for educational institutions, many of which have enough "roaming" licenses available in their computer labs that students effectively have 24/7 on-demand access to Matlab in those labs. Figure 8. The Bode phase of the Z/P/K model, with all pzgui controls visible. Continuous-Time Open-Loop Bode Phase 4 Phase, degrees - -4-6 -8 1 1 1 1 2 1 3 Select=18.85 rad/s Freq (rad/s) Biographical Information MARK A. HOPKINS An Associate Professor in the Electrical Engineering Department, Kate Gleason College of Engineering, Rochester Institute of Technology, Dr. Hopkins earned his Ph.D. in Electrical Engineering from Virginia Tech, in 1988. His main research interests are in the modeling and control of large flexible structures. He has an abiding interest in the computer-aided teaching of linear systems, modeling, and control. He has been developing pzgui since 1996.