University of Alberta ENGM 541: Modeling and Simulation of Engineering Systems Laboratory #7. M.G. Lipsett & M. Mashkournia 2011

Similar documents
INTRODUCTION TO TRANSFER FUNCTIONS

ET3-7: Modelling II(V) Electrical, Mechanical and Thermal Systems

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

Numeric Matlab for Laplace Transforms

D(s) G(s) A control system design definition

2.010 Fall 2000 Solution of Homework Assignment 1

CHAPTER 6 STATE SPACE: FREQUENCY RESPONSE, TIME DOMAIN

AMME3500: System Dynamics & Control

1-DOF Forced Harmonic Vibration. MCE371: Vibrations. Prof. Richter. Department of Mechanical Engineering. Handout 8 Fall 2011

EEE582 Homework Problems

Methods for analysis and control of. Lecture 6: Introduction to digital control

Course roadmap. Step response for 2nd-order system. Step response for 2nd-order system

Time Response Analysis (Part II)

Übersetzungshilfe / Translation aid (English) To be returned at the end of the exam!

EXPERIMENTALLY DETERMINING THE TRANSFER FUNCTION OF A SPRING- MASS SYSTEM


Chapter 2 SDOF Vibration Control 2.1 Transfer Function

EE -213 BASIC CIRCUIT ANALYSIS LAB MANUAL

MATHEMATICAL MODELING OF CONTROL SYSTEMS

ME scope Application Note 28

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

Introduction to Feedback Control

Laplace Transform Analysis of Signals and Systems

Transform Solutions to LTI Systems Part 3

THE subject of the analysis is system composed by

Lecture 14 - Using the MATLAB Control System Toolbox and Simulink Friday, February 8, 2013

APPLICATIONS FOR ROBOTICS

EECS C128/ ME C134 Final Wed. Dec. 15, am. Closed book. Two pages of formula sheets. No calculators.

Inverted Pendulum. Objectives

Linear Control Systems Solution to Assignment #1

Problem Set 3: Solution Due on Mon. 7 th Oct. in class. Fall 2013

Intermediate Process Control CHE576 Lecture Notes # 2

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Mechanical Engineering Dynamics and Control II Fall 2007

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur

School of Mechanical Engineering Purdue University. DC Motor Position Control The block diagram for position control of the servo table is given by:

MAS107 Control Theory Exam Solutions 2008

State Feedback Controller for Position Control of a Flexible Link

MAE143a: Signals & Systems (& Control) Final Exam (2011) solutions

Motion System Classes. Motion System Classes K. Craig 1

9. Introduction and Chapter Objectives

State Regulator. Advanced Control. design of controllers using pole placement and LQ design rules

6.003 Homework #6 Solutions

Introduction to Controls

Modeling and System Identification for a DC Servo

MAE 143B - Homework 7

Chapter 6 - Solved Problems

Control of Electromechanical Systems

Collocated versus non-collocated control [H04Q7]

ECE382/ME482 Spring 2005 Homework 6 Solution April 17, (s/2 + 1) s(2s + 1)[(s/8) 2 + (s/20) + 1]

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Some of the different forms of a signal, obtained by transformations, are shown in the figure. jwt e z. jwt z e

Controls Problems for Qualifying Exam - Spring 2014

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

CHAPTER 1 Basic Concepts of Control System. CHAPTER 6 Hydraulic Control System

Control of Manufacturing Processes

Implementation Issues for the Virtual Spring

MAE 143B - Homework 9

Advanced Control Theory

8.1.6 Quadratic pole response: resonance

( ) ( = ) = ( ) ( ) ( )

Positioning Servo Design Example

Professor Fearing EE C128 / ME C134 Problem Set 2 Solution Fall 2010 Jansen Sheng and Wenjie Chen, UC Berkeley

CDS 101/110a: Lecture 8-1 Frequency Domain Design

ẋ n = f n (x 1,...,x n,u 1,...,u m ) (5) y 1 = g 1 (x 1,...,x n,u 1,...,u m ) (6) y p = g p (x 1,...,x n,u 1,...,u m ) (7)

ECE 3793 Matlab Project 3 Solution

Transfer func+ons, block diagram algebra, and Bode plots. by Ania- Ariadna Bae+ca CDS Caltech 11/05/15

Chapter 3. State Feedback - Pole Placement. Motivation

Dr Ian R. Manchester Dr Ian R. Manchester AMME 3500 : Review

Topic # Feedback Control Systems

Laboratory handout 5 Mode shapes and resonance

EE -213 BASIC CIRCUIT ANALYSIS LAB MANUAL

