MS Excel as Tool for Modeling, Dynamic Simulation and Visualization ofmechanical Motion

Similar documents
Microsoft Excel Tutorial

Analysis of the use of measurement systems using computers in a school science laboratory at primary schools in the Czech Republic

Interactive Animation: A new approach to simulate parametric studies

Journal of Engineering Science and Technology Review 2 (1) (2009) Lecture Note

Free Fall: Observing and Analyzing the Free Fall Motion of a Bouncing Ping-Pong Ball and Calculating the Free Fall Acceleration (Teacher s Guide)

Projectile motion simulator.

Below is a very brief tutorial on the basic capabilities of Excel. Refer to the Excel help files for more information.

FRICTION, WORK, AND THE INCLINED PLANE

Catapult Engineering Pilot Workshop. LA Tech STEP

Formulas, Functions and Charts

Physics Notes Class 11 CHAPTER 3 MOTION IN A STRAIGHT LINE

Projectile Motion 1:Horizontally Launched Projectiles

Adequate Theory of Oscillator: A Prelude to Verification of Classical Mechanics Part 2

0 Introduction to Data Analysis Using an Excel Spreadsheet

Microsoft Mathematics for Educators:

Mathematical Modeling and Engineering Problem Solving

Current Standard: Mathematical Concepts and Applications Shape, Space, and Measurement- Primary

Regression Clustering

A Guide to Using Excel in Physics Lab

Tutorial on Using Excel Solver to Analyze Spin-Lattice Relaxation Time Data

Chapter 10: Linear Kinematics of Human Movement

Engineering Problem Solving and Excel. EGN 1006 Introduction to Engineering

INTRODUCTION TO EXCEL

Appendix 2.1 Tabular and Graphical Methods Using Excel

IJSRD - International Journal for Scientific Research & Development Vol. 3, Issue 10, 2015 ISSN (online):

Using Microsoft Excel to Plot and Analyze Kinetic Data

Describe the process of parallelization as it relates to problem solving.

= δx x + δy y. df ds = dx. ds y + xdy ds. Now multiply by ds to get the form of the equation in terms of differentials: df = y dx + x dy.

Summary of important mathematical operations and formulas (from first tutorial):

Assignment objectives:

METHODOLOGICAL CONSIDERATIONS OF DRIVE SYSTEM SIMULATION, WHEN COUPLING FINITE ELEMENT MACHINE MODELS WITH THE CIRCUIT SIMULATOR MODELS OF CONVERTERS.

Plot and Solve Equations

Uniformly Accelerated Motion

Calibration and Linear Regression Analysis: A Self-Guided Tutorial

Estimating a market model: Step-by-step Prepared by Pamela Peterson Drake Florida Atlantic University

Economic Scenario Generator Version 7 Release Notes

Integrating Spreadsheet Templates and Data Analysis into Fluid Power Instruction

GeoGebra Statistics and Probability

Acceleration levels of dropped objects

Maximum Range Explained range Figure 1 Figure 1: Trajectory Plot for Angled-Launched Projectiles Table 1

Microsoft Excel. Qi Wei

The Technical Archer. Austin Wargo

Graphing Parabolas With Microsoft Excel

Excel Math Project for 8th Grade Identifying Patterns

Excel Guide for Finite Mathematics and Applied Calculus

Orbital Mechanics. Angular Momentum

In this tutorial, we try to build a roc curve from a logistic regression.

Intro to Excel spreadsheets

USING TRIANGULATIONS IN COMPUTER SIMULATIONS OF GRANULAR MEDIA

2After completing this chapter you should be able to

Energy transformations

Design-Simulation-Optimization Package for a Generic 6-DOF Manipulator with a Spherical Wrist

Robotics and Automation Blueprint

APPLIED MATHEMATICS ADVANCED LEVEL

Physics Midterm Review Packet January 2010

CS100B Fall Professor David I. Schwartz. Programming Assignment 5. Due: Thursday, November

SIMPLIFIED METHOD FOR ESTIMATING THE FLIGHT PERFORMANCE OF A HOBBY ROCKET

WEIGHTLESS WONDER Reduced Gravity Flight

CALCULATING WHEEL-OVER POINT

Guidelines for Completing the VDOT Form C 13CPM

USING MS EXCEL FOR DATA ANALYSIS AND SIMULATION

University of Southern California Marshall Information Services

NUMERICAL ANALYSIS OF THE EFFECTS OF WIND ON BUILDING STRUCTURES

