[Ipopt] Question: Using IPOPT as an S-function in Simulink
Altmannshofer, Simon
simon.altmannshofer at tum.de
Thu May 31 09:38:11 EDT 2012
Hello Martijn,
we used IPOPT for solving the NLP arising in NMPC(MHE) in a MALTAB/Simulink S-function together with xPC-Target.
Our steps were:
- Download IPOPT (version prior to 3.10, we used 3.9, because there are problems with 3.10 and MS Visual Studio)
- Compile the source code as described with MS Visual Studio (look in ..CoinIpopt\Ipopt\MSVisualStudio\v8)
- Compile the test program with 32bit. Our MATLAB 2011a xPC Version only worked properly with 32bit.
- Now, you should have 5 libraries (*.lib) that can be linked statically to your Simulink program
- Static link is necessary for xPC Target, as your whole program is sent to the target PC
- As much as we know you have to write your own S-function where you invoke IPOPT to solve your problem. We used the C interface of IPOPT in a C MEX S-Function
You can contact me personally, if you want further information on how to build IPOPT for use in MATLAB/Simulink S-function. We controlled a real-world inverted pendulum with NMPC. I would also give you the simulation files, which are almost identical to the test rig control files. Just contact me.
Best Regards
Simon
-----------------------------------------------------
Dipl.-Ing. Simon Altmannshofer
Lehrstuhl für Regelungstechnik
Technische Universität München
Boltzmannstraße 15
85748 Garching bei München
Tel.: +49 (89) 289-15679
Fax: +49 (89) 289-15653
E-Mail: simon.altmannshofer at tum.de<mailto:tobias.kloiber at tum.de>
Internet: www.rt.mw.tum.de<http://www.rt.mw.tum.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20120531/89c9a370/attachment.html>
More information about the Ipopt
mailing list