S12ZVML: high speed running problem with PMSM single shunt sensorless

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

S12ZVML: high speed running problem with PMSM single shunt sensorless

Contributor I

Hi,I'm using S12ZVML for 24V fan controller with single shunt.

There is a problem when running at the max speed(goto the Vs max,limited by Vbus voltage).

Voltage: 24V

Target speed: 4000rpm.

1. I use another controller with 3 shunts.Fan goes to 3600rpm and keep stable.(max Vs is 2/sqrt(3)).

2.Using S12ZVML, fan goes to 3000rpm and oscillates a lot ,then stops after tens of seconds because of hardware overcurrent.(max Vs is 90%, current loop output limitation).

My question is that :

1. I use 10k pwm freq and sample current every pwm freq, because 20k with double switching takes a lot switching power loss. MC9S12ZVMMCLUG says:In certain duty cycles, there is a risk, that the last ADC trigger will cause the ADC conversion time to end in the next period of the double-switching PWM. In such cases,it is recommended to set the triggers only for every odd period of the PWM.

Is it could be the reason?if this is possible, is it reasonable for me to use 5k to sample ADC and 10k to generate the PWM for motor control?

Or, it could be the speed/current loop parameter setting problem?

BTW, fan runs well below 2900rpm.

2. If I want to extend the speed range,with no field weakening, Is there an alternative solution for over modulation to extend the phase voltage utilization?

I read the MC9S12ZVMMCLUG, the third harmonic injection seems a good way. However it seems that it can't be used by this application with the duty limit of double swtiching strategy.



0 Kudos
2 Replies

NXP Employee
NXP Employee


if there would be an issue with the timing, you would probably get an ADCError. Another question, however, is if your double-switching algorithm timing is set correctly. This can be verified using PTU trigger debug pins displayed against current signal on the opamp output. Using this technique, you can also check the signal quality (e.g. ringing, which is a usual issue in DC link sensing - see https://ieeexplore.ieee.org/document/8398266)

If your algorithm is running well up to certain speed and then it fails, I would suspect the controller settings. My first guess would be the speed PI controller, but in sensorless mode, it can be also the BEMF observer and/or tracking observer tuning. First of all, please make sure your motor parameters are correct. Not just the Rs, Ld, Lq, but also ke, kt and J, which play significant role in speed loop tuning.

Regarding the algo timing, typically we can run 2pp motors with 10kHz sampling up to 10,000 RPM. In case of fans, I suppose your motor is 4pp or 5pp. Then 3,000RPM is still in the range of acceptable speed for standard FOC. You may also consider to add some small negative D current to reduce cogging torque and get smoother operation - it is not the "field weakening" as such, but it helps to smoothen the performance.

Going down to 5kHz would significantly limit the bandwidth you can use for controller settings. Recommended ratio between the sampling frequency and cut-off frequency of the fastest controller is 20, thus, with 5kHz, you can go up to 250 Hz with the current loop settings. For some low-resistance motors, it might be insufficient. A step response in current loop would give you the insight to the controller performance.

In our examples, we use SVM, which is very similar to the 3rd harmonic injection. It works well even with the double-switching algorithm. I believe you can get reasonable results thanks to 1,15x increase in 1st harmonics.

I hope it helps,

Best regards,


0 Kudos

NXP TechSupport
NXP TechSupport


There are important differences between 3-shunt and single-shunt control mechanism. I 3-shunt version you have measured all three currents and when the sample time is properly designed the measurement is OK and thus the control can be OK.

In single-shunt version you can measure only two currents and third must be calculated from those two currents measured. It must be finished in the same period too. Then the sample time for next period must be set-up properly. Also the two current’s measurement is much critical.

It’s no so simply to explain this control method so the two documents are attached. Please study it and apply that theory for the single-shunt motor control application. It requires precise tune of current measurement time to avoid errors in measurement. Then the control loop can work fluently in whole range.

I wish you many success in your design.

Best Regards,


0 Kudos