系统动力学模型讲课件

上传人:枫** 文档编号:593275019 上传时间:2024-09-24 格式:PPT 页数:75 大小:476.50KB
返回 下载 相关 举报
系统动力学模型讲课件_第1页
第1页 / 共75页
系统动力学模型讲课件_第2页
第2页 / 共75页
系统动力学模型讲课件_第3页
第3页 / 共75页
系统动力学模型讲课件_第4页
第4页 / 共75页
系统动力学模型讲课件_第5页
第5页 / 共75页
点击查看更多>>
资源描述

《系统动力学模型讲课件》由会员分享,可在线阅读,更多相关《系统动力学模型讲课件(75页珍藏版)》请在金锄头文库上搜索。

1、 系统动力学简称SD(System Dynamics) 系统动力学原理系统动力学原理 建模基本步骤建模基本步骤 VensimPLE软件系统动力学模型讲系统动力学模型(System Dynamics)被誉为实实际系统的实验室际系统的实验室,是美国麻省理工学院(MIT)福瑞斯特Forrester (Jay W .Forrester)教授于1956年首创的一种运用结构、功能、历史相结合的方法,借助于计算机仿真而定量地研究非线性非线性(Non-linearity)、多重反馈多重反馈(Information feedback)、复杂时变复杂时变(Dynamic complexity)系统的系统分析技术。

2、可用于研究处理社会经济生态和生物等复杂系统问题,它可在宏观层次和微观层次上对复杂、多层次、多部门、非线性的大规模系统进行综合研究。 系统动力学模型讲反馈(feedback)是控制系统的一种方法。它是把系统输出去的一部分信息(给定信息)作用于被控对象后产生的结果(真实信息)再返回给输入,并对系统的再输出产生影响的过程。系统所具有的这种功能和过程称之为系统反馈。系统动力学认为几乎所有人工的系统都是反馈系统 。动态( Dynamic)即系统动力学所包含的量是随时间变化的,能以时间为坐标的图形表示。譬如,人口的增长,就业人数的增减,城镇与农村的生活质量和物价的涨落等都是动态问题。学习定义动态问题的技巧

3、是学习系统动力学的第一步。系统动力学模型讲1系统的流系统动力学主要利用四种流来构成模型 物流订货流资金流信息流系统动力学模型讲2水平(积累、状态)level变量水平(积累)是系统的流的积累。例如,库存量、存款、人口、资源等都可作为水平变量。一个水平方程相当于个容器,它积累变化的流速率。其流速有输入流速和输出流速,容器内的水平正是其输入流速与输出流速的差量的积累。 库存L R1 R2系统动力学模型讲怎样计算水平变量? 用用DTDT近似表示近似表示dt dt ,上式写成上式写成一阶差分方程,一阶差分方程,符号符号DTDT表示时间的差分,即两表示时间的差分,即两次计算之间时间间隔的长度。次计算之间时

4、间间隔的长度。 系统动力学模型讲因此,一个水平变量的新值等于它前一时刻的值加上或者减去时间间隔所产生的变化值。这就是系统动力学的水平方程(Level方程)。在一个水平方程中,可以有一个或者几个流入速率,也可以同时有一个或者几个流出速率。水平方程实际是积分运算,用微积分符号可将上式写成:系统动力学模型讲3速率(Rate)变量速率(流速) (Rate)表示系统中水平变量变化的强度,具有瞬时性的特征,反映单位时间内水平变量增加或减少的量。水平变量是系统活动结果的状态变量,而速率则是对水平变量变化过程及其控制的描述。速率的基本形式有两种,流入速率和流出速率。 系统动力学模型讲4延迟(Delay) 在复

5、杂的社会经济系统中存在广泛的延迟(Delay)现象即系统中的物流或信息流从它们的输入到它们的输出响应,总不可避免地有一段时间的延迟,这段时间就是延迟时间或延迟。例如,从订货到收货,固定资产的投资到发挥经济效益,从下种到庄稼收获,从投入教育经费到人才的产出,从污染物散入环境到危害人类健康,等等都存在着一段或长或短的延迟时间,这些是物流的延迟。同样信息流也存在延迟。如,商品供求关系的变化要经过一段时间才会引起商品价格的变动;产品质量影响工厂的声誉也需要一段时间。 系统动力学模型讲延迟实际上是将系统中流入速率变为流出速率的种转换过程。一个动态的流体系统通常是同一瞬间流入速度不等于流出速率,这就是说从

