1、Differential Equation Models东华大学信息学院自动化系 陈亮 office:信息学院楼:信息学院楼522室室2014-12By L. Chen2建模概述建模概述 机理建模机理建模 Analytical reasoning: the ability to write down mathematical expressions that represent a system; Computational skills: the ability to use a computer to either evaluate or predict characteristics o
2、f a model that are too challenging to solve analytically; (Physical) knowledge: crucial ability to think critically about analysis and computations in the context of real (, physical) knowledge about the world. 实验建模实验建模 System Identification Data ScienceBy L. Chen3Everything is the Same Modeling Eng
3、ineered SystemsSource: www.coursera.orgBy L. Chen4By L. Chen5By L. Chen6Spring-damper-mass mechanical system Idea component: Whenever the spring is in extension, its position xs is defined to be positive; Whenever a damper is in extension, its velocity vd is defined to be positive. The acceleration
4、of a mass is defined to be positive to the right; the external forces are always positive if they are acting to the right. The only allowed motion is horizontal motion. By L. Chen7Case1: without mass Ordinary differential equation (ODE) Linear, constant coefficient, first ordersdxv( )( )dxxf xdt0ext
5、for F0extfor F减震器、弹力绳E.g.By L. Chen8Numerical Solution - Euler Integration( )xf x Euler integration is the easiest method for numericaly approximating a solution to an ODE, but there are certainly other options; Euler integration doesnt do a very good job, but if you make dt small enough, you will a
6、lways end up approximating the limit well enough.By L. Chen9Example:By L. Chen10By L. Chen11Analytic Solution - Exponential solutionsFor linear, constant coefficient, first order ODEs:( )xf xh = ?E.g.Plot By L. Chen12By L. Chen13 If I extend the spring-damper system by 0.5 units, then I will see it
7、move forever, which of course a real system will never do. This is largely because damping tends to be nonlinear at very low velocity - suggesting we can never fully believe our analytical models or computational models - but the solution will capture the behavior of many spring-damper systems.物理解释:
8、By L. Chen14欧拉积分欧拉积分-评注评注 Euler integration allows us to approximate solutions to ODEs whether they are linear or not so long as dt is small enough. Euler integration requires having an initial condition to get started.By L. Chen15Superposition The principle of superposition: for the linear system.
9、Superposition: if I give you two solutions regardless of how I obtained them you can get a whole bunch of potential solutions from those two a really powerful idea. By L. Chen16叠加原理叠加原理-解释解释 Example: The principle of superposition: if x1(t) and x2(t) are both solutions to the same linear ,constant c
10、oefficient, first order ODE, then: is a solution, where and are constant numbers, even can be imaginary numbers.By L. Chen17叠加原理叠加原理-验证验证E.g.E.g.By L. Chen18 Why would you need to do this? You might have already calculated the solution for one initial condition, and then someone tells you that the o
11、riginal initial condition was wrong and you need to do it again for a new initial condition. For a simple system, you would probably just calculate the whole solution again, but as systems get more complex - if there were thousands or millions of spring-damper components all connected together - rec
12、omputing the solution might take a very long time.By L. Chen19Case 2: with mass Second-order ODE F are the forces acting on a point, defined to be positive if they are acting to the right; The acceleration a is the first time derivative of vm of the point; vm of the mass is measured relative to the
13、left wall.Shocks on a car or bicycle符号说明:符号说明:By L. Chen20To use Euler integration and the analytic exponential solutions, we need to convert this system to a first-order ODE.E.g.?x By L. Chen21Case 3: with several masses 12xv22va44va( )xxfBy L. Chen22 The first-order ODE with four states. The numbe
14、r of first-order equations you get will go up with the number of masses. Typically, you should expect to have two equations for every mass. The total distance between walls, L, is playing the role of an external force in the equation, and this is quite common any time there is a constraint between v
15、ariables.Same k and same m =1几点说明:几点说明:By L. Chen23About oscillation When you have mass you should expect the possibility of oscillation.1123( )cos2tx tcet( )xf xSolution e.g.Same to sin()By L. Chen24How to get oscillation Exponential solutions for linear, constant-coefficient, first-order ODEs How
16、do we get an exponential function to give us cos() and sin() ? 123( )cos2tx tcet0( )ktbx texBy L. Chen25Imaginary numbers and Eulers formula Taylor series expansion: cos()sin()htettEulers formula:By L. Chen26 Eulers formula : Example: the spring-mass system( )htx tce( )kjthtmx tcece( )cossinkkx tctj
17、tmmHow to get rid of j because the state x doesnt involve imaginary number.By L. Chen27( )cossinkkx tctjtmm1( )cossinkkx tctjtmm2( )cossinkkx tctjtmm33( )coskx tctm44( )sinkx tctm512( )cossinkkx tctctmmSuperpositionBy L. Chen28 The imaginary number j comes from wanting the exponential function to re
18、present oscillation. With it, we can assume an exponential function is the solution to a linear, constant-coefficient ODE and plug into the OED to obtain a solution.By L. Chen29Imaginary numbers continued Spring-mass-damper system:( )htx tceOscillate foreverImaginary numbers can be as a way of encod
19、ing oscillation into the exponential solution of an ODE. But most systems do not just oscillate forever they typically experience decaying oscillation due to damping.By L. Chen30( )htx tceNo oscillation, overdamped 35352212,ttx tcextce 13132212,jjttx tcextce Decaying oscillation, underdamped E.g.E.g
20、.By L. Chen31 13132212,jjttx tcextce 1251233( )cossin22tx tectct1Exponential solutions with imaginary numbers can both represent oscillation and decaying oscillation.By L. Chen32Vector and matrix representations Lots of springs, dampers and masses all connected together - vector and matrix represent
21、ationsBy L. Chen33Vector and matrix representations are really, really useful for organizing information. The more complex a system is, the more useful this notation becomes.E.g.By L. Chen34Vector solutions to ODEs A spring-mass-damper system with three masses: Six states total: three for the positi
22、ons of each spring, three for velocities of each mass.eigenvalue, eigenvectorh is a number and w0 is a vectorBy L. Chen35(Scaled eigenvectors)E.g. MATLABBy L. Chen36By L. Chen37 Eigenvectors and eigenvalues provide the means by which we compute those solutions as exponential solutions. We are able t
23、o compute any solution of a differential equation from the exponential solutions for each eigenvector-eigenvalue pair.By L. Chen38By L. Chen39By L. Chen40手抓取动作建模手抓取动作建模By L. Chen41By L. Chen42Nonlinear springBy L. Chen43By L. Chen44Each line represents a different muscle path.The external force is c
24、ontrolled to make the hand move.By L. Chen45站立站立-倾斜姿势建模倾斜姿势建模By L. Chen46Double inverted pendulum二级倒立摆二级倒立摆By L. Chen47By L. Chen48跑步姿势建模跑步姿势建模By L. Chen49A normal double pendulum + A single inverted pendulumBy L. Chen50Modeling electrical components Voltage V as an effort variable just like force i
25、n mechanical systems; The charge q is like the energy stored in a mechanical spring; The current I is the flow of charge from one part of the circuit to another part of the circuit. The idea system, e.g. The capacitor will be instantly charged because its voltage VC will be instantly equal to the ba
26、ttery voltage VBBy L. Chen51Capacitor Spring, Resistor Damper, Battery - External ForceKirchoffs lawsWe can use all the same tools as before: Euler integration, analytical solutions, superposition.基尔霍夫定律基尔霍夫定律By L. Chen52By L. Chen53? - Mass近似于机械系统:近似于机械系统:Capacitor - SpringResistor - DamperBy L. Ch
27、en54Inductor - MassBattery - External forceBy L. Chen55Mechanical/electrical analogiesWe often use our physical knowledge about one system to reason about another. For instance, we know that mechanical systems can oscillate if damping is low, and from that we might reason that electrical systems can
28、 oscillate with low resistance but only if there is an inductor to play the role that mass would play in a mechanical setting. In what sense are they equivalent? ODEBy L. Chen56几组相似系统几组相似系统By L. Chen57Analogs between electrical and mechanical systems are a powerful way of gaining intuition and apply
29、ing the physical knowledge you have about one type of system to the other types of systems that are equivalent.几组相似系统几组相似系统By L. Chen58Interpretation of mathematical expressions as physical systemsData means what ?A解解 h:By L. Chen59These two states are independent of each other and are fist-order.By
30、 L. Chen60The matrix has two states that depend on each other in the upper left and two states in the bottom right.By L. Chen61The system has the dynamics of the two masses like the previous example, but also has terms in the upper right and lower left. This means that the masses in the mechanical s
31、ystem must be coupled with each other.By L. Chen62Everything is the same - almostAnalog simulationOne mechanical analog : a series of spinning masses with torsional damping between them扩散扩散系统系统By L. Chen63 Mechanical, electrical and chemical systems are not always the same! We saw before that mechan
32、ical and electrical systems are sometimes the same if the components match up well. The relationship between mechanical, electrical and chemical systems means that we can use these physical analogies to understand how charge will diffuse through a circuit or how energy in a mechanical system will di
33、ffuse through its elements. Understanding analogies between systems provides us with a way of connecting analytical reasoning with computation, and computation with our physical knowledge, and our physical knowledge back to the analytical reasoning. The ability to connect these different ideas and intuitions to make decision.
侵权处理QQ:3464097650--上传资料QQ:3464097650
【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。