سایت آموزش مهندسی مکانیک

MODELING OF CONTROL SYSTEMS

Automatique. A. Hably 1. Commande d un robot mobile. Automatique. A.Hably. Digital implementation

Chapter 8: Frequency Domain Analysis

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

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

Radar Dish. Armature controlled dc motor. Inside. θ r input. Outside. θ D output. θ m. Gearbox. Control Transmitter. Control. θ D.

Answers to multiple choice questions

Appendix A: Exercise Problems on Classical Feedback Control Theory (Chaps. 1 and 2)

Outline. Classical Control. Lecture 5

Bangladesh University of Engineering and Technology. EEE 402: Control System I Laboratory

Example: DC Motor Speed Modeling

Compensator Design to Improve Transient Performance Using Root Locus

DEPARTMENT OF ELECTRONIC ENGINEERING

Massachusetts Institute of Technology Department of Mechanical Engineering Dynamics and Control II Design Project

Lecture 5: Linear Systems. Transfer functions. Frequency Domain Analysis. Basic Control Design.

100 (s + 10) (s + 100) e 0.5s. s 100 (s + 10) (s + 100). G(s) =

Introduction to Modern Control MT 2016

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

EE C128 / ME C134 Final Exam Fall 2014

(b) A unity feedback system is characterized by the transfer function. Design a suitable compensator to meet the following specifications:

Stability and Frequency Response of Linear Systems

Frequency Response part 2 (I&N Chap 12)

CYBER EXPLORATION LABORATORY EXPERIMENTS

kx m x B N 1 C L, M Mg θ

Exercise 1a: Transfer functions

First-Order Low-Pass Filter

2.010 Fall 2000 Solution of Homework Assignment 7

Dynamic circuits: Frequency domain analysis

Transcription:

ENG M 54 Laboratory #7 University of Alberta ENGM 54: Modeling and Simulation of Engineering Systems Laboratory #7 M.G. Lipsett & M. Mashkournia 2 Mixed Systems Modeling with MATLAB & SIMULINK Mixed systems are modeled in exactly the same way as any other set of governing equations. The governing equations for different subsystems are in terms of different units, and so the process of non-dimensionalising is a little more complicated in that it is done for several different types of units. The procedure, however, is the same for each set of units that needs to be non-dimensionalised. In many systems, the response of one subsystem may be much faster than another part. For example, an electric shovel may have mechanical dynamics that are low-bandwidth (that is, they change slowly), whereas the electrical drive system may have a very fast response. The system may be stiff if the sensitivity of one subsystem to variations is much greater than other parts of the overall system. In such cases, non-dimensionalising allows scaling to make the set of equations more stable. SIMULINK has add-on packages that can be purchased with custom blocks for different types of physical systems. SimMechanics is a rigid-body dynamics package that allows a mechanism to be constructed graphically and then simulated. The library has the following element types: Figure : SimMechanics toolbox The resulting simulation can be animated in OpenGL, and converted to a few different formats for playback. SimHydraulics is a mechano-hydraulic systems simulation package for SIMULINK, which allows a designer to analyse power hydraulics and control systems. It does not model fluid transportation, water supply and sewer systems, or distributed parameter systems. SimHydraulics assumes that fluid temperature and volume of entrapped air remain constant during the simulated time interval. The library contains the following element types:

Figure 2: SimHydraulics toolbox Model Conversion In this course, we have been developing state-space representations of systems. An alternative and powerful approach for modeling linearised systems is to use Laplace transforms to create transfer functions (covered in Chapter of the course text). MATLAB has functions that allow the user to convert between different model types, including: c2d to convert from continuous-time state-space to discrete-time state-space form, d2c to convert from discrete-time state-space to continuous state-space form, ss2tf to convert from state-space to transfer function form, ss2zp to convert from state-space to zero-pole-gain form, tf2ss to convert from transfer function to state-space form, tf2zp to convert transfer function to zero-pole-gain form, zp2ss to convert zero-pole-gain to canonical state-space form, and zp2tf to convert from zero-pole-gain to transfer function form. For example, to convert the continuous-time state-space representation to discrete-time, where ẋ = Ax + Bu () [ A = 3 4 ], B = [ ] (2) we use the following statements: >> A = [, ; 3, 4]; 2

