For this particulate project, I was given a complete Simscape model of a 3R robot. My objective was to develop a controller that the manipulator could use to follow a given trajectory.
Once the trajectories of the end effector were developed, I calculated the joint angles for each joint using standard inverse kinematics formulas. For the manipulator control, I used a combination of a PID and a transpose Jacobian controller to control the robot's joint torques. Transpose Jacobian control is a popular method of controlling robotic systems and is less computationally intense than inverse Jacobian. The Simulink block diagram of the controller is shown in the image below.
Upright Pendulum Control
Matlab

The objective of this project was to swing up and stabilize an inverted pendulum mounted on a cart. First, a feedback linearization (FBL) control law was used to compensate for the nonlinear dynamics of the system. After nearing the desired steady state, i.e. becoming upright, the control was switched to a Linear Quadratic Regulator (LQR) controller, which kept the pendulum upright and drove the position to zero. Scroll down for more.
Combined Feedback Linearization and LQR Controller in Force Domain
The snippet above shows the pendulum first swinging upright with the help of a feedback linearization control. As soon as the pendulum reaches a certain angular threshold, the control switches to an LQR controller, which keeps it upright. The advantage of the combined control was that with FBL, the pendulum was able to reach the desired steady state quickly, and then external disturbances could be rejected by the LQR.