Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

SAKSHAR BANERJEE

20CE31002

5.1
D = [440 0 0; 0 55 0; 0 0 3500];
X = [2200; 220; 35000];
R = [1 0.5 0; 0.5 1 0; 0 0 1];

sigma_x = D*R*D;
dg = [(-2*X(1,1)/(0.015625*(X(3,1)^2))) (-1/(0.015625*X(3,1)))
((X(2,1)/(0.015625*(X(3,1)^2))) + (2*(X(1,1)^2)/(0.015625*(X(3,1)^3))))]; G
= (1-(X(2,1)/(0.015625*(X(3,1))))-((X(1,1)^2)/(0.015626*(X(3,1)^2))));

beta = G/(sqrt(dg*sigma_x*dg'))

********[Above code is used to solve beta by MCFOSM (mean centered first order second
moment) by the equation shown below

]*******
Beta = 1.75

D = [440 0 0; 0 55 0; 0 0 3500];
X = [2200; 220; 35000];
R = [1 0.5 0; 0.5 1 0; 0 0 1];
sigma_x = D*R*D;
dg = [(-0.03125*X(1,1)*X(3,1)) (-0.015625*(X(3,1)^2))
(0.0007324218*(X(3,1)^2)-0.03125*X(2,1)*X(3,1)-0.015625*(X(1,
1)^2))];

G =

((0.0002441406*(X(3,1)^3))-(X(2,1)*0.015625*(X(3,1)^2))-(0.015625*X(3,1)*(X(1,
1)^2)));
beta = G/(sqrt(dg*sigma_x*dg'))
*******[Above code is used to solve beta by MCFOSM (mean centered first order second
moment) by the equation shown below

]********
Beta = 1.32
5.2

ep_1 = 10^-7;
ep_2 = 10^-7;
D = [440 0 0; 0 55 0; 0 0 3500];
M = [2200 220 35000];
R = [1 0.5 0; 0.5 1 0; 0 0 1];
L = chol(R);
J_u_x = inv(L')*inv(D);
J_x_u = D*L';
u = [0;0;0];
for i = 1:20
x = M' + J_x_u*u;
G_u = (1-(x(2,1)/(0.015625*(x(3,1))))-((x(1,1)^2)/(0.015626*(x(3,1)^2))));
m_u = (norm(u)^2)/2 + 10*G_u;
dg = [(-2*x(1,1)/(0.015625*(x(3,1)^2))) (-1/(0.015625*x(3,1)))
((x(2,1)/(0.015625*(x(3,1)^2))) +
(2*(x(1,1)^2)/(0.015625*(x(3,1)^3))))]*J_x_u;
alpha_n = -dg./norm(dg);
d = [G_u/norm(dg) + alpha_n*u]*alpha_n' - u;
beta = alpha_n*u
u = u + d;
end

The above code has been used by using iHL-RF method to find out beta.
Equation used in above code is

The table shows the conversion of the result


5.3
ep_1 = 10^-7;
ep_2 = 10^-7;
D = [440 0 0; 0 55 0; 0 0 3500];
M = [2200 220 35000];
R = [1 0.5 0; 0.5 1 0; 0 0 1];
L = chol(R);
J_u_x = inv(L')*inv(D);
J_x_u = D*L';
u = [0;0;0];
Data = zeros(20,2);
Datas_1 = zeros(63,4);
for i = 1:20
x = M_x' + J_x_u*u
G_u =
((0.000244*(x(3,1)^3))-(x(2,1)*0.015625*(x(3,1)^2))-(0.015625*x(3,1)*(x(1,1)^2
)));
m_u = (norm(u)^2)/2 + 10*G_u;
dg = [(-0.03125*x(1,1)*x(3,1)) (-0.015625*(x(3,1)^2))
(0.000732*(x(3,1)^2)-0.03125*x(2,1)*x(3,1)-0.015625*(x(1,1)^2))]*J_x_u;
alpha_n = -dg./norm(dg);
d = [G_u/norm(dg) + alpha_n*u]*alpha_n' - u;
beta = alpha_n*u
u = u + d;
Data(i,1) = G_u;
Data(i,2) = beta;
for j = 1:3
Datas_1(3*i-2, 1) = i;
Datas_1(3*i+j-3, 2) = x(j,1);
Datas_1(3*i+j-3, 3) = u(j,1);
Datas_1(3*i+j-3, 4) = dg(1,j);
end
end

Above code is used to calculate beta using this equation

The table shows the conversion of the results


SO BETA OBTAINED FROM 5.2 AND 5.3 ARE NEARLY SAME.

You might also like