Manual for simulation of EB processing. Software ModeRTL

E x c e l : Data Analysis Tools Student Manual

Monthly Payroll to Finance Reconciliation Report: Access and Instructions

Data representation and analysis in Excel

EXCEL Tutorial: How to use EXCEL for Graphs and Calculations.

All About Motion - Displacement, Velocity and Acceleration

MMGD0203 Multimedia Design MMGD0203 MULTIMEDIA DESIGN. Chapter 3 Graphics and Animations

MS Excel. Handout: Level 2. elearning Department. Copyright 2016 CMS e-learning Department. All Rights Reserved. Page 1 of 11

In search of Excellence Series Research - Study Material No. 18

Optimal Scheduling for Dependent Details Processing Using MS Excel Solver

The Center for Teaching, Learning, & Technology

Using Excel (Microsoft Office 2007 Version) for Graphical Analysis of Data

Figure 1. An embedded chart on a worksheet.

Mathematics Learning Activity Types 1, 2

Appendix A: REINFORCED STRUCTURE INTEGRITY MONITORING (RSIM) USER S MANUAL

Business Process Discovery

Parameter identification of a linear single track vehicle model

Recent Advances in Applied & Biomedical Informatics and Computational Engineering in Systems Applications

Chapter 14. Web Extension: Financing Feedbacks and Alternative Forecasting Techniques

1 FTire/editor s Main Menu 1

Plots, Curve-Fitting, and Data Modeling in Microsoft Excel

CHAPTER 5 PREDICTIVE MODELING STUDIES TO DETERMINE THE CONVEYING VELOCITY OF PARTS ON VIBRATORY FEEDER

Chapter 4 Displaying and Describing Categorical Data

Operational Space Control for A Scara Robot

How to program a Zumo Robot with Simulink

Vectors. Objectives. Assessment. Assessment. Equations. Physics terms 5/15/14. State the definition and give examples of vector and scalar variables.

SPINDLE ERROR MOVEMENTS MEASUREMENT ALGORITHM AND A NEW METHOD OF RESULTS ANALYSIS 1. INTRODUCTION

Polynomial Neural Network Discovery Client User Guide

Setting your session preferences

Proceedings of the 9th WSEAS International Conference on APPLIED COMPUTER SCIENCE

What is Multimedia? Derived from the word Multi and Media

USER S GUIDE for DSM@MIT

Web Extension: Financing Feedbacks and Alternative Forecasting Techniques

Penn State University Physics 211 ORBITAL MECHANICS 1

Effective Use of Android Sensors Based on Visualization of Sensor Information

Transcription:

MS Excel as Tool for Modeling, Dynamic Simulation and Visualization ofmechanical Motion MARIE HUBALOVSKA, STEPAN HUBALOVSKY, MARCELA FRYBOVA Department of Informatics Faculty of Science University of Hradec Kralove Rokitanskeho 62 CZECH REPUBLIC marie.hubalovska@uhk.cz, stepan.hubalovsky@uhk.cz Abstract: One of the most important tasks in teaching of mechanics is to use a suitable method for developing of theoreticallyacquired knowledge. Drawing on her own experience, the author has found that the best method to be used is the system approach.system approach is closely connected to the modeling,computer simulation and dynamic visualization. Theory of the systems, modeling and computer simulation are disciplines with its own theory and research methodology. Modeling and computer simulation (M&S) can be understand as one of the most important method in teaching of mathematics and simultaneously can be use as suitable method for practical developing of theoretically acquired knowledge. Case study, described in the paper, presentspossibility of dynamic visualization of mechanical motion trajectory of ballistic shot. The solution is demonstrated in MS Excel worksheet and chart. Key-Words:Animation, computer simulation, mathematical modeling, system approach, visualization. 1 Introduction The term developing of theoretically acquired knowledge can be connected with the terms system, model, computer simulation, dynamic visualization, animation or multidisciplinary approach, which are important in current approach to scientific, technological and professional practice. In this paper we first briefly introduce the theory of system approach, modeling,computer simulation and visualization as a method of multidisciplinary and system approach to education. Secondly we introduce a case study illustrating step by step process of developmentof computer simulation and dynamic visualization of mechanical motion trajectory of ballistic curve. 2 The system approach,modeling and computer simulation 2.1 System approach and education System approach, scientific modeling, computer simulation animation (or dynamic visualization) are the terms which are closely related. System approach enables description of the real processes, without which mathematical model and computer simulation model cannot be realized. From the education point of view the system approach can be applied: In the field of sciences - in case of models and simulations of science processes and phenomena; In the technical field - in case of the process control of machines and simple robots; In the humanities and social studies - in case of the processes and phenomena associated with this issue; In management - in case of the management processes and quality control processes. The other information on system approach in education can be found e.g. in [1], [2], [3] or [4]. 2.2 Multidisciplinary approach System approach, modeling and computer simulation of real processes are also closely related to multidisciplinary approach. Multidisciplinary approach generally means that specialized disciplines are applied in a study of real phenomenon. These disciplines provide partial analysis of the process. These mono-disciplinary analyses are integrated to overall solution by ISBN: 978-960-474-317-9 111

