In this video I augment the PD controller to handle reaction wheels that are not pointed along the X Y and Z axes. As long as your reaction wheels form an orthonormal basis this controller will work. It even works for any number of reaction wheels.
All code currently here but just comment if the link is broken.
https://github.com/cmontalvo251/aeros...
Watch video MATLAB Help - CubeSAT Simulation with Non Principally Oriented Reaction Wheels online, duration hours minute second in high quality that is uploaded to the channel Monte Carlos 25 December 2021. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 2,192 times and liked it 33 visitors.