In Motor Control Blockset™, there are two methods to create a model with PMSM motor block:
Perform the Parameter Estimation operation using Motor Control Blockset and open the Simulink model with PMSM motor block:
Motor Parameter Estimation workflow in Motor Control Blockset helps you to find the motor parameters by performing the series of tests on the motor. For details, refer to Estimate Motor Parameters by Using Motor Control Blockset Parameter Estimation Tool. After a successful motor parameter estimation, click Open Model in the parameter estimation host model. A new model opens with the Interior PMSM block (from the Simulink Library of Motor Control Blockset) along with the estimated motor parameters.
Create a new model and add PMSM motor block from Motor Control Blockset library:
Create a new Simulink model and add the Surface Mount PMSM block from the Motor Control Blockset library in Simulink library browser. Open the block mask and enter the motor parameters. The motor parameters can be obtained from:
Parameter Estimation workflow in Motor Control Blockset (for details, refer to Estimate Motor Parameters by Using Motor Control Blockset Parameter Estimation Tool)
From the datasheet of the motor or from known sources
In Surface Mount PMSM block, choose Simulation type
Discrete and enter the value of
Sample Time (Ts) as
of the control frequency). Discrete simulation improves the simulation
If parameters are available in mat-file format, click Browse in the Surface Mount PMSM block mask to locate the mat-file and then click Load from file to load the parameter.
The default motor parameter files are available in the location.
for your reference.
In the Surface Mount PMSM block mask, motor parameters can also be
represented as workspace variables and update these workspace variables
using m-script in the model initialization callback. Refer to the file
mcb_SetPMSMMotorParameter.m for the reference motor
parameters for some of the commercially available motors (for details about
this script, see Estimate Control Gains from Motor Parameters)