LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MPC design problem

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,

Download All
0 Kudos
Message 1 of 4
(2,769 Views)

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

0 Kudos
Message 2 of 4
(2,743 Views)

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. 

0 Kudos
Message 3 of 4
(2,730 Views)

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

0 Kudos
Message 4 of 4
(2,719 Views)