pachamatejS12 / MagniV Microcontrollers
Hi
We are trying to use the FOC PMSM code AN5327SW on the Miniboard. The miniboard has all the required hardware to work with this except for 4Mhz XTAL, which we are using internal clock.
We have set up the MCAT and parameters and the appconfig.h is attached below.
As per the PDF we are trying to at least start the motor in Scalar control.
After a lot many days of work we are able to spin the motor in SCALAR mode.
The motor stalls when entering any of the sensorless modes. In case of speed FOC we can here the motor vibrating but it has otherwise stalled
In the scalar mode the motor runs very hot and at limited RPM.
Further We are trying to tune using the AN4912 and the first step to getting Sinusoidal wave but the waves look randam and no amount of changing the V/HZ Ration Req is changing this. Please see attached image from Freemaster.
Also refer to Openloop position and estimated position recorder. they look to be in sync.
Further please see the current oscilloscope from Freemaster. Is this sinusoidal or do we need to tune this? What exact parameter do we need to change?
Urgent help required as we have spent over a week getting this far!
Hi,
I'd like to emphasize how important is to understand the field oriented control and motor construction and behavior. We provide open solution to be adjustable to most of the motors and to enable you to tune it to it's maximum efficiency. However, the price is that more time is needed to get understood the FOC (although it is a standard FOC with cascade structure, known and used for many years).
Please also take sufficient time to learn how to use the FreeMASTER. In your post, you are showing a "random" phase currents waveforms using a "scope" feature, however the "scope" is not capable of capturing such fast waveforms. Use "recorder" feature instead. The FreeMASTER tool has lot's of cool features connected with the recorder, such as triggering, capturing, etc.. You will need it during the tuning.
Unfortunately, my time and also the space here is limited so please let me just note, what I usually do when I tune the sensorless FOC:
Please also take into consideration:
- if the motor parameters are not correct, the algorithm settings may not follow the real scales and timings - please see the MCAT documentation, mainly the https://www.nxp.com/docs/en/application-note/AN4642.pdf .
- the FOC algorithm provided is based on linear model of the PMSM in the D-Q frame. If the motor is non-symmetrical, appropriate actions have to be taken to cover for these non-linearities (indicated by noise, low performance, low efficiency, etc.)
Best regards,
Matej
Matej
As usual you've given a great response. Thank you.
We are following AN4912. Between your points 3 & 4, as per AN4912, Voltage FOC should work with Uq_req set to some value > 0. But for us it is not working.
Process described in App Note 4680 is too complicated for us.
We already know that the Kv for our motor and we have calculated Ke in V.Sec/rad using the following steps (take a hypothetical motor of 500 Kv)
1) RPM to RPS (500/60 = 8.33)
2) Deg to Rad (8.33 * 360 = 3000, = 314.159265 rad/sec)
3) Ke = 0.00318309886547512771905676568221 ( 1/rad/sec)
Resistance we have measured with accurate multimeter and is 240E (480E/2)
We have directly measured the stator inductance between all three phases using an inductor meter and the average is 155uH. for this measurement we even removed the rotor so there was no influence of magnets. Note that when we enter this value into MCAT, we get an error saying Natural Frequency F0 cannot be less than 127.
Further it is a tiny motor with rotor mass of only 20 gms. Correspondingly moment of inertial is calculated based on radius etc. as 1.4E-05
Is there anything wrong we are doing?
After much effort and tuning, we are able to run our motor with Speed FOC across the full range of RPM.
We need you help in understanding the following settings logically because there is no simple explanation we could find....
1) How to calculate Kt from Ke above?
2) The meaning of Loop parameter "Bandwidth"? F0... Our motor runs when F0 for Current Loop is 128 but stalls if we change it to 256. If it's just PI update rate, it should not stall the motor due to higher update right? Also We already have the Sample time which we assume only samples but does not correct... is that right?
3) In control loop, what is the meaning of the attenuation parameter? Does it only attenuate the delta for the PI to see? If so how is this to be used generally?
4)What is the actual meaning of the 2 merging speed parameters? What is the difference between the two exactly (like lower and higher)?
5) We are finding that the motor stalls quickly as we apply load. There is no indication on MCAT about why the motor stopped. None of the error or flags or faults are set. So where do we look for the answer.
For us motor spins reliably under Spped FOC but does not spin at all under Voltage FOC and Current FOC. Is the motor supposed to spin with Current and Voltage FOC or are they only for tuning?
Finally, we see that that the iABC are not smooth sinusoidal even though the motor is running very smoothly. What could be the reason for this?
Please also see the eBEMF tuning below. Is this good or is this considered oscillating? My main concern is to rotate the motor as smoothly as possible to make sure it is as silent as possible. So it is not important that the motor is spinning, It is important that there should be minimum vibration. In the screen shot below I switched from 3000 RPM to 4800 RPM and we can see increase in delta of iQFbck vs iQ_Estimated. However visually, this sinusoidal movement is relative to the scale of iAxis, so need to know what would be a good range? At 4800 we can feel a lot of vibration in the motor.
You mention
"Very important is to set the current limit for the speed controller to be the same as the start-up limit "
Which settings are you referring to exactly?