04-08-2019 01:51 PM
Hello,
I have been facing a tough time getting a simple MPC working for a 2nd order discrete system. I've attached my code. It comes with an compile error. I don't really understand why. I've remade the model 3 times and it keeps on giving me this error. I've also attached a picture to show how i'm implementing the controller. All the examples i find don't use a control loop simulation. Could this be a problem? I have to use a control loop since the code needs to be programmed into a Quanser device. Any suggestions would be much appreciated.
Regards,
04-08-2019 08:43 PM
I don't know what a MPC is, and I can't see anything in the 5MB VI you attached. I'm "allergic" to pictures of code (too tiny to view, incomplete, can't modify, can't "look under the hood", etc.). Oh, well.
Bob Schor
04-09-2019 06:01 AM
The picture i gave you should serve as a reference to what you should expect when you open the VI . Its seems like the error was fatal and it wiped off everything. I made the code yet again and its attached below. Please do have a look.
MPC stands for Model Predictive Control. If you don't know this then i suspect you may not understand what the Control VIs are doing.
04-09-2019 11:06 AM
MPC stands for Model Predictive Control. If you don't know this then i suspect you may not understand what the Control VIs are doing.
I don't often use the Control Design and Simulation Module, couldn't easily see the code in the Picture, didn't find a likely referent for "MPC" on the Web, so I asked. I've done PID controllers before, but others are more experienced, particularly with LabVIEW's tools, so I'll leave this to them.
Bob Schor