A Hardware-In-the-Loop setup for rapid control prototyping of mechatronic systems