Hysteresis curve and envelope

47 Ansichten (letzte 30 Tage)
Emily L
Emily L am 7 Apr. 2021
Kommentiert: Felix Bouffard am 21 Mär. 2022
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;

Akzeptierte Antwort

Mathieu NOE
Mathieu NOE am 8 Apr. 2021
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 Kommentar
Felix Bouffard
Felix Bouffard am 21 Mär. 2022
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 ?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by