Simulink Transfer Function Variable from Matlab

4 visualizaciones (últimos 30 días)
Stephen Sommerville
Stephen Sommerville el 20 de Abr. de 2021
Comentada: Stephen Sommerville el 24 de Abr. de 2021
Hi,
I have setup a number of transfer functions in a simple control system, where the transfer functions are calling a variable from Matlab, which i have predefined and I do not need to change the values in the functions during the simulation. I have one parameter i call with an inport ok, but I am having problems getting the other parameters to load correctly into the transfer functions, as when i try and run the simulation i get the following error:
"The external inputs specified for the block diagram indicate that the port dimensions should be [9x1]. Instead, the port dimensions are being set to [1]. "
I can see that somehow Simulink is not finding the values from Matlab, but i am not sure what i am doing wrong, as creating other inports would not allow me to connect them. I have attached a screen grab of my model for reference
Matlab Values
wref = 50
Ki = 15
Kd = 0.04
T1 = 0.1
T2 = 0.2
T3 = 0.1
T4 = 1
T5 = 0.1
T6 = 0.2
Td = 0.02

Respuesta aceptada

Paul
Paul el 22 de Abr. de 2021
Try using a Constant block and set its parameter to wref, instead of using an Inport for wref. The error message sounds like there's a problem with parameters of that Inport, but based on the problem description it sounds like it's not needed anyway.
  1 comentario
Stephen Sommerville
Stephen Sommerville el 24 de Abr. de 2021
Thanks - i found the problem eventually, i was trying to import the values using 'Model Settings->Input' for all the settings, when this was only needed for inports.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Dynamic System Models en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by