Jump to content

MAFman

Members
  • Posts

    328
  • Joined

  • Last visited

Everything posted by MAFman

  1. I think the option I'll go with is the modular ground base. That means I need one rover for mining, one lander for refining, and a rover to transport the fuel to my Starship replica.
  2. Do you use the claw thing to refuel craft, since you can't use EVA construction for fuel lines?
  3. What are some ways I can make a mining/refinery base on the Mun? The refineries I come up with are way too big to actually land.
  4. How do I tune a PID controller to control a drone's altitude using the Ziegler Nichols method? Specifically, the first step is tripping me up, where the proportional gain starts at zero and is slowly ramped up until the output oscillates. How do I do that with the plant variable being motor throttle and the measured variable being altitude?
  5. I've successfully made a sort-of-stable helicopter using a single rotor and tail rotor! I just had to move the tail rotor as far away from the center of mass and as far up as possible, and enable yaw control on the tail rotor blades.
  6. It can however lift 35 tons to orbit and lob it at the Mun with fuel to spare.
  7. I just rebuilt one with the Rhino engine as the second stage and two Pollux boosters, and it does make it into orbit theoretically, barely, with a 90 ton payload. ...or not
  8. Ohhhh, so my payloads are just way too small. I was only trying to lift a 15-ton Orion spacecraft thing.
  9. Has anyone been able to make a Boston Dynamics-esque walking robot? I can't seem to get the kinematics right.
  10. Oh, so while the parts look the same as the real thing, they're not intended to be even close to replicas?
  11. What I mean is when I try to build something resembling the SLS, it is able to shoot off into infinity without boosters, which seems odd.
  12. I see. However, it doesn't make sense to me why I should be able to lift the entire SLS stack using just the Mammoth engines with no boosters with a TWR over 1.5.
  13. Is it just me, or is the main engine for the SLS very overpowered, with almost the same thrust as the real thing?
  14. Actually, I have a semi-working script already. Just, it hard-codes the kP value instead of finding it experimentally. How do I find the kP value in a PID? Here's my script: // Tune a quadcopter using electric motors function tuneQuad { clearscreen. core:doEvent("Open Terminal"). print "Toggle AG1 to start tuning...". wait until ag1. print "Tuning...". sas on. wait 1. local kU is 6. local motors is list( ship:partsTagged("Front Left")[0]:getModule("ModuleRoboticServoRotor"), ship:partsTagged("Front Right")[0]:getModule("ModuleRoboticServoRotor"), ship:partsTagged("Rear Left")[0]:getModule("ModuleRoboticServoRotor"), ship:partsTagged("Rear Right")[0]:getModule("ModuleRoboticServoRotor") ). local pid is pidloop(kU, 0, 0, 0, 1). set pid:setpoint to 0. for m in motors { m:setField("RPM Limit", 460 * pid:update(time:seconds, verticalSpeed)). } wait until alt:radar > 500. local errorSign is -1. local flips is list(). // Measure how many times the vertical speed bounces in 20 seconds local startTime is time:seconds. until time:seconds > startTime + 20 { if pid:error * errorSign < 0 { flips:add(time:seconds). set errorSign to -errorSign. } for m in motors { m:setField("RPM Limit", 460 * pid:update(time:seconds, verticalSpeed)). } wait 0.01. } // Calculate gains local total is 0. if flips:length > 0 for i in range(flips:length - 1, 1) { set total to total + (flips[i] - flips[i - 1]). } // Formulas taken from https://en.wikipedia.org/wiki/Ziegler%E2%80%93Nichols_method local pU is total / (flips:length - 1) * 2. local kP is kU * (1/3). local tI is 0.5 * pU. local tD is (1/3) * pU. local kI is ((2/3) * kU) / pU. local kD is (1/9) * kU * pU. set pid:kP to kP. set pid:kI to kI. set pid:kD to kD. print "Landing...". set pid:setpoint to -5. until alt:radar < 1 { for m in motors { m:setField("RPM Limit", 460 * pid:update(time:seconds, verticalSpeed)). } } for m in motors m:setField("RPM Limit", 0). wait 1. print "Exporting PID gains to file...". log "set kP to " + kP + ". set kI to " + kI + ". set kD to " + kD + "." to "0:/" + ship:name + "PidValues.ks". } // Tune a drone using jets or rockets for thrust function tuneJetDrone { clearscreen. core:doEvent("Open Terminal"). print "Toggle AG1 to start tuning...". wait until ag1. print "Tuning...". sas on. stage. wait 1. local kU is 6. // Full throttle until 500 meters lock throttle to 1. wait until alt:radar > 500. local pid is pidloop(kU, 0, 0, 0, 1). set pid:setpoint to 0. // Target vertical speed of 0 lock throttle to pid:update(time:seconds, verticalSpeed). // Wait for vertical speed to go negative wait until verticalSpeed < 0. local errorSign is -1. local flips is list(). local err is 0. // Measure how many times the vertical speed bounces in 20 seconds local startTime is time:seconds. until time:seconds > startTime + 20 { set err to max(err, abs(ship:verticalSpeed)). if ship:verticalSpeed * errorSign < 0 { flips:add(time:seconds). set errorSign to -errorSign. } lock throttle to pid:update(time:seconds, verticalSpeed). wait 0.01. } // Calculate gains local total is 0. if flips:length > 0 for i in range(flips:length - 1, 1) { set total to total + (flips[i] - flips[i - 1]). } // Formulas taken from https://en.wikipedia.org/wiki/Ziegler%E2%80%93Nichols_method local pU is total / (flips:length - 1) * 2. local kP is kU * (1/3). local tI is 0.5 * pU. local tD is (1/3) * pU. local kI is ((2/3) * kU) / pU. local kD is (1/9) * kU * pU. set pid:kP to kP. set pid:kI to kI. set pid:kD to kD. print "Landing...". set pid:setpoint to -5. until alt:radar < 2 { lock throttle to pid:update(time:seconds, verticalSpeed). wait 0.01. } lock throttle to 0. wait 1. print "Exporting PID gains to file...". log "set kP to " + kP + ". set kI to " + kI + ". set kD to " + kD + "." to "0:/" + ship:name + "PidValues.ks". } local type is "". for p in ship:parts { if p:hasModule("ModuleRoboticServoRotor") set type to "quad". else if p:hasModule("ModuleEngine") set type to "jet". } if type = "quad" tuneQuad(). else tuneJetDrone().
  15. Someone on StackOverflow mentioned the fast Fourier transform. How do I implement that?
  16. I'm writing a script to tune a PID controller for a drone using the Ziegler-Nichols method. How do I detect when the altitude or vertical speed starts oscillating, and figure out the period of oscillation?
  17. I know fuel lines can't be attached between two different vessels. Can I attach struts to two docked spacecraft to make the connection stronger?
  18. I've been wanting to make a quadcopter, and while I can make one that I can control using the pilot inputs, it's twitchy and I wish I could use SAS. Can I set it up to use SAS?
  19. Are my two vessels simply too far apart? I can attach one end of the line just fine but it refuses to let me attach the other end. What I'm trying to do is connect my mining truck to my refinery using a fuel line.
  20. Spamming reaction wheels would be unrealistic...Is there a way to tweak the motors or control scheme that would make it not spin?
  21. I've been trying to make a stable helicopter with a single main rotor and a single tail rotor, but the angular momentum of the rotors adds in a way that causes the thing to spin wildly around an axis that itself spins wildly. How do I fix this?
  22. It seems to me, based on intuition alone, that a 1:2:4 resonance like what's found in the Jovian system would be unstable because you have the three moons tugging on each other at the same times in each orbit. How is this stable, if it is?
  23. TUFX is in fact not installed, because that's caused severe blurring that's been nearly impossible to remove short of uninstalling and reinstalling the game. I'll try turning off AA.
×
×
  • Create New...