# Altering/Creating my own PID controller for ArduSub

**URL:** <https://discuss.bluerobotics.com/t/altering-creating-my-own-pid-controller-for-ardusub/11969>\
**Category:** ArduSub\
**Created:** [April 18, 2022, 7:07pm UTC](https://discuss.bluerobotics.com/t/altering-creating-my-own-pid-controller-for-ardusub/11969 "2022-04-18T19:07:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PerFrivik](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@PerFrivik](https://discuss.bluerobotics.com/u/PerFrivik)\
**Post date:** [April 18, 2022, 7:07pm UTC](https://discuss.bluerobotics.com/t/altering-creating-my-own-pid-controller-for-ardusub/11969/1 "2022-04-18T19:07:27Z")

</div>

Hello Everyone, I’m in a team and we are trying to build a buoyancy UUV. I’m wondering does anyone have any idea on how to or could help to alter the PID in the open source code. I have looked at the source code control\_auto.cpp, but i’ts just very confusing as there are so many different functions being called. Does anyone have a good document that explains how the PID here works? Where to find the parameters or update the frequency of the controller? It would be most helpful! I’m all ears for any information that anyone can give me and would appreciate it a ton!

Thank you again for your time and I hope to get some good responses!

Best regards

Per Frivik

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [April 19, 2022, 12:48am UTC](https://discuss.bluerobotics.com/t/altering-creating-my-own-pid-controller-for-ardusub/11969/2 "2022-04-19T00:48:12Z")

</div>

Hi @PerFrivik, welcome to the forum 🙂

> [@Ardusub use for AUV Glider / Single Thruster with control surfaces](https://discuss.bluerobotics.com/t/ardusub-use-for-auv-glider-single-thruster-with-control-surfaces/10942/2):
>
> Detailed developer documentation is something we’re currently somewhat lacking in, and are working to improve. The main reference for ardusub is [ardusub.com](http://ardusub.com) (which is currently undergoing a significant overhaul). As I understand it the current best reference for attitude control is from the [ArduCopter attitude overview](https://ardupilot.org/dev/docs/apmcopter-programming-attitude-control-2.html). It may also be helpful to look through the [Searching Resources](https://discuss.bluerobotics.com/t/how-to-use-the-blue-robotics-forums-please-read/10521#searching-resources-14) section of the How to Use the Blue Robotics Forums post 🙂

These are a couple of the forum posts that may be of interest:

- [Turning BlueROV into Spiderman](https://discuss.bluerobotics.com/t/turning-bluerov-into-spiderman/10330)
- [How to realize control allocation with BlueROV?](https://discuss.bluerobotics.com/t/how-to-realize-control-allocation-with-bluerov/11283)

Beyond that, the main relevant parameters are the [ATC Parameters](https://www.ardusub.com/developers/full-parameter-list.html#atc-parameters), and the following conference presentations may also be applicable.

[![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/e/eb666bd0f750fd3981fd6815f3f9e1ae490a6515.jpeg "Controls update") ](https://www.youtube.com/watch?v=uiruDJRkdRA)

https://www.youtube.com/embed/vmZ14M6j4xE?feature=oembed&wmode=opaque&list=PLC8WVaJJhN4ymMioTdKn0YduaNghJBEmt

I’ve also asked our software team if there are other resources that would be useful for this 🙂

---

<div class="post-metadata">

**Author:** ![PerFrivik](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@PerFrivik](https://discuss.bluerobotics.com/u/PerFrivik)\
**Post date:** [April 19, 2022, 9:04am UTC](https://discuss.bluerobotics.com/t/altering-creating-my-own-pid-controller-for-ardusub/11969/3 "2022-04-19T09:04:04Z")

</div>

Hey EliotBR! I’m super thankful for your help and the resources you have gathered for me :). I’ll take a look at it all and get back to you, and thank you for asking the software team too, I look forward to what they have to say :))!

Best regards,

Per Frivik