6、这一输入到输出的过程中会有一种延迟传送的流量:当流入速率大于流出速率时,延迟传送的流量就增多;当流出速率大于流入速率时,延迟传送的流量就减少。因此,延迟是一种特殊的水平变量,特殊的积累,延迟是一个“积累容器”、但它又不同于一般的水平变量。因为延迟的流出速率只受延迟时间的影响,与外界因素无关;而一般水平变量的流出速率除受本身的特性决定以外,还受外界因素的影响。系统动力学模型讲一个简单的疾病蔓延模型三个水平变量:未患病者;患病者;康复者;三个水平变量:未患病者;患病者;康复者;为分析需要,增加新的水平变量:为分析需要,增加新的水平变量:INC处于潜伏期者处于潜伏期者,其输其输入速率为感染率入速率为

7、感染率INF,输出速率为疾病显现率输出速率为疾病显现率SYMP。系统动力学模型讲5信息反馈系统控制论系统可以划分为开环系统和闭环系统。闭环系统又叫信息反馈系统。 如果系统的输出量对系统的输入量没有影响,即对如果系统的输出量对系统的输入量没有影响,即对系统的控制作用没有影响,则叫做开环系统。系统的控制作用没有影响,则叫做开环系统。例如,洗涤机就是这种系统在洗涤机中依次进行着浸湿、洗涤和漂清的过程。在洗涤机中不需要对输出信号,即衣服的清洁度进行测量。开环系统,不需对输出量进行测量,也不需将输出量反馈到输入端与输入量进行比较。这种系统不是不是反馈控制系统反馈控制系统,当出现扰动时,开环控制系统就不能

8、完成既定任务。系统动力学模型讲闭环系统是指系统的输出对系统的输入有影响的系统,也就是系统输出信息对控制作用有直接影响的系统。因此,闭环系统又叫信信息息反反馈馈系系统统。输入信号和反馈信号之差,叫误差信号。误差信号送到控制器上,以减少系统的误差,使系统的输出量趋于所希望的目标值。例如,商业中,订货库存系统就是反馈系统。订货与库存水平产生生产决策,生产决策又引起供货、调整库存,最后再引起生产决策,具有市场信息反馈的生产系统是一个反馈系统。该系统根据市场信息控制产品生产。系统动力学模型讲信息反馈系统又可以划分为两种系统:正反馈系统Positive (Reinforcing) Feedback Loo

9、p、负反馈系统Negative (Balancing) Feedback Loop 。正反馈系统是指系统运行发生一个持续增长过程,因为在该系统中控制作用引起的结果会导致发生更强的控制作用。负反馈系统,是系统运行时寻求目标,若没有达到目标就会不断产生反应的系统。 划分一个特定反馈系统是正反馈系统还是负反馈系统或者开环系统,也是相对的。这取决于观测者确定系统目标时的特殊着眼点(观点)。 系统动力学模型讲6因果关系 系统由相互依存、相关作用的要素组成。如果要素A的量的变化会引起要素B的量的变化,则称A与B之间存在着因果关系。反映系统各要素之间因果关系的图就称为因果关系图。 系统动力学用矢线表示系统中

10、两个要素(变量)之间的联系,称为因果链或因果环(Causal Link)。如果有两个因素(变量)A和B,它们之间存在因果联系,如果A变化A,则引起B变化B或-B。这时,可把A看作B变化的原因,B是A的结果。系统动力学模型讲正因果关系:设有两个因素(变量)A和B。如果A变化A,则使B变化B,A和B变化是同号。也就是说,如果A增加引起B增加,或者A减少引起B减少,即A对B的关系是正因果关系,记作AA+ +B B,如人口总数和出生率的关系是正因果关系。负因果关系:设有两个因素(变量)A和B。如果A变化A,则使B变化-B,A和B变化是异号。也就是说,如果A增加引起B减少,或者A减少引起B增加,即A对B

