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

Similar documents
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

Modeling and Control Overview

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

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

AP Physics C Mechanics Objectives

Modeling of Dynamic Systems: Notes on Bond Graphs Version 1.0 Copyright Diane L. Peters, Ph.D., P.E.

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

Mechatronics 1: ME 392Q-6 & 348C 31-Aug-07 M.D. Bryant. Analogous Systems. e(t) Se: e. ef = p/i. q = p /I, p = " q C " R p I + e(t)

Linear Systems Theory

Electrical Machine & Automatic Control (EEE-409) (ME-II Yr) UNIT-3 Content: Signals u(t) = 1 when t 0 = 0 when t <0

Solved Problems. Electric Circuits & Components. 1-1 Write the KVL equation for the circuit shown.

Index. Index. More information. in this web service Cambridge University Press

Chapter three. Mathematical Modeling of mechanical end electrical systems. Laith Batarseh

School of Engineering Faculty of Built Environment, Engineering, Technology & Design

Here are some internet links to instructional and necessary background materials:

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

2.004 Dynamics and Control II Spring 2008

Physics for Scientists & Engineers 2

Introduction to Controls

Noise - irrelevant data; variability in a quantity that has no meaning or significance. In most cases this is modeled as a random variable.

System Modeling. Lecture-2. Emam Fathy Department of Electrical and Control Engineering

MATHEMATICAL MODELING OF DYNAMIC SYSTEMS

Lecture 1. Electrical Transport

Basic Electronics. Introductory Lecture Course for. Technology and Instrumentation in Particle Physics Chicago, Illinois June 9-14, 2011

Chapter 1 Fundamental Concepts

ECE2262 Electric Circuits. Chapter 6: Capacitance and Inductance

Solving a RLC Circuit using Convolution with DERIVE for Windows

Springs and Dampers. MCE371: Vibrations. Prof. Richter. Department of Mechanical Engineering. Handout 2 Fall 2017

Inductance, RL and RLC Circuits

Ch. 23 Electromagnetic Induction, AC Circuits, And Electrical Technologies

Inductance, Inductors, RL Circuits & RC Circuits, LC, and RLC Circuits

Automatic Control Systems. -Lecture Note 15-

Mixing Problems. Solution of concentration c 1 grams/liter flows in at a rate of r 1 liters/minute. Figure 1.7.1: A mixing problem.

AC vs. DC Circuits. Constant voltage circuits. The voltage from an outlet is alternating voltage

Introduction to Process Control

Version 001 CIRCUITS holland (1290) 1

Electromagnetic Induction (Chapters 31-32)

ELECTROMAGNETIC OSCILLATIONS AND ALTERNATING CURRENT

Analog Signals and Systems and their properties

Gen. Phys. II Exam 2 - Chs. 21,22,23 - Circuits, Magnetism, EM Induction Mar. 5, 2018

Solution for Fq. A. up B. down C. east D. west E. south

SCHOOL OF COMPUTING, ENGINEERING AND MATHEMATICS SEMESTER 1 EXAMINATIONS 2012/2013 XE121. ENGINEERING CONCEPTS (Test)

Introduction to AC Circuits (Capacitors and Inductors)

ECE2262 Electric Circuits. Chapter 6: Capacitance and Inductance

Chapter 8. Model of the Accelerometer. 8.1 The static model 8.2 The dynamic model 8.3 Sensor System simulation

Chapter 32. Inductance

Physics Will Farmer. May 5, Physics 1120 Contents 2

MATH 312 Section 3.1: Linear Models

Solutions to PHY2049 Exam 2 (Nov. 3, 2017)

b) (4) How large is the current through the 2.00 Ω resistor, and in which direction?

INF5490 RF MEMS. LN03: Modeling, design and analysis. Spring 2008, Oddvar Søråsen Department of Informatics, UoO

Self-inductance A time-varying current in a circuit produces an induced emf opposing the emf that initially set up the time-varying current.

r where the electric constant

Slide 1 / 26. Inductance by Bryan Pflueger

Exercise 5 - Hydraulic Turbines and Electromagnetic Systems

Mechatronics Engineering. Li Wen

Chapter 6. Second order differential equations

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

In the presence of viscous damping, a more generalized form of the Lagrange s equation of motion can be written as

