Condition-based Maintenance: Rainflow Counting