Today: using MATLAB to model LTI systems

Similar documents
Mathcad Prime 3.0. Curriculum Guide

Curriculum Guide. Mathcad Prime 4.0

PHY 133 Lab 6 - Conservation of Momentum

ECLIPSE USER MANUAL AMXMAN REV 2. AUTOMETRIX, INC. PH: FX:

Mathcad Prime Curriculum Guide

Mathcad 14.0 Curriculum Guide

7-Nov-15 PHYS Elastic Collision. To study the laws of conservation of momentum and energy in an elastic collision. Glider 1, masss m 1.

Mathcad 140 Curriculum Guide

Aircraft Noise. Why Aircraft Noise Calculations? Aircraft Noise. SoundPLAN s Aircraft Noise Module

CATIA: Navigating the CATIA V5 environment. D. CHABLAT / S. CARO

Portability: D-cide supports Dynamic Data Exchange (DDE). The results can be exported to Excel for further manipulation or graphing.

ultimate traffic Live User Guide

EMC Unisphere 360 for VMAX

MEASUREMENT OF ACCELERATION Pre-Lab. Name: Roster#

Concur Travel User Guide

AIRBUS FlyByWire How it really works

Authentic Assessment in Algebra NCCTM Undersea Treasure. Jeffrey Williams. Wake Forest University.

Specialty Cruises. 100% Tally and Strip Cruises

A New Way to Work in the ERCOT Market

Copyright Thomson Financial Limited 2006

New Developments in VISSIM

Jump Chart Main Chart flagship Ship List

Motion 2. 1 Purpose. 2 Theory

UM1868. The BlueNRG and BlueNRG-MS information register (IFR) User manual. Introduction

Appendix B Ultimate Airport Capacity and Delay Simulation Modeling Analysis

Gain-Scheduled Control of Blade Loads in a Wind Turbine-Generator System by Individual Blade Pitch Manipulation

ATTEND Analytical Tools To Evaluate Negotiation Difficulty

A Practical Power System Stabilizer Tuning Method and its Verification in Field Test

Specialty Cruises. A. 100% Tally and Strip Cruises

PREFACE. Service frequency; Hours of service; Service coverage; Passenger loading; Reliability, and Transit vs. auto travel time.

4 REPORTS. The Reports Tab. Nav Log

UVACARS User Guide Version 1.0

Mechanics of Frisbee Throwing

ABSTRACT TIES TO CURRICULUM TIME REQUIREMENT

MYOB EXO OnTheGo. Release Notes 1.2

Hotel Investment Strategies, LLC. Improving the Productivity, Efficiency and Profitability of Hotels Using Data Envelopment Analysis (DEA)

Copyright Thomson Financial Limited 2002

Special edition paper Development of a Crew Schedule Data Transfer System

ADVANTAGES OF SIMULATION

Safety Analysis of the Winch Launch

Analysis of Air Transportation Systems. Airport Capacity

Discrete-Event Simulation of Air Traffic Flow

RV10 Weight and Balance

Notes largely based on Statistical Methods for Reliability Data by W.Q. Meeker and L. A. Escobar, Wiley, 1998 and on their class notes.

o " tar get v moving moving &

Important! You need to print out the 2 page worksheet you find by clicking on this link and take it with you to your lab session.

Students will make a brochure for their own amusement park. They create rides and complete tasks on the inequalities they have learned about.

Configuring a Secure Access etrust SiteMinder Server Instance (NSM Procedure)

MAT 115: Precalculus Mathematics Homework Exercises Textbook: A Graphical Approach to Precalculus with Limits: A Unit Circle Approach, Sixth Edition

Installation Guide. Unisphere Central. Installation. Release number REV 07. October, 2015

Cross-sectional time-series analysis of airspace capacity in Europe

University of Colorado, Colorado Springs Mechanical & Aerospace Engineering Department. MAE 4415/5415 Project #1 Glider Design. Due: March 11, 2008

Supports full integration with Apollo, Galileo and Worldspan GDS.

Cluster A.2: Linear Functions, Equations, and Inequalities

Developing a Functional Roller Coaster Optimizer. Ernest Lee. April 20, Abstract

ONLINE DELAY MANAGEMENT IN RAILWAYS - SIMULATION OF A TRAIN TIMETABLE

Pre-Calculus AB: Topics and Assignments Weeks 1 and 2

Notes largely based on. Meeker and L. A. Escobar, Wiley, 1998 and on their class notes. Ramón V. León. 9/3/2009 Stat 567: Unit 3 - Ramón V.

S-Series Hotel App User Guide

Scalable Runtime Support for Data-Intensive Applications on the Single-Chip Cloud Computer

