Assignment 7 solution

pdf

School

University of the Fraser Valley *

*We aren’t endorsed by this school

Course

135

Subject

English

Date

Jan 9, 2024

Type

pdf

Pages

8

Uploaded by CaptainEagle3867

Report
MECE 390 Assignment 7 Instructions Answer the following questions and prepare a single PDF file including: - Your augmented version of fitcurve.m. - A copy of the script of your process that performs the steps under "Operations Required." - The required plots for each sub-question in Question 1. - The Comment for Question 2. - The functions and the residual plots from Question 2 of both models. Note that in each sub-question, a unique dataset is provided. MATLAB Code - fitcurve.m A preliminary MATLAB function fitcurve.m has been provided that performs a least-squares approximation for a given set of basis functions (f1, f2, f3, etc.) for the purpose of curve fitting. The function header describes the current functionality of the function, which returns a vector of function coefficients. However, there are currently no residuals or coefficient of determination output. Augment the function with these additions in order to complete the lab. Operations Required for the Script 1. Reads in a dataset from a .dat file. 2. Inputs the model function (i.e., in a separate .m file or as input from the user) 3. Calls fitcurve.m to find the best fit. 4. Plots the required graphs. Question 1 Part I An engineering consulting firm for bridge inspection can perform in-site static testing of bridge structures. A newly designed highway bridge was tested using different truckloads. The maximum deflections of the bridge girder were measured under 10 different truckloads when the loads ranged from 100 kN to 300 kN. The load, ? (kN), and the associated maximum deflection, ? (mm), are recorded in Dataset 1 (You can find it on eClass in Lab 7 materials). Based on the as-built condition of the newly constructed highway bridge, an accurate relationship between the truckload ? (kN) and the deflection ? (mm), can be achieved by the following theoretical model (denoted as the True Model): True Model: ? ( ? ) = 𝑎 1 + 𝑎 2 ? with 𝑎 1 = 2.0 mm and 𝑎 2 =0.025 mm/kN
Find a Linear Model ? ( ? )= 𝑎 1 + 𝑎 2 ? with optimal model parameters 𝑎 1 and 𝑎 2 such that the linear model best fits the dataset. You may use the provided function fitcurve and modify it to suit your needs. - Find the Estimated Model function, including the coefficients 𝑎 𝑖 ( 𝑖 =1,2) and the corresponding coefficient of determination 𝑅 2 . - Plot the Estimated Model function, the True Model function, and the data points, all in a single graph for comparison. - Plot the residual in each point for the Estimated Model function. The residual is very helpful in model diagnosis (e.g. the residual should be around zero on average, with relatively constant variance). Note: - Report your answers to 4 decimal places. - Use Dataset1 provided on eClass.
Estimated Model: ? ( ? )= 𝑎 1 + 𝑎 2 ? with 𝑎 1 = 1.8852 mm 𝑎 2 = 0.0243 mm/kN Coefficient of determination 𝑅 2 = 0.9763 Which one of the following figures compares the True Model with the Estimated Model? a) Figure 1 b) Figure 2 c) Figure 3 Which one of the following figures shows the residual error in each point for the Estimated Model? a) Figure 4 b) Figure 5 c) Figure 6 Figure 1 Figure 2 Figure 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Note: Attach the MATLAB Code (curve fitting program) to the PDF Report. Question 1 Part II The consulting firm performs more tests and records 100 data points in total. The truckload, x (kN), and the associated maximum deflection, ? (mm), are recorded in the link Dataset2 . Use your code to find a Linear Model ? ( ? )= 𝑎 1 + 𝑎 2 ? with optimal model parameters 𝑎 1 and 𝑎 2 such that the linear model best fits the dataset. Note: - Report your answers to 4 decimal places. - Use Dataset2 provided on eClass as the test record. - Figure (1) compares the True Model with the Estimated Model. Estimated Model: ? ( ? )= 𝑎 1 + 𝑎 2 ? with 𝑎 1 = 2.0444 mm 𝑎 2 = 0.0245 mm/kN Coefficient of determination 𝑅 2 = 0.9565 Which one of the following figures shows the residual error in each point for the Estimated Model? a) Figure 2 b) Figure 3 c) Figure 4 Figure 4 Figure 5 Figure 6
Question 1 Part III Another bridge, which was designed to be the same as the above bridge four decades ago, was also tested by the same firm. The maximum deflections of the bridge girder were measured under 100 different truckloads, with loads ranging from 100 (kN) to 300 (kN). The test is recorded in the link Dataset3 . Use your code to find a Linear Model ? ( ? )= 𝑎 1 + 𝑎 2 ? with optimal model parameters 𝑎 1 and 𝑎 2 such that the linear model best fits the dataset. Note: - Report your answers to 4 decimal places. - Use Dataset3 provided on eClass as the test record. - Figure (1) shows the fitted curve on the dataset. If 𝑎 2 is identified to be 20% higher than the true value 𝑎 2 = 0.025 mm/kN, the bridge is flagged as damaged. Based on your fitted model, is the bridge damaged or not? By calculating the absolute relative error, the estimated a 2 is 18% higher than the true value which means that the bridge is not damaged. Figure 1 Figure 2 Figure 3 Figure 4
Estimated Model: ? ( ? )= 𝑎 1 + 𝑎 2 ? with 𝑎 1 = 2.0545 mm 𝑎 2 = 0.0295mm/kN Coefficient of determination 𝑅 2 = 0.9701 Which one of the following figures shows the residual error in each point for the Estimated Model? a) Figure 2 b) Figure 3 c) Figure 4 Question 2 As known to engineers, the mechanical behaviour of the bridge is typically nonlinear, which means the relationship between the truckloads and the maximum deflection is not linear, particularly when the truckloads are relatively high. For a bridge, the measurements show such a nonlinear relationship between the maximum deflection and the truckloads ranging from 100 kN to 500(kN). The truckload, ? (kN), and the associated maximum deflection, ? (mm), is recorded in the Link Dataset4 . Find a Linear Model ? ( ? )= 𝑎 1 + 𝑎 2 ? and a nonlinear model ? ( ? )= 𝑎 1 + 𝑎 2 ? + 𝑎 3 √? with optimal model parameters 𝑎 1 , 𝑎 2 (and 𝑎 3 ) such that the two models best fit the dataset. You may use the provided function fitcurve and modify it to suit your needs. Figure 1 Figure 2 Figure 3 Figure 4
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
- Calculate the Estimated Model functions (linear and nonlinear), including the coefficients 𝑎 𝑖 ( 𝑖 =1,2,3) and the corresponding coefficients of determination 𝑅 2 . - Plot the linear and nonlinear Estimated Model functions and the data points, all in a single graph for comparison. - Plot the residual in each point for the linear and nonlinear Estimated Model function in a single graph for comparison. - Comment on model performance based on the residual plots. From the residual plots, it is clear that the nonlinear model better describes the relationship between the truckload and the deflection. For the linear model, the residuals are significant especially at the ends while for the nonlinear model, the residuals are between ±0.5. This is expected since the mechanical behavior of the bridge is typically nonlinear so the nonlinear model will be more effective in this case.
NOTE: - Report your answers to 4 decimal places. - Use Dataset4 on eClass as the test record. - Figure (1) compares the Linear and Nonlinear Estimated Models. Linear Estimated Model: ? ( ? )= 𝑎 1 + 𝑎 2 ? with 𝑎 1 = 22.6749 mm 𝑎 2 = 0.1154 mm/kN Coefficient of determination 𝑅 2 : 0.9953 Nonlinear Estimated Model: ? ( ? )= 𝑎 1 + 𝑎 2 ? + 𝑎 3 √? with 𝑎 1 = 2.6864 mm 𝑎 2 = 0.0395 mm/kN 𝑎 3 = 2.5230 𝑚𝑚 𝑘𝑁 Coefficient of determination 𝑅 2 : 0.9996 Which one of the following figures shows the residual error in each point for the Estimated Models? a) Figure 2 b) Figure 3 c) Figure 4 Figure 1 Figure 2 Figure 3 Figure 4