SUMMARY Phys 2523 (University Physics II) Compiled by Prof. Erickson. F e (r )=q E(r ) dq r 2 ˆr = k e E = V. V (r )=k e r = k q i. r i r.

Energy Storage Elements: Capacitors and Inductors

Louisiana State University Physics 2102, Exam 3 April 2nd, 2009.

EE102 Homework 2, 3, and 4 Solutions

Lecture A1 : Systems and system models

Module 25: Outline Resonance & Resonance Driven & LRC Circuits Circuits 2

Chapter 2. Engr228 Circuit Analysis. Dr Curtis Nelson

Scanned by CamScanner

SUBJECT & PEDAGOGICAL CONTENT STANDARDS FOR PHYSICS TEACHERS (GRADES 9-10)

Physics For Scientists and Engineers A Strategic Approach 3 rd Edition, AP Edition, 2013 Knight

Assessment Schedule 2015 Physics: Demonstrate understanding of electrical systems (91526)

TELLEGEN S THEOREM APPLIED TO MECHANICAL, FLUID AND THERMAL SYSTEMS

Module 24: Outline. Expt. 8: Part 2:Undriven RLC Circuits

1 2 U CV. K dq I dt J nqv d J V IR P VI

ELECTRO MAGNETIC INDUCTION

Review: control, feedback, etc. Today s topic: state-space models of systems; linearization

Exam 3 Solutions. The induced EMF (magnitude) is given by Faraday s Law d dt dt The current is given by

PHYS General Physics for Engineering II FIRST MIDTERM

Chapter 1 Fundamental Concepts

Physics for Scientists & Engineers 2

Contents. Dynamics and control of mechanical systems. Focus on

Physics 240 Fall 2005: Exam #3 Solutions. Please print your name: Please list your discussion section number: Please list your discussion instructor:

2. The following diagram illustrates that voltage represents what physical dimension?

Final on December Physics 106 R. Schad. 3e 4e 5c 6d 7c 8d 9b 10e 11d 12e 13d 14d 15b 16d 17b 18b 19c 20a

CHAPTER FOUR MUTUAL INDUCTANCE

2.004 Dynamics and Control II Spring 2008

2.5 Translational Mechanical System Transfer Functions 61. FIGURE 2.14 Electric circuit for Skill- Assessment Exercise 2.6

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

Applications of Second-Order Differential Equations

Handout 10: Inductance. Self-Inductance and inductors

Where k = 1. The electric field produced by a point charge is given by

Alternating Current. Symbol for A.C. source. A.C.

Differential Equations Spring 2007 Assignments

Solution to Homework 2

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

10/11/2018 1:48 PM Approved (Changed Course) PHYS 42 Course Outline as of Fall 2017

Oscillations. Tacoma Narrow Bridge: Example of Torsional Oscillation

General Response of Second Order System

FEEDBACK CONTROL SYSTEMS

a + b Time Domain i(τ)dτ.

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

Transcription:

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 2 0 1 7

Modeling Modeling is the process of representing the behavior of a real system by a collection of mathematical equations and logic. Models are cause-and-effect structures they accept external information and process it with their logic and equations to produce one or more outputs. Parameter is a fixed-value unit of information Signal is a changing-unit of information Models can be text-based programming or block diagrams

Math Modelling Categories Static vs. dynamic Linear vs. nonlinear Time-invariant vs. time-variant SISO vs. MIMO Continuous vs. discrete Deterministic vs. stochastic

Static vs. Dynamic Models can be static or dynamic Static models produce no motion, fluid flow, or any other changes. 4 Example: Battery connected to resistor v = ir Dynamic models have energy transfer which results in power flow. This causes motion, or other phenomena that change in time. Example: Battery connected to resistor, inductor, and capacitor v Ri L di dt 1 C idt

Linear vs. Nonlinear Linear models follow the superposition principle The summation outputs from individual inputs will be equal to the output of the combined inputs Most systems are nonlinear in nature, but linear models can be used to approximate the nonlinear models at certain point.

Linear vs. Nonlinear Models Linear Systems Nonlinear Systems

Time-invariant vs. Time-variant The model parameters do not change in time-invariant models The model parameters change in time-variant models Example: Mass in rockets vary with time as the fuel is consumed. If the system parameters change with time, the system is time varying.