11、的关系是负因果关系,记作AA- -B B。如死亡率和人口总数的关系就是负因果关系。 A对B的因果关系无论是正因果关系还是负因果关系,反过来并不一定成立。例如,死亡率对人口总数是负因果关系,但人口总数对死亡率却是正因果关系 系统动力学模型讲7反馈回路系统中有两个或者两个以上的变量(水平变量、关于水平变量的信息变量),按照它们的因果反馈关系,组成一个闭合的因果反馈回路(又称因果反馈环)。系统动力学模型讲v正正反反馈馈回回路路(self-reinforcementself-reinforcement自自我我增增强强):一个反馈回路,假设其中某一变量有一个变化(增加),依次通过回路中其他变量的因果关系

12、之后,结果是加强原来变量的变化(增加);或者,这个变量有一个变化(减少),经过一系列因果关系后,结果是减弱这个变量的变化(减少)。那么,这个回路叫正反馈回路,记作“(+)”。v负反馈回路(负反馈回路(goal-seeking向目标追寻)向目标追寻):一个反馈回路,假设其中某一变量有一个变化(增加),依次通过回路中其他变量的因果关系之后,结果减弱了原来变量的变化(减少);或者,这个变量有一个变化(减少),经过一系列因果关系后,结果是增强这个变量的变化(增加)。那么,这个回路叫负反馈回路,记作“(-)” v判断一个反馈回路是正还是负有一条简明的规则判断一个反馈回路是正还是负有一条简明的规则:把反馈

13、回路中所有的负号(负因果链)的个数都加起来,如果负号锋的个数之和为零或偶数时则为正反馈回路,如果是奇数,则为负反馈回路 系统动力学模型讲8因果反馈回路图一个复杂的系统由几个或多个子系统组成系统动力学用数学模型来模拟系统并利用信息把系统定量化。一个系统就是一个模型。一个复杂模型可以分解为若干个子模型(模块)。一个子模型中又有若干个反馈回路,包括正、负相结合的反馈回路,把这些反馈回路按其内在因果关系联结起来,就构成整个模型的因果反馈图。系统动力学模型讲系统动力学模型讲一阶正反馈回路 一阶是指一个水平变量 举例:已知人口的年增加值和总人口构成一阶正反馈回路,现假设人口的年增长率为2%,期初人口为10