>> B = [; ]; >> [Ad, Bd] = c2d(a, B,.); where the third argument specifies the discrete sampling time of. seconds. The resulting discrete form is x[n + ] = A d x[n] + B d x[n] (3) where x[n+] is the value of the vector x at the n+st time step. The calculated matrices are [ ] [ ].9868.82.44 A =, B =.246.6588.82 This is a good way to represent a discrete linear system (such as a discrete manufacturing process) in which state changes occur synchronously (at the same time), with a uniform time step. As an example of converting from continuous state-space form to transfer function form, consider the system { } [ ] { } [ ] x x = + u (5) x 2 3 4 x 2 } which is in state-space form y = [ ] { x x 2 (4) + []u, (6) ẋ = Ax + Bu (7) y = Cx + Du (8) This linear system converts to a polynomial transfer function with the following statements: >> A = [, ; 3, 4]; >> B = [; ]; >> C = [, ]; >> D = ; >> iu = ; >> [num, den] = ss2tf(a, B, C, D, iu); where the transfer function is defined by numerator polynomial vector num and denominator polynomial vector den. The values are found to be num = [ ], den = [ 4 3] and so the transfer function is y(s) u(s) = s 2 + 4s + 3 We can use tf2ss to convert from transfer function to state-space form. For our example the commands are >> num = ; % here, the numerator has only one term >> den = [, 4, 3];% denominator polynomial terms (descending order) >> [A, B, C, D] = tf2ss(num, den); With the resulting matrices A = [ 4 3 ], B = [ The syntax for the other functions is given in the MATLAB help. Exercise ) For the transfer function ] (9), C = [ ], D = [], () H(s) = s + 3 S 2 + 4s 2 () 3

use the tf 2ss function to convert the transfer function to state-space representation; and then use the c2d function to convert the continuous state-space representation to discrete-time equations, using a sample period of.5 seconds. 2) In electromechanical control applications, a common task is to model the dynamics of actuators(eg. a dc motor). For high performance applications it is sometimes necessary to model the amplifier as well. The following are the two transfer functions for the amplifier and motor pair. H(s) = G(s) = 2(s + 5) s 2 + 3s + 2 22 s 3 + 2s 2 + 345s + 325 (2) (3) Find the state-space form the electromechanical system. (Example taken from Dynamic Modeling and Control of Engineering Systems) Analysis of linear systems (This example comes from www.me.cmu.edu/ctms/modeling which is a good site with several interesting and well explained examples.) A loudspeaker is a common example of a mixed dynamical system, combining an electrical subsystem that drives a mechanical subsystem (the vibrating speaker that produces the sound) through a linear motor. Figure illustrates the two subsystems, which are coupled by the linear motor. The state space model of this electromechanical system can be expressed as: Figure 3: Loud Speaker Model ẋ = Ax + Buy = Cx + Du (4) where is the vector of outputs, is the state vector, and is the input vector. The state-space model can be found using the following steps: Identify the energy storing elements Select state variables Identify any trivial state equations 4

Determine the other state equations using loop/node equations and constitutive relationships Express the state equations in first-order form Put the first-order state equations in vector-matrix form The mass, the spring, and the inductor can store energy. A trivial state equation is a definition of a time derivative of a variable. In this system, there is only one such state variable, the time derivative of the displacement (loop) variable in the mechanical subsystem: ẋ = v (5) From the node admissibility equations, we get the governing equation for the mechanical subsystem mẍ bẋ kx + qi = (6) where qi is the Lorentz force (motive force); and from the loop admissibility in the electrical subsystem we obtain the governing equation e i (t) Ri qẋ Li = (7) where is the Lorentz force response in the electrical subsystem (back emf). In first-order form, the state equations are ẋ = v (8) v = k m x b m v + q m i (9) i = q L v R L i + e i(t) L Let s use x(t) as our output of the system. The state vector can be written as x = x v i (2) (2) The first row of A and the first row of B contain the coefficients of the state equation for x. Likewise the second rows contain the coefficients of the state equation for v, and the third rows contain the coefficients of the state equation for i. Then write the vector form of the state equations ẋ = Ax + Bu, where A = k m b m q L q m R L, B = L (22) and the output equation y = Cx + Du, where C = [ ]; D = []. Enter this state space model into MATLAB with the specified values for each parameter, and convert it using ss to a state-space structure called electromech ss: >> R = 5; L = 5e 5; k = 2e5; b = 5; m = 4e 3; q = pi; >> A = [ ; k/m b/m q/m; q/l R/L]; >> B = [; ; /L]; 5

