Prior to solving the problem, the given stress and strain data of the heart chordae tendineae were plotted to develop an idea for the best way to fit the data. From Figure 1, it can be seen that the data does not appear linear. Thus, I will hypothesize that an exponential regression will be the best fit for the data.
Figure 1: The measured stress and strain data of the heart chordae tenedineae in Table C1 was plotted to determine trends.
Figure 2: The analytical derivative over stress calculated using the interp1 function is shown above.
The derivative of stress over the derivative of strain at each data point was approximated using finite divided differences. The derivative at the first data point was approximated using a forward finite divided difference, because there were no previous data points. The derivative at the last data point was approximated using a backward finite divided difference, because there were no successive data points. For the remaining data points, the derivative was approximated using a centered finite divided difference. The forward, backward, and centered finite divided difference formulas are provided below as equations (1), (2), and (3), respectively.
Part A)
The calculations of the derivative approximations were performed by hand. The calculations can be seen below. The results are compiled in Table 1.
Part B)
Next, the derivative was plotted over the stress values to determine the relationship between the stress and strain data. Assuming the relationship between stress and strain is linear, the first 5 data points were identified as non-linear. The lack of linearity in the first 5 data points is a result of an error in the measurement device. Therefore, the first 5 data points were eliminated from the set, and new stress and strain vectors were created. Then, the material constants, a and E0, were calculated by assuming the derivative of stress over strain is linear. A linear regression analysis was performed to determine the values of a and E0. Since equation C2 represents the derivative as a linear relationship, the following equations for A and E0 are the slope and intercept of a line, respectively.
However, the relationship of the data may not be linear, so other forms of curve fitting need to be implemented.
Part C)
First, the mean of the revised stress and strain data points was calculated. Then, the equation C1 was used to determine the analytical curve solution. This curve was plotted against the data points to determine the fit of the curve.
Part D)
Using equation C3, a new relationship between stress and strain was fitted to the data points. The resulting analytic curve was plotted against the data points to determine the fit of the curve in Figure 4. The difference between the stress of the at each strain value of the analytic curve and the data points was calculated. The mean and standard deviation of this error were then computed to better quantify the error.
Part E)
Polynomial regression was employed as a third relationship between stress and strain. Using the MATLAB polyfit function, 1st through 7th order polynomial regression was used to fit the data. To determine the effectiveness of each regression, the mean of the error for each data point was calculated. The standard deviation of the order of polynomial with the lowest error was then computed.
Part A)
Table 1: The finite divided difference approximations of the derivative are shown in the table below, along with the given stress and strain data points.
Part B)
The approximate derivative values were plotted over stress to determine the best fit for the data. Since the derivative is not constant, the data should not be fit using linear regression. The first five data points were removed from the data set because they appeared to not follow a linear relationship. These data points have significant error from the measurement instrumentation.
Figure 2: The derivative of stress with respect to strain is plotted over the given stress values.
Figure 4: The derivative of stress with respect to strain is plotted over the revised stress values.
The calculated values of the material constants, a and E0, are shown below.
a = 0.0035
E0 = 3.1929
Part C)
Figure 5: The analytical solution curve for the stress of soft tissue is compared to the data points in the plot above.
Part D)
Figure 6: The analytical solution using the refined equation for stress (C3) is plotted against the data points.
Part E)
Figure 7: The 7th order polynomial fit of the stress-strain data is shown in the plot above.
Table 2: The mean and standard deviation of the error between the data points and the regression type is shown in the table below.
The 7th order polynomial fit the data points points the best because the mean and standard deviation of the error between the data points and the regression curve was smallest. The error was for 1st through 9th order polynomials was also quantified. As the order of polynomial increased, the error decreased until the 7th order was reached. Increasing the order of the polynomial past seven caused the error to rise because the polynomials were ill-conditioned. After removing 5 data points from the set, only 8 points remained. With 8 data points, the seventh order polynomial is the highest order that can fit the data without ill-conditioning.
Part f)
I would use a 7th order polynomial to fit the relationship between the stress and strain of heart chordae tendineae because it yielded the smallest error and standard deviation between the the data and the regression curve. From table 2, the the error of the 7th order polynomial was much significantly lower than the other methods. Although the 7th order polynomial fit the original data with the highest level of accuracy, it may not best fit the overall trend of the data because only the error at the data points was calculated. If the 7th order polynomial fit is poorly conditioned, I would recommend using a lower order polynomial to fit the stress-strain data. Even the 1st order polynomial fit the data better than the analytical and refined analytical curves.
A)
I used most of my peer review comments to revise my website and code. First, I increased the size of the title and axes titles for every plot for easier reading. I moved the legends to the northwest corner of the plots as well to avoid cutting off the plotted function. I used the interp1 function in MATLAB to provide an analytical approach to plotting the derivative over stress as a linear relationship. I also displayed the values asked for in the problem, specifically E0, a, and the mean and standard deviation of error in my code. Lastly, I included extra comments in my code to clarify my approach.
B)
From reading my partner's code, I gained a greater understanding of how to use a while loop with many embedded if statements. My partner's code worked perfectly, making it even more impressive that the complex loop was coded successfully. I have always had trouble coding loops properly, so I think reviewing my partners code helped me gain both knowledge and confidence. Specifically, I learned the general process to implement Brent's method for finding roots. I learned that Brent's method can act as an open or closed method and that it will always converge on the roots if good bounds are chosen.
From looking at my partner's website, I realized that I should partition my website into the different parts of the problem. This way, it will be easier to follow and grade.
C) From the initial submission, I changed several things that improved the website and code. First, I included the interp1 function in my code to calculate an analytical solution to the derivative over stress. Since the derivative over stress was supposed to be linearly related, the plot of the interp1 function provided the derivative over stress values without error in the instrumentation that measured the stress and strain values. For the initial submission, the standard deviation of error values were the same for each regression type. Thus, I corrected them and included the 1st-7th polynomial interpolations in the error section. Generally, I altered the format of the website. I changed what I included in the analytical versus numerical solutions. Initially, I included parts c, d, and e in the analytical solution but I moved these to the numerical section while including the stress-strain plot to the analytical section.