Texas Instruments
Explore Motor Control Blockset™ examples that you can deploy on Texas Instruments hardware.
Featured Examples
Run 3-Phase AC Motors in Open-Loop Control and Calibrate ADC Offset
Uses open-loop control (also known as scalar control or Volts/Hz control) to run a motor. This technique varies the stator voltage and frequency to control the rotor speed without using any feedback from the motor. You can use this technique to check the integrity of the hardware connections. A constant speed application of open-loop control uses a fixed-frequency motor power supply. An adjustable speed application of open-loop control needs a variable-frequency power supply to control the rotor speed. To ensure a constant stator magnetic flux, keep the supply voltage amplitude proportional to its frequency.
Estimate PMSM Parameters Using Recommended Hardware
Determines the parameters of a permanent magnet synchronous motor (PMSM) using the recommended Texas Instruments® hardware. The tool determines these parameters:
Estimate PMSM Parameters Using Parameter Estimation Blocks
Uses the parameter estimation blocks provided by Motor Control Blockset™ to estimate these parameters of a permanent magnet synchronous motor (PMSM) with a quadrature encoder sensor:
Sensorless Field-Oriented Control of PMSM
Implements the field-oriented control (FOC) technique to control the speed of a three-phase permanent magnet synchronous motor (PMSM). For details about FOC, see Field-Oriented Control (FOC).
Hall Offset Calibration for PMSM
Calculates the offset between the rotor direct axis (d
-axis) and position detected by the Hall sensor. The field-oriented control (FOC) algorithm needs this position offset to run the permanent magnet synchronous motor (PMSM) correctly. To compute the offset, the target model runs the motor in the open-loop condition. The model uses a constant (voltage along the stator's d
-axis) and a zero (voltage along the stator's q
-axis) to run the motor (at a low constant speed) by using a position or ramp generator. When the position or ramp value reaches zero, the corresponding rotor position is the offset value for the Hall sensors.
Field-Oriented Control of PMSM Using Hall Sensor
Implements the field-oriented control (FOC) technique to control the speed of a three-phase permanent magnet synchronous motor (PMSM). The FOC algorithm requires rotor position feedback, which is obtained by a Hall sensor. For details about FOC, see Field-Oriented Control (FOC).
Quadrature Encoder Offset Calibration for PMSM
Calculates the offset between the d
-axis of the rotor and encoder index pulse position as detected by the quadrature encoder sensor. The control algorithm (available in the field-oriented control and parameter estimation examples) uses this offset value to compute an accurate and precise position of the d
-axis of rotor. The controller needs this position to implement the field-oriented control (FOC) correctly in the rotor flux reference frame (d-q reference frame), and therefore, run the permanent magnet synchronous motor (PMSM) correctly.
Field-Oriented Control of PMSM Using Quadrature Encoder
Implements the field-oriented control (FOC) technique to control the speed of a three-phase permanent magnet synchronous motor (PMSM). The FOC algorithm requires rotor position feedback, which is obtained by a quadrature encoder sensor. For details about FOC, see Field-Oriented Control (FOC).
Field-Weakening Control (with MTPA) of PMSM
Implements the field-oriented control (FOC) technique to control the torque and speed of a three-phase permanent magnet synchronous motor (PMSM). The FOC algorithm requires rotor position feedback, which is obtained by a quadrature encoder sensor. For details about FOC, see Field-Oriented Control (FOC).
Tune Control Parameter Gains in Hardware and Validate Plant
Uses field-oriented control (FOC) to run a three-phase permanent magnet synchronous motor (PMSM) in different modes of operation for plant validation. FOC algorithm implementation needs the real-time feedback of the rotor position. This example uses a quadrature encoder sensor to measure the rotor position. For details about FOC, see Field-Oriented Control (FOC).
Field-Oriented Control of PMSM Using SI Units
Implements the Field-Oriented Control (FOC) technique to control the speed of a three-phase Permanent Magnet Synchronous Motor (PMSM). However, instead of the per-unit representation of quantities (for details about the per-unit system, see Per-Unit System), the FOC algorithm in this example uses the SI units of signals to perform the computations. These are the signals and their SI units:
Control PMSM Loaded with Dual Motor (Dyno)
Uses field-oriented control (FOC) to control two three-phase permanent magnet synchronous motors (PMSM) coupled in a dyno setup. Motor 1 runs in the closed-loop speed control mode. Motor 2 runs in the torque control mode and loads Motor 1 because they are mechanically coupled. You can use this example to test a motor in different load conditions.
Monitor Resolver Using Serial Communication
Use the resolver sensor to measure the rotor position. The resolver consists of two stator (secondary) windings placed orthogonally around the resolver rotor (primary) winding. After you mount the resolver sensor over a PMSM, the resolver rotor winding rotates with the shaft of the running motor. Meanwhile, the controller provides a fixed-frequency excitation signal (alternating sinusoidal or square pulse) to the primary winding.
Model Switching Dynamics in Inverter Using Simscape Electrical
Uses field-oriented control (FOC) to control the speed of a three-phase permanent magnet synchronous motor (PMSM). It gives you the option to use these Simscape Electrical blocks as an alternative to the Average Value Inverter block in Motor Control Blockset™:
Tune PI Controllers Using Field Oriented Control Autotuner
Computes the gain values of PI controllers available in the speed and current control loops by using the Field Oriented Control Autotuner block. For details about this block, see Field Oriented Control Autotuner. For details about field-oriented control, see Field-Oriented Control (FOC).
Tune PI Controllers (in Field-Weakening Control Mode) Using FOC Autotuner Block
Uses the Field Oriented Control Autotuner block to compute the gain values of the PI controllers available in the speed, current, and flux control loops of a field-weakening control algorithm. For details about this block, see Field Oriented Control Autotuner.
Position Control of PMSM Using Quadrature Encoder
Implements the field-oriented control (FOC) technique to control the position of a three-phase permanent magnet synchronous motor (PMSM). The FOC algorithm requires rotor position feedback, which it obtains from a quadrature encoder sensor.
MATLAB Project for FOC of PMSM with Quadrature Encoder
This MATLAB® project provides a motor control example model that uses field-oriented control (FOC) to run a three-phase permanent magnet synchronous motor (PMSM) in different modes of operation. Implementing the FOC algorithm needs real-time rotor position feedback. This example uses a quadrature encoder sensor to measure the rotor position. For details about FOC, see Field-Oriented Control (FOC).
Frequency Response Estimation of PMSM Using Field-Oriented Control
Performs frequency response estimation (FRE) of a plant model running a three-phase permanent magnet synchronous motor (PMSM). When you simulate or run the model on the target hardware, the model runs tests to estimate the frequency response as seen by each PI controller (also known as raw FRE data) and plots the FRE data to provide a graphical representation of the plant model dynamics.
Integrate MCU Scheduling and Peripherals in Motor Control Application
Identify and resolve issues with respect to peripheral settings and task scheduling early during development.
Partition Motor Control for Multiprocessor MCUs
Partition real-time motor control application on to multiple processors to achieve design modularity and improved control performance.
Estimate Initial Rotor Position Using Pulsating High-Frequency and Dual-Pulse Methods
Estimates the initial position (in electrical radians) of a stationary interior PMSM by using pulsating high-frequency (PHF) injection and dual pulse (DP) techniques.
Field-Oriented Control (FOC) of PMSM Using Hardware-In-The-Loop (HIL) Simulation
Uses hardware-in-the-loop (HIL) simulation to implement the field-oriented control (FOC) algorithm to control the speed of a three-phase permanent magnet synchronous motor (PMSM). The FOC algorithm requires rotor position feedback, which is obtained by a quadrature encoder sensor. For more information on FOC, see Field-Oriented Control (FOC).
Direct Torque Control of PMSM Using Quadrature Encoder or Sensorless Flux Observer
Implements direct torque control (DTC) technique to control the speed of a three-phase permanent magnet synchronous motor (PMSM). Direct Torque Control (DTC) is a vector motor control technique that implements motor speed control by directly controlling the flux and torque of the motor. The example algorithm needs motor currents and position feedback from PMSM. It uses space vector pulse-width modulation (DTC-SVPWM) variant of DTC, which uses space vector modulation (SVM) to produce the pulse-width modulation (PWM) duty cycles that are used by the inverter. For more details about the DTC-SVPWM algorithm used in this example, see Direct Torque Control (DTC).
Run Field Oriented Control of PMSM Using Model Predictive Control
Uses Model Predictive Control (MPC) to control the speed of a three-phase permanent magnet synchronous motor (PMSM). MPC is a control technique that tunes and optimizes the inputs to a control system to minimize the error in the predicted system output and achieve the reference control objective over a period of time. This technique involves solving the objective function and finding an optimal input sequence at every sample time (). After each time step, the current state of the plant is considered as the initial state and the above process is repeated.
Code Verification and Profiling Using PIL Testing
Explains PIL profiling on Texas Instruments® LAUNCHXL-F28379D hardware board. In processor-in-the-loop (PIL) simulation, the control algorithm executes in the target hardware, but the plant model runs on the host machine. The plant model simulates the input and output signals for the controller and communicates with the controller by using the serial communication interface. This functionality allows you to use PIL simulation to determine the execution time on the target hardware, which you can then compare with the execution time for simulating the model on the host machine.
Implement PMSM Speed Control Using Active Disturbance Rejection Control
Implement active disturbance rejection control (ADRC) of the speed of a permanent magnet synchronous motor (PMSM) modelled in Simulink® using the Active Disturbance Rejection Control (Simulink Control Design) block. You can use the example to implement field-oriented control (FOC) using either a proportional integral (PI) or ADRC-based controller to run the motor in the speed control mode. Therefore, you can compare the performance of the PI and ADRC controllers.
Swap Motors with Single Model Deployment of Sensor-Based FOC Algorithm
Run a permanent magnet synchronous motor (PMSM) in an industrial drive application setup using position-sensor-based field-oriented control (FOC). Industrial drives enable you to swap motors in real-time without repeated deployment of code. An industrial drive setup needs a fixed inverter and software that has the ability to adapt the control algorithm according to the new motor using only the updated nameplate parameters.
Swap Motors with Single Deployment of Sensorless FOC Algorithm
Run a permanent magnet synchronous motor (PMSM) in an industrial drive application setup using a sensorless field-oriented control (FOC) algorithm. The example uses a sensorless Flux Observer to estimate the motor position. Industrial drives enable you to replace a motor with a new one without repeated deployment of code. An industrial drive setup needs only nameplate parameters to adapt the software to the new motor.
Generate Motor Control Models for Selected Algorithm and Hardware
Use Motor Control Blockset™ to generate a Simulink® model that is configured for a specific hardware and motor control technique.
Six-Step Commutation of BLDC Motor Using Sensor Feedback
Use six-step commutation technique to control speed and direction of rotation of a three-phase BLDC motor.
Hall Sensor Sequence Calibration of BLDC Motor
Calculates the Hall sensor sequence with respect to position zero of the rotor in open-loop control. This workflow helps you to spin the motor using six-step commutation without the need to label the hall sensors or derive the switching sequence. Run this example and obtain the hall sequence, and use this hall sequence with the Six Step Commutation block to run the motor in closed loop as explained in Six-Step Commutation of BLDC Motor Using Sensor Feedback example.
Estimate Induction Motor Parameters Using Recommended Hardware
Determines the parameters of a three-phase AC induction motor (ACIM) using the recommended Texas Instruments® hardware. The example determines these parameters:
Estimate Induction Motor Parameters Using Parameter Estimation Blocks
Uses the parameter estimation blocks provided by Motor Control Blockset™ to estimate these parameters of an AC induction motor (ACIM):
Field-Oriented Control of Induction Motor Using Speed Sensor
Implements the field-oriented control (FOC) technique to control the speed of a three-phase AC induction motor (ACIM). The FOC algorithm requires rotor speed feedback, which is obtained in this example by using a quadrature encoder sensor. For details about FOC, see Field-Oriented Control (FOC).
Sensorless Field-Oriented Control of Induction Motor
Uses sensorless position estimation to implement the field-oriented control (FOC) technique to control the speed of a three-phase AC induction motor (ACIM). For details about FOC, see Field-Oriented Control (FOC).
Commutation of SRM Using Sensor Feedback
Implements a commutation system to control the speed of a three-phase 12/8 switched reluctance motor (SRM).
Dwell Angle Computation for SRM Speed Control
Compute the dwell angle of a 12/8 switched reluctance motor (SRM) online (while the motor runs). The example then uses the computed dwell angle along with a delta controller to control the motor speed.
Sensorless Field-Oriented Control of PMSM Using DC Shunt Current Sensing
Implement sensorless field-oriented control (FOC) using only a single DC bus-based current measurement to run a permanent magnet synchronous motor (PMSM).
Sensorless Field-Oriented Control of PMSM Using I-F Control-Based Startup
Implements field-oriented control (FOC) using sensorless position estimation and I-F control-based startup to control the speed of a three-phase permanent magnet synchronous motor (PMSM).
Field-Oriented Control of PMSM Using Position Estimated by Neural Network
Implement field-oriented control (FOC) of a permanent magnet synchronous motor (PMSM) using rotor position estimated by an auto-regressive neural network (ARNN) trained with Deep Learning Toolbox™.
Run-Time Parameter Estimation of PMSM Using Sensor Feedback
Estimate the parameters of a permanent magnet synchronous motor (PMSM) at run-time. The example estimates the following PMSM parameters by running tests while the motor runs using a closed-loop field-oriented control (FOC) algorithm:
Motor Control Architectures Based on Different Current Sampling and PWM Frequencies
Enables you to implement different motor control architectures that use non-identical sampling rates for ADC conversion, PWM, and current controller algorithm to run a permanent magnet synchronous motor (PMSM) using field-oriented control (FOC).
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)