In my Mechatronics Systems class, I had a project with a partner where we were tasked with using the Matlab Simscape and Simulink applications to both simulate motor control with a potentiometer, and control actual motor position and speed in real time using a potentiometer.