Hysteresis curve and envelope

조회 수: 48 (최근 30일)
Emily L
Emily L 2021년 4월 7일
댓글: Felix Bouffard 2022년 3월 21일
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;

채택된 답변

Mathieu NOE
Mathieu NOE 2021년 4월 8일
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
Felix Bouffard
Felix Bouffard 2022년 3월 21일
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 ?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by