Effect of prediction horizon on objective cost in “Landing Rocket With MPC Example”
The Matlab example "Landing a Vehicle Using Multistage Nonlinear MPC" (which can be found here), uses a multistage nonlinear MPC to perform the trajectory optimization and another multistage nonlinear MPC to do the motion control. In the script, the former is called the "planner" and the latter is called the "lander". My question is purely regarding the planner:
Why does the objective cost increase when the prediction horizon (p) increases?
Given the sample time Ts and prediction horizon p, the prediction time becomes Ts*p. Here are three configurations with their output from the fmincon() function that resides in the nlmpcmove() function. Except the values for Ts and p, all code is similar to the Matlab example given here.
Ts = 0.2; pPlanner = 45; leads to Objective cost = 445.5349
Ts = 0.2; pPlanner = 50; leads to Objective cost = 492.9689
Ts = 0.2; pPlanner = 55; leads to Objective cost = 541.1668
To my understanding, a larger prediction horizon should give room to a more optimized result. Suppose the ideal trajectory takes Ts*p = 0.2*45 = 9 seconds. Why would the configuration with 50 seconds not lead to the exact same results?
The answers is probably related to how the nlmpcmove() function uses the user provided cost function and terminal state to converge to a solution. What is the math behind this convergence?
I’m using Matlab R2021b. Related Toolboxes are: Model Predictive Control Toolbox and Optimization Toolbox.The Matlab example "Landing a Vehicle Using Multistage Nonlinear MPC" (which can be found here), uses a multistage nonlinear MPC to perform the trajectory optimization and another multistage nonlinear MPC to do the motion control. In the script, the former is called the "planner" and the latter is called the "lander". My question is purely regarding the planner:
Why does the objective cost increase when the prediction horizon (p) increases?
Given the sample time Ts and prediction horizon p, the prediction time becomes Ts*p. Here are three configurations with their output from the fmincon() function that resides in the nlmpcmove() function. Except the values for Ts and p, all code is similar to the Matlab example given here.
Ts = 0.2; pPlanner = 45; leads to Objective cost = 445.5349
Ts = 0.2; pPlanner = 50; leads to Objective cost = 492.9689
Ts = 0.2; pPlanner = 55; leads to Objective cost = 541.1668
To my understanding, a larger prediction horizon should give room to a more optimized result. Suppose the ideal trajectory takes Ts*p = 0.2*45 = 9 seconds. Why would the configuration with 50 seconds not lead to the exact same results?
The answers is probably related to how the nlmpcmove() function uses the user provided cost function and terminal state to converge to a solution. What is the math behind this convergence?
I’m using Matlab R2021b. Related Toolboxes are: Model Predictive Control Toolbox and Optimization Toolbox. The Matlab example "Landing a Vehicle Using Multistage Nonlinear MPC" (which can be found here), uses a multistage nonlinear MPC to perform the trajectory optimization and another multistage nonlinear MPC to do the motion control. In the script, the former is called the "planner" and the latter is called the "lander". My question is purely regarding the planner:
Why does the objective cost increase when the prediction horizon (p) increases?
Given the sample time Ts and prediction horizon p, the prediction time becomes Ts*p. Here are three configurations with their output from the fmincon() function that resides in the nlmpcmove() function. Except the values for Ts and p, all code is similar to the Matlab example given here.
Ts = 0.2; pPlanner = 45; leads to Objective cost = 445.5349
Ts = 0.2; pPlanner = 50; leads to Objective cost = 492.9689
Ts = 0.2; pPlanner = 55; leads to Objective cost = 541.1668
To my understanding, a larger prediction horizon should give room to a more optimized result. Suppose the ideal trajectory takes Ts*p = 0.2*45 = 9 seconds. Why would the configuration with 50 seconds not lead to the exact same results?
The answers is probably related to how the nlmpcmove() function uses the user provided cost function and terminal state to converge to a solution. What is the math behind this convergence?
I’m using Matlab R2021b. Related Toolboxes are: Model Predictive Control Toolbox and Optimization Toolbox. multistage nonlinear model predictive controller, landing rocket with mpc example MATLAB Answers — New Questions