Challenges in Complex Procedure Design Validation

Lesson 1: Introduction to Networks

VAR-501-WECC-3 Power System Stabilizer. A. Introduction

A. Introduction Title: Power System Stabilizer (PSS)

Mr. Freeze. as viewed from the top of the ferris wheel:

Quick Reference Guide Version

An Analytical Approach to the BFS vs. DFS Algorithm Selection Problem 1

CASS & Airline User Manual

Attachment F1 Technical Justification - Applicability WECC-0107 Power System Stabilizer VAR-501-WECC-3

A Statistical Method for Eliminating False Counts Due to Debris, Using Automated Visual Inspection for Probe Marks

Analysis of Aircraft Separations and Collision Risk Modeling

Estimating passenger mobility by tourism statistics

APA NOISE REPORT. August 2018

Flight Dynamics Analysis of a Medium Range Box Wing Aircraft

PRELIMINARY WEB DOCUMENT

SLOPE CALCULATION. Wilderness Trekking School 1

APA NOISE REPORT. January 2018

APA NOISE REPORT. August 2017

Pre-lab questions: Physics 1AL CONSERVATION OF MOMENTUM Spring Introduction

EA-12 Coupled Harmonic Oscillators

Unit 6: Probability Plotting

Monitoring & Control Tim Stevenson Yogesh Wadadekar

A. Introduction Title: Power System Stabilizer (PSS) 2. Number: VAR 501 WECC

The Computerized Analysis of ATC Tracking Data for an Operational Evaluation of CDTI/ADS-B Technology

Washington Dulles International Airport (IAD) Aircraft Noise Contour Map Update

Hotel Booking System For Magento

Global formulas. Page1. Video filmed with GeneXus X Evolution 2

Stair Designer USER S GUIDE

LESSON PLAN Introduction (3 minutes)

Grip Strength Comparison

Concur Travel: User Supplied Hotels

Simulation of disturbances and modelling of expected train passenger delays

SPEDESTER Series QUICK REFERENCE GUIDE

BEARHHAWK Weight and Balance

According to FAA Advisory Circular 150/5060-5, Airport Capacity and Delay, the elements that affect airfield capacity include:

PRAJWAL KHADGI Department of Industrial and Systems Engineering Northern Illinois University DeKalb, Illinois, USA

SENIOR CERTIFICATE EXAMINATIONS

Assignment 10: Final Project

ROLLER COASTER POLYNOMIALS

QuickStart Guide. Concur Premier: Travel

Transcription:

Today: using MATLAB to model LTI systems 2 nd order system example: DC motor with inductance derivation of the transfer function transient responses using MATLAB open loop closed loop (with feedback) Effect of feedback gain 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 1

DC motor system with non-negligible inductance John Wiley & Sons. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 2

Theoretical tasks Derive the values of damping ratio ζ, natural frequency ωn analytically based on the TF from the previous page Express the conditions such that the 2 nd order DC motor model would become over/under damped PLEASE TURN IN THIS PAGE BEFORE YOU LEAVE THE LAB 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 3

MATLAB tasks /1 Select values of R, L, b, J, Km(=Kv) such that the open-loop (OL) response should be overdamped. Calculate the poles of the transfer function based on your choices, and compare the rise time of the response you get from MATLAB with the rise time that you expect from the theory. Make sure to turn off the feedback loop by setting the value of the gain to equal zero. Print out the MATLAB plots. PLEASE TURN IN THIS PAGE BEFORE YOU LEAVE THE LAB 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 4

MATLAB tasks /2 Select values of R, L, b, J, Km(=Kv) such that the open-loop (OL) response should be underdamped. Calculate the poles of the transfer function based on your choices, and compare the rise time, overshoot and damped oscillation frequency of the response you get from MATLAB with the corresponding values that you expect from the theory. Make sure to turn off the feedback loop by setting the value of the gain to equal zero. Print out the MATLAB plots. PLEASE TURN IN THIS PAGE BEFORE YOU LEAVE THE LAB 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 5

MATLAB tasks /3 Now set the value of the inductance L to zero, and keep the feedback loop turned off by setting the value of the gain to equal zero. How does the open-loop (OL) response change in MATLAB? PLEASE TURN IN THIS PAGE BEFORE YOU LEAVE THE LAB 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 6

MATLAB tasks /4 Restore the value of the inductance L to non-zero, and select the remaining values such that the open-loop (OL) response is again overdamped. Now turn on the feedback loop by gradually cranking up the value of the feedback gain. At some point, you will observe that the response becomes underdamped (oscillatory.) Print out the low-gain response (overdamped) and high-gain response (underdamped) and record the value of gain where the transition happens. PLEASE TURN IN THIS PAGE BEFORE YOU LEAVE THE LAB 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 7

