Design Patterns for Model-Based Automation Software Design and Implementation