Armand2011
Automotive
- Feb 15, 2011
- 2
Hello to everyone,
i am implementing a driver model with look-ahead function. Herefore, i have to use an optimization algorithm, which look in a finite future horizont, to define Np optimal control signals, so that a specific Cost function J(trade off between deviation to reference trajectory and Consumption), can be minimized. That means if for example i am only minimizing J over the acceleration pedal Ua, then i call fmincon from a level 2 s-function within the main Car-model like this for example:
Uopt = fmincon(@(u)fun(u),U0,[],[],[],[],-100,100,@nonlcon,options).
whereby U0 is a vector of size = [Npx1]. Within teh function fun a simplified vehicle model, is then called with u as input and the velocities over the Np time steps as output!
My questions are then:
1) since i set DiffMinChange=0.1 and DiffMaxChange = 100, why does fmincon only try pulses of u=0.1 at different time steps, and doesn't try bigger values within the range [0.1 ,100]??? Fmincon then stops since(i think) with a single input of 0.1 as pedal position the cost function doesn't vary very much. It would be something else if it would ahve tried u = [100 50 80 10 9] in case Np = 5 for example.
2) the all process of calling the simulink model is really, really slow. Is there a more convenient way to implement predictive control, when i don't have the predictive control toolbox???
I am new to the site and i hope we will have some great discussions.
Thanks for your time and help.
Armand
i am implementing a driver model with look-ahead function. Herefore, i have to use an optimization algorithm, which look in a finite future horizont, to define Np optimal control signals, so that a specific Cost function J(trade off between deviation to reference trajectory and Consumption), can be minimized. That means if for example i am only minimizing J over the acceleration pedal Ua, then i call fmincon from a level 2 s-function within the main Car-model like this for example:
Uopt = fmincon(@(u)fun(u),U0,[],[],[],[],-100,100,@nonlcon,options).
whereby U0 is a vector of size = [Npx1]. Within teh function fun a simplified vehicle model, is then called with u as input and the velocities over the Np time steps as output!
My questions are then:
1) since i set DiffMinChange=0.1 and DiffMaxChange = 100, why does fmincon only try pulses of u=0.1 at different time steps, and doesn't try bigger values within the range [0.1 ,100]??? Fmincon then stops since(i think) with a single input of 0.1 as pedal position the cost function doesn't vary very much. It would be something else if it would ahve tried u = [100 50 80 10 9] in case Np = 5 for example.
2) the all process of calling the simulink model is really, really slow. Is there a more convenient way to implement predictive control, when i don't have the predictive control toolbox???
I am new to the site and i hope we will have some great discussions.
Thanks for your time and help.
Armand