Permanent Magnet Synchronous Motors (PMSM)
Utilize the reference examples to implement sensor-based and sensorless motor control algorithms ranging from conventional to advanced techniques for PMSM.
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 Custom Hardware
Includes an algorithm to determine the parameters of a permanent magnet synchronous motor (PMSM) using any custom motor-control hardware (hardware not used in the Motor Control Blockset™ examples). The algorithm 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:
Estimate PMSM Parameters Using Parameter Estimation Blocks on Real-Time Systems
Uses the parameter estimation blocks provided by Motor Control Blockset™ to estimate these parameters of a permanent magnet synchronous motor (PMSM):
Estimate PMSM Parameters Using FPGA-Based Motor Control Development Kit
Estimate parameters of a permanent magnet synchronous motor (PMSM) using blocks from Motor Control Blockset™ on an FPGA device (Trenz Electronic™ Motor Control Development Kit TE0820).
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.
Tune PI Controllers Using Field Oriented Control Autotuner Block on Real-Time Systems
Compute the gain values of PI controllers within the speed and current controllers by using the Field Oriented Control Autotuner block.
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.
PMSM Drive Characteristics and Constraint Curves
Uses Motor Control Blockset™ to show how to use the PMSM characteristic plotting and PMSM milestone speed identification functions to obtain a control trajectory.
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.
Algorithm-Export Workflows for Custom Hardware
Enables you to use any custom motor-control hardware (hardware not used in the Motor Control Blockset™ examples) to run a three-phase permanent magnet synchronous motor (PMSM) using field-oriented control (FOC). Using the algorithm export workflows, which involve generating code for the control algorithm by using Simulink® and Embedded Coder® and then integrating it with either manually written or externally generated hardware driver code. This example explains the algorithm export workflows along with the intermediate steps.
Field-Oriented Control of PMSM Using Reinforcement Learning
Use the control design method of reinforcement learning to implement field-oriented control (FOC) of a permanent magnet synchronous motor (PMSM). The example uses FOC principles. However, it uses the reinforcement learning (RL) agent instead of the PI controllers. For more details about FOC, see Field-Oriented Control (FOC).
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).
Determine Power Losses and THD for PWM Methods
Calculates the inverter power loss and total harmonic distortion (THD) in motor current for different pulse-width modulation (PWM) methods. The example uses field-oriented control (FOC) algorithm that runs a permanent-magnet synchronous motor (PMSM) in speed control mode as a reference. The example only supports simulation.
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.
FOC of PMSM Using FPGA-Based Motor Control Development Kit
Use a Field-Oriented Control (FOC) algorithm for a Permanent Magnet Synchronous Motor (PMSM) by using blocks from the Motor Control Blockset™ on an FPGA device (Trenz Electronic™ Motor Control Development Kit TE0820).
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.
Field-Weakening Control (with MTPA) of Nonlinear PMSM Using Lookup Table
Uses a lookup table (LUT) for a nonlinear permanent magnet synchronous motor (PMSM) and controller to run the motor using field-weakening control (with maximum torque per ampere (MTPA)). Use this example to replicate and run a finite element analysis (FEA) based nonlinear, high-fidelity PMSM in simulation. This example helps motor design engineers to simulate high-performance motors in real-world motor control applications. In addition, control system engineers can use this example to design control algorithms for a given set of motor parameter data to achieve high levels of accuracy in tracking and controlling speed and torque as well as to meet efficiency requirements, especially for high-performance motors.
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.
PMSM Constraint Curves and Their Application
Uses Motor Control Blockset™ to explain the fundamentals of constraint curves, utilization of these curves to determine operating currents, and usage of the grid of these currents in simulation or deployment environments.
Implement Field-Oriented Control on FPGA SoC
Deploy a field-oriented control (FOC) algorithm for brushless DC motors to an SoC device by using a custom board target. A custom board target for the Trenz Electronic™ Motor Control Development Kit, based on Xilinx® Zynq® UltraScale+ MPSoC, allows you to deploy FOC application as a mix of software to the ARM® Cortex-A processor and hardware to the programmable logic of the device. This example uses the model and control algorithm partitioning from the Hardware-Software Partitioning of a Motor Control Algorithm (SoC Blockset) example.
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.
Initial Position Estimation and Field-Weakening Control of IPMSM Using Pulsating High-Frequency Injection and Extended EMF Observer
Uses sensorless techniques such as pulsating high-frequency injection and extended EMF observer to estimate and track motor position to run an interior permanent magnet synchronous motor (IPMSM) operation using field-weakening control (FWC).
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.
Analyze and Verify Motor Control Algorithms Using Polyspace
Uses the Polyspace® static code analysis tools to analyze and verify Simulink® models containing motor control algorithms. Static code analysis is a software verification technique that analyzes source code for quality, reliability, and security without executing the code. This approach uses robust error detection routines (that include checks for critical run-time errors) to identify bugs and defects and in addition ensures compliance with common coding standards. It provides a cost-effective alternative to measure and track the software quality metrics and eliminates the need to instrument the code or to write elaborate unit test cases.
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).
AUTOSAR-Based FOC of PMSM
Implement an AUTOSAR-based field-oriented control (FOC) algorithm to run a 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™.
Field-Oriented Control of Six-Phase PMSM
Control the torque of an asymmetric six-phase permanent magnet synchronous motor (PMSM) using field-oriented control (FOC).
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-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
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)