14、0万。试构造因果反馈结构并进行计算机仿真模拟。 系统动力学模型讲手工仿真计算的前几步:仿真步长(年)仿真步长(年)总人口(总人口(P P)年增长人口数(年增长人口数(R1R1)0 01001002 21 11021022.042.042 2104.04104.042.08082.08083 3106.1208106.12082.1222.122系统动力学模型讲系统动力学模型讲(1)birth=birth rate* populationUnits: Year(2)birth rate=0.02Units: *undefined*(3)FINAL TIME = 100Units: YearThe

15、 final time for the simulation.(4)INITIAL TIME = 0Units: YearThe initial time for the simulation.(5)population= INTEG (birth,100)Units: *undefined*(6)SAVEPER = TIME STEPUnits: Year 0,?The frequency with which output is stored.(7)TIME STEP = 1Units: Year 0,?The time step for the simulation.注释:注释:INTE

16、GRAL:积分积分即即population是是birth的积分,的积分,初始值为初始值为100。SAVERPER:the frequency with which values are saved for latter displayTME STEP:the integration solution interval.系统动力学模型讲系统动力学模型讲Time (Year)population Runs:0 10011022104.043106.1214108.2435110.4086112.6167114.8698117.1669119.50910121.89911124.33712126.8

17、2413129.36114131.94815134.58716137.27917140.02418142.82519145.681系统动力学模型讲一阶负反馈回路 举例:一个基本的库存控制系统。现假设初始库存量为 1000吨,期望库存量为6000吨,由当前库存量调整到期望库存量所需要的时间AT为5周,试构造因果反馈结构并进行计算机仿真模拟。 系统动力学模型讲手工仿真计算的前几步:手工仿真计算的前几步: 仿真步长仿真步长(周)(周)库存量变化值库存量变化值CI=OR*DTCI=OR*DT现在库存量现在库存量I IL=I.J+CI.KL=I.J+CI.K定货速率定货速率OR=(6000-OR=(60

18、00-I)/5I)/5库存差额库存差额IE=DI-IIE=DI-I0 01000100010001000500050002 22000200030003000600600300030004 41200120042004200360360180018006 672072049204920216216108010808 843243253525352130130648648系统动力学模型讲水平变量是库存量,记为I。订货速率为OR,OR可以为正,也可为负。正的表示订货增加库存量,负的表示将现有的库存量退回供应部门以减少库存量。系统的目标是要求的库存量,记为DI。由当前库存量调整到期望库存量所需时间,

19、记为AT系统动力学模型讲一阶负反馈回路:库存量模拟结果Current表示调整时间为2天run2表示调整时间为1天系统动力学模型讲总结:两种反馈回路一阶正反馈回路具有自自我我加加强强的作用,对系统起强化作用,经过若干年后总人口数会越来越多,每年增加的人口数也相应地越来越多。一阶负反馈回路具有自我平衡自我平衡的作用,经过若干时间(周、天)后,库存量会越来越接近于期望库存量,定货速率也相应地越来越小,库存差额相应地减小。 系统动力学模型讲画出系统的因果反馈图是建立系统动力学的数学模型的基础。1.在因果反馈图中采用名词,不用动词。变量之间的影响和作用用以带箭头的因果链表示。2.明确变量增减的涵义。3.

20、尽可能确定变量的量纲,这有助于突出因果反馈图中文字叙述的涵义。4.反馈结构一定形成闭合回路。5.画好各子模型中的反馈回路,区别正反馈还是负反馈,不能产生差错。系统动力学模型讲系统动力学仿真的基本步骤系统动力学仿真的基本步骤 明明确确系系统统仿仿真真的的目目的的确确定定系系统统的边界的边界确确定定系系统统因因素素之之间间因果关系因果关系建建立立系系统统动动力力学学模模型型计计算算机机仿仿真实验真实验结结果果分分析析和和模模型型修修正正系统动力学模型讲Vensim软件介绍1.界面及工具2.建立因果反馈图( causal loop diagrams )和流图( Stock and Flow Diag

21、rams )3.模拟过程4.函数:LOOKUP、TIME、STEP系统动力学模型讲What is Vensim?Vensim is a visual modeling tool that allows you to conceptualize, document, simulate, analyze, and optimize models of dynamic systems. Vensim provides a simple and flexible way of building simulation models from causal loop or stock and flow d

22、iagrams.By connecting words with arrows, relationships among system variables are entered and recorded as causal connections. This information is used by the Equation Editor to help you form a complete simulation model. You can analyze your model throughout the building process, looking at the cause

23、s and uses of a variable, and also at the loops involving the variable. When you have built a model that can be simulated, Vensim lets you thoroughly explore the behavior of the model.-Vensim Users Guide Version 5系统动力学模型讲1.界面及工具系统动力学模型讲标题Title Bar菜单菜单Menu系统动力学模型讲Toolbar系统动力学模型讲绘图工具绘图工具Sketch Tools状态

24、条Status Bar系统动力学模型讲Structural Analysis ToolsCauses Tree creates a tree-type graphical representation showing the causes of the Workbench Variable.因果树图Uses Tree create a tree-type graphical representation showing the uses of the Workbench Variable.使用树图Loops displays a list of all feedback loops passi

25、ng through the Workbench Variable.反馈图Document reviews equations, definitions, units of measure, and selected values for the Workbench Variable.Dataset Analysis ToolsCauses Strip Graph displays simple graphs in a strip, allowing you to trace causality by showing the direct causes (as shown) of the Wo

26、rkbench Variable.显示与所选择变量有直接关系的变量的模拟结果Graph displays behavior in a larger graph than the Strip Graph, and contains different options for output than the Strip Graph.Table generates a table of values for the Workbench Variable.Runs Compare compares all Lookups and Constants in the first loaded datase

27、t to those in the second loaded dataset.分析分析工具工具系统动力学模型讲Analysis Tool Output系统动力学模型讲控制板控制板The Control PanelThe Control Panel allows you to change internal settings that govern the operation of Vensim, such as which Workbench Variable is selected or what Datasets are loaded.系统动力学模型讲2. 建立因果反馈图( Causal

28、 loop diagram)和建立流图(Stock and flow diagram)1)建立因果反馈图()建立因果反馈图(causal loop diagrams):):以以Savings-Interest为例为例演示演示系统动力学模型讲3种分析工具:Cause Tree ; Uses Tree;Loops,分析因果反馈图的逻辑结构两个图经由变量两个图经由变量savings的因果关系而连接,刚好分别前后对的因果关系而连接,刚好分别前后对调;当反馈环向后回到该变量,则用括号括起来。调;当反馈环向后回到该变量,则用括号括起来。系统动力学模型讲确定savings为变量后,点击Loops,列举全部有

