I've been trying to implement a modification to the JPL guidance law that was used (or very similar to what was used) for the powered descent portion of the MSL mission and I'm struggling to figure out how to map my guidance provided acceleration curve to what my actuator effort must be to get that acceleration.
Basically the guidance law solves a 2 point boundary value problem from the beginning of the powered descent portion to the end of the first phase where the goal is to kill all horizontal velocity and acceleration above a certain altitude (Vx(tf) = 0 m/s, Ax(tf) = 0 m/s^2, h > 150m). A paper that outlines this guidance algorithm in detail is linked below. This part isn't difficult as I can get two nice polynomials for both X and Z that match my constraints.
The next part that I'm struggling with is to then map this nominal acceleration curve to what my thrust must be to achieve this. To this I've been solving a system of 5 equations to solve for my two thrust values, drag force in X and Z directions, and the attitude angle (theta) simultaneously in order to achieve the nominal acceleration. Seems like I'm getting pretty good results for the two thrusters and accelerations when I propagate this nominal thrust profile in the equations of motion; however, my X and Z position and velocity now do not meet the constraints that I had set in the initial nominal trajectory. This is where my intuition might be wrong because I am assuming that matching the nominal acceleration with the two thrusters would lead to spacecraft following the nominal velocity and position curves as well but clearly I am wrong about this. Is my intuition wrong here? I've tried so many variations to try and match accel, velocity, and position but I can only achieve nominal accel. To me it feels like I might be messing up the calculation of the attitude angle. At first I thought that my planar dynamics might have made the system uncontrollable but after linearizing the state space model and checking for controllability, I don't believe that's my problem anymore.
I've attached some more information on the EOMs and spacecraft setup below. I know I didn't explain this in all that much detail so feel free to respond if you want me to clarify anything or ask a questions. Any thoughts on this are much appreciated!