integrating the solver who has basic multidisciplines knowledge. scatter chart created in MS Excel program will be shown in the case study of this paper. 2.3 Modeling Modeling is a method that is often used in professional and scientific practice in many fields of human activity. The main goal of modeling is not only describing the content, structure and behavior of the real system representing a part of the reality but also describing the processes. The process can be understood as series of transformations that changes the input values to output values. From the system point of view the process is dynamic system in which the values of the characteristic of the system elements are changed under the influence of the external elements. The models are always only approaching of the reality, because the real systems are usually more complex than the models are. The system homomorphism is applied in the process of modeling, which means that each element and interaction between the elements of the model corresponds to one element and interaction of the modeled real system or real process, but the reverse is not true. The model is always to be understood as simplification of the original. If the relation of isomorphism is between the model and real system the original model we could not distinguish between the model and the original, which is discussed e.g. in [5] and [6]. The first step in the process of computer simulation is creation of mathematical model of the studied real system. Mathematical model can be represented in different way. The most used representations are: - Mathematical equitation; - Static or dynamic 2D or 3D scatter charts. In the paper both representation of the model will be presented. Mathematical equitations establish mathematical model of the studied real system or phenomenon. Mathematical equations as basics of the mathematical model adequately describe the dependency system outputs on its inputs. Mathematical models of real motion will be shown in the case study of this paper. Scatter charts (scatter plot)is a type of mathematical diagram using Cartesian coordinates to display values for two variables for a set of data in 2D types of the chart. Dynamic visualization of the dynamic properties of real phenomenon via 2D 2.4 Simulation The process of modeling is closely related to the simulation. Simulation can be understood as process of executing the model. Simulation enables representation of the modeled real system or real phenomenon and its behavior in real time by means of computer. The simulation enables also dynamic visualization and animation. A typical simulation model can be written both through specialized programming languages that were designed specifically for the requirements of simulations, or the simulation model can be created in standard programming languages. In our paper the dynamic simulation and visualization of the physical motion in MS Excel will be demonstrated. Similar problems are solved in e.g. [5], [6]. 3 Dynamic simulation, visualization and animation in MS Excel chart Before the modeling and dynamic simulation of the trajectory of the physical motion (ballistic curve) will be demonstrated in the case studies, the principle of the dynamic simulation and visualization in MS Excel has to be discussed. 3.1 Dynamic simulation chart Dynamic simulation chart is created based on the dynamic mathematical model. Dynamic mathematical model is model, which represents dynamic mechanical motion, e.g. the system which is time dependent. Time dependent system (time dependent motion) is based on the system theory such system, which changes its variables during the time. In sciences like mathematics, physics, chemistry we are speaking about the time dependent variables, which describe status of the system. 3.2 Visualization Term visualization is close related to the computer simulation. Visualization is a technique, which shows both input data and output data and its dependencies reached from the simulation model. Visualization helps data analysis and interpretation. ISBN: 978-960-474-317-9 112

