Why do derived parameters only update in the base workspace

1 Ansicht (letzte 30 Tage)
Zekun Li
Zekun Li am 13 Dez. 2020
Beantwortet: Rishabh Mishra am 24 Dez. 2020
Hello,
I'm a Simulink noob currently working with the powertrain blockset. When I update derived parameters (such as "calculate MTPA Table Data" for an electric motor controller), the parameters must be defined in the base workpace and only update in the base workspace. Why is this? Am I supposed to simply copy the data to the model workspace afterward?
Thank you!

Antworten (1)

Rishabh Mishra
Rishabh Mishra am 24 Dez. 2020
Hi,
Use the steps below to change/update variables in Model workspace:
  1. Export the derived variables/updated data to base workspace using ‘to workspace’ or ‘signal to workspace’ block.
  2. Access the model workspace variables in MATLAB using ‘get_param’ function.
  3. Once the base workspace variable is accessed, update the base workspace variable with derived parameters. The following link demonstrates how access workspace variable and modify it.
Hope this helps.

Kategorien

Mehr zu Powertrain Blockset finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by