1,139 downloads
Auto Credit Based on huuminberd's Vizzy PID controller test rig BETA

Work in progress.
Attempts to maintain a constant altitude above ground level using a PID controller. The stabilisation of vertical velocity is based around a set algorithm, acknowledgments to pedro16797, the PID output feeds the algorithm an offset which raises or lowers the vertical velocity in response to the changing terrain.
The TWR in this configuration make it suitable for Luna or Cylero.

Translate Forward to lift off.
Translate Up/Down and Left/Right to manoeuvre.

The legs are raised and lowered automatically dependent on lateral velocity. When the legs are lowered Translate Backwards will land the craft and switch off engines.

The AGL set points are determined in script by lateral velocity.

Brake Slider, proportional gain.
Slider 1, integral gain.
Slider 2, derivative gain.

Translate Forward also displays the PID gains.

The PID tunings are a rough guess, I’ve noticed on Luna a high derivative gain works well.

It’s not particularly accurate over difficult terrain at higher speeds, though is reasonably robust.

GENERAL INFO

PERFORMANCE

  • Total Delta V: 2.3km/s
  • Total Thrust: 14kN
  • Engines: 6
  • Wet Mass: 3,299kg
  • Dry Mass: 1,362kg

STAGES

Stage Engines Delta V Thrust Burn Mass
2 6 2.3km/s 14kN 6.1m 3,299kg

16 Comments

  • Log in to leave a comment
  • Profile image

    @huuminberd Certainly the PID control that i think is what you want to show here, meets the task... at least in high gain...

    4.2 years ago
  • Profile image
    1,155 huuminberd

    @Jaime731 Cool, though I'm still experimenting with this, it's not as tight as I'd like.

    4.2 years ago
  • Profile image

    Works on mobile...
    Huuminberd PID controller

    4.2 years ago
  • Profile image
    8,398 crowxe

    @huuminberd cool :) I'll upload a video showing the demo test. It's beautiful to watch really . And thanks

    4.2 years ago
  • Profile image
    1,155 huuminberd

    @crowxe Yeah the gravity velocity vector needs converting to length. It sounds interesting what you're doing, haven't had a chance to dig in yet. Feel free to public list it if your happy with, I'm not territorial 🙂. I was getting bored with the original test rig so that's why I built another model. It's just a platform to experiment with Vizzy control systems.

    4.2 years ago
  • Profile image
    8,398 crowxe

    @huuminberd
    Use on phone as the vizzy version used is the old one with normal gravity , not vector gravity

    4.2 years ago
  • Profile image
    8,398 crowxe

    @huuminberd
    I've been busy with your craft even with the new vizzy (it messed up older program that uses "Gravity" and took me a while to figure out how to fix it) I made a program for your craft, it fly higher for safety (minimum 5m) because I like it fast , the best addition is the free fall safety with engines off and a suicide landing burn trigger so I don't have to worry when it's climbing up hill fast. The deadly maneuver for the craft is encountering a slope up hill while falling from a previous hill

    https://www.simplerockets.com/c/q92SmD/Hill-Rider

    4.2 years ago
  • Profile image
    1,155 huuminberd

    Hmmm triggered something

    4.3 years ago
  • Profile image
    1,155 huuminberd

    @crowxe Ha, OK cool, I've just installed on windows and the translate forward doesn't seem to work for the conditional statement. Weird. Maybe me, haven't had more than a minute to look at it.
    <2m/s setpoint is 2m

    2 and <10m/s setpoint 5m
    10m/s setpoint 10m
    Completely arbitrary. The maximum reasonable lateral speed depends on the terrain. Climbing in and out of steep gullies certainly less than 10m/s. Over marginally flat ground, whatever. Luna is more tricky than Cylero. The low gravity makes things very laggy. For Luna I'd maybe set the low fail and high fail thresholds further out. Maybe LF at 4, HF at - 10.

    4.3 years ago
  • Profile image
    8,398 crowxe

    @huuminberd
    Alright, I tried. The controls are nice. I'm using it on phone for now. I don't know what's the targeted AGL though or the maximum reasonable lateral speed. I need those before I start testing the slides (which I'll be just playing around as I'm still not familiar with PID control aspects of this craft)

    4.3 years ago
  • Profile image
    1,155 huuminberd

    I've gotta say, this is quite a challenging scenario for PID control, it's just about adequate but can be defeated by various situations. I crudely implemented some failsafe 'out of range' exceptions, which takeover if the error gets too big. I'm thinking the thresholds might be a bit tight for Luna, which obviously plays very differently to Cylero. There might be a better way which involves scaling the PID gain based on error thresholds.

    4.3 years ago
  • Profile image
    1,600 Tarquez

    Cool build, buddy!

    4.3 years ago
  • Profile image
    1,155 huuminberd

    @crowxe Sorry to ask but basics first, your not on Droo? There's not enough thrust for Droo.. I've just downloaded it into a fresh game, launch only Luna. It's working here. Translate Forward, not up, to lift off. I changed the controls around a bit from the test rig. Is the navsphere showing changes with the right stick? Curious.

    4.3 years ago
  • Profile image
    8,398 crowxe

    @huuminberd
    After pressing translation, the directions are not doing anything

    4.3 years ago
  • Profile image
    1,155 huuminberd

    @crowxe What happens so that you can't use the program, what's going wrong?

    4.3 years ago
  • Profile image
    8,398 crowxe

    it's a beautiful craft, i couldnt use its program and i didn't give it some time to try again...i ran like crazy to check the script and when i failed to understand anything..i thought i'd make my own :) will share in a link

    4.3 years ago

10 Upvotes

Log in in to upvote this post.