NX PMSMRT1170B Bedienungsanleitung

PMSMRT1170B
MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC
Motors
Rev. 1 — 20 April 2023 User guide
Document information
Information Content
Keywords PMSMRT1170B , 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.

NXP Semiconductors PMSMRT1170B
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:
•i.MX RT1170-EVKB (MIMXRT1170-EVK)
•Freedom Development Platform for Low-Voltage, 3-Phase PMSM Motor Control (FRDM-MC-LVPMSM)
The document is divided into several parts. Hardware setup, processor features, and peripheral settings are
described at the beginning of the document. The next part contains the PMSM project description and motor
control peripheral initialization. The last part describes user interface and additional example features.
Available motor control examples types with supported motors, and possible control methods are listed in
Table 1.
Possible control methods in SDK example
Example type Supported motor Scalar and
Voltage
Current FOC
(Torque)
Sensorless
Speed FOC
Sensored
Speed FOC
Sensored
Position FOC
Linix 45ZWN24-
40 (default motor) ✓ ✓ ✓ N/A N/A
pmsm_enc Teknic M-2310P
(with ENC) ✓ ✓ ✓ ✓ ✓
Table 1. Available example type, supported motors and control methods
SDK motor control example description:
• pmsm_enc - pmsm example uses float arithmetic, the example contains sensored and also sensorless field
oriented vector control (FOC). This example can be used for sensor and sensorless motor control application
both. Default motor configuration is tuned for the Linix 45ZWN24-40 motor.
The SDK motor control example contains several additional features:
• FreeMASTER pmsm_float_enc.pmpx project provides a simple and user-friendly way for algorithm tuning,
software control, debugging, and diagnostics.
• MCAT - Motor Control Application Tuning page based on the FreeMASTER runtime debugging tool.
• MID - Motor parameter identification.
The control software and the PMSM control theory, in general, are described in Sensorless PMSM Field-
Oriented Control (FOC) (document DRM148).
PMSMRT1170B All information provided in this document is subject to legal disclaimers. © 2023 NXP B.V. All rights reserved.
User guide Rev. 1 — 20 April 2023
2 / 63

NXP Semiconductors PMSMRT1170B
MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors
2 Hardware setup
The following chapter describes the used hardware and the setup needed for proper example working
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 2.
Characteristic Symbol Value Units
Rated voltage Vt 24 V
Rated speed - 4000 RPM
Rated torque T 0.0924 Nm
Rated power P 40 W
Continuous current Ics 2.34 A
Number of pole-pairs pp 2 -
Table 2. Linix 45ZWN24-40 motor parameters
Figure 1. Linix 45ZWN24-40 permanent magnet synchronous motor
The motor has two types of connectors (cables). The first cable has three wires and is designated to power the
motor. The second cable has five wires and is designated for the hall sensors’ signal sensing. For the PMSM
sensorless application, only the power input wires are needed.
2.2 Teknic M-2310P motor
The Teknic M-2310P-LN-04K motor is a low-voltage 3-phase permanent-magnet motor used in PMSM
applications. The motor has two feedback sensors (hall and encoder). For information on the wiring of feedback
sensors, see the data sheet on the manufacturer webpage. The motor parameters are listed in Table 3.
Characteristic Symbol Value Units
Rated voltage Vt 40 V
Rated speed - 6000 RPM
Table 3. Teknic M-2310P motor parameters
PMSMRT1170B All information provided in this document is subject to legal disclaimers. © 2023 NXP B.V. All rights reserved.
User guide Rev. 1 — 20 April 2023
3 / 63

