r/Kos • u/BriarAndRye • Jun 29 '15
Tutorial Hover PID Tutorial
Hey everyone. Here's the tutorial for designing a PID controller for a hovering rocket that I promised a while back. The download link is zip file which contains a pdf of the tutorial and an example script which is an adaptation of the script by /u/Dunbaratu. The script requires kOS 17.3 to work.
Please, take a look. Let me know what works, what's confusing. I want to improve this so it is accessible to people new to kOS.
Thanks, and enjoy!
26
Upvotes
2
u/exoticsimpleton Jun 29 '15
This is really helpful, but a lot of the terms still go over my head. It reads like you do this stuff every day and are very familiar with all of the terminology and math involved.
I got through the first page fine, but then you start dropping terms like "Laplace transformation" and "frequency domain" and I'm pretty lost. :)
Around equations 4-7 I start having a hard time keeping up; my math is not the best, so forgive me if this is easy stuff. I think that if you could expand on the working steps between each one I'd be able to follow easier.
If you're aiming for a more educated reader, these comments are probably unnecessary. I feel like a general audience might have the same problems as me however.
Thanks for taking the time to put this together!
1
u/rooood Jun 29 '15
This is brilliant, I'll have a better look at it when I get home from work and can actually test things out. I didn't know you could (should) use variable K values. Can I ask you what software/site do you use to plot your graphs? And also how do you log your flight to plot a graph of a launch? (if that makes sense to you?)
1
u/fibonatic Jul 03 '15
In the introduction of the PDF you talk about saturation, but you do not mention it anywhere else in the document, but you could add that one could choose the natural frequency such that the actuator does not saturate, or how to choose the reference signal.
1
u/asm-teleco Sep 20 '24
I remember a time when all these equations made sense to me. They don't anymore, but the code works all right and I can use it all right too.
I was thinking on merging this with a suicide burn script, to allow it to be more efficient and to work even if the terrain isn't flat.
I was also thinking to make it able to change from AGL to ASL, that would help a lot too for landing on top of buildings and ships (to make towers of different ships coupled between one another)
1
u/[deleted] Feb 08 '22
This might be a really stupid question, but my physics, math and IT knowledge is a little rusty.
What does K stand for?
I don't remember a variable K from physics and on google i can't find the answer either (language barrier due to my search engine set to German?). In your text I also struggle to understand where exactly K is coming from.
Also does this code still work after 7 years?
0
u/Magnevv Jun 29 '15
Why is this a zip file? :/