Main Content

Use PMSM Block and Motor Parameters to Design Plant Model

You can use the surface mount or interior PMSM blocks from Motor Control Blockset™ in two ways to create a plant model.

  • Estimate motor parameters by using Motor Control Blockset and open a Simulink® model with PMSM motor block (auto-populated with estimated parameters):

    The Motor Control Blockset parameter estimation workflow helps you to determine the motor parameters by performing a series of tests on the motor. For details, see Estimate PMSM Parameters Using Recommended Hardware. After successfully estimating the motor parameters, click Open Model in the parameter estimation host model. A new model opens with the Interior PMSM block updated with the estimated motor parameters.

  • Create a new model and manually add the PMSM motor block from the Motor Control Blockset library:

    Create a new Simulink model and add the Surface Mount PMSM block from the Motor Control Blockset library in the Simulink library browser. Open the block mask and enter the motor parameters manually. You can obtain these parameters by using:

    In Surface Mount PMSM block, set the Simulation type parameter to Discrete and the Sample Time (Ts) parameter to 25e-6 (half of the control frequency). Discrete simulation improves the simulation speed.

    If the parameters are available in a MAT-file, click the Browse button on the block parameters dialog to locate the MAT-file and then click Load from file to load the parameters.

    The files containing the default motor parameters are available in the location <matlabroot>\toolbox\autoblks\autoblksshared\mcbtemplates as a reference.

    In the Surface Mount PMSM block parameters dialog, you can also represent the motor parameters as workspace variables and use the model initialization script (m-script) to automatically update these variables using the model initialization callback. Parameters of some commercially available motors are available in the file mcb_SetPMSMMotorParameter.m as a reference. For details about this m-script file, see Estimate Control Gains from Motor Parameters.