>> C = [ ]; >> D = []; >> electromech ss = ss(a, B, C, D) a = x x2 x3 x x2 5e + 7.25e + 4 785.4 x3 6.28e + 4 e + 5 b = u x x2 x3 2e + 4 c = x x2 x3 y d = u y Continuous timemodel. Now find the (linear) frequency response of this speaker driver by plotting the bode plot using the MATLAB command bode: >> bode(electromech ss); Figure 4: Bode Diagram The frequency response of this speaker driver rolls off by -3dB at approximately 54rad/sec (86Hz), and so this speaker would likely be a low-frequency woofer. The high-frequency asymptote for the magnitude 6

drops off at -6dB per decade, and the phase changes from degrees to -27 degrees, both characteristics of a 3rd-order system. MATLAB can plot the impulse response of this system when the state-space model is available. The impulse response is how the speaker responds to a brief peak in the input signal. Type the command >> impulse(electromech s s) and examine the plot of the impulse response function for this linear system: The transfer function for this Figure 5: Impulse Response system is the ratio of the Laplace Transform of the output of the system x(t) to the input Laplace Transform ei(t) : X(s)/Ei(s). The transfer function for this system is X(s) E i (x) = q (Ls + R)(ms 2 + bs + k) q 2 s (23) Enter this transfer function using the specified parameter values, defining s as a Laplace operator, to get the system transfer function structure electromech tf: >> R = 5; L = 5e 5; k = 2e5; b = 5; m = 4e 3; q = pi; >> s = tf( s ); >> electromech t f = q/((l s + R) (m s 2 + b s + k) q 2 s) T ransferfunction : 3.42 2e 7s 3 +.225s 2 + 25.s + e6 As discussed in the text Section 4.5, methods for analysing lower-order linear systems (such as finding the roots of the characteristic input-output equation to determine the poles of the system) get very involved and complicated for third-order and higher-order systems. Usually a third-order system is analysed by determining the poles, zeros, and DC Gain of the transfer function, or by examining characteristics of the frequency 7

response from the Bode Plot. The poles of this system are found using the MATLAB pole command, using the transfer function form of the system model: >> pole(electromech tf) ans =.e + 5.56.597 +.375i.597.375i which tells us the system has one real pole and one pair of complex conjugates, in this case scaled by the amount.x 5. We can also examine the natural frequencies of a system. For a second-order system with one pair of complex conjugate poles, the system has a single natural frequency, which is the frequency at which the system would exchange energy amongst the energy-storing elements within the system. The undamped natural frequency represents how elements exchange energy in a system with no energy dissipation. If there are also energy-dissipating elements in the system, then the system also has a damping ratio. This can be found using the damp command for the system in transfer function form: >> damp(electromech t f) Eigenvalue Damping F req.(rad/s) 5.97e + 3 + 3.75e + 3i 8.47e 7.5e + 3 5.97e + 3 3.75e + 3i 8.47e 7.5e + 3.e + 5.e +.e + 5 A system of order three or higher has a natural frequency and damping ratio for each pair of complex conjugate poles, which is a mode in which the system can oscillate. This system has only one pair of complex conjugates, and so there is one natural frequency, which is 7,5 rad/sec. (For high-order systems, the number of natural frequencies depends on the number of complex conjugate poles.) The natural frequency is equal to the magnitude of the associated complex conjugate pole. It is not affected by damping. The resonant frequency (also called the damped frequency) is the frequency of oscillation associated with a set of complex conjugate poles, but affected by the damping in the system: ω d = ω n ζ 2 (24) The resonant frequency in rad/sec is equal to the magnitude of the imaginary part of the complex poles which can be found using this combined MATLAB expression: >> abs(imag(pole(electromech t f))) ans =.e + 3 3.754 3.754 The first value is zero, which is the magnitude of the imaginary part of the real pole. The second two values are the resonant frequency of the complex conjugate pole, which in this system is 3,75 rad/sec. MATLAB can also show other aspects of system behavior. Exercise 2 An Inverted Pendulum is an interesting unstable system for analysis. The system equations for this system can be derived to be x x mg x2 x3 = M x2 x3 + M u (25) x4 (M+m)g x4 ML ML 8

Figure 6: Inverted Pendulum y = [ ] x x2 x3 x4 (26) where state variables x = x, x2 = ẋ, x3 = θ, x4 = θ For this example take m = kg, M = 3kg, and L =.2m. Convert the system into a state-space structure. Determine the Bode, impulse and step response of the system. Determine the poles and zeros of the system by first transforming it into a transfer function. Submit the plots and code used. References: D. Etter, Engineering Problem Solving with MATLAB. Prentice-Hall 997. http://www.me.cmu.edu/ctms/modeling www.mathworks.com Chi-Tsong Chen, Linear System Theory and Design, 3rd Edition. 9