NXP Semiconductors PMSMRT1170B
MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors
Characteristic Symbol Value Units
Rated torque T 0.247 Nm
Rated power P 170 W
Continuous current Ics 7.1 A
Number of pole-pairs pp 4 -
Table 3. Teknic M-2310P motor parameters...continued
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.
1 DRAIN x3 P DRAIN 9 16AWG BLK PHASE R
Pin Color
Encoder wires
Motor phases(Wire entry view)
Signal ColorPin Signal
2 N/A N/A 10 16AWG RED PHASE S
3 GRN 11 16AWG WHT PHASE T
4 GRN/WHT 12 RED +5VDC IN
5 GRY/WHT 13 BRN ENC 1
6 DRAIN x1 14 ORN ENC B
7 BLK 15 BLU ENC A
16* ORN/WHT ENC B˜
8* BLU/WHT
COMM S-T
COMM R-S
COMM T-R
E DRAIN
GND
ENC A˜
9 10 11 12 13 14 15 16
1 2 3 4 5 6 7 8
Figure 3. Teknic motor connector type 1
PMSMRT1170B All information provided in this document is subject to legal disclaimers. © 2023 NXP B.V. All rights reserved.
User guide Rev. 1 — 20 April 2023
4 / 63

NXP Semiconductors PMSMRT1170B
MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors
R DRAIN x3 P DRAIN L GRY/WHT COMM T-R
Pin Color
Motor phases Encoder wires(Mating face shown)
Signal ColorPin
F
Signal
C 16AWG RED PHASE S U BRN ENC I
D 16AWG WHT G GRN COMM S-T
B 16AWG BLK T RED +5VDC IN
J BLU F* ORN/WHT ENC B˜
K* BLU/WHT V ORN ENC B
H GRN/WHT M DRAIN x1 E DRAIN
S BLK
PHASE T
PHASE R
ENC A
ENC A˜
COMM R-S
GND
G
A M
E
B
H
L
D R
C
J
K
P
T
U
S
V
N
Figure 4. Teknic motor connector type 2
2.3 FRDM-MC-LVPMSM
In a shield form factor, this evaluation board effectively turns an NXP Freedom development board or an
evaluation board into a complete motor-control reference design. It is compatible with existing NXP Freedom
development boards and evaluation boards. The Freedom motor-control headers are compatible with the
Arduino R3 pin layout.
The FRDM-MC-LVPMSM low-voltage, 3-phase Permanent Magnet Synchronous Motor (PMSM) Freedom
development platform board has a power supply input voltage of 24 VDC to 48 VDC with reverse polarity
protection circuitry. The auxiliary power supply of 5.5 VDC is created to supply the FRDM MCU boards. The
output current is up to 5 A RMS. The inverter itself is realized by a 3-phase bridge inverter (six MOSFETs) and a
3-phase MOSFET gate driver. The analog quantities (such as the 3-phase motor currents, DC-bus voltage, and
DC-bus current) are sensed on this board. There is also an interface for speed and position sensors (encoder,
hall). The block diagram of this complete NXP motor-control development kit is shown in Figure 5.
Figure 5. Motor-control development platform block diagram
PMSMRT1170B All information provided in this document is subject to legal disclaimers. © 2023 NXP B.V. All rights reserved.
User guide Rev. 1 — 20 April 2023
5 / 63

NXP Semiconductors PMSMRT1170B
MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors
FRDM-MC-LVPMSM Parts
Controller Card Parts
Power Supply
Polarity
24-48V
DC
Motor
15V
6xPWM
Ia, Ib, Ic
Udc, Idc
Enc, Hall
5.5V
3.3V
USB
JTAG
Protection
6x
MOSFET
Analog
Sensing
Encoder /
Hall
Encoder
Hall
Power
Supply
MOSFET
Predriver
FRDM-MC-LVPMSM Controler card
Target
MCU
Open
SDA
Buttons
LEDs
Accel
Therm
Figure 6. FRDM-MC-LVPMSM
The FRDM-MC-LVPMSM board does not require a complicated setup. For more information about the Freedom
development platform, see www.nxp.com.
Note:
There might be a wrong FRDM-MC-LVPMSM series in the market (series VV19520XXX). This series
is populated with 10 mOhm shunt resistors and noisy operational amplifiers which affect phase current
measurement. The mc_pmsm example is tuned for original FRDM-MC-LVPMSM board with 20 mOhm shunt
resistors.
2.4 i.MX RT1170-EVKB
The i.MX RT1170-EVKB provides a high-performance solution in a highly integrated board. It consists of a 6-
layer PCB with through hole design for better EMC performance at a low cost, and it includes key components
and interfaces. The dual-core i.MX RT1170 runs on the Cortex-M7 at 1 GHz and Arm Cortex-M4 at 400 MHz,
while providing best-in-class security.
PMSMRT1170B All information provided in this document is subject to legal disclaimers. © 2023 NXP B.V. All rights reserved.
User guide Rev. 1 — 20 April 2023
6 / 63

