2022-06-15 08:00 AM
I have an issue where I keep getting a startup fault. But the motor gets up to the speed its commanded to. I don't have this issue with the demo (IMH07M1) board, but I do with my custom power stage.
The only way this would fail is if the pointer to the next phase is null, but it should exit this before it gets to the end of the phase Linked list... I'm starting my observer at stange 2, theres 5 phases... I'm very confused also why this would fail using one hardware and not another when both spin the motor and get up to speed.
Thanks!
2022-06-15 09:26 AM
a bit of weirdness. If the motor stalls and fails to start spinning (during RUC), it does converge and makes an awful noise... Why would it fail if its working and succeed when it doesn't??
2022-06-16 07:33 AM
What would be a good way to understand why the STO_PLL_IsObserverConverged doesn't return true? That's the only reason why i would get past phase 5 and not converge. I tried inserting a dynamic printf() but that causes the system to delay enough to just not function. I really want to avoid needing halls or resolver/encoder
2022-06-30 08:52 AM
I guess I'm alone with this problem.
I did discover that my pwm freq does affect whether it spins. My power stage needs 15kHz. But was unable to spin even the demo motor. I ran the same code (with config changes) with the IHM07m1 board just to compare. That also wouldn't spin. I then loaded up a default (workbench) build of the IHM + freertos and the bullrunner (demo) @ 15k still wouldn't startup correctly. got speed feedback errors. moved to 25kHz and worked perfectly.
I then slowly lowered it back to 15k, and now it works... Very peculiar...I changed nothing but the pwm freq.
I added the motor I'm interested in spinning but that one won't converge, gives startup failure (with 15k and 20k). I checked the RPM, and its exactly where the speed reference is set to. I'm really confused why startup fails. My guess its when it tries to switch over to FOC control, something is causing it to fail there.
If anyone has any experience with this and knows what to change, please let me know so I can stop fumbling around.
2022-06-30 02:09 PM
Ok, I'm really confused. I tried to get my other motor to work, its def the observer that's the issue because the estimated speed was ALL OVER THE PLACE. I put the bull runner back in there, and it was more sane. However after putting the bull runner back on with all the default values. It no longer converges and get a speed feedback error. I tried going back to 25000 khz, it didn't help.
2022-07-01 07:00 AM
After much playing with workbench and using git to track changes. I've understood some of the issues I had with frequency. I neglected to adjust some of my gains when I adjusted the pwm freq. However, this hasn't helped me with my motor. The speed reference is still all over the place if not "better".
Currently my gains are:
C1: 6000
C2: 15000
KP: 8000
KI: 2000
I've moved these around these spots a bit without much better results. I'm quite at a loss.
Is there a way to force it to converge or at the least keep it in open loop for testing?
2022-07-05 05:46 AM
hey, I am experiencing a similar problem and I can share some things that might help you: the PWM frequency has huge impact on the automatically calculated PI values of the current / torque and speed regulators and also on the C1 and C2 values of CORDIC (also PLL regulator values). You could try to increase the values of variance threshold under workbench --> speed sense to max 400% for CORDIC, you could also try to increase the values marked in the screenshot
and you could enable the following checkbox:
under "startup" settings. this helps when you startup the motor without any load, because in this case the acceleration during switchover can be very large and cause speed feedback error. also you could increase maximum allowed acceleration value under CORDIC settings. or increase any of the values in here under startup settings:
the allowed tolerance can be increased, or increase the minimum output speed, so that the switchover happens at higher RPM when the back EMF is stronger and the position estimation is more accurate.
2022-07-09 10:20 AM
Thanks @AL.8edig very detailed suggestions. I have messed with the C1/C2 and P/I gains a great deal. I haven't messed with the Bemf items. I will look into those more. Will report back.
2022-07-12 01:39 PM
I found that my pole pairs was wrong! I was using POLES not POLE PAIRS. Lots of things are working better now. However, I am getting a negative rotational speed. changing the sign of C1 (-8374 wb gen) makes it fail completely.
Still messing with this, but really curious how to adjust this. I have tried swapping poles of the motor wondering if that would help, it did not.
This motor has a lot of inertia, but the motor is overpowered... I've been thinking its my startup profile, it tends to get almost to my final rpm then faults. like its lagging to far behind. I have adjusted the lower and upper limits, hasn't really helped me much. CORDIC didn't work at all for me, PLL seems to estimate better (if not opposite sign).
Also something weird, the high speed plot Y axis and the Polled plot y axis of the same value are different. Plotting both shows the discrepancy.
2022-07-13 04:53 PM
More info.
I have gotten it to go positive, but its really touchy. sometimes it will go positive, others it wont.
I have been slowly reducing C2/GAIN2 to get somewhat reliable feedback. however, whenever it tries to switch over, I get weird current profile. Matches roughly what I see on the sillyscope.
I'm trying to play with the torque gains, only thing i can think of that would have such a drastic change on the pwm... But still why would it screw up this bad... Any insights would be greatly appreciated...
Current settings:
Torque: P = 3712, I = 2000
PLL: C1 = -8374, C2 = 14978, P = 598, I = 26
C2 is very sesitive at any #... I took it down to 7500, and just one number higher or lower will make it not work. but decrement a few more and it will work again.