SE 207: Modeling And Simulation Lecture 1: Introduction - KFUPM

Transcription

SE 207: Modeling and SimulationUnit 1Introduction to Modeling and SimulationDr. Samir Al-AmerTerm 072

Unit Contents and ObjectivesRRLesson 1: IntroductionLesson 2: Classification of SystemsUnit 1 Objectives:RRRTo give an overview of the course (Modeling & simulation).Define important terminologiesClassify systems/models

SE 207: Modeling and SimulationUnit 1Introduction to Modeling and SimulationLecture 1: IntroductionReading Assignment: Chapter 1 (Sections 1.1, 1.2)

SystemsWhat is a system?

SystemsRA system is any set of interrelatedcomponents acting together to achieve acommon objective.QQQQDefinition covers systems of different typesSystems vary in size, nature, function, complexity, Boundaries of the system is determined by the scope ofthe studyCommon techniques can be used to treat them

ExamplesRBatteryRRRCar Electrical systemRRRConsists of anode, cathode, acid and other componentsThese components act together to achieve one objectiveConsists of a battery, a generator, lamps, achieve a common objectiveSAPTCO (transportation company)RRConsists of Buses, drivers, stations, Achieves a common objectiveThe Boundaries of the system is determined by the scope of the study

SystemsRA system is any set of interrelated componentsacting together to achieve a common objective.inputssystemoutputs

SystemsRRInputs (excitations) :Qsignals that cause changes in the systems variables.QRepresented by arrows entering the systemOutputs (responses) :Q measured or calculated variablesQRShown as arrows leaving the systemSystems (process)QQDefined the relationship between the inputs and outputsRepresented by a rectangular box

The choice of inputs/outputs/processdepends on the purpose of the studyRSome Possible InputsQQQRInlet flow rateTemperature of entering materialConcentration of entering materialSome Possible OutputsQQQQLevel in the tankTemperature of material in tankOutlet flow rateConcentration of material in tankWhat inputs and outputs are needed when we want to model thetemperature of the water in the tank?

Modeling and SimulationModeling:Obtain a set of equations(mathematical model) thatdescribes the behavior of thesystemA model describes the mathematicalrelationship between inputs andoutputsSimulation:Use the mathematicalmodel to determine theresponse of the system indifferent situations.

Falling Ball ExampleA ball falling from a height of 100 metersWe need to determine a mathematical model thatdescribe the behavior of the falling ball.Objectives of the model: answer these questions:1. When does the ball reach ground?2. What is the impact speed?Different assumptions results in different models

Falling Ball ExampleRCan you list some of the assumptions?QQQQQ

Falling Ball ExampleAssumptions for Model 11.2.3.4.Initial position 100x(0) 100Initial speed 0v(0) 0Location: near sea levelThe only force acting on the ball is thegravitational force (no air resistance)Model :Solution :dvdx 9.8; v(t )dtdtx(0) 100; v(0) 0x(t ) 100 0.5 (9.8) t 2v(t ) 9.8 t

Falling Ball ExampleSimulation of Model 1The ball reaches ground at t 4.5175 velocity 44.2719

Falling Ball ExampleMore modelsROther mathematical models are possible. One suchmodel includes the effect of air resistance. Here thedrag force is assumed to be proportional to thesquare of the velocity.air resistance cv 2 , where c is the drag coeffientModel 2 :dvc 2 dx 9.8 v ; v(t )dtmdtx(0) 100; v(0) 0

How far can this stunt driver jump?List some assumptions for solving this problem

Stunt driverRAssumptions:QQQQQPoint massMass of car driver MInitial speed v0Angle of inclination aNo drag forceQRModel can be obtained to give the distancecovered by the jump in terms of M,a, v0,

How do we obtain mathematical models?Identification(Experimental)RRRRConduct an experimentCollect dataFit data to a modelVerify the modelModeling(Theoretical)RRRRConstruct a simplified versionusing idealized elementsWrite element lawsWrite interaction lawsCombine element laws andinteraction laws to obtain themodel

Force on the car driverRRRRWhat is the force actingon the driver when thecar moves over a roughsurface?Input: the shape of theroadOutput: force actingon the driverSystem model:describes the relationbetween input andoutput.

Modeling Using Idealized ElementsRRRRRA simplifiedrepresentation of thecar by idealizedelementsSelect relevantvariablesWrite element lawsWrite interaction lawsObtain the modeldriverseatchassisWheel axel

What is covered in this courseRModeling of SystemsQQQQRIdealized Elements (mechanical & electrical)Element lawsInteraction lawsObtaining the modelSolution of the ModelQQAnalytic solution using Laplace transformSimulation using SIMULINK

SummaryRSystems: set of components, achieve common objectiveQQQRRRRInputs: signals affecting the systemOutputs: measured or calculated variablesProcess: relating input and outputModeling: Derive mathematical description of systemSimulation: solving the mathematical modelExamples of modeling and simulationTopics covered in the course

SE 207: Modeling and SimulationUnit 1Introduction to Modeling and SimulationLecture 2: Classification of systemsReading Assignment: Chapter 1

