3-phase PMSM Sensorless FOC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

3-phase PMSM Sensorless FOC

Jump to solution
1,499 Views
Antal
Contributor II

Hello,

On my proprietary S32K144 (W) board, I implemented NXP's 3-Phase PSMS Sensorless FOC software. I was able to select the parameters for the software using the FreeMASTER's Motor Control Application. The target is a Maxon 48V/0.68A nom 5280 rpm motor. My motor is running, but I have questions about understanding the NXP software.


Motor Speed Control
The "Hardware Scales" - "I max": (I_MAX) should be 1.68 (A). When I use this value, the motor's speed control does not affect the motor rotation speed; instead, the applied DC voltage determines the rotation speed. In this case, the motor is running smoothly and very efficiently.

When I change this I_MAX to 0.001 (from 0.001 to 0.00000001), which only affects the measured phase current representation numerical value, the software has complete control over the motor speed from 0 to +/- nom rpm (with a very slow 100 rpm ramp).
Remarks: the I_MAX is used to set one other variable (U_DCB_MAX/I_MAX), which I replaced with the motor resistance value.

Any comment on this?

 

Motor Current Control
The NXP's algorithm does not control the current, or I could not make it, and when the motor changed direction at a low speed, the current was very high regardless of the selected I_MAX (10A ... 0.01A).

So I introduced a maximum_PWM variable limit to solve the current problem (maximum_PWM = f(Idc)).

I did expect that the current control loop would control the generated sinewave amplitude and that the motor would run equally if the input DC voltage is 48V or 480V(exaggerating).

Any comment on NXP's FOC current control functionality?

 

Best Regards,

Antal 

Tags (3)
0 Kudos
1 Solution
1,473 Views
RadekS
NXP Employee
NXP Employee

Hello Antal,

Thank you for your question. Yes, you are right, the I_MAX parameter isn't sufficiently explained in MCAT tool.

 

In fact, the _MAX parameter doesn't refer to the maximum motor current.

It characterize the current sense circuit on your board/EVB. So, it is only theoretical current value at which the input ADC voltage = 5V (= maximum measurable voltage). No relation to the real motor or power stage current capability.

Example: Current sense amplifier gain is 20. Shunt has 0.01 Ohm. So, (5 V / 20) / 0.01 = 25 Amps

 

The same is valid for U_DCB_MAX - it is theoretical value where ADC will measure full range 5V.

 

So these parameters just specified the ratio between real voltage/current values and ADC measurement results.

 

I hope it helps you.

 

Best regards

Radek 

View solution in original post

0 Kudos
4 Replies
1,457 Views
tomasfedor
NXP Employee
NXP Employee

Hi Antal,

Here are my comments:

Motor Speed Control:

As Radek mentioned I max and U DCB max are hw scales and they have to be set properly according to gains in your proprietary S32K144 (W) board  in order to be able to measure current and DC link voltage.

If those feedback signals are not measured properly it has an impact on a control algorithm.

Motor parameters (pp, Rs , Ld, Lq …) also have to be set properly according to used motor.

Note: If you make a change on Motor parameters or Hardware scales (MCAT tool card Parameters) the change has to be stored, output file has to be regenerated and application has to be recompiled in order to apply changes.

tomasfedor_0-1655185600852.png

tomasfedor_1-1655185625367.png

Motor Current Control

I suppose you are using sensorless. Application operates in 3 modes (Force mode, Tracking mode, and Sensorless mode). In all modes a current is controlled by AMCLIB_CurrentLoop_FLT. Output voltage is adjusted according measured DC link voltage by MCLIB_ElimDcBusRip_FLT. You can find detailed description in AN12235.pdf and Ammclib documentation on standard path C:\NXP\AMMCLIB\S32K14x_AMMCLIB_v1.1.28\doc\ S32K14XMCLUG.pdf.

Best regards,

Tomas Fedor.

0 Kudos
1,474 Views
RadekS
NXP Employee
NXP Employee

Hello Antal,

Thank you for your question. Yes, you are right, the I_MAX parameter isn't sufficiently explained in MCAT tool.

 

In fact, the _MAX parameter doesn't refer to the maximum motor current.

It characterize the current sense circuit on your board/EVB. So, it is only theoretical current value at which the input ADC voltage = 5V (= maximum measurable voltage). No relation to the real motor or power stage current capability.

Example: Current sense amplifier gain is 20. Shunt has 0.01 Ohm. So, (5 V / 20) / 0.01 = 25 Amps

 

The same is valid for U_DCB_MAX - it is theoretical value where ADC will measure full range 5V.

 

So these parameters just specified the ratio between real voltage/current values and ADC measurement results.

 

I hope it helps you.

 

Best regards

Radek 

0 Kudos
26 Views
VinGanZ
Contributor III

Our customer has designed the board with a 0.5mOhm resistor and an opamp gain of 56 with an idle reading set to 2.5V current sense amplifier output. How do we represent this on the firmware?

0 Kudos
3 Views
tomasfedor
NXP Employee
NXP Employee

Hi VinGanZ,

Considering 2.5V reference means 0A current and ADC voltage range is 5V:

current range is:  (5V/56)/0.0005ohm= 178.5714A = 2* Imax
<-Imax ; Imax>

<-89.28A ; 89.28A>

Best regards, 

Tomas Fedor.

0 Kudos