Commonly used tools for visualization are 2D charts, tables, flowcharts, diagram etc. 3.3 Animation Special type of the visualization of the dynamic simulation data is animated diagrams. Animation generally means a way how a static image can be seemingly set in motion. The principle of an animation is recording of a sequence of images which slightly differ. During a quick viewing of subsequent images an impression of movement occurs, due to the phenomenon of the persistence of vision. The frequency of changing of individual images is proportional to the displacement of the object in consecutive images. There are many visualizations types of software, which enable animate dynamic simulation date. In the paper we will describe MS Excel us powerful tool for animation of time dependency variables in the scatter chart. The principle of the animation of the scatter chart in MS Excel is based on the change of one or more parameters of the charts input data of the dynamic objects or curves. The objects or curves step by step change its position in relation to the static baselines which are time dependence function of one or more parameters. A change of these parameters can be achieved by using so-called iterative calculation of values in the cell. 3.4 Iteration In general, iteration means repetition of certain activities - the word comes from the Latin iteretur - repeat. The iteration in mathematics and numerical methods is a process of applying a function f repeatedly, using the output value x n +1 of the function as input argument x n of the function in the next step. This can be written by mathematical formula the value of x is changing. The termination of the iterations is determined by the required accuracy - ε. The calculation will be terminated if the following condition is fulfilled: x 1 x < ε. (3) i+ i 3.5 Iteration in algorithm development and programming Iteration in algorithm development and programming means a repeated call of the function whereas the argument of the function is the result of the previous function call. In this sense, the iteration corresponds to the aforementioned case of recursively given sequences. The iteration in algorithm development and programming is therefore called recursion. An important part of recursion is a terminating condition which determines when the recursion is to be stopped. The recursion in programming is quite often used, as well as e.g. the assignment statement A:=A+2 can be understood as a form of recursion based on (13) with the number of repetition t max = 1. This expression means that the new variable value equals to the original value increased by 2. The iteration and its termination can be expressed in the form of the algorithm flowchart in Figure 1, where the following variables are used: NI - the number of the already done iterations; Xold - the value of the cell before the iteration; Xnew - the value of the cell after the iteration; MI - the maximum iterations; MC - the maximum change. It is clear that the terminating condition is given either by the maximum of iterations (13) or by condition (10). x n+ 1 = f ( xn ). (1) A typical example of the use of iterations is the numerical solution of nonlinear equations by the general iterative method - see e.g. [7]. A typical example of a nonlinear equation is the transcendental equation x = cos x. (2) To find the approximate solution, one has to properly set the initial value of x (e.g. x 0 = 1), to provide the iteration (x i + 1 = cosx i ) and to see how Fig. 1 Flowchart of termination of iteration ISBN: 978-960-474-317-9 113

3.6 Iteration /recursion in the MS Excel The circular reference can occur in the formula of the cell in the Excel sheet. This means that the formula in a cell refers to the value of the same cell, eventually that the formula of the cell refers to the value of another cell, which has a formula linking back to the original cell see Figure 2. Animation will be realized in motion of projectilealong ballistic trajectory. Ballistic trajectory is trajectory of the flight projectile moving in the air. The main forces acting on the projectile are gravity, and air resistance. Gravity imparts a downward acceleration on the projectile, causing it to drop from the line of sight. Air resistance, decelerates the projectile with a force proportional to the square of the velocity. During flight, gravity and air resistance have a major impact on the path of the projectile, and must be accounted for when predicting how the projectile will travel. Fig. 2 Examples of circular reference in MS Excel The value of such cells can be determined only by the iterative calculation. If such an iterative calculation is not possible in MS Excel option tools (default is disabled), the calculation will be executed and an error message will be shown. The iterative calculation in version of MS Excel 2007 can be enabled in the Excel Options dialog box (which is reached by clicking to the Excel option button in the main menu) in the folder Formulas see Figure 3. The Enable iterative calculation checkbox has to be checked. Fig. 3 Setting of iterative calculation parameters in MS Excel 4 Case study animation of motion of projectilealong ballistic trajectory Case study demonstrating animation of the two dimensionalxy - scatter chart will be introduced in the following text. 4.1 Mathematical model Before the principle of animation of the ballistic trajectory will be shown, the mathematical model of the problem has to be established. The ballistic trajectory is given by equitations of motion. The equitations of motion in the x, resp. y directionsare:, (4), (5) wherem is mass of the projectile, k is coefficient of the air resistance, a x resp. a y are accelerations, v x resp. v y are velocities and g is gravity acceleration. The equitations (4) and (5) can be solved either analytically or numerically. We will show in the paper numeric solution. Numeric solution is based on splitting the trajectory of the ballistic motion to number of the small time elementsdt. The solution is as follows: The initial conditions are:, (6), (7), (8), (9), (10), (11), (12) (13) (14) (15) (16) wherev 0 is initial velocity of the projectile shoot, α is angle of the shoot and h is initial height of the shoot. ISBN: 978-960-474-317-9 114

