《学位论文—基于matlab测量平差程序设计-创新实践报告.doc》由会员分享,可在线阅读,更多相关《学位论文—基于matlab测量平差程序设计-创新实践报告.doc(44页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、创 新 实 践 报 告实践名称:基于MATLAB测量平差程序设计 系部名称: 测绘工程学院 专业班级: 测绘工程11-6班 学生姓名: 学 号: 指导教师: xxx工程学院教务处制实践项目 基于MATLAB的测量平差程序设计实践日期2014-2015(1)17-20周实践地点xxx工程学院同组人数1实践类型 传统 现代 其 他 验证性 综合性 设计性 其 他自立式 合作式 研究式 其 他一、创新实践研究的背景及意义Matlab软件是从Matrix(矩阵)和Laboratory(实验室)各取前三个字母组成,意思是矩阵实验室,是美国Mathworks公司于20世纪80年代推出的一种交互式面向对象的
2、科技应用软件,是一个为科学和工程计算而专门设计的高级交互式软件包。Matlab集成了图示与精确的数值计算,是一个可以完成各种计算和数据可视化的强有力工具,其优秀的数值计算能力和卓越的数据可视化能力使其很快的在数学软件中脱颖而出,成为以矩阵运算为主要的线性代数、概率论、数理统计、自动调控、数字信号处理、动态系统仿真等领域教学和科学工作者的有力武器。测量平差数据处理主要是基于矩阵的运算,常用的矩阵运算主要是矩阵的生成、转置、求逆和矩阵求广义逆等。在Matlab环境中,不需要对创建的变量对象给出类型说明和维数,所有的变量都作为Matlab中的M文件的语法与其他的高级语言类似,是一种程序化的编程语言,
3、同时也是一种解释性的编程语言,即逐行解释运行程序,使程序容易调试,计算更为简捷,而且对于平差原理理解和掌握变得更容易。另外,Matlab语言与数学语言比较接近,更容易掌握和理解。实际测量工程中,测量平差是非常重要的一项工作,控制网测量数据的平差处理必不可少。然目前市场上成熟的商业平差软件很多,但一般都需要准备特定格式的数据文件,将计算的过程完全封装,包括条件方程、误差方程的列立都不需要用户关心,这一方面大大减轻了计算量;但另一方面,不利于计算者了解平差的内部过程,也就不容易发现错误,因此在某工程科研项目研究中,研究人员往往还需要根据项目研究的实际需求,自主开发平差程序。二、实践仪器设备 CAI
4、测量平差软件,MATLAB语言等。三、实践内容、成果及参考文献 本次实践的内容是基于MATLAB的测量平差程序设计,随着计算机技术、网络技术的飞速发展,人类已进入以信息化为主要特征的新经济时代,信息化是当今世界经济和社会发展的趋势.程序的开发及实现:程序运行主界面如图1所示: 图1程序主界面有“条件平差”、“间接平差”、“设置保存”三个选项卡,选取前两项时,会弹出对应的平差步骤窗口,按步骤提示,可以对照进行手工平差计算,方便了解平差解算的过程和获得过程参数的大小。变量定义及赋值公共变量定义:DimP As Matri权阵Dim V As Matri 改正数向量条件平差变量定义:Dim A As
5、 Matri条件方程系数阵Dim W As Matri闭合差向量Dim Naa As Matri 法方程系数DimK As Matri联系数向量间接平差变量定义:Dim W As Matri误差方程系数阵Dim l As Matri常数项向量Dim Nbb As Matri法方程系数Dim x As Matri参数改正数向量根据矩阵行、列大小,将输入到表格中的各单元格数值赋值给矩阵变量 For j=1To Vak(Text1,Text) 矩阵的行数For j=1To Vak(Text2,Text)矩阵的列数B.r2(i,j)=Val(xSheet.Cell(i,j)) 矩阵元素赋值NextjN
6、exti参考文献:武汉大学测绘学院测量平差学科组误差理论与测量平差基础武汉:武汉大学出版社,.聂俊兵 测量平差 北京:测绘出版社, 孟德欣,谢婷,王先花 程序设计 北京:清华 大学出版社, 张景,张换香,石琳 在 中的数学调用 及实现 方 法 兰 州 大 学 学 报 (自 然 科 学 版), , 罗刚君 程序开发自学宝典 北京:电 子工业出版社, 四、实践中存在的问题、解决方法及进一步的想法等本次的实习中为了搜集更多的资料与文献,在学校的资料库中获取了很多相关的知识,但是在查找外文文献时就没那么容易了,相关的资料并没有那么丰富,并且还要把查回来的外文文献全部翻译过来,对于英语水平并不是很好的我
7、来说的确是一个比较艰难的任务,通过文献的查找丰富了我对课题内容的了解。之后就是把需要安装的软件装上,装软件的过程也比较复杂,每一个看似很好解决的问题在进行实际操作时总是会碰到一些想不到的困难,虽然装软件花费了比较长的时间但是还是成功的装上了。软件装完之后就是要熟悉软件的操作,对于这些软件来说使用和操作还是比较陌生的,虽说软件的功能非常的多但是对于我一个初学者来说掌握的就是九牛一毛,所以就去了图书馆借了几本有关MATLAB平差测量程序设计的教程和软件操作与应用的书来充实一下自己对软件操作这方面知识的欠缺。五、实践心得体会本次的实习是创新实习,根据自己毕业论文的选题而进行的创新探究,为下学期的毕业
8、论文做好基础的工作与想法。我研究的课题是基于MATLB测量平差的程序设计,使图数据制作和空间数据的维护更加方便,达到提高工作效率的目的。因为以后的工作就是内业处理一些数据,所以如果掌握好CAI和MATLAB语言这两种软件的话对以后的工作的帮助是非常大的,并且软件功能是非常强大的,利用这个软件可以解决生活中的很多问题。本次的实习让我对这些软件的使用有了很大的提高,在以后的日子里我会继续努力,在多掌握一些有关于软件的使用和应用,不仅是对本次的毕业设计做好准备也为今后的工作奠定了扎实的基础。六、教师评语成 绩指导教师签字: 年 月 日注:1、此报告为参考格式,各栏项目可根据实际情况进行调整;实验成绩
9、以优(90100)、良(8089)、中(7079)、及格(6069)、不及格(60以下)五个等级评定。附录1 外文参考文献原文参考文献一Improving oil fields recovery through real-time water flooding optimizationPamela Alessia Chiara MarescalcoPolitecnico di Torino, Land, Environment and GeoTechnologies Engineering Department,24, C.so Duca degli Abruzzi, 10129 Torino
10、, ItalySUMMARYIncreasing oil recovery from reservoirs is a strong urge. One of the most effective ways to get the result iswater flooding and thats why its application is nowadays widely used in the petroleum industry. Obviously,water flooding efficiency strongly depends on reservoir properties; thi
11、s makes simulating a water injectionprocess a priori an extremely important step of the reservoir production strategy. Simulation is commonlydone adopting a finite difference (FD) simulation approach.This paper explores a different and complementary approach, represented by streamline-based simulati
12、on,coupled with a tool to optimize water flooding campaigns and to help quick decision making. Inthe present study, water flooding simulation is performed via two commercial software: an FD and astreamline-based simulator, to highlight advantages and disadvantages of both simulation techniques indes
13、cribing a water injection campaign and to exploit the two approaches uniqueness in parallel.The final goal of iteratively converging to the optimal water flooding scheme, which is the core of thepresent work, is achieved through a customized Matlab script. The generated automatic procedure showsits
14、effectiveness in improving oil recovery, expediting decision making and saving time and FD simulationruns. A three steps workflow is outlined to get the best water flooding scheme for the examples shownbelow. Copyright q 2008 John Wiley & Sons, Ltd.Received 13 March 2008; Revised 1 September 2008; A
15、ccepted 8 November 2008KEY WORDS: water displacement optimization; FD simulation; streamline simulation; Matlab automatedroutine; real-time decision making; quantitative and iterative adjustment of water rates tobe injectedINTRODUCTIONIn the last decades water flooding has been widely applied in the
16、 petroleum field, both in mature and in newly developed fields, and its attractiveness lies in supporting the entire field pressureduring depletion and in improving the final oil recovery 13. The technique consists in injecting water with the purpose of displacing and therefore producing oil, especi
17、ally if the reservoir lacks an underlying aquifer able to counterbalance the depletion and to drive oil to the producer wells. To really understand a water flooding process and to predict its efficiency, it is useful to simulate it a priori. This is usually done via finite difference (FD) simulation
18、, which is able to describe any kind of existing reservoir very accurately, but unfortunately is not able to give enough details about the way the flow occurs throughout the field. Recent works 4, 5 have proposed a newly developed approach, based on streamline simulation, whose main attraction lies
19、in providing information not obtainable from FD simulation and useful for the purpose of improving reservoir performances.In the present study, water flooding simulation is performed via two commercial software: an FDand a streamline-based simulator, to highlight advantages and disadvantages of both
20、 simulationtechniques in describing a water injection campaign and to exploit the two approaches uniquenessin parallel. If FD simulation is essential to checking the streamline simulation results, the streamlinebasedsimulator is, on the other hand, an ideal tool to perform a procedure able to optimi
21、zewater injection. Then, the core of the work and its innovative approach lies in exploiting the twosoftware features in conjunction with the application of a customized Matlab code developed inorder to elaborate all the streamline simulation outputs, to calculate the changes to be made to theproduc
22、tion/injection constraints for the subsequent simulation run, so as to iteratively converge tothe optimal injection scheme for the reservoir under study. A three steps workflow is outlined toget the best water flooding scheme for the examples shown below.FD APPROACH VERSUS STREAMLINE SIMULATIONECLIP
23、SE is a complete and complex simulator, whose attractiveness resides in being able todescribe any kind of reservoir, including geological complexity, formation features, and fluidproperties. The simulator is based on a time and spatial discretization and solves a three-dimensionalequation by assigni
24、ng to all the parameters involved in the simulation a unique value, associated withthe entire cell, for every grid block. For models with a large number of cells, using FD relaxationcan be computationally heavy; therefore, a good balance must be kept between having sufficientaccuracy in describing t
25、he reservoir and keeping simulation time within reasonable limits 6.3DSL, on the other side, solves two different equations on two different grids and this is usuallyfaster than FD simulation, especially for large models: the pressure equation is solved implicitlyon the background grid (or pressure
26、grid), whereas the saturation equation is solved explicitly onthe streamline grid. This involves a minor effect of grid refinement on the results of the simulation,time-step limitations not as severe, thanks to a better stability of the geometrical grid, numericaldiffusion easier to control, faster
27、solutions with respect to FD approach 7.Streamline simulation solves mono-dimensional equations along streamlines, which means itsolves multiple streamlines in parallel, and the fluid transport, which for FD approach occursbetween grid cells 8, occurs along streamlines: this gives an immediate answe
28、r in terms of howthe streamlines (connecting injector and producer wellsto say, well pairs) are distributed, sothat the fluid trajectories and their rates at the wells are known at every time step 9, 10. Thanksto the available information, the distribution of injected water volumes can be modified,
29、and amore effective production strategy can be planned to maximize oil recovery 4, 5. Same as for FDsimulation, when using streamline-based simulation a good balance must be maintained betweenpressure updates and computational speed.In conclusion, 3DSL is simpler from a reservoir description (includ
30、es both flow physics andpetro-physical/geological information) point of view, but it cannot take into account importantparameters such as capillary pressure or cross flow effects: moreover, fluid compressibility cannot beeasily taken into account and mass conservation errors may occur while mapping
31、between pressuregrid and streamline grid therefore being incomplete or inadequate for most of real reservoirs. Everyfurther detail can be found in previous works 11.THE IDEA OF THE STUDYIn this paper the use of the two software as complementary tools to optimize water injectionis shown: ECLIPSE appe
32、ared to be the most reliable software to simulate reservoir models andto be essential to verify 3DSLs results accuracy upstream and downstream of the methodologydeveloped for this research, while 3DSL has been shown to be simpler and usually faster, providinginformation not obtainable by means of FD
33、 simulation, and which could be exploited to save atrial-and-error process trying to find the best injection schemeThe idea of the study resulted from previous works 12.The research presented here follows a three step workflow. In the first part of the study, thetwo software were used to simulate si
34、mple synthetic models. Once the results obtained from thetwo simulators were checked for consistency, a method was developed to exploit 3DSLs features.The most interesting pieces of information available from 3DSL are the connections between wellpairs (injector-producer) and the rates at the wells a
35、nd the connections. With this informatioavailable, the streamline simulator, coupled with Matlab, was involved into an automatic procedurethat reallocated water injected volumes in order to optimize water injection campaigns, for all the examined cases.This was gained by a customized Matlab script,
36、written for this specific purpose, which automaticallyinteracted with the streamline simulator, processed the input data supplied by the softwaregiving back new input rates to be used for the following simulation run. This was done for a fixednumber of runs to iteratively converge to the optimal inj
37、ection scheme. From preliminary analyses13 the procedure was shown to be effectiveEventually, in the third experimental phase, the last rates calculated from Matlab were inputinto ECLIPSE to check the procedures effectiveness and the added value in terms of oil recoveryimprovement.THE AUTOMATED PROC
38、EDURE AND THE EXPERIMENTAL METHODLets now focus on the second and main part of the experimental study which, as we said, consistedin writing a customized Matlab code. Streamline answers in terms of streamlines distribution(connecting injector and producer wellsor well pairs) and fluid rates at the w
39、ells are writtenat every time step in a 3DSL output file named .WAF, which is crucial for the entire codingdescribed below and for its application. The endeavor of the Matlab customized code is the optimization of the displacement processthrough a gradual reallocation of injected water rates, carrie
40、d out by increasing the water volumeinjected at the highly efficient connections and decreasing it at the poorly efficient connections.The term injection efficiency (for a well pair connection) stands for the ratio between offset oilproduced thanks to water displacement and the amount of water injec
41、ted at a certain well. In ananalogue manner the injection efficiency of an injector well is the ratio between offset oil at allproducers connected to it and the total water injected at the same well. The approach used forthe current application was aimed at increasing the oil production through a be
42、tter use of a givenwater volume available for injection. The Matlab code written for this purpose mainly works asfollows: the data needed for the procedure are read from 3DSLs output .WAF file and loadedinto Matlab environment, then they are processed throughout the code; eventually new rates forthe
43、 next simulation run are output to 3DSL. This is all done automatically with an approach aimedat maximizing oil production through a more efficient use of a given water volume available forthe injection 13. The code steps are here summarized 12:1st step consists in: establishing the number of iterat
44、ions to be run for the procedure of ratereallocation and their duration; fixing the volume of water to be injected and the target liquid rate.2nd step consists in: running a do nothing 3DSL simulation in order to choose a properstarting time for the entire procedure of rate reallocation (usually the
45、 reallocation starts whereas aproduction plateau starts).3rd step consists in: reading (within the Matlab environment, by means of functions coded onpurpose) from the .WAF file: rates (total rate for each injector well, and partial rate for eachproduction well connected to the injector); time; name
46、and number of injector or producer wellsand connections between them; number of existing connections in the model at any time step ofthe simulation.4th step consists in: calculating the injection efficiency for each well pair, for each injector well,and for the field (average injection efficiency).5
47、th step consists in: calculating for each iteration and for each injector well a new rate:Qnew i=(1+wi )qoldi (1)where i stands for the well, wi for the weight it has been assigned, and qoldi for the rate injectedat the well at the previous step.The average reference field injection efficiency (referred to as signed e) is a mean value:depending on its value, positi