Time-invariant vs. variant Time-invariant F(t) = ma(t) g Time-variant F = m(t) a(t) g Where m is the mass, a is the acceleration, and g is the gravity Here, the mass varies with time. Therefore the model is time-varying

Linear Time-Invariant (LTI) LTI models are of great use in representing systems in many engineering applications. The appeal is its simplicity and mathematical structure. Although most actual systems are nonlinear and time varying Linear models are used to approximate around an operating point the nonlinear behavior Time-invariant models are used to approximate in short segments the system s time-varying behavior.

SISO vs. MIMO Single-Input Single-Output (SISO) models are somewhat easy to use. Transfer functions can be used to relate input to output. Multiple-Input Multiple-Output (MIMO) models involve combinations of inputs and outputs and are difficult to represent using transfer functions. MIMO models use State-Space equations

System States Transfer functions Concentrates on the input-output relationship only. Relates output-input to one-output only SISO It hides the details of the inner workings. State-Space Models States are introduced to get better insight into the systems behavior. These states are a collection of variables that summarize the present and past of a system Models can be used for MIMO models

SISO vs. MIMO Systems U(t) Transfer Function Y(t)

Continuous vs. discrete Continuous models have continuous-time as the dependent variable and therefore inputs-outputs take all possible values in a range Discrete models have discrete-time as the dependent variable and therefore inputs-outputs take on values at specified times only in a range

Continuous vs. discrete Continuous Models Discrete Models Differential equations Integration Laplace transforms Difference equations Summation Z-transforms

Deterministic vs. Stochastic Deterministic models are uniquely described by mathematical equations. Therefore, all past, present, and future values of the outputs are known precisely Stochastic models cannot be described mathematically with a high degree of accuracy. These models are based on the theory of probability

Block Diagrams Block diagram models consist of two fundamental objects: signal blocks and wires. A block is a processing element which operates on input signals and parameters to produce output signals A wire is to transmits a signal from its origination point (usually a block) to its termination point (usually another block). Block diagrams are suitable to represent multidisciplinary models that represent a physical phenomenon. Dr. Tarek A. Tutunji

Block Diagram Example [Ref.] Prof. Shetty

Block Diagrams Manipulation

Block Diagrams Manipulation

Block Diagrams: Direct Method Example Consider the transfer function: We can introduce s state variable, x(t), in order to separate the polynomials

State Equation The differential equation is: Put the needed integrator blocks: Add the required multipliers to obtain the state equation:

Output Equation Repeat the same procedure for the output equation: Connect the two sub-blocks

Block Diagram Modeling: Analogy Approach Physical laws are used to predict the behavior (both static and dynamic) of systems. Electrical engineering relies on Ohm s and Kirchoff s laws Mechanical engineering on Newton s law Electromagnetics on Faradays and Lenz s laws Fluids on continuity and Bernoulli s law Based on electrical analogies, we can derive the fundamental equations of systems in five disciplines of engineering: Electrical, Mechanical, Electromagnetic, Fluid, and Thermal. By using this analogy method to first derive the fundamental relationships in a system, the equations then can be represented in block diagram form, allowing secondary and nonlinear effects to be added. This two-step approach is especially useful when modeling large coupled systems using block diagrams.

Power and Energy Variables: Effort & Flow [Ref.] Raul Longoria

Transitional Mechanical Systems Mechanical movements in a straight line (i.e. linear motion) are called transitional Force displacement Basic Blocks are: Dampers, Masses, and Springs Springs represent the stiffness of the system F kx Dampers (or dashpots) represent the forces opposing to the motion (i.e. friction) F cv velocity Masses represent the inertia F ma mass acceleration Dr. Tarek A. Tutunji

Transitional Mechanical Systems Equations for mechanical systems are based on Newton Laws Free body diagram Spring Mass Force Damper ma F - kx - c dx dt Dr. Tarek A. Tutunji

Example: Mass-Spring-Damper Note: D is Differentiation 1/D is Integration

Example: Two-Mass Mechanical System [Ref.] Prof. Shetty

Example: Two-Mass Mechanical System

Example: Mechanical Model Consider a two carriage train system x1 x2 Force Mass 1 k(x1-x2) k(x1-x2) Mass 2 c v1 m m 1 2 x x 1 2 f - k(x k(x 1-1 - x 2 x2 ) - cx ) - cx 2 1 c v2

