A core Course on Modeling Introduction to Modeling 0LAB0 0LBB0 0LCB0 0LDB0 P.6.

Slides:



Advertisements
Similar presentations
Introduction to Macromedia Director 8.5 – Lingo
Advertisements

Slopes and Areas Frequently we will want to know the slope of a curve at some point. Or an area under a curve. We calculate slope as the change in height.
Chapter 15: Transactions Transaction Concept Transaction Concept Concurrent Executions Concurrent Executions Serializability Serializability Testing for.
Experiment 17 A Differentiator Circuit
STROUD Worked examples and exercises are in the text PROGRAMME F4 GRAPHS.
A core Course on Modeling Introduction to Modeling 0LAB0 0LBB0 0LCB0 0LDB0 P.7.
1 CSC 551: Web Programming Spring 2004 client-side programming with JavaScript  scripts vs. programs  JavaScript vs. JScript vs. VBScript  common tasks.
® Page 1 Intel Compiler Lab – Intel Array Visualizer HDF Workshop VI December 5, 2002 John Readey
A core Course on Modeling Introduction to Modeling 0LAB0 0LBB0 0LCB0 0LDB0 P.13.
© Christine Crisp “Teach A Level Maths” Vol. 2: A2 Core Modules 22a: Integrating the Simple Functions.
CHE 185 – PROCESS CONTROL AND DYNAMICS
A core Course on Modeling Introduction to Modeling 0LAB0 0LBB0 0LCB0 0LDB0 S.16.
VBA Modules, Functions, Variables, and Constants
Laplace Transforms Important analytical method for solving linear ordinary differential equations. - Application to nonlinear ODEs? Must linearize first.
Macromedia Director 8 Advanced Level Course. Script Basics Lingo can be used to offer your users navigational control of the order of the scenes of your.
MATLAB - Lecture 22A Two Dimensional Plots / Chapter 5 Topics Covered:
Slopes and Areas Frequently we will want to know the slope of a curve at some point. Or an area under a curve. We calculate area under a curve as the sum.
Where can I find the lecture slides? There will be a link from MOODLE but the files can be accessed directly here:
LIAL HORNSBY SCHNEIDER
SOLUTION FOR THE BOUNDARY LAYER ON A FLAT PLATE
A Differentiator Circuit.  All of the diagrams use a uA741 op amp. ◦ You are to construct your circuits using an LM 356 op amp.  There is a statement.
Experiment 17 A Differentiator Circuit
EPSII 59:006 Spring Topics Using TextPad If Statements Relational Operators Nested If Statements Else and Elseif Clauses Logical Functions For Loops.
CS123 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Spring 2010.
05/09/ Introducing Visual Basic Sequence Programming.
A core Course on Modeling Introduction to Modeling 0LAB0 0LBB0 0LCB0 0LDB0 S.15.
Plot each point on graph paper.You will attach graph paper to Bell Ringer sheet. 1. A(0,0) 2. B(5,0) 3. C(–5,0) 4. D(0,5) 5. E(0, –5)  A A  B CC 
1 A Core Course on Modeling Enter: ACCEL basics running a script Time in ACCEL the { … } operator examples Week 3 – Time for Change.
Importing your Own Data To display in GIS Lab 4a: (Table Join) Mapping By State, County, or Nation.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
IE 411/511: Visual Programming for Industrial Applications
1 Tips for solving Project 1 Reactor SO 3 SO 2 +O 2.
1 CSC 121 Computers and Scientific Thinking David Reed Creighton University HTML and Web Pages.
1 VeriSoft A Tool for the Automatic Analysis of Concurrent Reactive Software Represents By Miller Ofer.
Math 15 Lecture 10 University of California, Merced Scilab Programming – No. 1.
COMPUTER PROGRAMMING. Control Structures A program is usually not limited to a linear sequence of instructions. During its process it may repeat code.
Prepared by Mrs. Azduwin Binti Khasri
MATLAB Harri Saarnisaari, Part of Simulations and Tools for Telecommunication Course.
A core Course on Modeling Introduction to Modeling 0LAB0 0LBB0 0LCB0 0LDB0 P.12.
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
1 Optimal Manufacturing Enter: ACCEL basics running a script Time in ACCEL the { … } operator Examples Modeling manufacturing Implementation of a functional.
A core Course on Modeling Introduction to Modeling 0LAB0 0LBB0 0LCB0 0LDB0 P.14.
A core Course on Modeling Introduction to Modeling 0LAB0 0LBB0 0LCB0 0LDB0 S.30.
1 3.3 Rules for Differentiation Badlands National Park, SD.
Introduction Stress: When some external system of forces act on a body, the internal forces are set up at various sections of the body, which resist the.
Structured Programming I – Relational & Logical Operators Objectives: By the end of this class you should be able to: Change graph interactively in EXCEL.
Exceptions, handling exceptions & message boxes Year 11 Information Technology.
 Control Flow statements ◦ Selection statements ◦ Iteration statements ◦ Jump statements.
