Before I get started, it's really complicated and hard to perfect. Are you sure you need this?
If yes, read on.
You will need some kind of PID algorithm. Those VIs are located in the Control and Simulation palette. Read up on them a lot, and you will learn much.
As for the IMU, there is a LabVIEW VI set you can get off GitHub. the links are in
this page, or rather, its derivative pages.