MPC cannot be designed in app

I have a Carsim S-functon as the plant model for a MPC. But I get an error saying "Plant model cannot be a pure direct feed-through system without additional dynamics". Why does it keep saying that?

4 commentaires

Pengshan Dai
Pengshan Dai le 17 Avr 2020
I have the same problem, do you have a solution already?
Dhruv Thakkar
Dhruv Thakkar le 26 Avr 2020
@Pengshan Dai I didn't. Please share the solution if you get it.
Kumar Prabhakar
Kumar Prabhakar le 29 Mai 2021
SIR HAVE YOU SOLVED THE SAME PROBLEM
TELL ME HOW
zhanglong zhang
zhanglong zhang le 11 Juin 2021
hello, i also have the problem,may you tell me how can i solve it? thank you.

Connectez-vous pour commenter.

Réponses (3)

Junhao Jiang
Junhao Jiang le 22 Avr 2020

1 vote

The compatibility between CarSim and Simulink is not high,if you have the state space,you should use it,or you only choose the s-function to make it.

3 commentaires

Dhruv Thakkar
Dhruv Thakkar le 26 Avr 2020
Hey, thanks for the reply. I do have the state-space, but I also want to capture the non-linearity and actuators delay which are difficult to model. Plus, I wil have no way to verify since I don't have actual vehicle data. Since Carsim is a high fidelity simulator I chose it. I didn't get the last thing you wanted to say.
Pacifique Turabimana
Pacifique Turabimana le 27 Déc 2021
How can I add CarSim S-Function in Simulink Library?
I tried to link CarSim with Simulink but nothing to do after because I can't find CarSim in Simulink library, I tried even online MATLAB but I can't be ab;e to continue working on my research. Please guide me to solve it.
Walter Roberson
Walter Roberson le 27 Déc 2021
Unfortunately carsim.com does not appear to post their installation documentation online :(

Connectez-vous pour commenter.

Walter Roberson
Walter Roberson le 11 Juin 2021

0 votes

According to https://www.mathworks.com/matlabcentral/answers/473358-mpc-controller-direct-feedthrough-from-manipulated-variables-to-any-output-in-plant-is-not-allowed#comment_961921 you currently have an output that is being calcuated from an input signal with no modeled delay, but MPC does not permit that. You need to configure your model to take some time between input and output for all signals.
You can use delay blocks, or you can use a transfer function.

4 commentaires

zhanglong zhang
zhanglong zhang le 12 Juin 2021
I added the delay module, but this is still the mistake. Please kindly guide me. Thank you very much.
as shown below:
MUHAMMAD
MUHAMMAD le 8 Déc 2023
How did you solved this problem? I am facing same problem
Solution:
I had same problem and It is solve by adding time delay.
You can add time delay in between MV and plant. I did using matlab command like like
plant = tf([num],[den],'OutputDelay',1.5 )
I hope this answer helped you.
Example
%%Transfer Function By System identification
num = [-1.324 6.6e05 -6.914e09 5.128e13 -1.054e19]
den = [1 1.99e04 1.371e09 1.145e13 4.037e17]
plant = tf([num],[den],'OutputDelay',1.5 )
JGP
JGP le 20 Mar 2024
can you help me? Even if I use the delay or LTI system, the error continues.
How do I insert the Matlab code you mentioned into Simulink?

Connectez-vous pour commenter.

MUHAMMAD
MUHAMMAD le 8 Déc 2023

0 votes

Solution:
I had same problem and It is solve by adding time delay.
You can add time delay in between MV and plant. I did using matlab command like like
plant = tf([num],[den],'OutputDelay',1.5 )
I hope this answer helped you.
Example
%%Transfer Function By System identification
num = [-1.324 6.6e05 -6.914e09 5.128e13 -1.054e19]
den = [1 1.99e04 1.371e09 1.145e13 4.037e17]
plant = tf([num],[den],'OutputDelay',1.5 )

Commenté :

JGP
le 20 Mar 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by