Different MPC Responses with the Same Input Parameters

6 vues (au cours des 30 derniers jours)
jana nassereddine
jana nassereddine le 20 Août 2025
I have an MPC in MATLAB with a custom cost function embedded in a script connected to a Simulink model. The issue is that when I change the indexing in the cost function from (1:np) to (2:np+1), I start getting different plots even though the inputs remain the same. What should I add here? I specifically need to use (2:np+1) instead of (1:np).
In my previous work with Particle Swarm Optimization, I faced a similar issue, and adding rng('default') ensured consistent results. However, that approach doesn’t seem to work here.

Réponses (0)

Catégories

En savoir plus sur Linear Plant Specification dans Help Center et File Exchange

Produits


Version

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by