Matlab parameters change when i run simulink model?

2 visualizaciones (últimos 30 días)
Matthew Price
Matthew Price el 1 de En. de 2020
Respondida: Matthew Price el 6 de En. de 2020
Hi there,
As part of a uni coursework we have had to create a model of a vehicle drivetrain. I have done this in simulink and fairly sure it is correct as i got the answer i recieved. Then based on experimental data i used the parameter estimation in Simulink to tune the parameters. I then updated said parameters in the original Matlab parameter file. However, when I then go to rerun the simulation the parameters I've updated change back to their original values. Could someone please help me stop this, it's driving me mad :P
Kind regards,
Matthew
  2 comentarios
Divya Yerraguntla
Divya Yerraguntla el 6 de En. de 2020
Hi Matthew,
Could you check if you ran the MATLAB parameter file after updating the parameters in the file and before running the SIMULINK model because if the MATLAB workspace is'nt updated with the new parameter values then iy will keep using the old values from workspace.
Matthew Price
Matthew Price el 6 de En. de 2020
Hi Divya,
Thank you for your reply. I had updated the parameter file and the model with the updated parameters but then when i ran the SIMULINK model it still changed the parameters back. After playing around with it for several hours, I realised I just have changed the parameter file name at some point and the SIMULINK model was still drawing parameters from the original file. I've changed the name of the file back to the original and put the parameter file and model in its own folder and it seems to have worked since. Thank you very much for your time though.
Regards,
Matthew

Iniciar sesión para comentar.

Respuestas (1)

Matthew Price
Matthew Price el 6 de En. de 2020
Hi Divya,
Thank you for your reply. I had updated the parameter file and the model with the updated parameters but then when i ran the SIMULINK model it still changed the parameters back. After playing around with it for several hours, I realised I just have changed the parameter file name at some point and the SIMULINK model was still drawing parameters from the original file. I've changed the name of the file back to the original and put the parameter file and model in its own folder and it seems to have worked since. Thank you very much for your time though.
Regards,
Matthew

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by