Hysteresis curve and envelope

I am trying to plot the backbone curve of the hysteresis curve shown in the figure below. I roughly sketched a black line showing what the backbone curve should look like. The curve plots the minimum force for displacement<0 and the maximum force for displacement>0. I attached the data force (column 1) and displacement (column 2) data. I think a for loop would work for the curve, but I don't know how to structure it. *Code is below
%Column 2 Force vs Displacement
clc;clear;close all;
%Transverse Force
h=load('InputForceDisp.txt');
f=h(:,1); %force
d=h(:,2); %displacement
for i=min(d):max(d)
x=linspace(min(d),max(d),length(d));
if x<=0
y=min(f(i))
else
y=max(f(i))
end
end
%Values used to sketch approximate curve
xapp=[-5.484, -4.021, -2.655, -0.6775, -0.1959, 0, 0.1914, 1.582, 1.993, 2.29, 2.526];
yapp=[-27.69, -26.23, -25.17, -21.04, -10.25, 0, 11.88, 16.73, 17.09, 14.81, 11.85];
h=figure(18);
hold on
plot(d,f,'r','LineWidth',0.5)
plot(x,y,'b','LineWidth',1)
plot(xapp,yapp,'k','LineWidth',1.5)
hold off
xlabel('displacement [in]'); ylabel('force [k]'); grid on;

 Accepted Answer

hello Emily
this is how I solved it (blue curve)
hope it helps
%Column 2 Force vs Displacement
clc;clear;close all;
%Transverse Force
h=load('InputForceDisp.txt');
f=h(:,1); %force
d=h(:,2); %displacement
% for i=min(d):max(d)
% x=linspace(min(d),max(d),length(d));
% if x<=0
% y=min(f(i))
% else
% y=max(f(i))
% end
% end
%Values used to sketch approximate curve
xapp=[-5.484, -4.021, -2.655, -0.6775, -0.1959, 0, 0.1914, 1.582, 1.993, 2.29, 2.526];
yapp=[-27.69, -26.23, -25.17, -21.04, -10.25, 0, 11.88, 16.73, 17.09, 14.81, 11.85];
h=figure(18);
hold on
plot(d,f,'r','LineWidth',0.5)
% plot(x,y,'b','LineWidth',1)
plot(xapp,yapp,'k','LineWidth',1.5)
xlabel('displacement [in]'); ylabel('force [k]'); grid on;
%% create boudary curve data
shrink_factor = 0.5;
k = boundary(d,f,shrink_factor);
dk = d(k);
fk = f(k);
% upper right segment selection
ind_up = find(dk>min(dk)/2 & [diff(dk); 0]< 0);
dk1 = dk(ind_up);
fk1 = fk(ind_up);
dk2 = linspace(0.2,max(dk1),10);
fk2 = interp1(dk1,fk1,dk2);
% lower left segment selection
ind_low = find(dk<0 & [diff(dk); 0]> 0);
dk3 = dk(ind_low);
fk3 = fk(ind_low);
dk4 = linspace(min(dk3),min(0,max(dk3)),10);
fk4 = interp1(dk3,fk3,dk4);
% join the two segments
dkk = [dk4 dk2];
fkk = [fk4 fk2];
plot(dkk,fkk,'b','LineWidth',2.5);
hold off

1 Comment

This is really helpful ! Quick question, how would you solve it to have the blue curve in the lower left segment to be sitting on the curve at the maximum negative force instead of the maximum negative displacement ?

Sign in to comment.

More Answers (1)

Bayya
Bayya on 18 Sep 2024
write matlab code to plot s curve of a hysterisis curve of a ferro my alpha -0.39e11 beta 2.9e15 and pr 13e5 and EC 1e6 using algebraic solver lybaris and using plot function

Asked:

on 7 Apr 2021

Answered:

on 18 Sep 2024

Community Treasure Hunt

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

Start Hunting!