Unchanging PI parameters of mcb example
2 views (last 30 days)
Show older comments
Hello,
I work on mcb_pmsm_foc_sensorless_f28379d example. My hardware is F28379D and BOOSTXL-DRV8305 which same as the original example. However motor is different (DT4260-24-055). That's why I would like to change PI_parameters from "External Data" tab on model explorer page. I can type new parameters on model explorer. Then I build&deploy the simulink model into lauchpad sucessfully however the parameters do not change. Model still get the original PI parameters from somewhere. How can i change the PI parameters permanently.
0 Comments
Answers (1)
Poorna
on 30 Nov 2023
Hi burak_gazi,
I understand that you want to modify the “PI_params” of the given model to use it for your motor. I was able to reproduce the problem at my end.
When you modify the parameters in the Explorer tab, the changes are temporary. Upon simulating the model again, the values get overwritten. To make permanent changes, you should adjust the values in the script responsible for generating the parameters.
This script can be located in the "initFcn" callback within the Model Properties tab. In your case, the script is named "mcb_pmsm_foc_sensorless_f28069MLaunchPad_datascript". You can customize this script to assign the parameters the values you need.
To access the file directly, you can click the first link "Edit motor & inverter parameters" in the “Explore more” widget within the model. Alternatively, you can use the following path: "PATH_TO_MATLAB/MATLAB/R2023a/toolbox/mcb/mcbexamples/mcb_pmsm_foc_sensorless_f28069MLaunchPad_datascript.m"
If the file is read-only, you'll need to manually copy the file and the model to a local directory to make the changes. Alternatively, you can directly include the script that modifies the parameter values in the "initFcn" callback, just below the call to the initialization script as shown below.
mcb_pmsm_foc_sensorless_f28069MLaunchPad_datascript;
PI_params.Kp_i = 2;
Hope this Helps!
Best regards,
Poorna
0 Comments
See Also
Categories
Find more on Motor Drives in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!