Modeling and control of flexible mechatronic systems