Machine safety: Functional safety and simulation