Creating Plant Model Using Motor Control Blockset

An accurate plant model is a vital part of control system development using Motor Control Blockset™. After creating an accurate plant model, you can verify the functionality of the control system, conduct closed-loop model-in-the-loop tests, tune gains using simulation, and optimize the design before you deploy the model in the actual plant.

When you create a plant model using Motor Control Blockset, you model these components to simulate functional behavior in a simulation environment:

  • Permanent Magnet Synchronous Motor (PMSM)

  • Average-value Inverter

  • Sensors and signal conditioning circuits

  • Processor peripherals: Analog-to-Digital converter (ADC) and Pulse-width-modulator (PWM)

You can verify the functionality of the plant model you create by:

  1. Reading the normalized PWM duty cycle from the control algorithm

  2. Simulating the motor for the connected load

  3. Obtaining the output motor phase current (in terms of ADC counts) and the output motor position (in terms of encoder pulse counts) from the simulation

The workflow to create a plant model involves these steps.


See the plant model in mcb_pmsm_foc_qep_f28379d used in the example Field-Oriented Control of PMSM Using Quadrature Encoder.