MPC toolbox: implementation of default cost function
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Renate
el 2 de Jul. de 2022
Comentada: Renate
el 3 de Jul. de 2022
Where can I find the code of the default cost function in the Model Predictive Control toolbox?
I want to make a custom cost function, but I doubt I'd be able to do that from scratch. The easiest way to tackle this is probably to copy the code for the default cost function and edit that code, but I cannot find it anywhere. I have found the documentation on how to specify a custom cost function, but I'd rather take a look at the code for the default first before I build something from scratch.
Some context: I'm building a controller that penalizes a decrease in the MV's (Manipulated Variables), but doesn't penalize an increase in the MV's. For the weights, I can only tweak the "Weights.MVRate", which of course impacts both equally.
Thanks,
Renate
0 comentarios
Respuesta aceptada
Sam Chak
el 3 de Jul. de 2022
Hi @Renate
There shoud be a file called mpc_costcomputation. Please check if this is what you are looking for.
edit mpc_costcomputation
Más respuestas (0)
Ver también
Categorías
Más información sobre Refinement en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!