### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# NUM&GRAPHC&LAB TCNQ AER E 161

ISU

GPA 3.81

### View Full Document

## 17

## 0

## Popular in Course

## Popular in Aerospace Engineering

This 24 page Class Notes was uploaded by Noel Koelpin on Sunday September 27, 2015. The Class Notes belongs to AER E 161 at Iowa State University taught by Dana Haugli in Fall. Since its upload, it has received 17 views. For similar materials see /class/214530/aer-e-161-iowa-state-university in Aerospace Engineering at Iowa State University.

## Similar to AER E 161 at ISU

## Popular in Aerospace Engineering

## Reviews for NUM&GRAPHC&LAB TCNQ

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/27/15

Binary Conversion Integers This document demonstrates how to convert a base10 integer to binary and back In this document n2 represents a binary number 7110 a base10 integer and ythe highest integer power of 2 that ts into 7110 A search of the web indicates that two procedures are typically used to convert a base10 number to binary The first procedure involves subtracting powers of 2 from the base 10 number and the second involves dividing the base10 number repeatedly by 2 The conversion from a base10 integer to binary is exact and does not involve roundoff errors Subtraction Procedure The subtraction procedure depends on determining ysuch that 2y will t into the base10 number or its remainder without exceeding it Mathematically this statement is equivalent to i1 1 where any digits t0 the right of the decimal have been truncated Rearrange this equation and apply the property of logs to nd y 2y x10 log 2y logx10 ylog 2 log x10 logx10 2 log 2 I The subtraction procedure is 1 Determine yfrom Equation 2 N Evaluate the remainder 7110 7110 2y 3 Return to Step 1 computing the next highest power of 2 that will t into the remainder Repeat Steps 1 and 2 until the remainder is 0 Keep track of each power of 2 that ts into each remainder 4 Assemble the binary number n2 beginning with the highest power of two on the left The procedure is most easily completed with a table as shown in Example 1 Q Lmu 3396 Example 1 Convert 129610 to binary In the following table Bit stores tracks powers of 2 Base 10 of 2 Bit With the highest power on the left the binary number is n2 101000100012 Division Procedure The diVision procedure is 1 Compute n10 2 using integer division truncate digits to the right of the decimal and determine the remainder 0 or 1 Repeat keeping track of each remainder until the quotient is zero N Assemble the binary number with the last remainder on the left and the rst on the right Example 2 Repeat Example 1 with the diVision procedure With the last remainder on the left the binary number is r12 101000100012 The corresponding power of two is less obVious with the diVision procedure than with the subtraction procedure but the binary result is the same 391 xsl 1 Llquot Conversion Back To convert a binary number back to base10 simply work out the powers of 2 and add them together Example 3 Convert the binary number from Examples 1 and 2 back to base10 n10 1gtlt210 1gtlt28 1gtlt24 1gtlt20 129710 Signs Different methods exist for identifying the sign of a base10 number in a binary code For the purposes of Aer E 161 we will use the simplest method which consists of adding a 0 t0 the left of a binary number if the base10 equivalent is positive and 1 if the base10 number is negative Example 4 Demonstrate the difference between 129710 and 7129710 129710 0101000100012 129710 1101000100012 Dj mir w39 Con The Trapezoidal Rule The trapezoidal rule uses a rstorder polynomial ie the equation of a line to estimate the function f x in the incremental integral I I I f xdx Thus f x E y1 a0 91x To avoid confusion the subscript l on y1 indicating that the polynomial is rstorder will be dropped in the derivation that follows With a bit of algebraic trickery the solution to the incremental integral is 9 I Ja0a1xdx gt971 1 2 a0x3a1x 10 x1 x171a1x12 x1271gt 1C171 1 a0 x1 x1713a1x1 x171 x171 9 l a0 x1 x1713a1x1 x171 x171 9 l x1 x171a0 3611 x1 x171 9 l l x1 x171 a0 1 3611 xx x1719 l l x1 x1713a0 a1x15a0 alxzri 9 l l x1 x171 ny Ey171 l 3x1x171yz yzri This result yields the general trapezoidal rule which works for unequallysized increments n 1 n 1 21 32ltxl gtltyl m 11 11 In the case were the increments x1 xH are of equal size Ax the trapezoidal rule becomes 109 x m 2 11 Ax V Z 4 J41 11 Ax quot1 y0 22y1ynj 11 ltyoylgtltylygtltyy3gtuy gtm1yngt1 which is the form commonly seen in calculus books To use either equation general or equalincrement with experimental data X1 K with X1 and y with K Example FORTRAN Code replace x1 This program computes the area under a curve via the general trapezoidal rule for arbitrary grid spac1ng PROGRAM trapezoidalrule IMPLICIT NONE INTEGER i n p REAL kind8 ar a REAL kind8 ALLOCATABLE X Y Open the input file and determine the number of data pairs OPEN unit12 filequotinputdatquot 12 p l l The number if increments which the l is one less than the number of data p l ALLOCATE XOn y0n Read the input data and compute the READ 12 x0 510 area Od0 DO i area2d0 Write out the result WRITE quotThe area under the curve STOP END PROGRAM trapezoidalrule p is the number of data pairs lines in the file trapezoidal rule is based on pairs area integral Yil is approximately quot area Example Results Consider the following input le 0000 3679 1353 0498 0183 0067 0025 0009 0003 mxlmU39IwaI Oko OOOOOOOOI The rst number is the number of lines that follow the rst column is X and the second column is K The code above yields Vincent f90 trapezoidalrulef90 Vincent acgtut The area under the curve is approximately 108155000000000 The data in the input le is actually from the function f x equot The analytical value of the integral is 8 I jewx 09997 0 yielding a relative error of approximately 8 for this approximation Taylor Series According to Taylor s theorem if the function f and it s rst n1 derivatives are continuous on an interval containing a and x then the value of the function at x is given by faxa f axa2 f a fxfa 1 2 3 H x a3 f n39ax aquot Rn 1 Here Rn is the remainder from truncating after the nthterm De ne mac a 2 fx fa flak WM akmr fquotmquot Rn 3 An alternate formulation is derived by letting x x1 1 and a x where 139 is an integer index such that Ax x1 1 x1 p n H mm fxz f Wm f fwz f 3 f Wmquot Rn lt4 n or de ning f E fq n n fm Ax Axz Ax3 AxquotRn 5 1 2 3 quot1 Finally combine terms bearing in mind that 0 l 7 see httpwwwzero factorialcomWhatishtml to yield a the Taylor Series n fk k 12Ax Rk 6 160 Example 1 Consider function fx 3x3 2x2 x 1 Write the Taylor Series for this function Begin by writing out the function and its derivatives for x a fa3a3 2612 al f a9a2 4al f a 18a 4 f a 18 All higher order derivatives are zero The Taylor Series is 3 2 9a24al 18a4 2 18 3 fx 3a 2a alTx aTx a x a which is exact since all higherorder derivatives are zero Example 2 Show the effect of truncating terms by applying the Taylor Series from Example 1 at a 0 with Ax x a 01 meaning x 01 Note the true value of f 0 l is 1123 The function is the approximate value obtained from the Taylor Series The function f x is the true value Ep 2 Eu E N N a 100 Terms fx fx fxx 1796 fa 1000 0123 110 fx fa fem 1no 0023 20 1796 fa fSax a 339quot xa2 1120 0003 03 1795 fa flgaxa 1123 0000 00 fa xa2f xa3 Question how would these results change if Ax was smaller Larger Example 3 Use the Taylor Series with f x 6x and a 0 to show that 2 3 n x x x e 1x E 2 3 10 n From Equation 1 fx fa f39l quotxa f1quot ye gr f1quot ye gr fquotxaquot Rn 0 0 0 r 0 e e 2 e 3 e e 1x 0 2x 0 3x 0 x2 x3 1x 2 3 By observation this equation can be rewritten as 0 1 2 3 w n x x x x x 2 e 0 1 3 1071 which resembles Equation 6 Error Propagation A quick search of the web yields hundreds if not thousands of documents related to the topic of error propagation The basic question is how does a small error in an independent variable x in uence 7 or propagate through 7 a function f x For example how might roundoff error propagate through a calculation performed on a computer This document will focus on the error associated with a single independent variable similar analyses involving partial derivatives of multiple independent variables can also be performed but will not be considered here From calculus if the derivative of f exists at x then fxAx fx fx llmT Axgt0 or for small values of Ax Hmm f xz Ax Thus a small change in x propagates through the function as fx Ax z fx f xAx 1 This result provides a basis for estimating the in uence of an error in x on f Note that the result resembles a Taylor Series truncated after the first derivative term First rearrange Equation 1 as fxAxfx f xAX Next substitute f the approximate value of x and Ax x f into the result to obtain fxff f fAx or Let Eu 9 represent the absolute error in Ex Ax 2 Then Ax iEa and f xf f if fE 3 De ne Ef fx ff 4 representing the absolute error in the function due to the error in f Substitute from 3 into 4 to obtain E 14 It f fEa f Ef 5 The last equality is possible because Eu 9 is already an absolute value Consistent with the notes on the de nition of an approximate error given in class this equation can be rewritten in terms of the approximate absolute error in the function 8 f 9 f f IE f Example 1 Consider the function fx 3x3 2x2 x 1 If x 05 and f 04999999 what is the error in From 2 E G Ix f 05 04999999 00000001 1gtlt10 7 The resulting absolute error in the function is from 5 E G 949999992 449999991 00000001 525 x10 525 times greater than the error in f From 3 fx fgti f E G 05 r 0000000525 Letter Report Format A letter report is a brief report that summarizes progress on an experiment or the results from an experiment that is part of a larger or ongoing project The report includes results analyses and conclusions from the experiment and may also include preliminary analyses and or conclusions for the larger project The report is typically addressed to a supervisor to colleagues on the project team or to clients The report is a form of formal business letter Include the date a return address or be printed on letterhead with the return address and the addresses of the intended recipients a greeting such as Dear John or Dear Dr Doe is optional Include a salutation such as Sincerely followed by the signatures and typed names of the authors at the end of the letter If the report is more than two pages long include page numbers Begin the letter with a paragraph that describes the purpose and layout of the letter For example This letter summarizes the results and analyses of thrust measurements preformed on Estes C63 and C65 model rocket engines The letter begins with a brief description of the purposes and background for the experiment followed by experimental objectives equipment procedures results analyses and conclusions Include the following headings sections as described below More than one headingsection may appear on the same page Purpose Background amp Theory This section is optional depending on the intended recipient For example a supervisor might already be familiar with the background and may not need or want the information in contrast a client might be confused without it Describe why the experiment was conducted and how it ts into the larger project Provide background such as research into past experiments results found by other researchers and theoretical equations N Objectives List specific objectives of the experiment For example The objectives of this experiment were to 0 Test fire three C63 engines and three C65 obtain thrust curves and compute burn times and total thrust 0 Analyze the data statistically including an error analysis and 0 Compare computed results with expected performance for these engines LA Equipment Include a complete list or table of equipment with model numbers serial numbers or other identification information Include diagrams and instructions for assembling the equipment 4 Procedure Describe the experimental procedure in enough detail for another person to recreate the experiment If the procedures have been documented elsewhere and that document is available to the recipient of your letter report refer to it than repeating the procedures but describe any changes to the procedure and why Include equipment settings UI Results and Analysis Present data in table andor graphical format Describe any problems noted in collecting the data and the in uence those problems might have had on errors Analyze the data as required for the project Include as needed properlylabeled gures and plots to clarify the analysis Do NOT show calculations except where calculations help to clarify the analysis 0 Conclusions Summarize or list any conclusions drawn from the analysis Describe questions that remain unanswered and suggest future experiments if needed to clarify the results Pose any new questions that were raised When the report is complete have a second person proof it This person should write Reviewed By and then initial and date the report at the bottom of the last page The Bisection Method The bisection method is an iterative numerical method for nding the roots of a function The method is called a bracketing method because it requires two initial guesses one to the left and one to the right of the desired root The method will fail if these guesses do not bracket the root A quick plot of the function should reveal the location of the root and guarantee appropriate guesses The algorithm is 1 Make initial guesses for x1 and x where the subscripts l and r indicate to the left and right of the root respectively 2 Average these guesses to approximate the root x0 x x 9 T 1 3 Evaluate the following conditions a If fx1 fx0 lt 0 the root lies to the left of x0 as shown below For the next iteration set x x0 and return to Step 2 Fquot If fx1fx0gt 0 the root lies to the right of x0 For the next iteration set x1 x0 and return to Step 2 c If f x1 f x0 0 the root is found since the function is zero at the root Repeat Steps 2 and 3 until Condition 3c is satisfied In practice roundoff errors make Condition 3c difficult to evaluate because a real number is unlikely to exactly equal zero on the computer Instead a convergence criterion can be applied When the bisection method is converging the estimate of the root for the next iteration xg should be closer to the true value of the root than the estimate from the current iteration x3 The superscripts represent iterations not powers This observance leads to the idea of an approximate error as discussed in the document Error Definitions on the Aer E 161 website To control the number of digits after the decimal use an absolute convergence criterion n1 e x0 a ltC 2 n x0 a where Cu is smaller than the desired number of digits To control the relative or percent error use relative or percent convergence criterions E lt C r or 8p lt C p see the Error Definitions document The Inmp nlztinn Methnd r V quot esttm ates Both methods are examples of bracketing methods approxlmated where the lme lntersects the Kn rnhl H nght guesses As shown m thure 1 the root x ls 7 1 7w wd w r H tequltes fewer lteratlons than the blsechon method x my Actual Root Figure 1 A graphlcal depletlon ofthe lnterpolanon method The equation for xquot can be denved as follows Recall the llnear lnterpolatlon formula ya yt PM XrXt Let x x and x2 2 my ttgtlstm 5 ol em New D m lmtt l w e as Since at the root x0 the function is zero substitute x x0 and set f x f x0 0 and solve Equation 2 to obtain fx1xxl 3 x0 x1 f x f x which replaces the average equation in the bisection method D Haugii Lecturer Aer E 161 Lkemsguace Engineering 2 I iZOUS The lnteszolaiimi Mciiu wi Page 2 Iowa State University Date September 9 2005 T0 Aer E 161 Students From Dana Haugli Instructor DQH Subject Example Technician Report Format The purpose of this report is to provide an example of a technician report Technician reports are also called test reports because they typically contain the results of tests performed as part of a project or experiment Like an technical report technician reports should be reviewed for clarity grammar and spelling and should be presented in a professional manner typed with typeset equations clear margins and lack of crowding All tables and figures should be identified in the text and labeled clearly The test report consists of three sections which follow These sections cover experimental procedures equipment and data Procedures This section does not restate procedures but rather documents where the procedures are located and what changes were made to the procedures An example might be The procedures followed during these tests are documented in the file testdoc on the desktop of the laboratory computer No changes were made to t e procedures If changes are necessary because something about the experiment would not work or a specific procedure cannot be followed document the changes For example Step 3 was changed because the probe described in the procedure would not fit so the next smaller version of the probe was used Equipment This section identifies the specific equipment used in an experiment The documentation usually in the form of a table such as the example in Table 1 includes descriptive information such as the serial number to help recreate the tests with the same equipment if necessary Pictures of the equipment or setup may also be included such as in Figure 1 next page Tables and Figures should be placed as close to the text that refers to them as possible in the order to which they are first referred Table 1 Example equipment identi cation tablel 1Exerpted from Research in SmallScale Wind Turbines a paper presented at the 2004 AIAA Region V Student Conference by Jacob J Sullivan and Nathan C Thomas Figure 1 Example picture of equipment setup from an experiment2 2Exerpted from 39 39 quot I Wind Turbines a pay 39 39 AIAA Region v student Conference by Jacob J Sullivan and Nathan c Thomas Data Data couldbeinthe form oftables gures orboth Table 2 and Figure 2 show examples ofhowto present data No analysis quot 39 39 39 39 r 39 39 r t t t t Table 2 quot 39 39 A E 161 39 L Time Voltage Shifted ms V V Figure 2 Printout from oscilloscope reading in the Aer E 161 Lab during an accelerometer test Shifted Data Voltagev O KMWLU ICDVOJ I x Time msec Error De nitions The true value of a number x can be expressed in terms of total error as True Value x Approximate Value 9 Total Error E l where J is the approximate value of x obtained through experimentation or numerical analysis Total error can be represented as absolute relative or percent error When the true value is unknown total error can still sometimes be approximated Representation Absolute error is de ned as the absolute value of the difference between the true and approximate values E lx 2 Relative error is the ratio of absolute error to the true value E E a 3 x and the percent error Ep E X100 4 These de nitions can be extended to the error in a function caused by An error in an input value Ea Approximating the function numerically Ea I f x causing an error in the output value Or both Ea Numerical Errors Numerical methods and computations involve numerical errors Numerical errors consist of round o errors and truncation errors which together are sometimes called total numerical error Roundoff errors occur when a real base10 number is converted to or from binary which is necessary for the computer process and store the number For example 717has an infinite number of digits but only a few of those digits can be stored in the computer Roundoff errors can significantly undermine the accuracy and precision of a numerical solution especially a solution involving repetitive calculations where each calculation depends on the previous step Roundoff errors can be found in input and output values Truncation errors are the result of approximating a complex equation for which an analytical solution cannot be obtained For example approximations derived from Taylor Series such as the NewtonRaphson method for nding roots or nite differences to approximate derivatives involve truncation errors These errors generally occur in output values Approximate Errors Many numerical solutions require an iterative approach to solve a system of equations In this approach an approximation at step n1 W is made based on the previous approximation fquot Often the true value is unknown which is why the solution is being approximated in the rst place so an approximate absolute error NH FI n Ea x x 5 is computed instead This de nition assumes that W is closer to the true value than 7 The solution is said to converge when the difference becomes smaller than some convergence criterion Ea lt C 6 a For example C a 0001 would correspond to a solution precise to four places right of the decimal Relative and percent errors can also be approximated and compared to corresponding convergence criteria EH 8 fn HltCr 8p 3gtlt100ltCp 8 n1 x Why is the denominator in Equation 7 Order of Magnitude Order of magnitude refers to the relative size of an error A simplistic way to visualize this concept is that an answer off by a tenth of a decimal place has order of magnitude of O 10 1 An answer correct to through the third decimal place has order of magnitude of 01104 This concept is used to compare numerical methods and determine which method might give a better approximation to a solution The smaller the orderormagnitude of an error the better the approximation and in general the more complex the computation mathematically and in CPU hours The Newton Raphson Method The NewtonRaphson method is a simple efficient method for estimating a root The method has the form x 2x fxquot 1 Here xquot is a guess for the value of x at iteration n which is used to compute a new guess xquot1 The difference between the two calculated as the absolute error Ea Ea x 1 xquot 2 If the difference is larger than a specified convergence criterion Ca xquot1 is used as the next guess replacing the original value of xquot and Equation 1 is solved again This procedure is repeated until Ea becomes smaller than Ca Example 1 Derive an algorithm for the function fx xp q 0 where p is the power and q is a constant Substitute f x and f 39x into Equation 1 yielding x 1 xquot x 1 3 3 MN The algorithm for solving Equation 3 and finding the root is as follows 1 Ask the user to enter the values of q and p in x J how was this equation obtained Ask also for a starting guess xquot and how many digits of precision are required Ca 2 Find the root a Calculate x 1 from Equation 3 b Calculate Ea from Equation 2 c Check for convergence to see if the root is found i If Ea lt Ca the root is found otherwise ii Set xquot x 1 which makes xquot1 the new guess and return to Step a 3 Display the root and the number of times Step 2 was repeated the number of iterations 5 Example 2 Apply the algorithm from Example 1 to nd the cube root of 8 The actual root is 2 but to demonstrate the method make an initial guess of xquot0 3 739 Guess xquot x 1 Difference Ea Eq 2 In this example the root x 2 is found through the sixth decimal place after only ve iterations 4mm 33961quot 1 The Hemm Graphical amp Algebraic Approaches for Finding a Root A root is de ned as the value of x where a function f x crosses the xaXis ie where f x 0 A function can have multiple roots one root for each time it crosses the xaXis For simple functions the root can often be determined algebraically This method is preferable to others because it yields an accurate precise results Example 1 Find the root of the equation f x xy n Since fx0 atthe root xy n 0 or xW Graphing a function provides another way to determine its roots The graphical method will give an accurate but probably not very precise depending on the resolution of the graph estimate of the root Example 2 Plot the function f x x3 8 and determine the root from the graph L xess fxx3 8 E 800 g 799 200 g 794 J78 150 E 749 100 i 700 x i 627 5 5 0 i 526 0 i 390 i 217 3950 OOO 100 MS 00 05 10 15 20 25 30 g 582 i 958 x A 1395 30 1900 From the graph the root occurs at x 2

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "When you're taking detailed notes and trying to help everyone else out in the class, it really helps you learn and understand the material...plus I made $280 on my first study guide!"

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.