29、关该变量的因果反馈图 Loop Number 1 of length 1 saving interestLoop Number 2 of length 2 saving work effort income系统动力学模型讲因果反馈图只能描述反馈结构的基本方面,不能表示不同性质的变量的区别,这是其根本弱点。如状态变量的积累概念,是系统动力学中最重要的量,然而因果反馈图全然忽视了这一点。因此,需要建立流图。系统动力学模型讲2)建立流图(Stock and Flow Diagrams ) -以workforce-inventory为例construct Inventory as a Level, t

30、hen add a rate flowing in and a rate flowing out. Now we need to figure out how production gets determined.add the level Workforce. net hire rate can either increase or decrease the workforce. 系统动力学模型讲 add the proportionality constant productivity. Also, net hire rate is dependent on the value of Wo

31、rkforce. add in the variables target workforce and time to adjust workforce and connect them.系统动力学模型讲Add the concept of target production, and connect it to target workforce. We will set target production on the basis of sales.系统动力学模型讲 introduce target inventory, inventory correction and two additio

32、nal Constants. The idea is simple .target inventory is the amount of stock that should be held based on expectations about sales. The inventory correction is the correction for a deviation of Inventory from its target. 系统动力学模型讲3. 模拟:以workforce-inventory为例The following steps are typical for building

33、and using Vensim models.Construct a model or open an existing model.Examine the structure using the structural Analysis tools (Tree Diagrams.).Simulate the model moving around model parameters to see how it responds.Examine interesting behavior in more detail using the dataset Analysis tools (Graphs

34、 and Tables).Perform controlled simulation experiments and refine the model.Present the model and its behavior to your audience using SyntheSim results, Analysis tool output customer Graphs and Tables.系统动力学模型讲1) open an existing model:c:Program FilesVensimmodelsguidechap03WFINV.MDL系统动力学模型讲2)Examine

35、the structure using the structural Analysis tools (Tree Diagrams.).Causes Tree Diagram(Workbench Variable, Inventory, is on the right and everything that causes it to change (up to 2 connections distant) is on the left.)系统动力学模型讲the Workbench Variable on the left and where it is used in the model (wh

36、at it causes change, up to 2 connections distant) on the right.Uses Tree Diagram系统动力学模型讲the Loops Analysis tool:variable net hire rateLoop Number 1 of length 1 net hire rate WorkforceLoop Number 2 of length 6 net hire rate Workforce production Inventory inventory correction target production target

37、workforce displays all variables in all feedback loops (two) that pass through the Workbench Variable (net hire rate).系统动力学模型讲3)Simulating the Model:amount of Inventory over time.Double click on the simulation Runname editing box on the Toolbar to highlight the default name Current (or click once an

38、d drag over the name Current), then type in the name baserun.Click on the SyntheSim button系统动力学模型讲Double click on the simulation Runname editing box on the Toolbar again and replace the name baserun with experiment.Using the mouse drag the slider below productivity back and forth. As you move the sl

39、ider the model will simulate and the results will display in blue, with the results from baserun being shown in red.系统动力学模型讲4)Examining BehaviorPosition the mouse over Workforce and leave it there. A graph should pop up just below workforce.系统动力学模型讲Click on Workforce to select it into the Workbench.

40、 Click on the Graph Analysis toolTwo things are worth noting about the above graph. First both runs show a pattern of behavior known as damped oscillation. Second, the two runs are identical except for scaling.系统动力学模型讲Click on the variable Inventory appearing in the sketch and then click on the Grap

41、h toolWe see a graph of Inventory with oscillating behavior similar to workforce, although Inventory starts out by declining before increasing in value. More importantly, there is only one graph visible.系统动力学模型讲Click on the Table toolOnly one graph line is visible for Inventory because the values ar

