Matlab parameters change when i run simulink model?

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 件のコメント

Divya Yerraguntla
Divya Yerraguntla 2020 年 1 月 6 日
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 2020 年 1 月 6 日
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

サインインしてコメントする。

回答 (1 件)

Matthew Price
Matthew Price 2020 年 1 月 6 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeSimulink についてさらに検索

質問済み:

2020 年 1 月 1 日

回答済み:

2020 年 1 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by