Chapter 16: Robot System Design Process
Lesson 5: Design for Maintainability and Cost
This lesson introduces quantitative tools for designing robot systems that are maintainable (easy and fast to keep operational) and cost-efficient over their entire life cycle. We construct basic reliability/maintainability models, couple them with life-cycle cost formulations, and show how to reason about trade-offs using simple analytical and computational tools.
1. Maintainability and Life-Cycle Cost Concepts
In robot system design, it is not enough that a robot works in the lab. It must be available and affordable over years of operation. This is captured by three interconnected concepts:
- Reliability – probability the robot (or subsystem) performs its intended function without failure over an interval.
- Maintainability – probability the robot can be restored to operation within a specified time when a failure occurs.
- Life-cycle cost (LCC) – total cost from concept to retirement, including design, acquisition, operation, maintenance, and disposal.
Let \( T_f \) denote the time-to-failure of a component, and \( T_r \) the repair time. We define the reliability function
\[ R(t) = \mathbb{P}(T_f > t), \quad t \ge 0, \]
and the maintainability function
\[ M(t) = \mathbb{P}(T_r \le t), \quad t \ge 0. \]
The corresponding mean-time metrics are
\[ \text{MTBF} = \mathbb{E}[T_f] = \int_0^{\infty} t f_{T_f}(t)\,\mathrm{d}t, \quad \text{MTTR} = \mathbb{E}[T_r] = \int_0^{\infty} t f_{T_r}(t)\,\mathrm{d}t. \]
For a repairable robot, the steady-state availability for a single component under a renewal approximation is
\[ A \approx \frac{\text{MTBF}}{\text{MTBF} + \text{MTTR}}. \]
High availability can be achieved either by increasing \( \text{MTBF} \) (more reliable parts) or decreasing \( \text{MTTR} \) (better maintainability: modular design, accessible fasteners, standardized connectors, good documentation, etc.). Design for maintainability focuses on the latter.
flowchart TD
REQ["System requirements: availability and budget"] --> ARCH["High-level architecture"]
ARCH --> REL["Reliability choices \n(component quality, redundancy)"]
ARCH --> MAINT["Maintainability choices \n(modularity, access, diagnostics)"]
REL --> LCC["Life-cycle cost model"]
MAINT --> LCC
LCC --> TRADE["Trade-off study: availability vs cost"]
TRADE --> DESIGN["Final design decisions"]
2. Life-Cycle Cost (LCC) Modeling
A robot's life-cycle cost is the sum of all costs from development to disposal. Decomposing into major categories:
\[ \text{LCC} = C_{\text{dev}} + C_{\text{acq}} + C_{\text{op}} + C_{\text{maint}} + C_{\text{downtime}} + C_{\text{ret}}. \]
Over an operating horizon \( [0, T_h] \), we can write a discounted cost model
\[ \text{LCC} = C_{\text{dev}} + C_{\text{acq}} + \mathbb{E}\!\left[ \int_0^{T_h} e^{-\rho t} \Big( c_{\text{op}}(t) + c_{\text{maint}}(t) + c_{\text{downtime}}(t) \Big) \,\mathrm{d}t \right] + C_{\text{ret}}, \]
where \( \rho \ge 0 \) is a discount rate and the cost rates \( c_{\text{op}}, c_{\text{maint}}, c_{\text{downtime}} \) depend on reliability and maintainability decisions.
For a simplified discrete-time (per-year) model with expected values \( \mathbb{E}[C_{\text{maint}}(k)] \) and \( \mathbb{E}[C_{\text{downtime}}(k)] \) at year \( k \):
\[ \text{LCC} \approx C_{\text{dev}} + C_{\text{acq}} + \sum_{k=1}^{N} \frac{\mathbb{E}[C_{\text{op}}(k)] + \mathbb{E}[C_{\text{maint}}(k)] + \mathbb{E}[C_{\text{downtime}}(k)]}{(1+\rho)^k} + C_{\text{ret}}. \]
Maintainability-driven design decisions (e.g. degree of modularity, number of spare modules, built-in diagnostics) modify \( \mathbb{E}[C_{\text{maint}}(k)] \) and \( \mathbb{E}[C_{\text{downtime}}(k)] \):
- More modular robot → higher acquisition cost but reduced repair time and labor.
- Better diagnostics → increased development cost but fewer troubleshooting hours and misdiagnoses.
- Standardized components → lower spare-part logistics cost and better economies of scale.
flowchart LR
DEV["Dev cost"] --> LCCNODE["Total LCC"]
ACQ["Acquisition cost"] --> LCCNODE
OP["Operation cost (energy, operators)"] --> LCCNODE
MA["Maintenance cost (spares, labor)"] --> LCCNODE
DT["Downtime cost (lost production)"] --> LCCNODE
RET["Retirement cost"] --> LCCNODE
3. Reliability, Maintainability, and Availability Metrics
A common assumption for electronic components in early design is an exponential time-to-failure model with constant failure rate \( \lambda > 0 \):
\[ f_{T_f}(t) = \lambda e^{-\lambda t}, \quad R(t) = \mathbb{P}(T_f > t) = e^{-\lambda t}, \quad \text{MTBF} = \frac{1}{\lambda}. \]
For repair time, a simple model is an exponential with rate \( \mu > 0 \):
\[ f_{T_r}(t) = \mu e^{-\mu t}, \quad M(t) = 1 - e^{-\mu t}, \quad \text{MTTR} = \frac{1}{\mu}. \]
Under these assumptions, the steady-state availability of a single repairable subsystem becomes
\[ A = \frac{\mu}{\lambda + \mu} = \frac{\text{MTBF}}{\text{MTBF} + \text{MTTR}}. \]
For a robot composed of \( N \) series subsystems (any one failing stops the robot), a conservative approximation is
\[ A_{\text{sys}} \approx \prod_{i=1}^{N} A_i = \prod_{i=1}^{N} \frac{\mu_i}{\lambda_i + \mu_i}. \]
This illustrates an important design message: even if individual subsystems are highly available, many subsystems in series can yield moderate system availability unless maintainability is carefully engineered (e.g. quick swap of high-failure-rate modules).
If the cost of one hour of downtime is \( C_d \) and we approximate the fraction of time the robot is down by \( 1 - A_{\text{sys}} \), then the expected downtime cost rate is
\[ c_{\text{downtime}} \approx C_d \big(1 - A_{\text{sys}}\big). \]
Designing for maintainability aims to increase \( \mu_i \) (faster repair) where it yields the biggest reduction in \( c_{\text{downtime}} \) per unit design cost.
4. Preventive Maintenance and Cost-Rate Optimization
A common maintainability-related design question is: how often should we replace a critical component to minimize average cost per unit time? This is an age replacement problem.
Assume:
- Time-to-failure \( T_f \sim \text{Exp}(\lambda) \).
- Preventive replacement at age \( \tau > 0 \) (if still working) costs \( C_p \).
- Corrective replacement upon failure costs \( C_f \) with \( C_f \ge C_p \).
Each replacement cycle ends at time \( \min(T_f, \tau) \). The expected cost of a cycle is
\[ \mathbb{E}[C(\tau)] = C_f \,\mathbb{P}(T_f \le \tau) + C_p \,\mathbb{P}(T_f > \tau) = C_f(1 - e^{-\lambda \tau}) + C_p e^{-\lambda \tau}. \]
The expected cycle length is
\[ \mathbb{E}[L(\tau)] = \mathbb{E}[\min(T_f,\tau)] = \int_0^{\tau} t\,\lambda e^{-\lambda t}\,\mathrm{d}t + \tau \,\mathbb{P}(T_f > \tau) = \frac{1 - e^{-\lambda \tau}}{\lambda}. \]
Therefore, the average cost per unit time is
\[ g(\tau) = \frac{\mathbb{E}[C(\tau)]}{\mathbb{E}[L(\tau)]} = \lambda \, \frac{C_f + (C_p - C_f)e^{-\lambda \tau}}{1 - e^{-\lambda \tau}}. \]
The optimal replacement age \( \tau^\star \) minimizes \( g(\tau) \) for \( \tau > 0 \). We can differentiate and set the derivative to zero:
\[ \frac{\mathrm{d}g}{\mathrm{d}\tau} = 0 \quad \Rightarrow \quad \text{implicit equation in } \tau^\star \text{ that is solved numerically.} \]
Robot designers typically:
- Estimate \( \lambda \) and costs \( C_p, C_f \) from vendor data or prototypes.
- Compute \( g(\tau) \) on a grid of candidate ages.
- Choose \( \tau^\star \) (or a constrained variant) that minimizes cost and satisfies safety requirements.
This optimization is part of design for maintainability: adding features that reduce \( C_f \) or increase allowable \( \tau \) (e.g. better diagnostics) may be justified if they significantly reduce \( g(\tau) \).
5. Simple Computational Examples
In this section we implement basic availability and cost-rate calculations in several languages commonly used around robotics software stacks. These snippets are intentionally simple and focus on numerical evaluation of the formulas from the previous sections.
5.1 Python: Availability and Preventive Maintenance Cost Grid
import numpy as np
def availability(mtbf, mttr):
"""Compute steady-state availability A = MTBF / (MTBF + MTTR)."""
mtbf = float(mtbf)
mttr = float(mttr)
return mtbf / (mtbf + mttr)
def cost_rate_age_replacement(lam, C_p, C_f, tau):
"""
Average cost rate g(tau) for exponential failure rate lam,
preventive cost C_p, corrective cost C_f, replacement age tau.
"""
lam = float(lam)
C_p = float(C_p)
C_f = float(C_f)
tau = float(tau)
if tau <= 0.0:
raise ValueError("tau must be positive")
num = C_f + (C_p - C_f) * np.exp(-lam * tau)
den = 1.0 - np.exp(-lam * tau)
return lam * num / den
# Example parameters (illustrative only)
mtbf_motor = 2000.0 # hours
mttr_motor = 4.0 # hours
A_motor = availability(mtbf_motor, mttr_motor)
print("Motor availability:", A_motor)
lam = 1.0 / mtbf_motor
C_p = 200.0 # preventive replacement cost
C_f = 800.0 # corrective replacement cost
taus = np.linspace(100.0, 3000.0, 30)
g_vals = [cost_rate_age_replacement(lam, C_p, C_f, tau) for tau in taus]
tau_star = taus[int(np.argmin(g_vals))]
g_star = min(g_vals)
print("Approx optimal replacement age:", tau_star, "hours")
print("Min cost rate:", g_star, "cost units per hour")
5.2 C++: Availability Utility for Robot Subsystems
#include <iostream>
#include <vector>
double availability(double mtbf, double mttr) {
return mtbf / (mtbf + mttr);
}
double system_availability_series(const std::vector<double>& mtbf,
const std::vector<double>& mttr) {
if (mtbf.size() != mttr.size()) {
throw std::runtime_error("mtbf and mttr vectors must have same size");
}
double A_sys = 1.0;
for (std::size_t i = 0; i < mtbf.size(); ++i) {
double Ai = availability(mtbf[i], mttr[i]);
A_sys *= Ai;
}
return A_sys;
}
int main() {
std::vector<double> mtbf = {2000.0, 5000.0, 3000.0}; // hours
std::vector<double> mttr = { 4.0, 2.0, 1.0}; // hours
double A_sys = system_availability_series(mtbf, mttr);
std::cout << "Approx series system availability: "
<< A_sys << std::endl;
double downtime_cost_per_hour = 100.0; // arbitrary units
double c_down = downtime_cost_per_hour * (1.0 - A_sys);
std::cout << "Approx downtime cost rate: "
<< c_down << " cost units per hour" << std::endl;
return 0;
}
5.3 Java: Simple Life-Cycle Cost Aggregation
public class LifeCycleCost {
public static double discountedSum(double[] yearlyCosts, double rho) {
double lcc = 0.0;
for (int k = 0; k < yearlyCosts.length; ++k) {
int year = k + 1;
lcc += yearlyCosts[k] / Math.pow(1.0 + rho, year);
}
return lcc;
}
public static void main(String[] args) {
double C_dev = 50000.0;
double C_acq = 80000.0;
double rho = 0.05;
// Example expected yearly operating + maintenance + downtime costs
double[] yearly = new double[] {
15000.0, 15000.0, 16000.0, 17000.0, 18000.0
};
double lcc_oper = discountedSum(yearly, rho);
double lcc_total = C_dev + C_acq + lcc_oper;
System.out.println("Discounted operating-related LCC: " + lcc_oper);
System.out.println("Total LCC (approx): " + lcc_total);
}
}
5.4 MATLAB / Simulink: Cost-Rate Curve Evaluation
function cost_rate_age_replacement_demo
mtbf = 2000; % hours
lam = 1/mtbf;
C_p = 200; % preventive replacement cost
C_f = 800; % corrective replacement cost
tau_vec = linspace(100, 3000, 50);
g_vec = arrayfun(@(tau) cost_rate_age_replacement(lam, C_p, C_f, tau), tau_vec);
[g_star, idx] = min(g_vec);
tau_star = tau_vec(idx);
fprintf("Approx optimal replacement age: %.1f hours\n", tau_star);
fprintf("Min cost rate: %.2f cost units per hour\n", g_star);
figure;
plot(tau_vec, g_vec, 'LineWidth', 1.5);
xlabel('Replacement age tau [hours]');
ylabel('Cost rate g(tau) [cost units/hour]');
grid on;
end
function g = cost_rate_age_replacement(lam, C_p, C_f, tau)
if tau <= 0
error('tau must be positive');
end
num = C_f + (C_p - C_f) * exp(-lam * tau);
den = 1 - exp(-lam * tau);
g = lam * num / den;
end
In a Simulink model, the same computation can be represented by blocks:
a constant block for lam, a time-varying or parameter block
for tau, math function blocks implementing the exponential
and rational expression for \( g(\tau) \), and a scope
block to visualize how cost rate changes as you sweep
\( \tau \).
6. Problems and Solutions
Problem 1 (Availability of a Two-Subsystem Robot):
A mobile robot has two critical subsystems in series: a drive subsystem
and a perception subsystem. The drive subsystem has
\( \text{MTBF}_1 = 3000 \) hours and
\( \text{MTTR}_1 = 3 \) hours. The perception subsystem
has \( \text{MTBF}_2 = 2000 \) hours and
\( \text{MTTR}_2 = 2 \) hours.
(a) Compute the availability of each subsystem.
(b) Compute the approximate system availability assuming a series
structure.
Solution:
(a) For subsystem \( i \) we have
\( A_i = \frac{\text{MTBF}_i}{\text{MTBF}_i + \text{MTTR}_i} \).
\[ A_1 = \frac{3000}{3000 + 3} \approx 0.999, \quad A_2 = \frac{2000}{2000 + 2} \approx 0.999. \]
(b) For a series system the approximate availability is \( A_{\text{sys}} \approx A_1 A_2 \):
\[ A_{\text{sys}} \approx 0.999 \times 0.999 \approx 0.998. \]
Even with individually high availabilities, the series combination slightly reduces system availability. Adding more subsystems in series would further reduce \( A_{\text{sys}} \).
Problem 2 (Effect of Maintainability Improvement): For the perception subsystem in Problem 1, you are considering design changes that reduce the mean repair time from \( 2 \) hours to \( 0.5 \) hour, without changing MTBF. Compute the new subsystem availability and the new system availability.
Solution: The new perception maintainability gives
\[ A_2' = \frac{2000}{2000 + 0.5} \approx 0.99975. \]
The drive subsystem remains as before \( A_1 \approx 0.999 \). The new system availability is
\[ A_{\text{sys}}' \approx A_1 A_2' \approx 0.999 \times 0.99975 \approx 0.99875. \]
The maintainability improvement slightly increases availability. Whether this is worth the design cost depends on the downtime cost and life-cycle cost analysis.
Problem 3 (Expected Number of Failures): A robot joint actuator has exponential time-to-failure with \( \lambda = 1 / 4000 \) failures per hour. Over a 10 000-hour mission horizon, approximate the expected number of failures if the actuator is repaired to as-good-as-new after each failure.
Solution: Under the exponential and perfect-repair assumptions, failures occur as a Poisson process with rate \( \lambda \). The expected number of failures in horizon \( T \) is \( \lambda T \):
\[ \mathbb{E}[N(T)] = \lambda T = \frac{1}{4000} \cdot 10000 = 2.5. \]
On average, we expect 2.5 failures in this horizon. This can be used to estimate expected maintenance labor and spare-part consumption.
Problem 4 (Cost-Rate Comparison of Replacement Ages): Consider the age replacement model in Section 4 with \( \lambda = 1 / 2000 \) per hour, \( C_p = 200 \), and \( C_f = 800 \). Compare the cost rates \( g(1000) \) and \( g(3000) \). Which age is preferable according to the cost-rate criterion?
Solution: We use \( g(\tau) = \lambda \,\dfrac{C_f + (C_p - C_f)e^{-\lambda \tau}}{1 - e^{-\lambda \tau}} \). First compute \( \lambda = 1 / 2000 = 5 \times 10^{-4} \).
\[ \begin{aligned} e^{-\lambda \cdot 1000} &= e^{-0.5} \approx 0.6065, \\ e^{-\lambda \cdot 3000} &= e^{-1.5} \approx 0.2231. \end{aligned} \] \[ g(1000) = 5 \times 10^{-4} \frac{800 + (200 - 800)\cdot 0.6065}{1 - 0.6065} \approx \\ 5 \times 10^{-4} \frac{800 - 363.9}{0.3935} \approx 5 \times 10^{-4} \cdot 1110.7 \approx 0.555. \] \[ g(3000) = 5 \times 10^{-4} \frac{800 + (200 - 800)\cdot 0.2231}{1 - 0.2231} \approx \\ 5 \times 10^{-4} \frac{800 - 133.9}{0.7769} \approx 5 \times 10^{-4} \cdot 858.6 \approx 0.429. \]
Since \( g(3000) \lt g(1000) \) in this example, waiting longer between replacements is cheaper on average, even though it leads to a higher probability of corrective failures. The optimal \( \tau^\star \) would lie somewhere near 3000 hours (exact value found via numerical search).
Problem 5 (Impact of Discount Rate on LCC): A robot has a development cost of 50 000, acquisition cost of 80 000, and constant yearly operating plus maintenance cost of 15 000 for 5 years. Compute the life-cycle cost for discount rates \( \rho = 0 \) and \( \rho = 0.1 \), and comment on the difference.
Solution: For \( \rho = 0 \), there is no discounting:
\[ \text{LCC}_{\rho=0} = 50000 + 80000 + 5 \cdot 15000 = 50000 + 80000 + 75000 = 205000. \]
For \( \rho = 0.1 \), discounted operating cost is
\[ \sum_{k=1}^{5} \frac{15000}{(1 + 0.1)^k} \approx 15000 \cdot (0.9091 + 0.8264 + 0.7513 + 0.6830 + 0.6209) \approx \\ 15000 \cdot 3.7907 \approx 56861. \]
Thus
\[ \text{LCC}_{\rho=0.1} \approx 50000 + 80000 + 56861 \approx 186861. \]
Higher discount rate reduces the present value of future operating and maintenance costs. Design decisions that reduce early-life failures and costs may therefore be more attractive when the discount rate is low (future costs matter almost as much as present ones).
7. Summary
In this lesson we formalized design for maintainability and cost using basic reliability and life-cycle cost concepts. We introduced:
- Reliability \( R(t) \), maintainability \( M(t) \), and availability \( A \), along with MTBF and MTTR.
- A life-cycle cost (LCC) decomposition linking engineering choices to long-term economic performance.
- Approximate formulas for system availability in series architectures and cost of downtime.
- An age replacement model and the average cost-rate function \( g(\tau) \), illustrating preventive maintenance planning.
- Simple Python, C++, Java, and MATLAB examples to numerically explore availability and cost trade-offs.
These tools provide a quantitative language for trade-off studies within the robot system design process, complementing the qualitative design thinking from previous lessons in this chapter.
8. References
- Barlow, R.E., & Proschan, F. (1965). Mathematical Theory of Reliability. John Wiley & Sons.
- Barlow, R.E., & Hunter, L.C. (1960). Optimum preventive maintenance policies. Operations Research, 8(1), 90–100.
- Blanchard, B.S. (1992). Logistics engineering and management (chapters on life-cycle costing and maintainability). Prentice Hall.
- Dhillon, B.S. (1999). Engineering Maintainability: How to Design for Reliability and Easy Maintenance. Gulf Publishing.
- Sherif, Y.S., & Smith, M.L. (1981). Optimal maintenance models for systems subject to failure: a review. Naval Research Logistics Quarterly, 28(1), 47–74.
- Saaty, T.L. (1961). Elements of Queueing Theory with Applications. McGraw-Hill. (For renewal and availability calculations.)
- Kapur, K.C., & Lamberson, L.R. (1977). Reliability in Engineering Design. John Wiley & Sons.
- Ebeling, C.E. (1997). An Introduction to Reliability and Maintainability Engineering. McGraw-Hill.