Processing Timeseries of Cylinder Pressure Data

5 ビュー (過去 30 日間)
Karan Kakar
Karan Kakar 2023 年 3 月 29 日
コメント済み: Karan Kakar 2023 年 4 月 6 日
Dear All - need help to execute below in Matlab:
  1. Open an excel file containing timeseries of pressure data for 4 cylinders for a 15year period (see attached sample file with ~1day of data).
  2. However due to sensor error, data for all cylinders may not be available for all the timestamps, therefore need to
a) Develop a master timestamp array - one option is that this can be the timestamp array for the cylinder with the shortest timestamp array
b) For each timestamp in the master array,
i) check whether pressure data is available for each cylinder
ii) if data is available, check whether data is meaningful (within min-max range - values TBD)
c) If for a given timestamp, meaningful data is available for all four cylinders, then multiply by a calibration factor (value TBD) and add to get total pressure and save to a new array with associated timestamp
d) Else move to next timestamp
3. Plot the total pressure (y-axis) vs time (x-axis)
Thanks!
Karan

採用された回答

KSSV
KSSV 2023 年 3 月 29 日
REad about functions: readtable, datetime, logical inequalitties and plot

その他の回答 (1 件)

Peter Perkins
Peter Perkins 2023 年 4 月 5 日
Your file has four time series in it. I would recommend reading those four ranges using readtimetable to get four timetables. Then use synchronize to get one timetable with a common time vector and four series, one for each cylinder. synchronize has options to return the union or intersection of the four time vectors, and options to interpolate or fill in with NaN. And you can replace out of range values with NaN by hand or using remove outliers. It's all there.
Once you have the data cleaned up, the math to combine across cynlinders and add a new series to your timetable is simple.
No loops are needed here.
  1 件のコメント
Karan Kakar
Karan Kakar 2023 年 4 月 6 日
Brilliant suggestion - thanks @Peter Perkins!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by