Confusion On Parameter Changing for SPMSM Field Weakening Matlab/Simulink Template When Simulated
2 views (last 30 days)
Show older comments
Hello,
I need some assistance with changing parameters in a Simulink template I found on the Matlab website. Whenever I try to change the parameters in blocks that are included in the struct and/or base workspace (which is almost every block), the parameters I modify revert to their default values when I started the simulation. I believe the issue may be related to the callback section or the default component that governs the parameters I am attempting to modify.
For context, I am simulating a SPMSM Field Weakening model for a 400V battery system and a high-power motor controller. However, the default motor controller in the template, the Anaheim-BLY171D-24V-4000, is only rated for a 24V DC system and is designed for low-torque applications. My question is: how can I change the parameters for this default system to make it compatible with my simulation? Additionally, is there a list of components for high-power inverters and SPMSM motors that we can access for use in the simulation?
Thank you for your help!
2 Comments
Sabin
on 7 Mar 2025
Can you please give a sample model or a link to which tempate are you refering to?
Answers (1)
KrishnaKumar
on 12 Mar 2025
Please refer to the Prerequisites section of https://www.mathworks.com/help/mcb/gs/field-weakening-control-mtpa-pmsm.html
"If you obtain the motor parameters from the datasheet or other sources, update the motor, inverter, and position sensor calibration parameters in the model initialization script associated with the Simulink® models."
The example uses a model intialization script to set the values of variables defined in the model. This would be run at the beginning of every simulation and can overwrite any local variables in matlab workspace with the same name. Please edit the model initialization script to update the required motor/inverter parameters needed for your simulation. See Estimate Control Gains and Use Utility Functions on how find the model initialization function/script.
For the field weakening example it might be one of the *_data.m files in the example folder based on the model that is being used by you.
0 Comments
See Also
Categories
Find more on Specialized Power Systems 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!