The Lego NXT robotic arm was controlled using Simulink for a pick and place task. System identification was performed for the two motors that control the position of the end-effector. The scope shows the angular rotation of motors that control the up and down movement, and the rotation of the base. It takes about 45 seconds to download the program to the Lego brick. A PI controller was designed and discretized using the Forward Euler technique before implementing it by the Lego robot.
Here’s a video of the controlled robotic arm below.