Switching application for msata and pci express mini-card (17 pages)
Summary of Contents for NXP Semiconductors PMSMRT1060C
Page 1
User guide Document information Information Content Keywords PMSMRT1060C , PMSM, FOC, MCAT, MID, Motor control, Sensorless control, Speed control, Servo control, Position control Abstract This user guide describes the implementation of the motor-control software for 3-phase Permanent Magnet Synchronous Motors.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 1 Introduction SDK motor control example user guide describes the implementation of the motor-control software for 3-phase Permanent Magnet Synchronous Motors (PMSM) using following NXP platforms: •...
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 2 Hardware setup 2.1 Linix 45ZWN24-40 motor The Linix 45ZWN24-40 motor is a low-voltage 3-phase permanent-magnet motor with hall sensor used in PMSM applications. The motor parameters are listed in Table Table 2. Linix 45ZWN24-40 motor parameters...
Page 4
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Table 3. Teknic M-2310P motor parameters ...continued Characteristic Symbol Value Units Rated power Continuous current Number of pole-pairs Figure 2. Teknic M-2310P permanent magnet synchronous motor For the sensorless control mode, you only need the power input wires. If used with the hall or encoder sensors, connect the sensor wires to the NXP Freedom power stage.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Motor phases (Mating face shown) Encoder wires Color Signal Color Signal DRAIN x3 P DRAIN GRY/WHT COMM T-R 16AWG RED PHASE S ENC I 16AWG WHT...
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors FRDM-MC-LVPMSM Controler card FRDM-MC-LVPMSM Parts 24-48V 5.5V Controller Card Parts Power Supply 3.3V Polarity Power Supply Protection Open MOSFET 6xPWM JTAG Predriver MOSFET Target Ia, Ib, Ic...
Page 7
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors The jumper setting is as default, except for J110. See the table below. Table 4. MIMXRT1060-EVKC jumper settings Jumper Setting Jumper Setting Jumper Setting J107 J110 open...
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Figure 8. Resistor needed for proper operation on the bottom side of the EVK board For more information about the MIMXRT1060-EVKC hardware (processor, peripherals, and so on), see the MIMXRT1060/1064 Evaluation Kit Board Hardware User’s Guide (document MIMXRT10601064EKBHUG).
Page 9
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Table 5. MIMXRT1060-EVKC pin assignment ...continued FRDM-MC-LVPMSM Connection MIMXRT1060-EVKC VOLT_DCB J2, 7 <-> J1, 14 GPIO_AD_B1_02 CUR_DCB J2, 9 <-> J1, 16 GPIO_AD_B1_03 3. Connect the 3-phase motor wires to the screw terminals (J7) on the Freedom PMSM power stage.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 3 Processors features and peripheral settings This chapter describes the peripheral settings and application timing. 3.1 i.MX RT1060 ™ i.MX RT1060 crossover MCUs are part of the EdgeVerse edge computing platform and expand the i.MX RT...
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 3.1.2 RT1060 - Peripheral settings This section describes the peripherals used for the motor control. On i.MX RT1060, three submodules from the enhanced FlexPWM (eFlexPWM) are used for 6-channel PWM generation and two 12-bit ADCs for the phase currents and DC-bus voltage measurement.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors • The slow loop is usually ten times slower than the fast loop. Therefore, the interrupt is generated after the counter counts from CNTR0 = 0 to COMP1 = IPG CLK ROOT / (16U * Speed Loop Freq). The speed loop frequency is set in the M1_SPEED_LOOP_FREQ macro and equals 1000 Hz.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 4 Project file and IDE workspace structure All the necessary files are included in one package, which simplifies the distribution and decreases the size of the final package. The directory structure of this package is simple, easy to use, and organized logically. The folder structure used in the IDE differs from the structure of the PMSM package installation, but it uses the same files.
Page 14
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors • m1_pmsm_appconfig.h: contains the definitions of constants for the application control processes, parameters of the motor and regulators, and the constants for other vector-control-related algorithms. When you tailor the application for a different motor using the Motor Control Application Tuning (MCAT) tool, the tool generates this file at the end of the tuning process.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 5 Motor-control peripheral initialization The motor-control peripherals are initialized by calling the MCDRV_Init_M1() function during MCU startup and before the peripherals are used. All initialization functions are in the mc_periph_init.c source file and the mc_periph_init.h header file.
Page 16
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors – void M1_MCDRV_ADC_GET(mcdrv_adc_t*): this function reads and calculates the actual values of the 3-phase currents, DC-bus voltage, and auxiliary quantity. • The available APIs for the PWM are: –...
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 6 User interface The application contains the demo mode to demonstrate motor rotation. You can operate it either using the user button, or using FreeMASTER. The NXP development boards include a user button associated with a port interrupt (generated whenever one of the buttons is pressed).
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 7 Remote control using FreeMASTER This section provides information about the tools and recommended procedures to control the sensor/ sensorless PMSM Field-Oriented Control (FOC) application using FreeMASTER. The application contains the embedded-side driver of the FreeMASTER real-time debug monitor and data visualization tool for communication with the PC.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Figure 14. FreeMASTER communication setup window 2. Ensure, that your computer is communicating with the plugged board. Unplug and then plug in the USB cable and reopen the FreeMASTER project.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Figure 15. Default symbol file 5. Click OK and restart the FreeMASTER communication. For more information, check FreeMASTER User Guide. 7.3 Motor Control Aplication Tuning interface (MCAT) The PMSM sensor/sensorless FOC application can be easily controlled and tuned using the Motor Control Application Tuning (MCAT) plug-in for PMSM.
Page 21
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors tuning parameters to MCU's flash memory, m1_pmsm_appcofig.h must be saved, code recompiled, and downloaded to MCU. Note: Path to mX_pmsm_appcofig.h file also composed from Board ID value. Therefore, FreeMASTER must be connected to the target, and Board ID value read prior using Save/Load buttons.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors • Sensors: this page contains the encoder parameters and position observer parameters. • Sensorless: this page enables you to tune the parameters of the BEMF observer, tracking observer, and open-loop startup.
Page 23
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Table 8. Parameters tab inputs ...continued MCAT group MCAT name Equation name Description Unit use the electrical parameters identification and then fill manually. Stator quadrature inductance. Obtain from motor manufacturer...
Page 24
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Table 8. Parameters tab inputs ...continued MCAT group MCAT name Equation name Description Unit E block Eblock Blocked rotor detection. When BEMF voltage drops under E E block per...
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors • M1_UDCB_IIR_A1 = -(2 * pi * UdcbIIRf0 * currentLoopSampleTime - 2) / (2 + (2 * pi * UdcbIIRf0 * currentLoopSampleTime)) • M1_SCALAR_VHZ_FACTOR_GAIN = UphNom*k_factor/100/(Nnom*Pp/60) •...
Page 26
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Table 10. Speed loop tab input MCAT group MCAT name Equation name Description Unit Loop parameters Sample time speedLoopSampleTime Slow control loop period. This [sec] disabled value is read from...
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 7.3.1.5 Sensors Available at sensored (encoder) applications only. This tab enables setting the encoder properties and tuning encoder's tracking observer. MCAT group and MCAT name help to locate the parameter in MCAT layout.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 3. No pending fault. Check variable "M1 Fault Pending" in "Motor M1" project tree subblock. If there is some value, first remove the cause of the fault, or disable fault checking. (for example in variable "M1 Fault Enable Blocked Rotor")
Page 30
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors α_req d_req PMSM β_req αβ q_req θ Sensor θ init ω Frequency 2π Integrator Figure 18. Voltage - Open loop control For run motor in Voltage - Open loop control, follow these steps: 1.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 4. In variable "M1 Openloop Required Id" and "M1 Openloop Required Iq" set required values. 5. In variable "M1 Openloop Theta Electrical" set required initial position.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 2. Switch variable "M1 MCAT Control" on "SPEED_FOC". 3. Choose between sensored and sensorless control in variable "M1 MCAT POSPE Sensor". 4. In variable "M1 Speed Required" set the required speed. (i.e. 1000rpm). The motor automatically starts spinning.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Figure 24. Faults in variable watch located in "Motor M1" subblock 7.5.1 Variable "M1 Fault Pending" It shows actually persisting faults, which means that the fault indicated during fault conditions is accomplished.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 7.5.2 Variable "M1 Fault Captured" If any fault condition appears, the fault captured is indicated. Similar to fault pending, fault captured is shown in the BIN format, but every fault type has its own variable ("M1 Fault Captured Over Curent" and others). For example, if the undervoltage fault condition is accomplished, fault captured is indicated.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 7.6 Initial motor parameters and harware configuration Motor control examples contain two or more configuration files: m1_pmsm_appconfig.h, m2_pmsm_appconfig.h, and so on. Each contains constants tuned for the selected motor (Linix 45ZWN24-40 or Teknic M-2310P for the Freedom development platform and Mige 60CST-MO1330 for the High-voltage platform).
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Table 14. Fault limits ...continued Parameter Units Description Typical range U DCB under Trigger value at which 0 ~ U DCB Over the undervoltage fault is detected...
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Figure 27. MID FreeMASTER control 7.7.1 Switch between Spin and MID Users can switch between two modes of application: Spin and MID (Motor Identification). Spin mode is used...
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 7.7.2 Motor parameter identification using MID The whole MID is controlled via the FreeMASTER "Variable Watch". The Motor Identification (MID) subblock is shown in Figure 27. Following is the motor parameter identification workflow: 1.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Table 18. MID Start Result variable MID Start Result mask Description Troubleshooting b#00 0001 Error during initialization electrical Check whether inputs to the MCAA_ parameters measurement EstimRLInit_FLT are valid...
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 7.8.4 Number of pole-pair assistant The number of pole-pairs can only be measured with a position sensor. However, there is a simple assistant to determine the number of pole-pairs (PP_ASSIST). The number of the pp assistant performs one electrical revolution, stops for a few seconds, and then repeats.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Figure 28. PMSM identification tab 7.9 Electrical parameters measurement control This section describes how to control electrical parameters measurement, which contains measuring stator resistance R , direct inductance L , and quadrature inductance L .
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors • MID: Config El I DC positive max - Maximum positive DC current for the L dependency map measurement. Injected AC and DC currents are automatically derived from the MID: Config El I DC (estim Lq) and MID: Config El I DC positive max currents.
Page 44
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors (11) Where, = nominal voltage phnom = ratio within range 0-100% factor pp = number of pole-pairs = nominal revolutions Note: Changes V/Hz factor is not propagated to the m1_pmsm_appconfig.h.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 9. Enable the voltage FOC mode in the "M1 MCAT Control" variable while the main application switch "M1 Application Switch" is turned off. 10. Switch on the main application switch on and set a non-zero value in the “M1 MCAT Uq Required” variable.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Figure 32. Encoder direction—wrong direction 7.10.2 Alignment tuning For the alignment parameters, navigate to the "Parameters" MCAT tab. The alignment procedure sets the rotor to an accurate initial position and enables you to apply full startup torque to the motor. A correct initial position is needed mainly for high startup loads (compressors, washers, and so on).
Page 47
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Figure 33. Slow step response of the Id current controller • The loop bandwidth (300 Hz) is optimal and the response time of the Id current is sufficient (see Figure Figure 34. Optimal step response of the Id current controller...
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Figure 35. Fast step response of the Id current controller 7.10.4 Speed ramp tuning To tune speed ramp parameters, follow the steps below: 1. The speed command is applied to the speed controller through a speed ramp. The ramp function contains two increments (up and down) which express the motor acceleration and deceleration per second.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 7.10.5 Open loop startup To tune open loop startup parameters, follow the steps below: 1. The startup process can be tuned by a set of parameters located in the "Sensorless" tab. Two of them (ramp increment and current) are accessible in both tuning modes.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 1. Navigate to the "Sensorless" MCAT tab. 2. Set the required bandwidth and attenuation of the BEMF observer. The bandwidth is typically set to a value close to the current loop bandwidth.
Page 51
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Figure 38. Speed controller response—SL_Ki value is low, Speed Ramp is not achieved • The "SL_Kp" value is low, the "Speed Actual Filtered" greatly overshoots, and the long settling time is unwanted.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Figure 40. Speed controller response—speed loop response with a small overshoot 7.10.8 Position P controller tuning The position control loop can be tuned using the proportional gain "M1 Position Loop Kp Gain" variable. A proportional controller can be used to unpretend the position-control systems.
Page 53
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Figure 41. Position controller response—PL_Kp value is low, the actual position response is very slow The "PL_Kp" value is too high and the actual position overshoots the required position.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 8 Conclusion This application note describes the implementation of the sensor and sensorless field-oriented control of a 3- phase PMSM. The motor control software is implemented on NXP board with the FRDM-MC-LVPMSM NXP Freedom development platform.
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 9 Acronyms and abbreviations Table 19 lists the acronyms and abbreviations used in this document. Table 19. Acronyms and abbreviations Acronym Meaning Analog-to-Digital Converter ACIM Asynchronous Induction Motor...
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 10 References These references are available on www.nxp.com: • Sensorless PMSM Field-Oriented Control (document DRM148) • Motor Control Application Tuning (MCAT) Tool for 3-Phase PMSM (document AN4642) •...
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors 12 Revision history Section 12 summarizes the changes done to the document since the initial release. Table 20. Revision history Revision number Date Substantive changes May 2023...
NXP Semiconductors. In the event that customer uses the product for design-in and use in In no event shall NXP Semiconductors be liable for any indirect, incidental, automotive applications to automotive specifications and standards, punitive, special or consequential damages (including - without limitation - customer (a) shall use the product without NXP Semiconductors’...
Page 61
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Tables Tab. 1. Available example type, supported motors Tab. 11. Sensors tab input ..........27 and control methods ......... 2 Tab. 12. Sensorless tab input ........27 Tab.
Page 62
PMSMRT1060C NXP Semiconductors MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors Figures Fig. 1. Linix 45ZWN24-40 permanent magnet Fig. 24. Faults in variable watch located in "Motor synchronous motor ..........3 M1" subblock ...........34 Fig. 2. Teknic M-2310P permanent magnet Fig.
Need help?
Do you have a question about the PMSMRT1060C and is the answer not in the manual?
Questions and answers