MATLAB tasks /5 In the last lab, we also had a second-order system where we observed the response change from over- to underdamped by cranking up the gain in the experimental flywheel system. Comment on the difference(s) between the model for the last lab s experiment and the model used in this lab s numerical exploration. PLEASE TURN IN THIS PAGE BEFORE YOU LEAVE THE LAB 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 8

APPENDIX MATLAB Control Systems Toolbox Tutorial 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 9

2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 10

MATLAB Linear Model Representation Transfer functions s +2 H(s) = s 2 + s + 10 sys = tf ([1, 2],[1, 1, 10]) State-space Models A, B, C, and D are matrices of appropriate dimensions, x is the state vector, and u and y are the input and output vectors respectively. Note: There are also other more complex forms of linear systems 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 11

State-space System Representation Example 1 inductance dissipation (due to windings) (resistance of windings) Recall from Lecture 5 dissipation (viscous friction in motor bearings) load (inertia) 2.004 Spring 13 John Wiley & Sons. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. Lecture 09 Tuesday, Feb. 26 12

State-space System Representation Example 2 Reorganizing the system and write in matrix form 8 8 di di R Kv > L + Ri + K v! = v s = - i -! + v < dt < > dt L L s =) > : d! > d! K m b J + b! = Km i : = i -! dt dt J J =) d dt apple i! = apple - R L K m J - K v L - b J apple i! + apple 1 L 0 v s Here our input is vs and output is ω; we also have y(t) = 0 1 apple i! + [0] v s (t) Now we have our A B C D matrices ready 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 13

State-space System Representation Example 3 In MATLAB, we can represent the motor system using following command: (need to define all parameters first) A = [-R/L -Kv/L; Km/J -b/j]; B = [1/L; 0]; C = [0 1]; D = [0]; sys_dc = ss(a,b,c,d) We can also convert this state-space system to transfer function or Pole/zero/gain form: sys_tf = tf(sys_dc) %(to transfer function) sys_zpk = zpk(sys_dc) %(to ZPK form) NOTE: The state-space representation is best suited for numerical computations and is most accurate for most cases. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 14

LTI Objects and Manipulation Control System Toolbox software uses custom data structures called LTI objects. The state-space model we have created for the DC motor is called an SS object. There are also TF, ZPK, and FRD objects. LTI objects enable you to manipulate linear systems as single entities using get command in MATLAB, we can see the detailed entities. get(sys_dc) sys_dc.a=a_new (This line allows you to manipulate individual quantities) 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 15

Creating Multiple Transfer Functions s s +1 s +2 Assume the three transfer functions are, and s +5 s +6 s 2 + s +5 Collect all numerators and denominators in cells; use the following MATLAB command: N = {[1, 0], [1, 1], [1, 2]}; D = {[1, 5], [1, 6], [1, 1, 5]}; sys = tf(n, D) 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 16

Interconnecting Linear Models -- Arithmetic Operations Addition (parallel systems): tf(1, [1 0]) + tf([1 1], [1 2]); This line represents 1 s + s +1 s +2 Transfer function: s^2 + 2 s + 2 ------------------- s^2 + 2 s = (s + 2) + s(s + 1) s(s + 2) Multiplication (cascaded systems): 2 * tf(1,[1 0])*tf([1 1],[1 2]); Transfer function: 2s+2 -------------- s^2 + 2 s This line represents 2 1 s s +1 s +2 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 17