Classification of SystemsRSystems can be classified based on differentcriteriaQQQQQSpatial characteristics: lumped & distributedContinuity of the time variable:continuous & discrete-time & hybridQuantization of dependent variable:Quantized & Non-quantizedParameter variation: time varying & fixed (time-invariant)Superposition principle: linear & nonlinear

Continuity of time variablett0t1t2tContinuous-time SignalDiscrete-time SignalThe signal is defined for all t inan interval [ti, tf]The signal is defined for a finitenumber of time points {t0, t1, }

Give ExamplesRGive examples ofQcontinuous time signalRRRQDiscrete time signalRRR

Examples of signalstemperaturetTemperature Sensor thatprovides Continuousreading of the temperaturet0t1t2tDigital TemperatureSensor that providesreading of the temperatureevery 30 Seconds

Classification of SignalsContinuous-time,nonquantized(Analog uantizedDiscrete-time,quantized(Digital Signal)

Classification of Signals and SystemsClassification of SignalsClassification of Systems

Classification of SystemsSystems are classified based on Spatial Characteristics (physical dimension,size) Continuity of time Linearity Time variation Quantization of variables

Spatial CharacteristicsLumped Models:Lumped models are obtained by ignoring the physical dimensions of the system. Amass is replaced by its center of mass (a point of zero radius) The temperature of a room is measured at a finite number of points. Lumped models can be described by a finite set of state variables.Distributed Models: Dimensions of the system is considered Can not be described by a finite set of state variables.

Spatial CharacteristicsLumped Models:Distributed Models: Only Moreone independent variable ( t )than one independent variable No dependence on the spatialcoordinates Depends on on the spatialcoordinates or some of them. Modeled by ordinary differentialequations Modeled by partial differentialequations Needs a finite number of statevariables Needs an infinite number ofvariablesstate

QuestionsRGive examples ofQQDistributed modelsLumped models

Continuity of timeContinuous Systems:The input, the output and state variables are defined over a range oftime.Discrete Systems:The input, the output and state variables are defined for t {t0,t1,t2, .}.For other values of t, they are either undefined or they are of nointerest.Hybrid Systems:Contains both continuous-time and discrete time subsystems

Quantization of the Dependant VariableQuantized variable:The variable is restricted to a finite or countable number of distinct valuesNon-Quantized variable:The variable can assume any value within a continuous range.

Classification of SignalsContinuous-time,nonquantized(Analog ntizedContinuous-time,quantized(Digital Signal)

QuestionsRGive examples ofQQQQContinuous signalContinuous systemDiscrete signalDiscrete system

Parameter VariationsSystems can be classified based on the properties of their parametersTime-Varying SystemsCharacteristics changeswith time. Some of thecoefficients of the modelchange with timeTime-Invariant SystemsCharacteristics do notchange with time.The coefficients areconstants

LinearityA system is linear if it satisfies the super positionprinciple. A system satisfies the superposition principleif the following conditions are satisfied:1. Multiplying the input by any constant, multiplies theoutput by the same constant.2. The response to several inputs appliedsimultaneously is the sum of individual response toeach input applied separately.

LinearityExamples of Linear Systems2y(t) u(t) dt0y (t ) 2t u (t )dy (t ) 3t 2 y (t ) u (t )dtu(t)Examples of Nonlinear Systems2y(t) u 2 (t) dt0y (t ) 2t u (t )dy (t ) u (t ) y (t ) u (t )dty(t)

LinearityExample of linear systems22y1 (t) u1 (t) dt,y 2 (t) u 2 (t) dt00u(t) u1 (t) u 2 (t)2200y(t) u(t) dt [u1 (t) u 2 (t) ]dt2200 u1 (t)dt u 2 (t) dt y1 (t) y 2 (t)2200Bothconditionsare satisfiedu(t) k u1 (t) y(t) k u1 (t)dt k u1 (t)dtu(t)y(t)

LinearityExample of non-linear systemsy1 (t) 2 t u1 (t) ,u(t) u1(t)u(t) 2 t u1 (t) 2 t u1 (t) y1 (t)In generaly1 (t) y1 (t)If the input is multiplied by (-1) the output remainsunchanged. This system is nonlinearu(t)y(t)

Classification of SystemsSpatial characteristicslumpedContinuity of the timevariablecontinuous discrete-timeParameter variationtime inearnonlinearQuantization ofdependent variableSuperposition principledistributedhybrid

KeywordsRRRRRRRRRRRRLinear modelNonlinear tatic modelDynamic modelQuantized variableNon-QuantizedSuper position principleSpatial characteristicsAnalog signalDigital signalIdealized elementSystemProcess

SummaryRClassification of signalsQRContinuous, discrete, quantized, non-quantizedClassification of SystemsQQQQContinuous-time systems, discrete-time systemsHybrid systemsLinear systems, nonlinear systemsTime-varying, time-invariant,

Modeling and Simulation Modeling: Obtain a set of equations (mathematical model) that describes the behavior of the system A model describes the mathematical relationship between inputs and outputs Simulation: Use the mathematical model to determine the response of the system in different situations.