NXP Semiconductors PMSMRT1170B
MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors
Jumper Setting Jumper Setting Jumper Setting
JP6 1-2 J53 1-2 J90 1-2
JP7 1-2 J56 2-3 J91 1-2
J14 1-2 J67 1-2 J93 1-2
J19 1-2 J68 1-2 J97 1-2
J23 1-2 J69 1-2 J98 1-2
J28 1-2 J71 1-2 J99 1-2
J38 7-8 J73 1-2 J100 1-2
J41 1-2 J79 1-2
J49 1-2 J80 1-2
Table 4. MIMXRT1170-EVKB jumper settings
All others jumpers are open.
Figure 7. MIMXRT1170-EVKB board with highlighted jumper settings
PMSMRT1170B All information provided in this document is subject to legal disclaimers. © 2023 NXP B.V. All rights reserved.
User guide Rev. 1 — 20 April 2023
7 / 63

NXP Semiconductors PMSMRT1170B
MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors
The motor-control application requires removing and soldering some zero resistors for a correct connection.
Remove and solder zero resistors according to Table 5.
Add resistors Remove resistors
R1841 R1845 R188 R412
R1842 R1846 R193 R1814
R1843 R1847
R1844
Table 5. Add and remove resistors
For locate resistors on the board see schematic and layout on board web page.
PMSMRT1170B All information provided in this document is subject to legal disclaimers. © 2023 NXP B.V. All rights reserved.
User guide Rev. 1 — 20 April 2023
8 / 63

NXP Semiconductors PMSMRT1170B
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 RT1170
The i.MX RT1170 crossover MCUs are setting speed records at 1 GHz. This ground-breaking family combines
superior computing power and multiple media capabilities with ease of use and real-time functionality. The
i.MX RT1170 MCU offers support over a wide temperature range and is qualified for consumer, industrial, and
automotive markets.
For more information, see i.MX RT1170 Crossover MCU Family web pages.
3.1.1 RT1170 - Hardware timing and synchronization
Correct and precise timing is crucial for motor-control applications. Therefore, the motor-control-dedicated
peripherals take care of the timing and synchronization on the hardware layer. In addition, you can set the PWM
frequencies as a multiple of the ADC interrupt (ADC ISR) frequency where the FOC algorithm is calculated. In
this case, the PWM frequency is equal to the FOC frequency.
master
reload
master
reload
SM0 counter
PWM top
PWN bottom
ADC ETC
and ADC
conversion
ADC ETC
ISR
TRIG0 (val 4) Tdeadtime
Figure 8. Hardware timing and synchronization on i.MX RT1170
•The top signal shows the eFlexPWM counter (SM0 counter). The dead time is emphasized at the PWM top
and PWM bottom signals. The SM0 submodule generates the master reload at every opportunity.
•The SM0 generates trigger 0 (when the counter counts to a value equal to the VAL4) for the ADC_ETC (ADC
External Trigger Control) with a delay of Tdeatime/2. This delay ensures correct current sampling at the duty
cycles close to 100 %.
•ADC_ETC starts the ADC conversion.
•When the ADC conversion is completed, the ADC_ETC ISR (ADC_ETC interrupt) is entered. The FOC
calculation is done in this interrupt.
PMSMRT1170B All information provided in this document is subject to legal disclaimers. © 2023 NXP B.V. All rights reserved.
User guide Rev. 1 — 20 April 2023
9 / 63

