chapter modeling - unimore · 2013. 2. 26. · chapter modeling mathematical models of systems ......

20
Chapter Modeling Mathematical Models of Systems Derive Mathematical Models for Mechatronics Systems. Lesson of the Course “Fondamenti di Controlli Automatici ” of 27 Feb 2013 Cesare Fantuzzi , Università degli Studi di Modena e Reggio Emilia Modeling.1 1 Content and Learning Objectives The learning objectives of this lesson and exercises. 1. Understand quantitative mathematical models of physical systems to design and analyze control sys- tems. We will consider a wide range of systems, including mechanical, hydraulic, and electrical. We will consider the general case in which dynamic behavior is described by ordinary differ- ential equations. Since most physical systems are nonlinear, we will discuss linearization approximations. 2. We will discuss internal and external behavior: Internal behavior description requires the definition of system states, that take into consideration hidden system operation (e.g. system actions that are not measured with sensors) that might have or might not have influence on system output. External behavior describes the system operation visible from the analysis of the system input and output (e.g. monitored with sensors). 3. We will then proceed to obtain the input-output relationship for components and subsystems in the form of transfer functions. 4. We will recall Laplace transform as a tool for analysis of mathematical model. 5. The transfer function blocks can be organized into block diagrams or signal-flow graphs to graphi- cally depict the interconnections. Modeling.2 Contents 1 Content and Learning Objectives 1 2 The definition of Mechatronic Systems 1 3 System Modeling 5 4 Differential equations of physical systems 10 5 Linearization 18 Modeling.3 2 Mechatronic Systems The definition of Mechatronic Systems Mechanical system control is undergoing a revolution in which the primary determinant is becoming the electronic control system. This is enabled by developments in electronics and computer technol- ogy. The definition of Mechatronics from different authors: Mechatronics (Tetsuro Mori, Yaskawa Electric, 1969): “is a new kind of mechanical system where the electronics take the decision-making function formerly performed by mechanical components.” 1

Upload: others

