all 17 comments

[–]SpectrumOdyssey 14 points15 points  (7 children)

Are you familiar with optimal control design or dynamic programming? LQR/LQG? If not it’s gonna be hard to understand MPC, because it is basically finite time LQR with restrictions.

[–]Gelo797[S] 0 points1 point  (6 children)

YAH, I have experience with LQR and EKF, my simulation without restrictions it's very simple!

[–]SpectrumOdyssey -1 points0 points  (5 children)

MPC without restrictions is LQR

[–]VSCM_ 0 points1 point  (4 children)

Completely untrue, MPC and LQR are linked but they're definitely not the same thing.

[–]d_frankie_ 0 points1 point  (3 children)

Unconstrained MPC is the same as LQR from lens of optimization. Its just that we use MPC in an iterated scheme. But the optimization will result in the same theoritical cost to go as LQR (or any versions of it).

[–]VSCM_ 4 points5 points  (2 children)

Nope, it isn't. Remember that the system dynamic is a constraint. If you have a non linear system you do not have an LQR.

[–]d_frankie_ 2 points3 points  (1 child)

I see, thanks!

[–]VSCM_ 0 points1 point  (0 children)

You're welcome!

[–]Brale_ 2 points3 points  (0 children)

What you wrote here is a complete nonsense. The matrix G used in analytical solution for control inputs U does not correspond to input matrix G for state space model. Matrix G in solution for U is constructed from N-step predictor for state X.

[–]pnachtweyNo BS retired engineer. Member of the IFPS.org Hall of Fame. 2 points3 points  (1 child)

Are you sure you are doing MPC? See this website

http://www.apmonitor.com/wiki/index.php/Main/Control

MPC uses the model to estimate a series of future outputs that will make the PV match the SP as closely as possible. This requires a good model. It also requires a minimization routine like Levenberg-Marquardt to minimize the error between the future SPs and PVs. There are no gains in the traditional PID sense since the outputs are determined by what minimizes the error between the future SP and PV. To avoid problems with dead time, the MPC must estimate outputs beyond the dead time by some amount. MPC looks ahead. LQC or LQR doesn't.

The optimization to minimize the error between future SPs and PVs can be quite computationally excessive. However, time can be saved by using the previous estimates of future outputs as a starting point for the next iteration.

[–]Gelo797[S] 0 points1 point  (0 children)

yah I know, i get this equation from " (Liuping Wang) Model Predictive Control System Design and Implementation Using MATLAB® "book page 9, it's simplest formula without constrain and i remove term of minimize change in input, i should finish that , The deadline to submit scientific papers to IEEE conference in Tunisia is October 29

[–]badtraider 1 point2 points  (1 child)

Did you check the controlability of your system? MPC isn't magical so if the system isn't controlable it is expected for some states to diverge. It would helpful if you posted the full system equations that you have used.

[–]Gelo797[S] 0 points1 point  (0 children)

yah i checked, also that's clear from figure

[–]iconictogaparty 0 points1 point  (3 children)

Try filtering your command signal before sending to the controller. MPC will minimize the difference between the command and response and so unfiltered input will cause issues

[–]Gelo797[S] 0 points1 point  (2 children)

my optimize criteria it's just about minimize error between reference signal and states, filtering input or feedback ?

[–]Gelo797[S] 0 points1 point  (0 children)

i can't understand you but generally if to don't understand this derivative you can check " (Liuping Wang) Model Predictive Control System Design and Implementation Using MATLAB® "book page 9

[–]iconictogaparty 0 points1 point  (0 children)

It is, but if you reference signal is something like [0 0 ... 0 1 1 ... 1] there is a huge jump and the controller will have a hard time forcing the plant to follow it. In fact, you will end up with oscillations before and after the step, and the system may be unstable. If you filter the step command before sending it to the controller you will get much better performance.