How can i solve 3 parameters of Weibull distribution under with initial data? like nonliear equation? Or do we have any method for estimate 3 parameters distribution from fail

2 views (last 30 days)
How can i solve 3 parameters of Weibull distribution under with initial data? like nonliear equation? Or do we have any method for estimate 3 parameters of Weibull distribution for number of failure strength?
clc; clear; close all;
syms m sigma sigma_0 sigma_th
% Define failure strength data (30 values)
sigma_i = [137.48, 162.07, 162.24, 162.82, 164.01, 164.40, 165.87, ...
167.72, 169.75, 171.39, 177.64, 180.30, 180.57, 181.05, ...
182.19, 182.86, 187.90, 187.92, 188.07, 188.21, 188.25, ...
189.46, 190.05, 190.82, 190.99, 191.17, 191.62, 214.00, ...
218.37, 221.12];
N = length(sigma_i); % Number of failure strength values
% Equation 1: dL/dσ_th
eq1 = -(m - 1) * sum(1 ./ (sigma_i - sigma_th)) + (m / sigma_0^m) * sum((sigma_i - sigma_th).^(m - 1));
% Equation 2: dL/dσ_0
eq2 = -(n * m) / sigma_0 + (m / sigma_0^(m + 1)) * sum((sigma_i - sigma_th).^m);
% Equation 3: dL/dm
z = (sigma_i - sigma_th) / sigma_0;
logz = log(sigma_i - sigma_th);
eq3 = (n / m) - n * log(sigma_0) + sum(logz) - sum(z.^m .* (logz - log(sigma_0)));

Accepted Answer

Star Strider
Star Strider on 2 Apr 2025
The Statistiics and Machine Learning Toolbox norrmally fits a two-parameter Weibull distribution, howeer fitting a three-parameter distru=ibution in described in Three=Parameter Weibull Distribution
Shamelessly copying large sections of that code —
sigma_i = [137.48, 162.07, 162.24, 162.82, 164.01, 164.40, 165.87, ...
167.72, 169.75, 171.39, 177.64, 180.30, 180.57, 181.05, ...
182.19, 182.86, 187.90, 187.92, 188.07, 188.21, 188.25, ...
189.46, 190.05, 190.82, 190.99, 191.17, 191.62, 214.00, ...
218.37, 221.12];
figure
histfit(sigma_i, 10, 'Weibull')
f = @(x,a,b,c) wblpdf(x-c,a,b);
try
mle(sigma_i,'pdf',f,'Start',[1700 2 1500])
catch ME
disp(ME)
end
MException with properties: identifier: 'stats:mle:NonpositivePdfVal' message: 'Custom probability function returned negative or zero values.' cause: {} stack: [7x1 struct] Correction: []
statset('mlecustom')
ans = struct with fields:
Display: 'off' MaxFunEvals: 400 MaxIter: 200 TolBnd: 1.0000e-06 TolFun: 1.0000e-06 TolTypeFun: [] TolX: 1.0000e-06 TolTypeX: [] GradObj: 'off' Jacobian: [] DerivStep: 6.0555e-06 FunValCheck: 'on' Robust: [] RobustWgtFun: [] WgtFun: [] Tune: [] UseParallel: [] UseSubstreams: [] Streams: {} OutputFcn: []
opt = statset('FunValCheck','off');
params = mle(sigma_i,'pdf',f,'Start',[100 2 100],'Options',opt, ...
'LowerBound',[0 0 -Inf],'UpperBound',[Inf Inf min(sigma_i)]);
fprintf('\nParameters —\n\ta = %12.7f\n\tb = %12.7f\n\tc = %12.7f\n',params)
Parameters — a = 65.3620433 b = 3.6671814 c = 122.5383564
x = linspace(0, 250);
figure
histogram(sigma_i,8,'Normalization','pdf')
hold on
plot(x,f(x,params(1),params(2),params(3)),'LineWidth',2)
hold off
.

More Answers (0)

Products


Release

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!