Hazard Analysis of Collaborative Automation Systems: A Two-layer Approach based on Supervisory Control and Simulation