Design mechatronic systems by sizing the machine and its controller together. Choose motors, transmissions and sensors for a motion axis, wire them to a microcontroller, and tune servo control loops against the resonance and backlash of real hardware.