Post on 03-Feb-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

  • Chapter ModelingMathematical Models of SystemsDerive Mathematical Models for Mechatronics Systems.

    Lesson of the Course “Fondamenti di Controlli Automatici” of 27 Feb 2013

    Cesare Fantuzzi , Università degli Studi di Modena e Reggio Emilia

    Modeling.1

    1 Content and Learning Objectives

    The learning objectives of this lesson and exercises.

    1. Understand quantitative mathematical models of physical systems to design and analyze control sys-tems.

    • We will consider a wide range of systems, including mechanical, hydraulic, and electrical.• We will consider the general case in which dynamic behavior is described by ordinary differ-

    ential equations.

    • Since most physical systems are nonlinear, we will discuss linearization approximations.2. We will discuss internal and external behavior:

    • Internal behavior description requires the definition of system states, that take into considerationhidden system operation (e.g. system actions that are not measured with sensors) that mighthave or might not have influence on system output.

    • External behavior describes the system operation visible from the analysis of the system inputand output (e.g. monitored with sensors).

    3. We will then proceed to obtain the input-output relationship for components and subsystems in theform of transfer functions.

    4. We will recall Laplace transform as a tool for analysis of mathematical model.5. The transfer function blocks can be organized into block diagrams or signal-flow graphs to graphi-

    cally depict the interconnections.Modeling.2

    Contents

    1 Content and Learning Objectives 1

    2 The definition of Mechatronic Systems 1

    3 System Modeling 5

    4 Differential equations of physical systems 10

    5 Linearization 18 Modeling.3

    2 Mechatronic Systems

    The definition of Mechatronic Systems

    • Mechanical system control is undergoing a revolution in which the primary determinant is becomingthe electronic control system. This is enabled by developments in electronics and computer technol-ogy.

    • The definition of Mechatronics from different authors:

    – Mechatronics (Tetsuro Mori, Yaskawa Electric, 1969): “is a new kind of mechanical systemwhere the electronics take the decision-making function formerly performed by mechanicalcomponents.”

    1

  • – Mechatronics (Tomizuka, 2004): “there has been a shift from electronics to software as pri-mary decision-making, the definition thus becoming: Mechatronics is the synergetic integrationof physical systems with information technology and complex-decision making in the design,manufacture and operation of industrial products and processes.”

    Modeling.4

    • We can conclude that Mechatronics is a holistic approach to system design and manufacture thatintegrates deveral disciplines, such as:

    – Mechanic Engineering,– Electronic Engineering,– Computer Sciences,– Software Engineering,– Control Engineering,

    Mechatronics is the combination of several branches of engineering as mechanical, electronic, com-puter, software and control in order to design and manufacture devices and machines which aresupervised and controlled by an automatic system.Mechatronics is a multidisciplinary field of engineering, that is to say it rejects splitting engineeringinto separate disciplines, and for this reason it’s also sometimes named as System Engineering tooutline the holistic approach to the complete system design and development.French standard NF E 01-010 gives the following definition: “approach aiming at the synergisticintegration of mechanics, electronics, control theory, and computer science within product designand manufacturing, in order to improve and/or optimize its functionality”.Thus we can say that Mechatronics is a science that defines the System Engineering Approach tomodern system design and development:

    The System Engineering Approachfollowing this approach the design of a system considers a global approach, in which all the aspects,also named system views: mechanics, physics, electronics, control, are considered all togheter at thereal beginning of the design phase.

    Modeling.5

    Disk Drive System

    A disk Drive SystemA disk drive system is composed by mechanical, electrical and control parts. System engineering approachrequires to desing the mechanical part considering at the same time the electronic part (e.g. size and positionof the electrical motor) and the control part (e.g. a spring used to auto-park the system at home positionduring the shut down might be replaced by a proper control of the recording heads)

    Modeling.6

    A solenoid valve .A solenoid valve is an electromechanically operated valve, an example of mechatronic system.

    The valve is controlled by an electric current through a solenoid: in the case of a two-port valve the flowis switched on or off; in the case of a three-port valve, the outflow is switched between the two outlet ports.Multiple solenoid valves can be placed together on a manifold.

    Solenoid valves are the most frequently used control elements in fluidics. Their tasks are to shut off,release, dose, distribute or mix fluids. They are found in many application areas. Solenoids offer fast andsafe switching, high reliability, long service life, good medium compatibility of the materials used, lowcontrol power and compact design.

    A solenoid valve has two main parts: the solenoid and the valve. The solenoid converts electrical energyinto mechanical energy which, in turn, opens or closes the valve mechanically. A direct acting valve has

    2

  • Figure 1: A scheme of a Solenoid Valve: A- Input side, B- Diaphragm, C- Pressure chamber, D- Pressurerelief passage, E- Solenoid, F- Output side

    only a small flow circuit, shown within section E of this diagram (this section is mentioned below as a pilotvalve). In this example, a diaphragm piloted valve multiplies this small pilot flow, by using it to control theflow through a much larger orifice.

    Solenoid valves may use metal seals or rubber seals, and may also have electrical interfaces to allow foreasy control. A spring may be used to hold the valve opened (normally open) or closed (normally closed)while the valve is not activated. The Figure 1 shows the design of a basic valve, controlling the flow ofwater in this example.

    At the top figure is the valve in its closed state. The water under pressure enters at A. B is an elasticdiaphragm and above it is a weak spring pushing it down. The function of this spring is irrelevant fornow as the valve would stay closed even without it. The diaphragm has a pinhole through its center whichallows a very small amount of water to flow through it. This water fills the cavity C on the other side ofthe diaphragm so that pressure is equal on both sides of the diaphragm, however the compressed springsupplies a net downward force. The spring is weak and is only able to close the inlet because water pressureis equalized on both sides of the diaphragm.

    In the previous configuration the small passage D was blocked by a pin which is the armature of thesolenoid E and which is pushed down by a spring. If the solenoid is activated by drawing the pin upwardsvia magnetic force from the solenoid current, the water in chamber C will flow through this passage D tothe output side of the valve. The pressure in chamber C will drop and the incoming pressure will lift thediaphragm thus opening the main valve. Water now flows directly from A to F.

    When the solenoid is again deactivated and the passage D is closed again, the spring needs very littleforce to push the diaphragm down again and the main valve closes. In practice there is often no separatespring, the elastomer diaphragm is molded so that it functions as its own spring, preferring to be in theclosed shape.

    From this explanation it can be seen that this type of valve relies on a differential of pressure betweeninput and output as the pressure at the input must always be greater than the pressure at the output for it towork. Should the pressure at the output, for any reason, rise above that of the input then the valve wouldopen regardless of the state of the solenoid and pilot valve.

    In some solenoid valves the solenoid acts directly on the main valve. Others use a small, completesolenoid valve, known as a pilot, to actuate a larger valve. While the second type is actually a solenoidvalve combined with a pneumatically actuated valve, they are sold and packaged as a single unit referredto as a solenoid valve. Piloted valves require much less power to control, but they are noticeably slower.Piloted solenoids usually need full power at all times to open and stay open, where a direct acting solenoidmay only need full power for a short period of time to open it, and only low power to hold it. Modeling.7

    System Engineering Design for Mechatronics

    • The design of Mechatronic Systems is usually a complex tasks as the target system is.• The design deals with the integrated and optimal design of a physical system, including sensors,

    actuators, and electronic components, and its embedded digital control system. The integration isrespect to both hardware components and information processing.

    • An optimal choice must be made with respect to the realization of the design specifications in thedifferent domains.

    • Functionality can be achieved either by solutions in the physical (mechanical) domain or by infor-mation processing in electronics or software, as control based on computer offers extreme flexibility(smart actions).

    • This integrated approach is called System Engineering Design.Systems engineering is an interdisci-plinary field of engineering focusing on how complex engineering projects should be designed and

    3

  • managed over their life cycles. Issues such as logistics, the coordination of different teams, andautomatic control of machinery become more difficult when dealing with large, complex projects.Systems engineering deals with work-processes and tools to manage risks on such projects, and itoverlaps with both technical and human-centered disciplines such as control engineering, industrialengineering, organizational studies, and project management.

    Modeling.8

    Mechatronic System Design Team

    MechanicalEngineers

    ElectricalEngineers

    MechanicalEngineers

    MechanicalElectro-

    Engineers

    ElectricalEngineers

    MechanicalEngineers

    ControlEngineers

    MechanicalElectro-

    Engineers

    ElectricalEngineers

    MechanicalEngineers

    SensorsActuators

    ControlEngineers

    MechanicalElectro-

    Engineers

    ElectricalEngineers

    MechanicalEngineers

    SensorsActuators

    SystemEngineers

    ComputerControlEngineers

    MechanicalElectro-

    Engineers

    ElectricalEngineers

    MechanicalEngineers

    SensorsActuators

    Modeling &Simulation

    SystemEngineers

    ComputerControlEngineers

    MechanicalElectro-

    Engineers

    ElectricalEngineers

    MechanicalEngineers

    ControlEmbedded

    SensorsActuators

    Modeling &Simulation

    SystemEngineers

    ComputerControlEngineers

    MechanicalElectro-

    Engineers

    ElectricalEngineers

    MechanicalEngineers

    Mechatronic System Design

    ControlEmbedded

    SensorsActuators

    Modeling &Simulation

    SystemEngineers

    ComputerControlEngineers

    MechanicalElectro-

    Engineers

    ElectricalEngineers

    MechanicalEngineers

    Mechatronics system development requires contribution from diverse technical disciplines. By pro-viding a systems holistic view of the development effort, systems engineering helps mold all the technicalcontributors into a unified team effort, forming a structured development process that proceeds from conceptto production to operation and fault managment and recovery.

    The modern approach of system engineering requires the development of smarter control algorithms,microprocessor design, and analysis performed with mathematical and simulate models of real systems.

    Systems engineering encourages the use of tools and methods to better comprehend and manage com-plexity in systems. Some examples of these tools can be listed as:

    • Systems analysis,• System mathematical modeling• System simulation,• Optimization and• Reliability analysis, etc.

    Modeling.9

    The Engineer’s trouble.

    The Solution of the Engineer’s trouble.• The need for systems engineering arose with the increase in complexity of systems and projects.• A system can become more complex due to an increase in size as well as with an increase in the

    amount of data, variables, or the number of engineering fields that are involved in the design.• A solution to tackle system complexity is apprach the System Engineering developing Models of the

    system (Model Based system design).Modeling.10

    4

  • System modeling for System Engineering

    • Develop models of systems is a important step in system engineering. Before a new prototype designfor an automobile braking system or a multimillion dollar aircraft is developed and tested in the field,it is common place to “test drive” the separate components and the overall system in a simulatedenvironment based on some form of model.

    • A system model allows to understand and test systems in an economical and safe manner. The benefitof having a model is to be able to explore the intrinsic behavior of a system in an economical andsafe manner. The physical system being modeled may be inaccessible or even nonexistent as in thecase of a new design.

    • The system model is based on physical observation expressed using mathematics. The behavior ofdynamic systems can be explained by mathematical equations and formulae, which embody eitherscientific principles or empirical observations, or both, related to the system

    Modeling.11

    3 System Modeling

    Model Based Design

    • In the evaluation of a system design:• the design-and-test approach should be replaced by• modeling-analysis-simulation-design-test process.

    The new approach requires

    • Multidisciplinary approach that• crosses domanin boundaries, to obtain a• physical and mathematical modeling.

    Modeling.12Model-Based Design (MBD) is a method to address the problem of system engineering in the desing

    and devleopment of complex mechatronic devices and components.In Model-based design, development is manifested in these steps:

    1. Defining the specifications of the system under development, both technical (e.g. speed, processingtime, etc.) and non-technical (e.g. costs, availability of spare replacment parts, etc.)

    2. Modeling the system using physical model described by different kinds of mathematics (continuoustime differential equations, discrete time equations, discrte events, stochastic systems, etc.)

    3. Analyzing the behaviour of the system and develop the control system to assure system specificationfulfilment.

    4. Simulating the overall system,5. if necessary modify the behavior of the system and/or of the controller, that is rerun the development

    process from second step (system behaviour analysis) or third step (controller developement)6. Deploy the system into the final artifact.

    The model–based design paradigm is significantly different from traditional design methodology. Ratherthan design and develop mechanical parts, often without a clear understanding on system specification andwith no consideration about control system, designers use MBD to define models with advanced functionalcharacteristics using modular models described using different kind of matehmatical formulae.

    These models can be collected into component libraries of continuous-time and discrete-time buildingblocks. These built models used with simulation tools can lead to rapid prototyping, software testing, andverification. Not only is the testing and verification process enhanced, but also, in some cases, hardware-in-the-loop simulation can be used with the new design paradigm to perform testing of dynamic effects onthe system more quickly and much more efficiently than with traditional design methodology.

    The main steps in MBD approach are:

    1. Plant modeling. Plant modeling can be data-driven or physical principles based. Data-driven plantmodeling uses techniques such as System Identification. With system identification, the plant modelis identified by acquiring and processing raw data from a real-world system and choosing a math-ematical algorithm with which to identify a mathematical model. Various kinds of analysis andsimulations can be performed using the identified model before it is used to design a model-basedcontroller. First principles based modeling is based on creating a block diagram model that imple-ments known differential-algebraic equations governing plant dynamics. A type of first principlesbased modeling is physical modeling, where a model is created by connectings blocks that representphysical elements that the actual plant consists of.

    2. Controller analysis and synthesis. The mathematical model conceived in step 1 is used to identifydynamic characteristics of the plant model. A controller can be then be synthesized based on thesecharacteristics.

    5

  • 3. Offline simulation and real-time simulation. The time response of the dynamic system to complex,time-varying inputs is investigated. This is done by simulating a simple LTI (Linear Time Invariant)system or a non-linear model of the plant with the controller.Simulation allows specification, requirements, and modeling errors to be found immediately, ratherthan later at real system development and test. Real-time simulation can be done by automaticallygenerating code for the controller developed in the previous step.This code can be deployed to a special real-time protoyping computer that can run the code andcontrol the operation of the plant. If plant prototype is not available, or testing on the prototype isdangerous or expensive, code can be automatically generated from the plant model. This code can bedeployed to the special real-time computer that can be connected to the target processor with runningcontroller code. This way, controller can be tested in real-time against a real-time plant model.

    4. Deployment. Ideally this is done via automatic code generation from the controller developed in step3. It is unlikely that the controller will work on the actual system as well as it did in simulation,so an iterative debugging process is done by analyzing results on the actual target and updating thecontroller model. Model based design tools allow all these iterative steps to be performed in a unifiedvisual environment.

    Some of the notable advantages MBD offers in comparison to the traditional approach are:

    • MBD provides a common design environment, which facilitates general communication, data analy-sis, and system verification between development groups.

    • Engineers can locate and correct errors early in system design, when the time and financial impact ofsystem modification are minimized.

    • Design reuse, for upgrades and for derivative systems with expanded capabilities, is facilitated.

    Physical System Modeling Design Concepts.

    A Spindle actuation system of a Lathe.An example of mechatronic system is the electrical actuation system of the spindle in a metalworking lathe.The physical system is formed by a rotating actuator (electrical motor) with a transmission that is containedin a flexible linear suspension.

    Modeling.13

    Physical System Modeling Design Concepts.

    The system model.The system model represents a system consisting of a rotating actuator with ideal transmission that iscontained in a flexible linear suspension.

    Modeling.14

    Physical system, physical model and Mathematical Model. How to develop a model for a physicalsystem

    • Identify the system (e.g. by defining system characteristics, behavior, boundaries, etc.) which is theobject of the study.

    • Isolate a physical model for each component of the system (e.g. define general characteristics of thesystem, identify input, output and state variables for each component).

    • Determine physical laws (mathematical description) that describe the behaviour of each compoennt.• Identify parameters present in the above physical laws.

    Modeling.15

    6

  • General Mathematical models. An unified description of Mathematical Systems• We are going to use quantitative mathematical models of physical systems.• The system dynamic behavior of continuous time systems is generally described by ordinary differ-

    ential equations.• This approch is very general and it can be used for a wide range of physical systems.• moreover, both the system model (physical part of a mechatronic system) and the control system

    (implemented ina computer, that is a immaterial part of a mechatronic system) can be described withthe same mathematics and graphical schemes.

    In summary, we use quantitative mathematical models of physical systems to design and analyze controlsystems. The dynamic behavior is generally described by ordinary differential equations. We will considera wide range of systems, including mechanical, hydraulic, and electrical. Since most physical systemsare nonlinear, we will discuss linearization approximations, which allow us to use linear methods such asLaplace transform methods.

    We will then proceed to obtain the input–output relationship for components and subsystems in theform of transfer functions. The transfer function blocks can be organized into block diagrams or signal-flow graphs to graphically depict the interconnections. Block diagrams (and signal-flow graphs) are veryconvenient and natural tools for designing and analyzing complicated control systems. Modeling.16

    Develop a model of a physical systemA model is a representation of the process or a system existing in reality or planned for real-ization which expresses the essential attributes of a process or a system in a useful form.

    Norbert Wiener, 1945 Modeling.17Mathematical models are needed when quantitative relationships are required, for example, to represent

    the detailed behavior of the output of a feedback system to a given input.Development of mathematical models is usually based on principles from the physical, biological, so-

    cial, or information sciences, depending on the control system application area, and the complexity ofsuch models varies widely. One class of models, commonly called linear systems, has found very broadapplication in control system science.

    Techniques for solving linear system models are well established and documented in the literature ofapplied mathematics and engineering,

    The process of obtaining a modelThe process of modeling can be summarized as follows:1. Identify the real system to be modeled.2. Identify components and describe necessary assumptions and simplifications.3. Write the differential equations describing the model.4. Simulate the model and, conceptually in parallel, execute the real system, and obtain a time history,

    data from sensor for real model, simulation data for the model.5. Examine if the difference between the two is within a specified accuracy.6. If necessary, renalyze or redesign the mathmatical model.

    Physical

    System

    Mathematical

    Model

    Physical laws

    Measurements Parametric equations (structure)

    Coefficients (values)

    Sensor

    acquisition

    Simulation

    data collect

    Real system execution

    Model Validation

    Model in therange of accuracy?

    Computersimulation Change in:

    (1) coefficients or(2) equations.

    Figure 2: The process of obtaining a model

    Modeling.18

    7

  • A model of an open Tank

    A model of a real thinkThe model capture only relevant thinks capable to describe the system behavior that is of interests.

    The figures represent respectively a real tank system and a description of the physical aspects that areof importance in the modeling step.

    The primary input of the system is the liquid flow rate F1(t), an independent variable measured inappropriate units such as cubic feet per minute (volumetric flow rate) or pounds per hour (mass flow rate).

    Responding to changes in the input are dependent variables H(t) and F0(t) the fluid level, and flow ratefrom the tank, respectively.

    Once the derivation is completed, we can use the model to predict the outflow and fluid level responseto a specific input flow rate F1(t), t > 0.

    Note that we have restricted the set of possible inputs to F1(t) and in the process relegated the remain-ing independent variables, that is, other variables which affect F0(t) and H(t), to secondary importance(sometime referred as huger order effects), such as fluid evaporation. It’s important to note that those as-sumption should be validated by observation and actual verification that those terma are really negligible tothe prediction of output variables. Modeling.19

    Derivation of modelThe mathemaical model of the system is obtained from the observation of tank conditions at two discrete

    points in time, as if snapshots of the tank were available at times t and t +∆t, as shown in following figure:

    Notation:F1(t) : Input flow at time t ,ft3/min. H(t) : Liquid level at time t ,ft, F0(t) : Output flow at time t ,ft3/minA : Cross-sectional area of tank, ft2

    Modeling.20

    Mathematical modelAt time t +∆t, from the physical law of conservation of volume, we obtain:

    V (t +∆t) =V (t)+∆V

    where V (t) is the volume of liquid in the tank at time t, ∆V is the change in volume from time t to t+∆t.The volume of liquid in the tank at times t and t +∆t is given by:

    V (t) = AH(t) ; and: V (t +∆t) = AH(t +∆t)

    8

  • Previous euqations assume constant cross-sectional area of the tank, that is, A is independent of H.The change in volume from t to t +∆t is equal to the volume of liquid flowing in during the interval t to

    t +∆t minus the volume of liquid flowing out during the same period of time. The liquid volumes are theareas under the input and output volume flow rates from t to t +∆t. Modeling.21

    Expressing these areas in terms of integrals:

    ∆V =V (t +∆t)−V (t) =∫ t+∆t

    tF1(t)dt−

    ∫ t+∆tt

    F0(t)dt

    Modeling.22

    The integrals in previous Equation can be approximated by assuming F1(t) and Fo(t) are constant overthe interval t to t +∆t. ∫ t+∆t

    tF1(t)dt ≈ F1∆t;

    ∫ t+∆tt

    F0(t)dt ≈ F0∆t

    Previous equations are reasonable approximations provided that ∆t is small. So that, we obtain:

    ∆V ≈ F1∆t−F0∆t

    and then:

    AH(t +∆t)≈ AH(t)+ [F1−F0]∆t

    and then, we obtain, finally:

    AH(t +∆t)−AH(t)≈ [F1−F0]∆t

    where ∆H is the change in liquid level over the interval (t, t +∆t). Note that ∆H/∆t is the average rateof change in the level H over the interval (t, t +∆t). It is the slope of the secant line from point A to pointB in the following figure.

    Modeling.23

    In the limit as ∆t approaches zero, point B approaches point A, and the average rate of change in H overthe interval (t, t +∆t) becomes the instantaneous rate of change in H at time t, that is:

    lim∆t 7→0

    ∆H∆t

    =dHdt

    where we calldHdt

    the first derivative of function H(t)

    From the graph, it can be seen that the firt orderd derivative is equal to the slope of the tangent line ofthe function H(t) at t (point A).

    9

  • Taking the limit as ∆t approaches zero and using the definition of the derivative give:

    lim∆t 7→0

    A∆H∆t

    = lim∆t 7→0

    [F1−F0]→ A∆H∆t

    = [F1−F0]Modeling.24

    • Since there are two dependent variables, a second equation or constraint relating F0 and H is requiredin order to solve for either one given the input function F1(t).

    • It is convenient at this point to assume that F0 is proportional to H, that is, F0 = cH, being c theconstant of proportionality expressed as 1/R, where R is call ed the fluid resistance of the tank.

    F0 =1R

    HModeling.25

    • In this example, the model is a coupled set of equations.• One is a linear differential equation and the other is an algebraic equation, also linear.• The differential equation is first order since only the first derivative appears in the equation and the

    tank dynamics are said to be first order.• The outflow F0 can be eliminated from the model equations obtaining:

    AdHdt

    +1R

    H = F1

    • Before a particular solution to previous equation for some F1(t), t ≥ 0 can be obtained, the initialtank level H(0) must be known.

    Modeling.26

    Assigment 2.1 Mathematical model of a tank with variable cross-sectional area.

    CCCCCCCCCC �

    ���������

    ?

    6..............................................................................

    -�..............................................................................

    -�............................................................................................................................................................

    -�...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

    ...............................................................................................................................................................

    ..................

    ....................

    ...............................................................................................................................................................................

    ...................................................................................................................................................................................

    L

    P(h)

    P1

    P0

    h = 1

    h = 0

    h

    Lateralview

    Topview

    P(h) = P0 +(P1−P0)∗h, h ∈ [0,1]

    Modeling.27

    4 Differential equations of physical systems

    Modeling using mathematics

    • The differential equations describing the dynamic performance of a physical system are obtained byutilizing the physical laws of the proces.

    • This approach applies equally well to mechanical, electrical, fluid, and thermodynamic systems.• The physical laws define relationships between fundamental quantities and are usually represented

    by equations.• A differential equation is any algebraic or transcendental equality which involves either differentials

    or derivatives.Modeling.28

    10

  • Example in mechanical domain• The scalar version of Newton’s second law states that, if a force of magnitude f is applied to a mass

    M units, the acceleration a of the mass is related to f by equation

    f = Ma ; f = M(dvdt

    )

    • The velocity v= v(t) and force f = f (t) are dependent variable, the time t is the independent variable.Modeling.29

    Example in electric domani• Ohm’s law states that, if a voltage of magnitude v is applied across a resistor of R units, the current i

    through the resistor is related to v by the equation

    v = Ri; v = R(dqdt

    )

    • The charge q = q(t) and the voltage v = v(t) are dependent variable, the time t is the independentvariable. Modeling.30

    A linear equation.• A linear equation is an equation consisting of sum of linear terms.• A linear term is one which is first degree in dependent variables and their derivatives.• If any term of differential equation contains higher power, products, or transcendental functions of

    the dependent variables, it is nonlinear.

    (dydt

    )3,udydt

    ,sin(u)Modeling.31

    time variant - time variant equations• A time-invariant equation is an equation in which none of the terms depends explicitly on the inde-

    pendent variable time.• A time-variable equation is an equation in which one or more terms depend explicitly on the inde-

    pendent variable time.• A system in which time is the independent variable is called causal if the output depends only on

    present and past values of the input.That is, if y(t) is the output, then y(t) depends only on the x(td) for values of td 6 t. Modeling.32

    Through and Across variables• Consider a torsional spring-mass system with applied torque Ta(t), assume the torsional spring ele-

    ment is massless. Suppose we want to measure the torque Ts(t) transmitted to the mass m. Since thespring is massless, the sum of the torques acting on the spring itself must b e zero: Ta(t)−Ts(t) = 0,which implies that Ts(t) = Ta(t).

    • We see immediately that the external torque Ta(t) applied at the end of the spring is transmittedthrough the torsional spring.

    • Because of this, we refer to the torque as a through-variable.• In a similar manner, the angular rate difference associated with the torsional spring element is ω(t) =

    ωs(t)−ωa(t)• Thus, the angular rate difference is measured across the torsional spring element and is referred to as

    an across-variable.• These same types of arguments can be made for most common physical variables (such as force,

    current, volume, flow rate, etc.).• These definitions allows a generalization of approach to system modeling that is considered as the

    moder approach to modeling (such as Matlab’s SIMSCAPE, 20 Sim, Dymola, etc.).Modeling.33

    An Example of “Across variable”Across-variables are defined by measuring a difference, or drop, across an element, that is between

    nodes on a graph (across one or more branches). These variables sum to zero around any closed loop onthe graph. Two across variable examples are (i) velocity drop in mechanical systems, and (ii) voltage dropin electrical systems.

    Across variables satisfy the compatibility condition

    n

    ∑i=1

    vi = 0

    around the n elements in any loop on a graph, which is clearly a generalization of Kirchoff’s voltagelaw Modeling.34

    11

  • Figure 3: To measure voltage drop in an electrical circuit you must connect a voltmeter across an element

    An Example of “Through variable”Through variables are measured through an element, that is considered as being transmitted through an

    element unchanged.These variables sum to zero at the nodes on a graph, and are said to satisfy the continuity condition.

    Example of through variables defined are (i) current in electrical systems, and (ii) force in mechanicalsystems.

    Through variables satisfy the continuity condition

    n

    ∑i=1

    fi = 0

    in the n elements connected to any node on a graph, which is clearly a generalization of Kirchoff’scurrent law

    Figure 4: to measure force in a mechanical system, or current in an electrical system a sensor must beinserted in series with an element.

    Modeling.35

    Summary of Through - and Across-Variables for Physical Systems

    12

  • System Variable Through Element Variable Across Element (difference)

    Electrical Current, i Voltage, Va−VbMechanical transla-tional

    Force, F Velocity, va− vb

    Mechanical rota-tional

    Torque, T Angular velocity, ωa−ωb

    Fluid Fluid volumetric rate of flow, Q Pressure, Pa−PbThermal Heat flow rate, q Temperature, Ta−Tb

    Modeling.36

    An example: a hydraulic motor

    • A hydraulic motor is a mechanical actuator that converts hydraulic pressure and flow into torqueand angular displacement (rotation). The hydraulic motor is the rotary counterpart of the hydrauliccylinder. Conceptually, a hydraulic motor should be interchangeable with a hydraulic pump becauseit performs the opposite function (much as the conceptual DC electric motor is interchangeable witha DC electrical generator).However, most hydraulic pumps cannot be used as hydraulic motors because they cannot be back-driven. Also, a hydraulic motor is usually designed for the working pressure at both sides of themotor.

    • The function of hydraulic motors is to convert hydraulic pressure and flow into rotational mechanicalenergy via an output shaft.

    • The power output of a motor is a torque and an angular velocity:

    Powerout = Pout = ωTbeing T : Torque, P : power, ω : rotatiopnal speed.

    • The hydraulic power supplied to the motor (input) is:

    Powerin = Pin = (Pa−Pb)Qbeing Pa−Pb the pressure difference across the motor lines, and Q is the flow through the motor.

    Modeling.37

    • If we assume to be 100% the efficinecy of the motor, we have:

    T =Qω(Pa−Pb)

    • Now by definition:

    Dm :=Qω

    where Dm is defined as the volumetric displacement (or simply displacement) of the motor.• Combining the equation gives:

    T = Dm(Pa−Pb)• If we consider that the motor drives a mechanical load with inertia J and viscous friction F , we

    obtain:

    Dm(Pa−Pb) = Jdωdt

    +Fω

    and then: (Pa−Pb) = JDmdωdt +

    FDm ω

    Modeling.38

    A schematic of an axial piston motor is shown in Figure 5. As can be seen in the figure, the axialpiston pump is identical to a piston pump, except that the swashplate angle is now fixed (i.e., there is nocompensator and control piston). The inlet side of the motor is the high pressure side and the outlet is lowpressure. The pressure difference causes the pump to rotate. Since the swashplate is fixed, speed of thismotor is controlled by either controlling inlet pressure Pa−Pb across the motor) or the flow rate. Also,like pumps, hydraulic motors tend to have 9 pistons, or possibly 7 (more pistons increase displacement andhence increase output torque). Piston motors provide the best sealing for high input pressures and work bestin high torque, low speed applications. They have the best sealing and will be the most efficient. An axialpiston motor with a fixed swashplate is unidirectional (rotate in 1 direction only). To be bi-directional, theswashplate would need to be variable position. Lastly, piston motors will have a case drain line to allowpiston leakage to flow to return. Modeling.39

    13

  • Figure 5: Axial Piston Hydraulic Motor.

    Figure 6: Hydraulic motor Calzoni

    Modeling.40

    14

  • Generalized elements An unified view of elements that affects variables in physical systems.

    Systems considered in their energy domains can be generalized in three primitive modeling elements:

    • Energy storage element in which energy is a function of the through variable (Inductive storage).• Energy storage element in which energy is a function of the across variable (Capacitive storage).• Energy dissipative element.

    Modeling.41

    Inductive Storage These are the energy storage elements in which the stored energy is a function of thethrough-variable.

    a a

    a aa aa a P2−P1 = I dQdt

    Fluid inertia

    P1P2

    QI

    E = 12T 2Kω2−ω1 =

    1K

    dTdt

    Rotational spring

    ω1ω2

    T

    L iV1V2

    Electrical inductancePhysical Element Equation Energy

    V2−V1 = L didt E =12Li

    2

    K Fv2 v1

    Translational spring

    v2− v1 = 1KdFdt E =

    12

    F2k

    K

    E = 12 IQ2-

    -

    -

    -

    ............................................

    .................................................

    ...............................................................

    ..........................................................

    ...............................................................

    .......................................................

    ........

    ............................................

    .................................................

    ...............................................................

    ..........................................................

    ...............................................................

    .......................................................

    ........

    ............................................

    .................................................

    ...............................................................

    ..........................................................

    ...............................................................

    .......................................................

    ........

    ............................................

    .................................................

    ...............................................................

    ..........................................................

    ...............................................................

    .......................................................

    ........

    Modeling.42

    Capacitive Storage These are the energy storage elements in which the stored energy is a function of theacross-variable.

    a a

    a a

    a a T = J dω2dtRotational mass

    ω2

    -

    -

    ω1 = const.

    CiV1V2

    Electrical capacitancePhysical Element

    Equation Energy

    i =C d(V2−V1)dt E =12C(V2−V1)

    2

    MFv1 = const.v2

    Translational mass

    F = M dv2dt E =12Mv

    22

    J T E =12J(ω2)

    2

    -

    Modeling.43

    15

  • Energy dissipators These are the dissipative elements (non-energy storage, the power flow is always intothe element)

    a a

    a a

    a a

    b -

    -

    .........................................................

    ................................................................

    ...............................................................

    ..........-

    Ri

    V1V2

    Electrical resistancePhysical Element

    Equation Power

    i = 1R(V2−V1) P =1R(V2−V1)

    2

    F

    v1 = const.v2

    Translational mass

    F = bv2 P = bv22

    T

    ω1 = const.ω2

    Rotational mass

    T = bω2 P = bω22b

    Modeling.44

    An example: An automobile shock absorber

    An automotive shock absorber.A shock absorber is a mechanical device designed to smooth out or damp shock impulse, and dissipatekinetic energy.

    Modeling.45

    Shock absorber model

    Conceptual model.The system can be represented by a mass M with a spring K and a friction effect B.

    Free body diagram.We model the wall friction as a viscous damper, the friction force is linearly proportional to the velocity

    of the mass. In reality the wall friction may behave as a Coulomb damper- a dry friction,which is a nonlinearfunction of mass velocity and possesses a discontinuity around zero velocity.

    16

  • a

    a v1 = 0Fk Fb

    a

    a a

    a

    6

    ....................

    ....................

    ....................

    ....................

    ....................

    ....................

    ....................

    ....................

    ....................

    ....................

    ....................

    ....................

    ....................

    6

    ?

    M

    F

    v2

    r

    6.......................................................... ......................................................................................................................... ......................................................................................................................... ........................................

    Modeling.46

    Deriving mathematical equations

    The mathematical model can be described as:a capacitive storage (a mass M), an inductive storage (a spring K) and a dissipative element (a dumper B)

    Summing the forces acting on M and utilizing Newton’s second law yields:

    F +Fk +Fb = r

    F = Mdv2dt

    ; Fb = Bv2; v2 =1K

    dFkdt

    ;

    v2 =dydt7→ r = M d

    2ydt2

    +Bdydt

    +Ky (1)Modeling.47

    A system with two carts connected by a flexible link

    Conceptual Model.

    Free body diagram.

    a aFM1Fb1

    M2a�a� a-a�a�a

    .................... ...

    ................. .......

    ............. ..........

    .......... .............

    ....... ................

    .... ..................

    .. ..................

    .. ..................

    .. ..................

    .. ....................

    - -

    M1FM2

    v2Fb2 Fk

    u

    v1

    -................................................ .......

    ....

    ..............................................

    ..........................

    ...................................... ....................

    ...............................................................

    ...................................... ....................

    ..............................

    Modeling.48

    Mathematical model• Three elements are present:

    – Two capacitive storage elements: FM1 = M1ẍ1, and FM2 = M2ẍ2,– One inductive storage element: Fk = (x2− x1)k.– Two dissipative elements: Fb1 = b1ẋ1, and Fb2 = b2ẋ2

    • so that we can write:

    FM1 +Fk +Fb1 = u, so that M1ẍ1 =−k(x1− x2)−b1ẋ1 +u

    FM2 −Fk +Fb2 = 0, so that M2ẍ2 =+k(x1− x2)−b2ẋ2 Modeling.49

    17

  • An example An Electrical Circuit

    RLC Circutit current driven

    a aa aa aiRR

    iCC

    V2V1

    iLL

    i

    .........................................................

    ................................................................

    ...............................................................

    ..........-

    �����

    -................................................ .............................................

    ...............................................................

    ..........................................................

    ...............................................................

    .......................................................

    ........

    -

    iR + iL + iC = i, i =V2−V1

    R+C

    d(V2−V1)dt

    +1L

    ∫ t0(V2−V1)dt

    Modeling.50

    Assigments 2.2 and 2.3 Calculate the differential equation corresponding to the following conceputalmodels

    Modeling.51

    5 Linearization

    Linear approximations of physical systems

    A non linear system.

    Modeling.52

    18

  • Linearization. Using linear equations to describe a non linear world.

    • Most, almost all, physical systems are nonlinear.• on the other hands the mathematical equations are tractable if they are linear.• therefore we will discuss the linearization process to obtain a mathematically tractable equation from

    a real model.Modeling.53

    Superposition and homogeneity principles.A great majority of physical systems are linear within some (sometime small) range of the process

    variables. In general, however systems ultimately become always nonlinear as the variables are increasedwithout limit.

    For example, a spring-mass-damper system has a linear behaviour as long as the mass is subjectedto small deflections. However, if the force were continually increased, eventually the spring would beoverextended and break.

    This behavior applies in general to all the actuation systems. For example an electrical motor has a rangeof working mode that corresponds to a maximum torque that it can actuate. If a greater torque is requestedby the control system, the motor gives a maximum torque, but not anymore. This can of behaviour is calledsaturation of the actuator.

    Therefore the question of linearity and the range of applicability must be considered for each system.A system is defined as linear in terms of the system excitation, the system input: u(t), and response, thesystem output: y(t). Having these concepts defined, it can de introduced the:

    • Superposition principle. When the system at rest is subjected to an excitation u1(t) it provides aresponse y1(t). Furthermore, when the system is subjected to an excitation u2(t), it provides a corre-sponding response y2(t). For a linear system, it is necessary that the excitation u1(t)+u2(t) result ina response y1(t)+ y2(t) This i s usually called the principle of superposition.

    • Homogeneity principle. Furthermore, the magnitude scale factor must be preserved in a linear system.Again, consider a system with an input u(t) that results in an output y(t). Then the response of a linearsystem to a constant multiple β of an input u(t) must be equal to the response to the input multipliedby the same constant so that the output is equal to βy(t). This is called the property of homogeneity.

    In other words we define as linear a system which behavior can be described by a mathematical func-tion:

    f : u ∈U 7→ y ∈ Y

    so that given any two real numbers λ and γ and any two values u1,u2 ∈U , the following equality holds:

    f (λu1 + γu2) = λ f (u1)+ γ f (u2)Modeling.54

    System linearizationThe linearity of many mechanical and electrical elements can be assumed over a reasonably large range

    of the variables.This is not usually the case for thermal and fluid elements, which are more frequently nonlinear in char-

    acter. Fortunately, however, one can often linearize nonlinear elements assuming small-signal conditions.This is the normal approach used to obtain a linear equivalent circuit for electronic circuits and transis-

    tors.

    • Consider a general element with an excitation (through) variable u(t) and a response (across) variabley(t).

    • The relationship of the two variables is written as

    y(t) = f (u(t))

    • where f (u(t)) indicates that output y(t) is a nonlinear function f (.) of input u(t).• We designate the normal operating point of the system as u0. If we assume that f (.) is contiunous

    arount operating point u0, that is usually the case of physical system, expecially if the product ofthrough and across variable is an energy,

    • we can write the Taylor series of function f (.) around the operating point u0:

    y(t) = f (u0)+d f (u(t))

    du(t)

    ∣∣∣∣u(t)=u0

    (u(t)−u0)+

    d2 f (u(t))du(t)2

    ∣∣∣∣u(t)=u0

    (u(t)−u0)2

    2!+ . . .

    Modeling.55

    19

  • • The slope at the operating point,

    d f (u(t))du(t)

    ∣∣∣∣u(t)=u0

    is a good approximation to the curve over a small range of (u(t)−u0), the deviation from the operat-ing point.

    • Then, as a reasonable approximation, we can take only the first term of the Taylor series:

    y(t) = f (u0)+d f (u(t))

    du(t)

    ∣∣∣∣u(t)=u0

    (u(t)−u0) = m(u(t)−u0)

    where m is the slope at the operating point.Modeling.56

    • Finally, it can be written a linear approximation of nonlinear system:

    y(t)− f (u0) = m(u(t)−u0)• or

    ∆y(t) = m∆u(t)Modeling.57

    An example. Application to a non linear spring.

    • Consider the case of a mass M sitting on a nonlinear spring, which have the following nonlinearcharacteristics:

    f = y2

    • The normal operating point is the equilibrium position that occurs when the spring force balances thegravitational force Mg, where g is the gravitational constant. Thus, we obtain:

    Mg = f0 = y20• For the nonlinear spring with the equilibrium position is

    y0 =√(Mg)

    Modeling.58

    • The linear model for small deviation is

    ∆ f = m∆y

    • where

    m =d fdy

    ∣∣∣∣y=√

    (Mg)

    • Thus,

    m = 2y0 = 2√(Mg)

    A linear approximation is as accurate as the assumption of small signals is applicable to the specificproblem.

    Modeling.59

    A second example of linearization.

    • Let’s consider the non linear equation:

    y(t) = f (u(t)) = sin(5u(t))

    to be linearized around the point u0 = 0;• being u(t) the input and y(t) the output.• The linearization can be computed as:

    y(t) = f (u0)+d f (u(t))

    du(t)

    ∣∣∣∣u0(u(t)−u0)

    • By the application of the linearization formula, we obtain:

    f (u0) = sin(5u0) = sin(5 ·0) = 0;d f (t)du(t)

    ∣∣∣∣u0

    = 5 · cos(5u(t))|u0 = 5cos(5 ·0) = 5

    • therefore the linearized system is: y(t) = 5u(t).Modeling.60

    20

    Content and Learning ObjectivesThe definition of Mechatronic SystemsSystem ModelingDifferential equations of physical systemsLinearization