How can I find the Time for specific values of Voltage (with a small tolerance)?

1 visualización (últimos 30 días)
Hi,
I want to extract an Indirect Health Indicator (IHI) from the below plot.
How can I find the Time for specific values of Voltage?
For instance, for Voltage = 3.8 (with a small tolerance 0.01), what is the TIme?
Lithium - Ion Battery Data Set #5 by NASA Prognostics Center of Excellence Data Repository.
load('B0005.mat');
% Cycle 1
Cell_Time_1 = B0005.cycle(2).data.Time; % Time (seconds)
Cell_Voltage_1 = B0005.cycle(2).data.Voltage_measured; % Voltage (V)
Cell_Temperature_1 = B0005.cycle(2).data.Temperature_measured; % Temperature (T)
% Cycle 30
Cell_Time_30 = B0005.cycle(82).data.Time; % Time (seconds)
Cell_Voltage_30 = B0005.cycle(82).data.Voltage_measured; % Voltage (V)
Cell_Temperature_30 = B0005.cycle(82).data.Temperature_measured; % Temperature (T)
% Cycle 60
Cell_Time_60 = B0005.cycle(198).data.Time; % Time (seconds)
Cell_Voltage_60 = B0005.cycle(198).data.Voltage_measured; % Voltage (V)
Cell_Temperature_60 = B0005.cycle(198).data.Temperature_measured; % Temperature (T)
% Cycle 90
Cell_Time_90 = B0005.cycle(313).data.Time; % Time (seconds)
Cell_Voltage_90 = B0005.cycle(313).data.Voltage_measured; % Voltage (V)
Cell_Temperature_90 = B0005.cycle(313).data.Temperature_measured; % Temperature (T)
% Cycle 110
Cell_Time_110 = B0005.cycle(431).data.Time; % Time (seconds)
Cell_Voltage_110 = B0005.cycle(431).data.Voltage_measured; % Voltage (V)
Cell_Temperature_110 = B0005.cycle(431).data.Temperature_measured; % Temperature (T)
% Cycle 140
Cell_Time_140 = B0005.cycle(545).data.Time; % Time (seconds)
Cell_Voltage_140 = B0005.cycle(545).data.Voltage_measured; % Voltage (V)
Cell_Temperature_140 = B0005.cycle(545).data.Temperature_measured; % Temperature (T)
Discharging Voltage Curves with Different Cycles
figure; hold on;
plot(Cell_Time_1, Cell_Voltage_1, 'LineWidth', 2);
plot(Cell_Time_30, Cell_Voltage_30, 'LineWidth', 2);
plot(Cell_Time_60, Cell_Voltage_60, 'LineWidth', 2);
plot(Cell_Time_90, Cell_Voltage_90, 'LineWidth', 2);
plot(Cell_Time_110, Cell_Voltage_110, 'LineWidth', 2);
plot(Cell_Time_140, Cell_Voltage_140, 'LineWidth', 2);
title('Discharging Voltage Curves with Different Cycles');
legend('Cell (1st Cycle)','Cell (30th Cycle)','Cell (60th Cycle)','Cell (90th Cycle)','Cell (110th Cycle)','Cell (140th Cycle)');
xlabel('Time (Seconds)');
ylabel('Voltage (V)');
axis auto;
grid on;
Extract Indirect Health Indicator
%

Respuesta aceptada

Walter Roberson
Walter Roberson el 28 de En. de 2023
find(abs(data-target)<=tolerance)
Or ismembertol()
  3 comentarios
Walter Roberson
Walter Roberson el 28 de En. de 2023
match_Times = Cell_Time_1(abs(Cell_Voltage_1-3.8)<=0.1);
Note that in general there can be more than 1 result -- if you were testing for 3.5 for example then you could get the self-recharge matches too.
Bob
Bob el 29 de En. de 2023
Editada: Bob el 29 de En. de 2023
Thanks again for your answer.
If I correctly understood, this is what I am looking for.
I tried to narrow down the tolerance but it doesnt seem to work but I am ok with the result.
IHI3_Cycle_140_High = Cell_Time_140(find(abs(Cell_Voltage_140-3.8)<=0.005))
IHI3_Cycle_140_Low = Cell_Time_140(find(abs(Cell_Voltage_140-3.5)<=0.005))
IHI3_Cycle_140 = abs(IHI3_Cycle_140_High(1)-IHI3_Cycle_140_Low(1))

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by