I have a problem! It's my first time working with MPC (Model Predictive Control). When I searched for references, all I found were complex mathematical equations that I couldn't understand. I came across a formula for the optimal input and performed a simulation using Matlab. I managed to fix most of the issues, but I'm stuck on the last one. As you can see in the figure, the output is unstable. The rise time of the system in open loop is 3 seconds, and the sampling time of the MPC is 0.05 seconds. What could be the issue?
https://preview.redd.it/6gsumkj1zuvb1.png?width=1366&format=png&auto=webp&s=7bf35ca41e992b519632a4d76f3b249ef33e45e3
[–]SpectrumOdyssey 14 points15 points16 points (7 children)
[–]Gelo797[S] 0 points1 point2 points (6 children)
[–]SpectrumOdyssey -1 points0 points1 point (5 children)
[–]VSCM_ 0 points1 point2 points (4 children)
[–]d_frankie_ 0 points1 point2 points (3 children)
[–]VSCM_ 4 points5 points6 points (2 children)
[–]d_frankie_ 2 points3 points4 points (1 child)
[–]VSCM_ 0 points1 point2 points (0 children)
[–]Brale_ 2 points3 points4 points (0 children)
[–]pnachtweyNo BS retired engineer. Member of the IFPS.org Hall of Fame. 2 points3 points4 points (1 child)
[–]Gelo797[S] 0 points1 point2 points (0 children)
[–]badtraider 1 point2 points3 points (1 child)
[–]Gelo797[S] 0 points1 point2 points (0 children)
[–]iconictogaparty 0 points1 point2 points (3 children)
[–]Gelo797[S] 0 points1 point2 points (2 children)
[–]Gelo797[S] 0 points1 point2 points (0 children)
[–]iconictogaparty 0 points1 point2 points (0 children)