Other Parts Discussed in Thread: MOTORWARE
I have a small surface-mount permanent magnet motor mounted to a test stand. I'm driving it with a slightly modified version of Lab 11 from the InstaSPIN labs. I removed the speed loop, so I'm directly commanding the phase currents. At any speed, if I exceed a particular amount of current (20Apk), the controller seems to get lost. The phase currents become dramatically non-sinusoidal and the motor emits significant noise. If I reduce the current command, the motor recovers and runs smoothly. My command is always 100% q-axis current. I'm commanding the d-axis current to be zero.
I can't tell whether this is the FAST estimator losing its lock on the angle, causing the current regulators to apply the wrong voltages, or if the regulators are falling apart and that's causing the estimator to get lost. But, not matter what I do with the PI gains, the problem remains.
I posted this previously, and the resulting thread below took a deep dive into any potential issues with the hardware, including some alleged issues with the 8301 itself. That all came up short, and I'm convinced that the demo kit is just fine and should be able to run this motor at the requested current. That thread has more or less died because I accidentally marked it solved. If there ARE any hardware suggestions, I'd like to keep them in that thread just for organization reasons. Here's that thread, just for reference.
I'd like to explore what might be causing the estimator to lose its lock. I have some new information that wasn't available when I posted previously.
First, I added some extra code that lets me intercept the FAST estimator and run the motor in open-loop mode at a fixed frequency. The bench load is a DC machine connected to a variable resistor bank, so at a fixed frequency, if I don't vary the load resistance, the motor torque should be constant. That also means the q-axis current should be constant. If I run the motor up to 20A with the estimator intact, I can observe the phase voltage (and the commanded d- and q-axis voltages). When I intercept the estimator with that same voltage, everything stays the same. However, from here I am able to adjust the phase voltage amplitude until the phase current is at a minimum. Basically, I can guess-and-check until we're at the maximum torque per amp operating point, which also means that we weren't there before. This indicates that the phase current applied to the motor has a d-axis component to it.
Second, as I approach the 20Apk ceiling, the estimated angle starts to "wobble". What I mean is that there's an oscillation on top of the triangular wave (I can extract the data directly from the 28069 and plot it). This oscillation is better, but still present, when I intercept the estimator and run the motor in open-loop (the FAST estimator still runs in the background; I just don't use the angle to drive the phase voltages).
Third, I added a position sensor to the test stand. It's a quadrature encoder with an index pulse. I calibrated the index pulse to the back EMF, so I know the rotor position leads the index pulse by 196° electrical. When I run the motor with the full control system and spit the angle out on a DAC port, the estimated angle is advanced from the true rotor position. This isn't just happening at large currents...It happens even at Iq_ref = 0.1pu (5A). With the measured phase angle advanced, the current controller will supply some demagnetizing current. This makes sense, because the torque I get per amp, even at low speeds and low currents, is less than what I expect coming from the torque constant.
I've checked the motor parameters and measured them twice, but they're OK. Adjusting the inductance hasn't helped much.
Right now I'm working on a couple things. First, I'm using the open-loop operation to try and find where the machine starts to saturate, as I'm sure that's not helping. Second, I'm going to plot the angle deviation vs. current level. Finally, I have a library that lets me adjust the flux constant during operation, but I haven't gotten time to use that. Maybe a combination of this AND the inductance adjustment will help, and I'm sure it will be necessary if the motor is saturating. But, even at low currents the estimated angle doesn't seem to sync with the measured angle.
I'm happy to run any suggested tests. I can generate plots of just about anything, either on an oscilloscope or internal to the DSP. Any help is much appreciated.
Thanks,
Matt