Modeling and design of mechatronic systems