Example continued Taking the Laplace transform of the equations gives m s m 1 2 s 2 2 X X 1 2 (s) (s) F(s) - k(x k(x 1 (s) - 1 (s) - X 2 X 2 (s)) (s)) - csx - csx 2 (s) 1 (s) Note: Laplace transforms the time domain problem into s-domain (i.e. frequency) L L x(t) X(s) x(t) sx(s) 0 e st x(t)dt

Example continued Manipulating the previous two equations, gives the following transfer function (with F as input and V1 as output) V 1 (s) F(s) m m 1 2 s 3 c m s cs k 2 2 m m s km km c s 2kc 1 2 2 2 1 2 Note: Transfer function is a frequency domain equation that gives the relationship between a specific input to a specific output

Example continued Simulation using MATLAB m1= 5; m2=0.7; k=0.8; c=0.05; num=[m2 c k]; den=[m1*m2 c*m1+c*m2 k*m1+k*m2+c*c 2*k*c]; sys=tf(num,den); % constructs the transfer function impulse(sys); % plots the impulse response step(sys); % plots the step response bode(sys); % plots the Bode plot

Example continued: Impulse response Dr. Tarek A. Tutunji

Example continued: Step response Dr. Tarek A. Tutunji

Dr. Tarek A. Tutunji Example continued: Bode Plot

Example: Motion of Aircraft

Rotational Mechanical Systems Consider a mechanical system that involves rotation Torque, T w dq/dt q T Shaft Side View J dw/dt kq cw The torque, T, replaces the force, F The angle, q, replaces the displacement x The angular velocity, w, replaces velocity v The angular acceleration, a, replaces the acceleration a The moment of inertia J, replaces the mass m Dr. Tarek A. Tutunji Top View

Rotational Mechanical Systems The mechanics equation becomes spring coefficient angle damper coefficient angular velocity moment of inertia angular acceleration Torque Dr. Tarek A. Tutunji T kθ cω Jα dθ T kθ c J dt d 2 dt θ 2

Example: Rotational-Transitional System Consider a rack-and-pinion system. The rotational motion of the pinion is transformed into transitional motion of the rack w T in pinion r v F rack For simplicity, the spring effects are ignored dω Tin Tout J c1ω dt Dr. Tarek A. Tutunji

Example continued The rotational equation is dω Tin Tout J c1ω dt The transitional equation is F c2v m dv dt Using the equations T out rf And manipulating the rotational and transitional equations with the input torque, Tin, as inputs and velocity, v, as output, we get ω v/r c T 1 in c r r 2 v J r mr dv dt Dr. Tarek A. Tutunji

Example continued Let us take a look at the state space equations In general, where x is the states vector, y is the output vector, and u is the input vector x y Ax Bx Cu Du In our example, we will dω use the states: w and v, dv dt the inputs: T in and F dt the output: v v 0 Manipulating the equations in the previous slide, we get c1 J 0 ω v 1 c 0 2 ω v m 1 J 0 r J T 1 F m in

Conversion: Transitional and Rotational

Gear Trains

where Gear Trains

Electrical Systems: Basic Equations Resistor Ohm s Law Voltage V Ri current Inductor V L di dt Resistance Capacitor Power = Voltage x Current Inductance V i 1 idt C dv C dt Capacitance Dr. Tarek A. Tutunji

Kirchoff Laws Equations for electrical systems are based on Kirchoff s Laws 1. Kirchoff current law: Sum of Input currents at node = Sum of output currents 2. Kirchoff voltage law: Summation of voltage in closed loop equals zero

Example: RLC circuit R i L C V + - + V R - + V L - + V c - Using Kirchoff voltage law V Ri L di dt 1 C idt Or V Ri L di dt V c since i C dv dt c Then V RC dv dt c LC d 2 Vc 2 dt V A second order differential equation c

RLC MATLAB Code R=1000000; % R = 1MW L=0.001; % L=1 mh C=0.000001; % C= 1mF num=1; den=[l*c R*C 1]; sys=tf(num,den); bode(sys) Impulse(sys) Step(sys)

RLC Simulation: Bode Plot At DC (i.e. frequency = 0), Capacitor is open => Voltage gain is 0dB (i.e. 1 V/V) At high frequency, Capacitor is short => Voltage = 0 Dr. Tarek A. Tutunji