4.2 Setting of parameters and formulas for iterative recalculation In the following text the dynamic animation of the ballistic trajectory in MS Excel two dimensional XY scatter chart will be shown. Main parameter responsible for iterative recalculation is time t. The trajectory will be drawn step by step from time t = 0 with the time increment dt. The value of thetimetis saved in cell D2. Simultaneously the circular reference formula = D2 +D10, isentered into cell D2 This formula expresses that the value of time inb2 after one iterative recalculation step increases by the increment time dtvalue entered in cell D10 - iteration (animation) step. Iterative recalculation starts by pressing of F9 key. The number of the iteration steps is set by the value of Maximum Iterations. To make only one step of the iteration, defined by formula in cell D2, the value of Maximum Iterations has to be equal to 1,as is evident from the Figure 3. By repeated pressings, eventually by holding down the key F9, the value of cell D2 will step by step increase by the value of the animation step value in cell D10. If only the formula =D2 + D10 was entered to the cell D2 the value of D2 would after each iteration step still increase. It is therefore necessary to determine the terminating condition, i.e. minimum and maximumtime limits. Minimum time is t = 0 s. Maximum animation timet max is given by time, when y coordinate of the projectile is less then 0. This can be done by adding the following condition to formula in cell D2: =IF(MIN($S:$S)<0;0;D2+D10). This condition compares the values of y stored in rows ofcolumn S. If the condition is true (first y value is less then 0) the value of D2 changes to the 0. Otherwise, the iterative calculation is carried out and the value of D2 cells increases by the value of the iteration step (value of the cell D10). The situation is shown on the Figure 4. Fig. 4 Solution of the iterative calculation of the parameter c The iterative recalculation of time tis changed within the range from a minimum value (t = 0) to a maximum value (t max ) with the iteration step (the value of dt given in cell D10) by repeated pressings or by holding of key F9. 4.2 Creation of the XY scatter chart Thedynamic animation chart of the ballistic curve will bedrawnin the interval t 0, t max. Into one of the columns (e.g. columnl) the set oftime increments t are saved. The values of a x, a y, v x, v y, x and y are calculated based on formulas (6) (12) see figure 5. Fig. 5 Dynamic animation of ballistic curve in XY scatter chart ISBN: 978-960-474-317-9 115

5 Conclusion There are various approaches how to provide training and development of theoretically acquired knowledge in mechanics. A new way of the teaching / learning strategy by using the system approach was presented in the paper. The processes of creation of dynamic computer simulation model, visualization and animation have been presented step by step in the paper. The system approach can be set as the default paradigm for a wide integration of the principles of the algorithm development into education. Acknowledgements This research has supported by the Specific research project of the Faculty of Science of University of Hradec Kralove. Simulation. 2013, Vol. 7, No. 2, pp. 267-276. ISSN 1998-0159. [6] Hubalovska, M., Hubalovsky, S., MS Excel as Tool for Modeling, Dynamic Simulation and Visualization of Mathematical Functions. In:Applied mathematics and informatics (AMATHI '12), Montreux, WSEAS Press, 2012. s. 183 188. ISBN: 978-1-61804-148-7. [7] Prazak P.: Recursively Defined Sequences and CAS, In: Advanced Educational Technologies, Proceedings of 6th WSEAS/IASME International Conference on Educational Technologies (EDUTE 10), WSEAS Press, Kantoui, Sousse, Tunisia, 2010, pp. 58 61. References: [1] Šedivý, J. Multimedia support ofparametric modeling. In: RecentResearches in EngineeringEducation and Software Engineering, Proceedingsofthe 9th WSEAS International Conference on EngineeringEducation (EDUCATION '12), WSEAS Press, 2012, ISBN: 978-1-61804-070- 1 [2] Hubálovský, Š., Jelínek, J., Šedivý, J.Mathematical modeling and computersimulationofoptimalreactiontimeofthe Lupine protein hydrolysisusingfermentedwhey. International journalofmathematicalmodels and methods in appliedsciences. North atlantic university union, 2012. 8 pp. ISSN: 1998-0140. [3] Hubalovsky, S., Mastermind methodofthesystemapproach in thealgorithmdevelopment and computersimulation. In: AppliedInformatics and ComputingTheory (AICT 11), Praha, WSEAS Press, 2011, pp. 152 157, ISBN 978-1-61804-034-3. [4] Hubalovsky, S., Modeling and computer simulation of real process solution of Mastermind board game. International Journal of Mathematics and Computers in Simulation.2012, Vol. 6, No. 1, pp. 107-118. ISSN 1998-0159. [5] Hubalovska, M., Hubalovsky, S., Implementation of the Systems Approach in Mathematical Modeling, Dynamic Simulation and Visualization Using MS Excel Spreadsheet.International JournalofMathematics and Computers in ISBN: 978-960-474-317-9 116