42、e identical for both runs. Changing productivity impacts only Workforce, target workforce and net hire rate. This is quite clear just by looking at the model diagram as you drag the slider and occurs because productivity really just scales the number of people required to produce one item.系统动力学模型讲Cl

43、ick on the Reset Slider button or press the Home key to return the value of productivity to its original setting.Repeat the above experimentation process with each of the three remaining constants. Drag the sliders observing behavior and then bring up more detailed graphs when you see something inte

44、resting.系统动力学模型讲The things to be looking for when you are evaluating behavior are the period of oscillation(振动), the extent by which variables change and the degree of damping(衰减). The period of oscillation is the time from one peak to the next on the time graphs. Damping is the decrease in amplitud

45、e that occurs from peak to peak, where amplitude is the distance along the y axis from the eventual value the variable settles to. It should be easy to see that productivity and inventory coverage do not significantly change these while time to adjust workforce and time to correct inventory do.系统动力学

46、模型讲time to adjust workforce系统动力学模型讲5)Causal TracingJust as you looked at the causes of Inventory by using the Causes Tree Diagram Analysis tool, you can also look at graphs of behavior of the variables that cause Inventory to change.系统动力学模型讲Click on the Reset All button or use the key combination Ct

47、rl+Home.Click on Inventory to select it into the workbench. Click on the Causes Strip Analysis toolA strip graph is generated that shows the Workbench Variable (Inventory) at the top, and all the variables that directly cause Inventory to change below it (production and sales).we will look into prod

48、uction and not sales to understand the source of this oscillation.系统动力学模型讲Causal Tracing is a quick and powerful tool that helps us determine what portions of a model are causing which types of behavior. The Causes and Uses Tree Diagrams and the Table tool can all be used for Causal Tracing but the

49、most commonly used tool is the Causes Strip tool and we will use that to investigate the sources of oscillation in this model.系统动力学模型讲4.几个常用函数:LOOKUP、TIME、STEP1)LOOKUP:说明在一个模拟模型中任意两个变量之间的函数关系;可以描述一个表格包含两个变量的一组值。比如,改变原储蓄存款模型(Saving-Interest)。当存款少于5000¥,利率为5;存款不少于5000¥,利率为7 。相当于原来DYNOMA 中的table函数系统动力学

50、模型讲演示演示系统动力学模型讲2)TIME变量一些Vensim功能明显是时间函数,为了使用这一功能,在模型中必须使用TIME当作函数。比如,对某些产品100单位振幅与12个月季节变化需求。时间以月为单位。Variable Demand=100*sin(2*3.14159*Time/12) 演示演示系统动力学模型讲注意:Time 用符号包起来,表示它是一个隐藏式变量系统动力学模型讲3)STEP函数阶跃函数产生一个从零到给定值的一次阶跃。比如WFINV.MDL中sales=100 + STEP(50,20)The STEP function is one of the most commonly

51、used input functions. This function returns 0 until Time reaches stime and then it returns sheight. In our example it will return 0 till time 20 then it will return 50 so that sales will start at 100, remain constant till time 20 and then jump to 150. 系统动力学模型讲系统动力学模型讲Time (Month)Time (Month)salessal

52、esTime (Month)Time (Month)salessalesTime (Month)Time (Month)salessales0 01001001 1100100212115015041411501502 2100100222215015042421501503 3100100232315015043431501504 4100100242415015044441501505 5100100252515015045451501506 6100100262615015046461501507 7100100272715015047471501508 8100100282815015

53、048481501509 910010029291501504949150150101010010030301501505050150150111110010031311501505151150150121210010032321501505252150150131310010033331501505353150150141410010034341501505454150150151510010035351501505555150150161610010036361501505656150150171710010037371501505757150150181810010038381501505858150150191910010039391501505959150150202015015040401501506060150150系统动力学模型讲作业:1.阅读现代地理学中的数学方法P370-3782.试构造一个问题的因果反馈结构(要求至少包括正负反馈回路各一个)3.熟悉下周上机内容:VensimUsersGuideP11-22;P23-40;P75-P90系统动力学模型讲

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 资格认证/考试 > 自考

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号