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.
Drone LQR Controller
(C++)
The video above shows a quadcopter simulation. The drone takes off, briefly hovers in place and lands. The objective of this project was to design a Linear Quadratic Regulator (LQR) controller and implement it on a custom made quadcopter employing the Pixracer commercial flight controller. The purpose of the LQR controller was to stabilize the quadcopter in attitude and velocity so that it would hover in place and reject external disturbances.
The equations of motion were derived from a CMU lecture on Quadrotor Modeling and Control. The LQR controller was then designed based on a linearized model of the drone.

A video of the controller stabilizing is shown below.
Although the controller performed well in the simulations, several challenges arrived during hardware implementation. The attitude control consistently worked to stabilize the quadcopter; however, there was no stable position control from just using the LQR controller. Since there was no direct access to position data, velocity and acceleration controls were used in separate attempts to mitigate changes in position. Since the drone was loaned to my team, the were some uncertainties in motor, propeller and inertia parameters which would affect the controller's performance in real conditions. In future aircraft control implementations, I would like to work with trimming, which is a commonly used technique for adjusting aerodynamic forces on all manner of flying vehicles. Trimming can account for an offset center of mass to prevent drifting and maintain a constant altitude.