RLC Simulation: Impulse Response Input voltage is pulse => Capacitor stores energy And then releases the energy Dr. Tarek A. Tutunji

RLC Simulation: Step Response At about 2.3 seconds, the capacitor Voltage becomes 90% of the 1 Volts Dr. Tarek A. Tutunji

Op Amps

PM-DC Motor Modeling R i L V in + - Motor T w The electrical equation is V in Ri L di dt V emf where V emf (Back electromagnetic voltage) = k 1 w dω The mechanical equation is T J bω Tload dt where T = k 2 i

DC Motor Model: Block Diagram T load V in i T + 1/(Ls+R) + - k 2-1/(Js+b) w k 1

Simulation Result

Fluid Systems Fluid systems can be divided into two categories: Hydraulic: fluid is a liquid and incompressible Pneumatic: fluid is gas and can be compressed The volumetric rate of flow, q, is equivalent to the current The pressure difference, P 1 -P 2, is equivalent to voltage The basic building blocks for hydraulic systems are: Hydraulic resistance, capacitance, and inertance

Hydraulic resistance Hydraulic resistance is the resistance to the fluid flow which occurs as a result of valves or pipe diameter changes The relationship between the volume rate of flow, q, and pressure difference, p 1 -p 2,is given by Ohm s law p p2 1 Rq p 1 p 2 p 1 p 2 pipe valve

Hydraulic Capacitance Potential energy stored in a liquid such as height of a liquid in a container q 1 p 1 h A p 2 q 2 Volume Change Volumetric rate of change q V 1 q 2 Ah Cross sectional Area dv dt q 1 q 2 dh A dt height

Hydraulic Capacitance p 2 1 p p hgρ density pressure height gravity Note that p F / A mg / A p Vg / A p hg dh q q2 A q1 - q2 dt d p gρ A dt 1 A gρ dp dt By letting the hydraulic capacitance be We get q q2 1 C dp dt C A gρ

Hydraulic Inertance Equivalent to inductance in electrical systems To accelerate a fluid and increase its velocity a force is required F 1 F2 p1 p2 Cross sectional Area F mass 1 = p 1 A Length using F 2 = p 2 A Then p p2 1 F1 F2 m ALρ q Av dq I dt dv ma m dt A Where the Inertance is Lρ I A

Hydraulic Example Modeling: an interactive 2-tank system q in (t) A 2 h 1 (t) A 1 R 1 q h 2 (t) 1 (t) dh dt dh 1 2 1 2 dt q (t) q (t) q q h h in 1 1 2 (t) q (t) q (t)/r 2 1 2 (t) h 2 (t) (t) (t) /A /A /R 1 2 1 R 2 q 2 (t)

Hydraulic Example Modeling: Block Diagram Input: q in 1/A 1 - dh1 h h /dt 1 2 Sum Integrate Sum 1/R 1 1/A 2 Sum Integrate - - q 1 1/A 1 1/A 2 1/R 2 Dr. Tarek A. Tutunji Output: q 2

Hydraulic Example: Simulation Input, q in, is a step Output, q 2, is taken to a virtual scope Here, we assume all the Cross sectional areas and the resistances equals 1

Hydraulic Example: Simulation

Another Form of Analogies Potential and Flow Variables When systems are in motion, the energy can be Increased by an energy-producing source outside the system Redistributed between components within the system Decreased by energy loss through components out of the system. Therefore, a coupled system becomes synonymous with energy transfer between systems. Potential Variable = PV Flow Variable = FV

Analogies: FV and PV Flow Variable (FV) Potential Variable (PV) Electrical Current Voltage Mechanical Transitional Force Velocity Mechanical Rotational Torque Angular Velocity Hydraulic Volumetric Flow Rate Pressure Pneumatic Mass Flow Rate Pressure Thermal Heat Flow Rate Temperature

Which Analogies to use? Force-Voltage makes more physical sense Graphical Representation: Bond Graphs Force-Current makes mathematical sense Sum of Currents= Zero and Sum of Forces = Zero Graphical Representation: Linear Graphs

Conclusion Mathematical Modeling of physical systems is an essential step in the design process Simulation should follow the modeling in order to investigate the system response Mechatronic systems involve different disciplines and therefore an appropriate modeling technique to use is block diagrams Analogies among disciplines can be used to simplify the understanding of different dynamic behaviors Dr. Tarek A. Tutunji