Presentation is loading. Please wait.

Presentation is loading. Please wait.

Use of Matlab for Analysis and Plotting of Accoustic Well Data.

Similar presentations


Presentation on theme: "Use of Matlab for Analysis and Plotting of Accoustic Well Data."— Presentation transcript:

1 Use of Matlab for Analysis and Plotting of Accoustic Well Data

2 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Home Open and converting data Open and converting data Operators and comands Operators and comands Handling graphics Handling graphics Start Matlab M-files Start Matlab M-files Introduction Program Exercise Program Exercise Resources Quiz

3 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Introduction MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation MATLAB is an interactive, matrix based system whose basic data element is an array that does not require dimensioning. This allows you to solve many technical computing problems, especially those with matrix and vector formulations, in a fraction of the time it would take to write a program in a scalar non interactive language such as C or Fortran However, the speed when running a Matlab script or function may be described as ”slow as a turtle” compared to Fortran (”fast as a rabbit”) The name MATLAB stands for MATrix LABoratory. Matlab may … More

4 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Introduction MATLAB may be used directly from the command window, but you should use m-file programming. This is quite similar to Fortran programming but the file is denoted.m rather than.f There are two types of m-files; scripts and functions, where the first is the simplest and easiest-to-use. When you invoke a script, MATLAB simply executes the commands found in the file. Scripts can operate on existing data in the workspace, or they can create new data on which to operate. In addition, scripts can produce graphical output using functions like plot.

5 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Start Matlab There are two ways you can start Matlab : 1.In Windows from your Start Menu 2.In Unix, logged on Petra, simply write matlab in the terminal window Creating m-files in: 1.Windows: when you have started matlab, click file-> new-> m-file 2.Unix: use a text editor, emacs is preferred (type emacs file.m) Running m-files: type the name of the file (without.m; if the filename is test.m, type test) in the matlab command window and hit enter (both Windows and Unix)

6 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Open and Controlling Data When you have created an m-file, you should start your script by opening the file from which your data is to be imported For a file in ASCII format use the following command: fp = fopen( ’c33.dat’, ’ r ’) opens the file c33.dat and labels it fp For control of your data you should convert it into a matrix To do so, you should use the command [w,c] = fscanf(fp,'%e %e %e %e %e %e %e %e',[8, inf]) reads data from fp in e-format (%e) into the matrix w that has 8 columns and unknown number of rows (8, inf)

7 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Operators Arithmethic operators in matlab are the familiar expressions: + - / * ^ Note: If you want to perform an element by element operation of two or more matrices, instead of / * ^, use./.*.^ If you want to extract the first column from a matrix x and store it as the variable v, use the following command: z = x(1,:) If you want to make a new vector acimp(i)=vp(i)*rho(i), use: acimp = vp.*rho where vp and rho has already been defined

8 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Handling Graphics MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well as annotating and printing these graphs Creating a plot: plot(x, y) produces a graph of y vs x Multiple graphs in one figure: plot(x1, y1, x2, y2,...) Typically, you often want to plot several different plots in different windows for easy comparison. To do so use the command: figure(n)where n is the number of the figure Colors and Styles Subplots

9 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Colors and Styles It is possible to specify color, linestyle, and markers, such as plus signs or circles, with: plot(x,y,'color_style_marker') Color strings are 'c', 'm', 'y', 'r', 'g', 'b', 'w', and 'k'. These correspond to cyan, magenta, yellow, red, green, blue, white, and black. Linestyle strings are '-' for solid, '- -' for dashed, ':' for dotted, '-.' for dash-dot, and 'none' for no line. The most common marker types include '+', 'o', '*', and 'x'. Plot(x,y,’c:+’) plots a cyan, dotted line and places plus sign markers at each data point

10 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Subplots The subplot function allows you to display multiple plots in the same window: subplot(m,n,p) breaks the figure window into an m-by-n matrix of small subplots and selects the p’th subplot for the current plot. Subplots are best illustraded with an example Example

