05-16-2010 09:30 AM
Hello,
I am working on my final thesis project, and now I'm in the last phase that requires designing a model predictive control in Labview.
I've got the model already in Matlab& simulink, and it's quite complex, so I've realised that to design by my own the MPC in Labview is a big deal, and I'm running out of time...
The version i have on my computer is the 7.1 one, but I think I could get any other a bit newer... I don't know if I could get the 8.5 which i've read there is a MPC model already in the library...
My help request is basically:
WHICH IS THE BEST AND FASTEST SOLUTION TO IMPLEMENT THE MPC CONTROL I HAVE IN SIMULINK ITO MY LABVIEW 7.1?
- UPDATING MY LABVIEW VERSION?
- I'VE READ ABOUT CONVERTING SIMULINK FILES (.mdl) INTO LABVIEW ONES (.dll or .vi), SO, COULD ANYONE EXPLAIN ME HOW TO DO THIS?
SINCE THE DESIGN I HAVE OF THE MPC IS REALLY HUGE, IT HAS MANY INPUTS, OUTPUTS, MATRIX, FEEDBACKS... WELL...
I BEG FOR HELP,
regards,
ALFONSO
05-16-2010 09:27 PM
Hello Alfonso,
If you can get a newer version of LabVIEW Control Design and Simulation Module, you would be able to use native MPC Controller VIs for your model.
CD Create MPC Controller VI
http://zone.ni.com/reference/en-XX/help/371894D-01/lvctrldsgn/cd_creatempc/
How complex is your Simulink model? Does it contain S-functions? If you have LabVIEW Control Design and Simulation Module, you can use Simulation Model Converter to convert your .mdl model to LabVIEW VIs.However, you may need to makesome changes to the converted VIs to match your mdl model.
Simulation Model Converter Dialog Box
http://zone.ni.com/reference/en-XX/help/371894D-01/lvctrldsgn/cd_creatempc/
05-17-2010 02:53 AM
Hello,
my model in simulink contains buffers, delays, arrays (and operations with them), feedbacks, and so...
i like the idea of the conversion, but I guess, as You say, it's not so easy...
I can't attach here my predictive control model in simulink but still, maybe you can have a look and tell me if it's worth it or the best solution... I so would thank you.
And another question is, if I update the version of Labview, will I have any kind of trouble to open what I have already done? like the name of the vi's or cables or sth?? I'm a bit scared about that as well...
Finally, to design by my own the MPC in the version 7.1 is totally crazy or not? As I said, it contins lots of arithmetical operations but many are delays, buffers, and select components of arrays, remove one and introduce another.... well, if i must,i will, but I prefer any of you who know Labview much better than me give me the best advice...
I am really grateful for your help!!
wait impatient for you answer,
BR,
ALFONSO
05-17-2010 03:03 AM
Hi fonsodecelis,
You might wnat to use MATLAB(C) Script Node or Simulation Interface Toolkit (SIT). You may want to check this link also. If you are using LV 7.1 you should use LV SIT 2.0.2 according to the following document.
Hope this helps.
Regards,
05-17-2010 06:45 AM
Hello Alfonso,
From what you are describing, it does not seem like your model would have much trouble with the converter. If you are having issue convertering, I would suggest contacting one of our applications engineers at www.ni.com/support for assistance.
As for updating the version of LabVIEW, you shouldn't have problem opening the model that you have already constructed. At the same time, our compiler for Control Design and Simulation Module has improved drastically. So upgrading to 8.6 or even 2009 would be extremely helpful.
Like DavidOna said, in LabVIEW, you have many tools such as MathScript RT Module along with Control Design and Simulation Module that allow users to create their own algorithms.I have implemented several online-optimization algorithms for cruise control and maximum power point tracking using Control Design and Simulation Module, so customization is very much achievable. Again, if you are having issue with Control Design and Simulation Module, dont hesitate to speak with our applications engineer.
Hope this helps.
05-19-2010 09:36 AM
Hello,
firstly, thank you very much for all your attention to my doubts.
As far as i've read, defenitely the best way to achieve my goal of implementing the MPC designed in simulink into Labview is to convert such model .mdl into the libraly dll and then get the .vi ...
But now i wonder, I have the CD to install the SIT of my LABVIEW 7.1, but I don't know if I have to use Control and design simulation or the simulation interface to import the model of simulink and get the blocks .vi ... I know it's not so easy to convert this kind of files, but despite my version is not the newest, the manuals look like they offer this tool already in 7.1 without the necessity of updating the version. I believe the new Labviews have improved drastically, but at my university we can't afford getting a new version right now, it's quite late now...
I hope I can work it out with the Labview 7.1 SIT, but still I don't know how to start...
I beg someone to help me,
thank you very much
Regards
02-11-2012 03:04 PM
Can anyone help me please! I've been trying to design a mpc controller for my state space system but I can't. The examples I used them and change the constraints and the model and doesn work, I don't understand them also. Please somebody help I have to get this done as quickly as possible. The space state model with some contraints are:
A=[-0.001118 0.00109;0.001597 -0.003519];
B=[2.415;0];
C=[0 1;1 0];
D=[0;0
umin = 0;
umax = 7.5e-4;
ymin = [0;0];
ymax = [0.69;0.69];
I would appreciate any helpp!°!