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

조회 수: 2 (최근 30일)
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
%

채택된 답변

Walter Roberson
Walter Roberson 2023년 1월 28일
find(abs(data-target)<=tolerance)
Or ismembertol()
  댓글 수: 3
Walter Roberson
Walter Roberson 2023년 1월 28일
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 2023년 1월 29일
편집: Bob 2023년 1월 29일
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))

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by