With the advent of powerful computing and efficient computational algorithms, real-time solutions to constrained optimal control problems are nearing a reality. In this thesis, we develop a computationally efficient Nonlinear Trajectory Generation (NTG) algorithm and describe its software implementation to solve, in real-time, nonlinear optimal trajectory generation problems for constrained systems. NTG is a nonlinear trajectory generation software package that combines nonlinear control theory, B-spline basis functions, and nonlinear programming. We compare NTG with other numerical optimal control problem solution techniques, such as direct collocation, shooting, adjoints, and differential inclusions.; We demonstrate the performance of NTG on the Caltech Ducted Fan testbed. Aggressive, constrained optimal control problems are solved in real-time for hover-to-hover, forward flight, and terrain avoidance test cases. Real-time trajectory generation results are shown for both the two-degree of freedom and receding horizon control designs. Further experimental demonstration is provided with the station-keeping, reconfiguration, and deconfiguration of micro-satellite formation with complex nonlinear constraints. Successful application of NTG in these cases demonstrates reliable real-time trajectory generation, even for highly nonlinear and non-convex systems. The results are among the first to apply receding horizon control techniques for agile flight in an experimental setting, using representative dynamics and computation. |