11 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Program Exercise In this exercise we will be using accoustic well logs from well C- 33 in the Gullfaks field. This well is one of few wells on Gullfaks that has also been logged some distance above the actual reservoir. In addition, shear wave velocities has also been logged. The file c33.dat (can be downloadedfrom the course homepage ), contains the following data: homepage  Column 1: Depth in meters  Column 2: P-wave velocity (m/s)  Column 3: Density,  (g/ccm)  Column 4: P-wave velocity for 10% water saturation  Column 5: Density,  for 10% water saturation  Column 6 :P-wave velocity for 80% water saturation  Column 7 :Density,  for 80% water saturation  Column 8 :S-wave velocity (m/s) Next

12 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Program Exercise 1.Use MATLAB to read all data from c33.dat to a matrice with 8 columns. Plot V p, V s and  as a function of depth. Plot the three curves below each other. 2.Use MATLAB to compute accoustic impedance (V p *  ) and shear wave accoustic impedance (V s *  ), and plot the two impedances either in the same plot or in to equal plots right below each other. This way, a comparison between the two curves can easily be made. 3.Compute the V p /V s ratio. Comment the deflections around top Kritt (ca 1675 m) and top Brent (1835 m). Also compute the difference in p-wave velocity between 10% and 80% water saturation as a function of depth.

13 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Program Exercise 4.In seismic AVO-analysis and inversion it is common to use Elastic Impedance. Elastic Impedance (EI) is defined as where Compute Elastic Impedance as a function of depth and make a plot where you plot both accoustic impedance and elastic impedance (vs depth). Assume that  is 30 degrees. Comment the difference between the two curves, again particularly around top Kritt and top Brent Useful Info Resources

14 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Resources The whole exercise in a printable format here Web sites: http://www.stud.ntnu.no/info/programmer/matte/matlab/matlab -info.html http://www.ntnu.no/itea.info/programvare/matlabdoc/rel11doc/t echdoc/basics/getstarted.html Short list of MATLAB Commands Useful Info

15 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Useful Info If you simply type a statement and press Return or Enter, MATLAB automatically displays the results on screen. However, if you end the line with a semicolon, MATLAB performs the computation but does not display any output. This is particularly useful when you generate large matrices. For example A = magic(100); As long as you do not want a computation to be shown on the screen, you should always include a semicolon at the end of each line Resources

16 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz This section includes a quiz on the topics covered by this module. The quiz is meant as a control to see if you have learned some of the most important features Hit object to start quiz (Depending on your connection, this may take a few seconds...) Quiz

17 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz General information Title:Use of Matlab for Analysis and Plotting of Accoustic Well Data Teacher(s):Professor Jon Kleppe Assistant(s):Per Jørgen Dahl Svendsen Abstract:Provide a good background for solving problems within petroleum related topics using numerical methods 4 keywords:Matlab, Seismic Data, Visualization Topic discipline: Level:2 Prerequisites:None Learning goals:Develop problem solution skills using computers and numerical methods Size in megabytes:0.7 MB Software requirements:MS Power Point 2002 or later, Flash Player 6.0 Estimated time to complete: Copyright information:The author has copyright to the module and use of the content must be in agreement with the responsible author or in agreement with http://www.learningjournals.net. About the author

18 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz FAQ No questions have been posted yet. However, when questions are asked they will be posted here. Remember, if something is unclear to you, it is a good chance that there are more people that have the same question For more general questions and definitions try these Dataleksikon Webopedia Schlumberger Oilfield Glossary

19 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz References ”Getting started with Matlab” http://www.ntnu.no/itea.info/programvare/matlabdoc/rel11doc/te chdoc/basics/getstarted.html

20 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Summary Subsequent to this module you should...  be familiar with Matlab and how to use it to visualize computed data  know how to use scripts in Matlab

21 FAQReferencesSummaryInfo Resources Introduction Start Matlab Open and controlling data Operators Handling Graphics Program Exercise Useful Info Quiz Example See the plots this matlab script would produce: Figure 1 Figure 2 Back


Download ppt "Use of Matlab for Analysis and Plotting of Accoustic Well Data."

Similar presentations


Ads by Google