I think the Carmack approach was beyond option 3, to the point that the code didn't have a throttle valve map. It just went "my position (or velocity) is wrong, bang on this digital line until it has moved some distance" in a PID way. The model-based approach is to have a chamber pressure sensor. From that you know thrust, and from that (and static testing and first principles analysis) you have mdot. Start with a mass estimate and have it continue tweaking the mass estimate during flight, using the mdot as a known input and acceleration as a corrective factor. Then when you want a given acceleration you: (desired thrust)=(mass estimate)(desired accel) (desired throttle position)=f(desired thrust) (pwm signal)=f(desired throttle position, current throttle position) It is a more complex approach but can give much sharper results. The PID control for the final throttle valve control signal can be tuned on the ground without spending propellant or risking the vehicle. As can the acceleration-based mass correction, to a degree. Of course the likely candidate controller for a scenario when you think you know something but you're getting noisy input that suggests a difference is a Kalman filter. Ben On Mon, Feb 16, 2015 at 6:18 PM, <rsteinke@xxxxxxxxxxx> wrote: > I have a question about vertical position control for a hovering rocket. > One option is to do a PID control loop where the manipulated variable is > vertical acceleration and the controlled variable is vertical position. The > thing is, you aren't really manipulating vertical acceleration. You are > manipulating the throttle valve. You've got a few confounding factors in > the mapping from throttle valve position to thrust, and net thrust needs the > vehicle's weight subtracted out and weight is always changing as propellant > is consumed. I've thought of a few ideas to deal with this: > > 1) Do a lot of testing and analysis and get a really good educated guess of > thrust mapping and propellant usage. Any errors in those get handled by > integral gain in the vertical acceleration to vertical position controller. > > 2) Have another controller where the manipulated variable is throttle > position and the controlled variable is vertical acceleration. > > 3) Cut out the middle man and have a single controller from throttle > position to vertical position. I don't even know what the gains on such a > controller would look like without knowing where the "zero point" is of zero > net vertical thrust. > > What have other people done? Are there other ideas? > > Thanks > Bob >