Assignment title: Information
Question
Mat Lab
Q
You have been supplied with a set of measurements for the lifetime of a bearing in the file
ass3q1data.csv. You should use this data to construct a model for the behaviour of the real lifetime
(the lifetime of the population). It has been well-established that the Weibull distribution is the best
model for the reliability of objects (Juvinall & Marshek 2011).
For quality control and defining warranties, models for population lifetimes are used to determine
how many products will fail within a stipulated period. Using the model for the population, determine
which samples are in the bottom 2% of the population. Also determine the fraction of samples which
do not last the desired minimum of 950 hours and which fraction of the population would not last 950
hours.
Requirements
For this assessment item, you must produce MATLAB code which:
1. Loads the data file ass3q1data.csv and verifies that it has been loaded correctly (first 5 values)
2. Determines the estimated parameters for the Weibull distribution and reports the values to the
Command Window.
3. Compares the sample pdf with the population pdf graphically.
4. Compares the mean and standard deviation computed from the samples with the mean and
standard deviation computed from the Weibull distribution's parameters. Discuss why the
results are the same or different. This comparison and discussion is to be reported to the
Command Window.
5. Verifies the mean and standard deviation calculations by comparing the results for the first 5
values with hand calculations. Be careful how you calculate the standard deviation.
6. Computes the fraction of the samples that are in the bottom 2% of the population and reports
the result to the Command Window.
7. Computes the fraction of the samples and fraction of the population that do not satisfy the
minimum of 950 hours and reports the result to the Command Window.
8. Has appropriate comments throughout.
Assessment Criteria
Your code will be assessed using the following scheme. Note that you are marked based on how well
you perform for each category, so the correct answer determined in a basic way will receive half
marks and the correct answer determined using an excellent method/code will receive full marks.
Quality of the code 5 marks
Quality of header(s) and comments 10 marks
Quality of the data loading and verification 10 marks
Quality of the Weibull distribution parameter estimation 10 marks
Quality of the pdf comparison 15 marks
Quality of the statistics verification 10 marks
Quality of the bottom 2% calculation 20 marks
Quality of minimum 950 hours calculation 20 marks
Reference
Juvinall, RC & Marshek, KM 2011, Fundamentals of Machine Component Design, 5th edn, Wiley, USA.ENG3104 Engineering Simulations and Computations Semester 2, 2014
Page 2 of 5
Question 2 (150 marks)
Introduction
a) It's time to do assignment 1 properly. To begin with, Eq. (1) in assignment 1 is incorrect; this
is the correct derivation:
0
0
0
0
0
0
v t t
v
t
t
dv
a t
dt
dv adt
dv adt
v t v adt
v t v adt
(1)
It is therefore necessary to add the initial condition to the integral (as defined previously).
For this assignment, load the data in ass1data.csv and integrate it accurately to determine the
position as a function of time. Graphically compare the x-position and y-position as functions
of time for the method used in assignment 1 and a better method. Also graphically compare
the heart-shapes that are produced. Compare the position at 6.28 s for both methods.
b) Taking the acceleration formulae from Assignment 2 Question 3, solve the ODEs for xposition
and y-position to determine what the position should be at 6.28 s using:
i. Euler's method
ii. A MATLAB ode solver (programmed in MATLAB)
iii. Simulink
iv. Validation with the analytical solution
Verify your code for Part (b)(i) by performing hand calculations for the first 5 timesteps and
comparing to the result from the code.
Compare the four results from Part (b) with each other and the two results from Part (a).
c) Theoretically, the heart shape should be closed at 2 seconds. Prove that this is true
analytically. Determine how closely the following numerical methods come to achieving this:
i. Euler's method (choose 2 different timesteps)
ii. ode23 (report any changes to the settings from the default)
iii. ode45 (report any changes to the settings from the default)
iv. ode113 (report any changes to the settings from the default)
Compare the results by using these four methods programmed in MATLAB and also using
Simulink (you should have a total of 8 simulations: do not create a Simulink model for
Euler's method)