NXP Semiconductors PMSMRT1170B
MCUXpresso SDK Field-Oriented Control (FOC) of 3-Phase PMSM and BLDC Motors
3.1.2 RT1170 - Peripheral settings
This section describes the peripherals used for the motor control. On i.MX RT1170, 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. The eFlexPWM and ADC are synchronized via submodule 0 from
the eFlexPWM. The following settings are located in the mc_periph_init.c and peripherals.c files and
their header files.
3.1.2.1 PWM generation - PWM1
•Six channels from three submodules are used for the 3-phase PWM generation. Submodule 0
generates the master reload at event every nth opportunity, depending on the user-defined macro
M1_FOC_FREQ_VS_PWM_FREQ.
•Submodules 1 and 2 get their clocks from submodule 0.
•The counters at submodules 1 and 2 are synchronized with the master reload signal from submodule 0.
•Submodule 0 is used for synchronization with ADC_ETC. The submodule generates the output trigger after the
PWM reload, when the counter counts to VAL4.
•Fault mode is enabled for channels A and B at submodules 0, 1, and 2 with automatic fault clearing.
Note: The PWM outputs are re-enabled at the first PWM reload after the fault input returns to zero.
•The PWM period (frequency) is determined by how long the counter takes to count from INIT to VAL1. By
default, INIT = -MODULO/2 = -15000 and VAL1 = MODULO/2 -1 = 14999. The eFlexPWM clock is 240 MHz,
so it takes 0.0000625 s (16 kHz).
•Dead time insertion is enabled. Define the dead time length in the M1_PWM_DEADTIME macro.
3.1.2.2 ADC external trigger control - ADC_ETC
The ADC_ETC module enables multiple users to share the ADC modules in the Time Division Multiplexing
(TDM) way. The external triggers can be brought from the Cross BAR (XBAR) or other sources. The ADC scan
is started via ADC_ETC.
•Both ADCs have set their own trigger chains.
•The trigger chain length is set to 2. The back-to-back ADC trigger mode is enabled.
•The SyncMode is on. In the SyncMode, ADC1 and ADC2 are controlled by the same trigger source. The
trigger source is the PWM submodule 0.
•After both ADCs conversion is completed, ADC_ETC interrupt is enabled and serves the FOC fast-loop
algorithm.
3.1.2.3 Analog sensing - ADC1 and ADC2
ADC1 and ADC2 are used for the MC analog sensing of currents and DC-bus voltage.
•The ADCs operate as 12-bit with the single-ended conversion and hardware trigger selected. The ADCs are
triggered from ADC_ETC by the trigger generated by the eFlexPWM.
3.1.2.4 Quadrature Decoder (QD) module
The QD module is used to sense the position and speed from the encoder sensor.
•The direction of counting is set in the M1_POSPE_ENC_DIRECTION macro.
•The modulo counting and the modulus counting roll-over/under to increment/decrement revolution counter are
enabled.
PMSMRT1170B All information provided in this document is subject to legal disclaimers. © 2023 NXP B.V. All rights reserved.
User guide Rev. 1 — 20 April 2023
10 / 63
Inhaltsverzeichnis
Beliebte Netzwerk-Hardware Handbücher anderer Marken

Matrix Switch Corporation
Matrix Switch Corporation MSC-HD161DEL Bedienungsanleitung

B&B Electronics
B&B Electronics ZXT9-IO-222R2 Bedienungsanleitung

Yudor
Yudor YDS-16 Bedienungsanleitung

D-Link
D-Link ShareCenter DNS-320L Bedienungsanleitung

Samsung
Samsung ES1642dc Gebrauchsanweisung

Honeywell Home
Honeywell Home LTEM-PV Montageanleitung