Interconnecting Linear Models -- Feedback loop Example system: sys_f = feedback(tf(1,[1 0]), tf([1 1],[1 2]) Transfer function: s+2 ------------------ s^2 + 3 s + 1 NOTE: You can use the lft function to create more complicated feedback structures. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 18

The LTI Viewer LTI Viewer GUI allows you to analyze the time- and frequency-domain responses of one or more linear models. Syntax: ltiview(model1,model2,...,modeln) This syntax opens a step response plot of your models 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 19

General LTI Viewer Menus 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 20

Adding More Plots To LTI Viewer Select Edit > Plot Configurations. You can also designate specific type of plots to view on the right hand side of this window. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 21

Change Plot Type To view a different type of response on a plot, right-click and select a plot type. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 22

Analyze System Performance Right-click to select performance characteristics. Click on the dot that appears to view the characteristic value. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 23

Importing Models into the LTI Viewer Select Import under the File menu. This opens the Import System Data dialog box All the models available in your MATLAB workspace are listed 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 24

Alternative Command to Simulate Different Responses you can open the LTI Viewer and import systems from the MATLAB prompt. This syntax views the ltiview('step', sys) step response of our More options: 'step' -------- Step response 'impulse' -------- Impulse response 'initial' -------- Initial condition 'lsim' -------- Linear simulation 'pzmap' -------- Pole/zero map 'bode' -------- Bode plot 'nyquist' -------- Nyquist plot 'nichols' -------- Nichols plot Multiple plots are allowed. Example: ltiview({'step';'impulse'},sys) 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 25

Displaying Response Characteristics Right-click on the plot Example: select Characteristics > Rise Time. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 26

Toggling Model Visibility This figure shows how to clear the second of the three models using right-click menu options. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 27

The Linear Simulation Tool In the LTI Viewer, right-click the plot area and select Plot Types > Linear Simulation. You can also use the lsim function at the MATLAB prompt: Syntax: lsim(modelname) 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 28

Using The Linear Simulation Tool Specify the time duration you want to simulate: Import the time vector by clicking Import time (From workspace) Enter the end time the time interval in seconds Specify the input signal Click Import signal to import it from the MATLAB workspace or a file Click Design signal to create your own inputs If you have a state-space model, you can specify the initial conditions click the Initial states tab For a continuous model, select an interpolation method 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 29

Functions for Frequency and Time Response 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 30

Using a Response Command Example: Plot: h = tf([1 0],[1 2 10]) impulse(h) 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 31

Response for Multiple Systems Command (Collect transfer functions into a vector array): Plot: h = [tf(10,[1 2 10]), tf(1,[1 1])] step(h) 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 32

Alternative Command for Multiple Systems Syntax: stepplot(sys1, 'r', sys2, 'y--', sys3, 'gx') This command generates a step plot (sys1 with solid red lines, sys2 with yellow dashed lines, impulseplot(sys1, 'r', sys2, 'y--', sys3, 'gx') bodeplot(sys1, 'r', sys2, 'y--', sys3, 'gx') NOTE: Options for plot color and shape are optional (all in blue solid lines) Example: stepplot(sys1, sys2, sys3, sys4, sysn) 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 33

Controller Design -- PID Tuner To launch the PID Tuner, use the pidtool command: pidtool(sys, type ) Type The PID Tuner automatically designs a controller for your plant. You can use the Response time slider to try to improve the loop performance 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 34

The PID Tuner Controller type Response type Response time slider 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 35

The PID Tuner Right click on the plot and select Characteristics to mark the characteristic times. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 36

The SISO Design Tool Open the control design GUIs with the following command sisotool 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 37

Define The Control Architecture In the Architecture tab, click Control Architecture Select proper architecture and specify the sign of 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 38

Specifying System Data In the Architecture tab, click System Data You can select values or transfer functions from MATLAB workspace or a *.mat file 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 39

Compensator Design In the Compensator Editor tab, you can manually define the compensator form. Right click on the Dynamics table allows you to add/delete Poles, Zeros, Integrators, Differentiators etc. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 40

Graphically Tuning Control Parameters 1 In the Graphical Tuning tab, you can configure the plots you want to see in the Graphical Tuning Window. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 41

Graphically Tuning Control Parameters 2 In the Graphical Tuning Window, you can grab and drag the pink squares using the small hand in the toolbar. This changes the constant multiplier value of the compensator. You can also add poles and zeros in this window using the cross and circle in the toolbar. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 42

Viewing Damping Ratios 1 Right-click on the root locus graph and select Requirements > New to add a design requirement. In the New Design Requirement dialog box choose Damping ratio 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 43

Viewing Damping Ratios 2 Applying damping ratio requirements to the root locus plot results in a pair of shaded rays at the desired slope Try moving the complex pair of poles you added to the design so that they are on the 0.707 damping ratio line. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 44

Analysis Plot 1 In the Analysis Plots tab, select a plot type Select the type of response for each plot 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 45

Analysis Plot 2 Click Show analysis plot in the Analysis plots tab This displays the real-time specific performance characteristics for your system. Compare values to design requirements. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 46

Storing and Retrieving Intermediate Designs Click the Design History node or Store Design, both located on the SISO Design Task node in the Control and Estimation Tools Manager. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 47

Exporting the Compensator and Models After you design the controller, you may want to save your design parameters for future implementation. Select File > Export in the Control and Estimation Tools Manager Select File > Export in the Graphical Tuning window. 2.004 Spring 13 Lecture 09 Tuesday, Feb. 26 48

MIT OpenCourseWare http://ocw.mit.edu 2.04A Systems and Controls Spring 2013 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.