The project simulinks the dynamic modeling and PD/InverseDynamic control of 2-link robotic manipulator. It uses S-function to execute state differential equation in Matlab Simulink.
Above results looks not perfect due to short time duration, it works better when the simulation runs longer.