Averaging Hysteresis Data - how to do it?
27 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Giuseppe Naselli
el 16 de Dic. de 2013
Comentada: Fede
el 7 de Feb. de 2024
Hi All,
below damper Force Vs Velocity for a typical 2-way adjustment damper is shown and as expected a typical hysteresis shape is obtained. We could imagine the data as the sum of 2 curves: one curve is given when the velocity goes from NEGATIVE to POSITIVE and the other is obtained when the velocity goes from POSITIVE to NEGATIVE
I want to use this damper data on my vehicle dynamics model and in order to speed up the processing time (as there are 4 dampers) I would like to extrapolate a curve with the following features
- Only one line
- This line should pass the middle of the two curves (a sort of average, an ideal damper with no hysteresis)
I would appreciate some suggestions on how to tackle this problem. how would you do that?
Many thanks for you help
(DATA attached)
Thanks in advance
G
0 comentarios
Respuesta aceptada
Mischa Kim
el 4 de En. de 2014
Hello Guiseppe, try to use curve fitting. In MATLAB, go to the Apps tab and find the Curve Fitting app (in the math, statistics and optimization folder). Select as X and Y data Velocity and Force, respectively. Smooth Splines will probably work pretty well, you can also adjust the smoothness/roughness of the fit.
3 comentarios
Fede
el 7 de Feb. de 2024
Let's assume you have your datain (x,f) format, meaning displacement and force:
% First, I calculate the index at which the data turns, to separate up and down curves:
% hystereis turning point:
[x_turning, idx] = max(x_data);
x_up = x_data(1:idx);
f_up = f_data(1:idx);
x_down = x_data(idx:end);
f_down = f_data(idx:end);
% plot(x_up, f_up, 'o')
% plot(x_down, f_down, 'x')
% Then, Filter to only keep unique values:
%Keep unique values:
[x_up,ia,~] = unique(x_up);
f_up = f_up(ia);
% plot(x_up,f_up, '.');
[x_down,ia,~] = unique(x_down);
f_down = f_down(ia);
% plot(x_down,f_down, '.');
% Fit curves for each segment:
nQueryPoints= 100;
xx_up = linspace(min(x_up), max(x_up), nQueryPoints); % Generating points for smooth curve
yy_up = interp1(x_up,f_up,xx_up);
% plot(xx_up, yy_up, 'r');
xx_down = xx_up; % Note: I take the same query points as xx_up, to be ale to later calculate average value :)
yy_down = interp1(x_down,f_down,xx_down);
% plot(xx_down, yy_down, 'g');
% Calculate Average value:
xx_avg = xx_up;
yy_avg = (yy_up+yy_down)./2;
plot(xx_avg, yy_avg, '--b');
It doesn't give you a spline, but it's something!
Más respuestas (0)
Ver también
Categorías
Más información sobre Interpolation en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!