Design of CAN-based distributed control systems with optimized configuration