CVX for Simulink

Uncategorized
Feb 1, 2019
S

Hi, Is there any way to use CVX in Simulink?

Thanks,
Sepideh

M

See CVX and Simulink Problem .

I think if you try to mix CVX and SIMULINK, you are on your own. But feel free to report any results if you try.

S

I have tried, but no success. Do you have any suggestion?

M

The suggestion is not to mix CVX and SIMULINK.

If you want to use CVX, don’t use SIMULINK. If you want to use SIMULINK, you’ll have to find something other than CVX. Perhaps you can try YALMIP https://yalmip.github.io/YALMIP-and-simulink/ and https://yalmip.github.io/example/simulink .

S

Thanks. I have to use SIMULINK.

S
Replying to #4

What about CXVGEN, does CXVGEN work with SIMULINK?

M

This is not the right forum for expertise in CVXGEN.

Googling CVXGEN SIMULINK shows some Q&A links, although I’m not sure they will help.

You could try contacting the CVXGEN developer, Jacob Mattingley. I don’t know whether CVXGEN is still being developed/maintained.

Anyhow, YALMIP might be your best option https://yalmip.github.io/example/simulink/ . You can get help at https://groups.google.com/forum/#!categories/yalmip .

E
Replying to #7

What about using yalmip or maybe call something like Mosek directly instead.

S

I found a way around it. I ended up using interpreted MATLAB function in SIMULINK and call CVX by this block. It is working.

G
Replying to #9

Hey @Sepideh_Kianbakht … did you used the function on run time of the simulation? Can you please elaborate the technique that worked for you.