Slide Copyright © 2009 Pearson Education, Inc. Slide Copyright © 2009 Pearson Education, Inc. Welcome to MM150 – Unit 4 Seminar Unit 4 Seminar.
A core Course on Modeling Introduction to Modeling 0LAB0 0LBB0 0LCB0 0LDB0 S.10.
Page 1 NHSC PACS Web Tutorial PACS 301 nhsc.ipac.caltech.edu/helpdesk NHSC/PACS Web Tutorials Running the PACS Spectrometer pipeline for CHOP/NOD Mode.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 23.
Signals and Systems Lecture #6 EE3010_Lecture6Al-Dhaifallah_Term3321.
STROUD Worked examples and exercises are in the text 1 STROUD Worked examples and exercises are in the text Programme F4: Graphs PROGRAMME F4 GRAPHS.
CS122 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Winter 2010.
A core Course on Modeling Introduction to Modeling 0LAB0 0LBB0 0LCB0 0LDB0 S.2.
A core Course on Modeling Introduction to Modeling 0LAB0 0LBB0 0LCB0 0LDB0 S.29.
How to use MATLAB (using M-files) Double click this icon To start Matlab 6.5.
DYNAMIC BEHAVIOR OF PROCESSES :
A core Course on Modeling Introduction to Modeling 0LAB0 0LBB0 0LCB0 0LDB0 P.4.
HTML Again GUI Items Originally HTML 4 Copyright © Curt Hill.
“Teach A Level Maths” Vol. 2: A2 Core Modules
Instructions for using this template
MATLAB How to use (using M-files)
Oh DEER! Lab Report Oh DEER! Lab Report DIRECTIONS:
Structures- case, sequence, formula node
How to Start This PowerPoint® Tutorial
Lab 2: Terminal Basics.
Title of presentation | Presentation by [Enter details in 'Header & Footer' field 18/05/2019.
“Teach A Level Maths” Vol. 2: A2 Core Modules
Presentation transcript:

A core Course on Modeling Introduction to Modeling 0LAB0 0LBB0 0LCB0 0LDB0 P.6

Dynamic Models: dealing with time Examples of recursive functions (ACCEL demo’s) Contents time in ACCEL plotting graphs with descartes differentiationintegrationdampingdelay

Dynamic Models: dealing with time Examples of recursive functions (ACCEL demo’s) Contents time in ACCEL plotting graphs with descartes differentiationintegrationdampingdelay This section does not appear in the voice-over version of this presentation. Descartes is the new plotting system in ACCEL; to get a simple introduction in using descartes, consult slides 7 – 15.

Remember recursive functions: Q current = f (Q prev, P prev ) Simplest example: time current = time prev + 1 Start conditions: ACCEL initializes all quantities to 0 Time in ACCEL

p=t t=t{1}+1 ACCEL uses {1} to access previous value: t{1} is the value of t during the previous evaluation ACCEL uses {n} to access n-th previous value, n>0 ACCEL initializes after any modification in script Time in ACCEL

p=t t=t{1}+1 Time in ACCEL If p{1} does not exist (i.e., during the first execution of the script – there is no historic value for quantity p yet), the default value p=0 is obtained. In case you want another value, use the form p{delay | start value}, for instance p{1 | 5} to make p start with 5 in stead of 0.

p=k k=if(t>0,k{1}+5,0) t=t{1}+1 ACCEL can be forced to re-initialize after nr steps: Specify here after how many evaluations of the script you want to re-initialize. If set to 0, there is no re-initialization Have the above script running, and increase or decrease the value in the yellow oval. Notice how the result varies: you will find multiples of five, e.g. for re-initializing after 10 evaluations the outcome is 10 x 5 = 50. Time in ACCEL

z=descartes([gr]) s=slider(50,0,100) gr=[ locations:[x:[mode:'intp'],y:[mode:'shift', value:s]], edges:[thickness:2,col_r:255] ] descartes([gr1,gr2,gr3,...]) is the instruction to plot arbitrary many graphs, in this case gr1, gr2, gr3,... The simplest case is where we have just a single graph: gr. Even then, the argument to descartes must be an array: descartes([gr]) Plotting a graph using descartes

z=descartes([gr]) s=slider(50,0,100) gr=[ locations:[x:[mode:'intp'],y:[mode:'shift', value:s]], edges:[thickness:2,col_r:255] ] To plot a graph, we must first have a sequence of numbers. For dynamical models, this will be a quantity, changing over time. With s=slider(50,0,100), the user is responsible for the varying values of s Plotting a graph using descartes

z=descartes([gr]) s=slider(50,0,100) gr=[ locations:[x:[mode:'intp'],y:[mode:'shift', value:s]], edges:[thickness:2,col_r:255] ] A graph-concept has two properties: locations gives information about the (x,y) coordinates to be plotted edges gives information about the visual appearence of the graph Plotting a graph using descartes

z=descartes([gr]) s=slider(50,0,100) gr=[ locations:[x:[mode:'intp'],y:[mode:'shift', value:s]], edges:[thickness:2,col_r:255] ] A graph-concept has two properties: locations gives information about the (x,y) coordinates to be plotted In the simples case, we only have to tell descartes how to obtain the x-values and how to obtain the y-values. Plotting a graph using descartes

z=descartes([gr]) s=slider(50,0,100) gr=[ locations:[x:[mode:'intp'],y:[mode:'shift', value:s]], edges:[thickness:2,col_r:255] ] A graph-concept has two properties: locations gives information about the (x,y) coordinates to be plotted In an ordinary graph, y=f(x), x ranges over the entire width of the available plotting area. This is achieved by x:[mode:'intp'], which literally means: 'interpolate over the default range' (being the width of the plotting area) Plotting a graph using descartes

z=descartes([gr]) s=slider(50,0,100) gr=[ locations:[x:[mode:'intp'],y:[mode:'shift', value:s]], edges:[thickness:2,col_r:255] ] A graph-concept has two properties: locations gives information about the (x,y) coordinates to be plotted In an ordinary graph, y=f(x), y varies in according to what we want to plot. In the simplest case, we think of the graph as plotted on a moving, endless strip of paper. Then we only need to take in one y-value at the time. Descartes does the shifting for us: y:[mode:'shift', value:...] Plotting a graph using descartes

z=descartes([gr]) s=slider(50,0,100) gr=[ locations:[x:[mode:'intp'],y:[mode:'shift', value:s]], edges:[thickness:2,col_r:255] ] A graph-concept has two properties: locations gives information about the (x,y) coordinates to be plotted edges gives information about the visual appearance of the graph. Plotting a graph using descartes

z=descartes([gr]) s=slider(50,0,100) gr=[ locations:[x:[mode:'intp'],y:[mode:'shift', value:s]], edges:[thickness:2,col_r:255] ] A graph-concept has two properties: locations gives information about the (x,y) coordinates to be plotted edges gives information about the visual appearance of the graph. Often occurring properties are the thickness and the color. In this case we give the thickness a value of 2. For the color, we only set the red component (col_r), and leave green and blue to the default values. Plotting a graph using descartes

z=descartes([gr]) s=slider(50,0,100) gr=[ locations:[x:[mode:'intp'],y:[mode:'shift', value:s]], edges:[thickness:2,col_r:255] ] Descartes has endless more options to create visuals, including 3D objects with perspective and lighting, interactive camera control, text labels and more. To use these features in your own projects, consult the ACCEL manual (start reading at the term 'descartes'), and study the example scripts in the demo-section. In the sequel of this presentation, we only use the form explained above. Plotting a graph using descartes

z=descartes([gr1,gr2]) s=50+25*sin(t/10) gr1=[ locations:[x:[mode:'intp'],y:[mode:'shift', value:s]], edges:[thickness:2,col_r:255] ] gr2=[ locations:[x:[mode:'intp'],y:[mode:'shift', value: 50+s-s{1}]],edges:[thickness:2,col_b:255] ] t=t{1}+1 s behaves as a sin-function of time with frequency 1/10 per evaluation The expression s-s{1} gives the difference between the current and the previous value of s : this approximates the time derivative of s. Differentiation

z=descartes([gr1,gr2]) gr1=[ locations:[x:[mode:'intp'],y:[mode:'shift',value:50+10*rate]], edges:[thickness:2,col_r:if(rate>0,0,255),col_g:if(rate>0,255,0)] ] gr2=[ locations:[x:[mode:'intp'],y:[mode:'shift',value:50+supply]], edges:[thickness:2,col_b:255] ] rate=slider(0,-0.5,0.5) supply=supply{1}+rate rate is a user-controlled stream of water, flowing into a bucket. If rate >0: flowing in, if rate 0: flowing in, if rate <0: leaking out. We have supply = supply{1} + rate The if -statement serves to color the graph gr1 differently in dependence of the sign of rate. Integration

z=descartes([gr2,gr1]) gr1=[locations:[x:[mode:'intp'],y:[mode:'shift',value:s]], edges:[thickness:2,col_r:255]] gr2=[locations:[x:[mode:'intp'],y:[mode:'shift',value:ds]],edges:[thickness:2,col_b:255]] s=slider(50,0,100) ds=(1-damp)*s+damp*ds{1} damp=slider(0.5,0.01,0.99) s is controlled by the user. If damp (also controlled by the user) is (close to) zero, ds  s. If damp is close to 1, ds  ds{1}, in other words: ds hardly changes. Play with damp to see ds vary between an accurate copy of s and an almost constant signal. What would happen if damp 1? Experiment! Damping

z=descartes([gr1,gr2]) gr1=[locations:[x:[mode:'intp'],y:[mode:'shift',value:s]], edges:[thickness:2,col_r:255]] gr2=[locations:[x:[mode:'intp'],y:[mode:'shift',value: s{delay}]],edges:[thickness:2,col_b:255]] s=slider(50,0,100) ds=s{delay} delay=slider(1,1,100) s changes under control of the user ds is the value of s as it was a number of delay evaluations earlier. Delay