IPM Motor - Auto-setup

User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »




only by flashing the loader with the programmer and then your file .bin I got a working firmware.

but it's not about that. now attempts to rotate the motor are working, but the "angle" graphs do not display anything even if I rotate the motor with my hands in the resolver test mode. I also didn't get an adequate phase test (but my new controller from Honda ima is probably to blame here, it doesn't have a part tracking the voltage and the amplifier settings are made so that he think the battery voltage is always 180 volts.
Screenshot_20230606-185225_1.png
Screenshot_20230606-184706_1.png
Screenshot_20230606-184852_1.png
Screenshot_20230606-185114_1_1.png
Screenshot_20230606-185016_1.png
evil neodymium :twisted:
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

I think that if the angle and angle graphs were displayed in the scrolling mode of the motor or the scrolling bidir, then it would be possible to judge the correctness of the angle setting by their convergence or offset, even with controllers that do not know the real battery voltage
evil neodymium :twisted:
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

Screenshot_20230606-191342_1.png
the normal start mode with manual rotation of the motor allows you to check the angle graph. Should I put TWO marks on the angle field to get a graph of the resolver and phases?
evil neodymium :twisted:
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: IPM Motor - Auto-setup

Post by Pete9008 »

The motor movement doesn't look right, not sure what this issue is though :(

The ud reading wrong would explain the low current error. Could you try reducing the mintesti to say 8A and the testdetlev to say 50 to see if that helps?

On the angle have you tried plotting "testangle" and "angle"?

Is it a resolver or an encoder?

Can you get a plot when testmode is set to "Resolver" and the inverter is started in the old manual mode?

Edit - just the one mark. If you mark both it plots the same parameter twice, once on the left hand Y axis and once on the right hand Y axis.
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

Encoder KMZ60
Testangle = fine!
Angle = 0
I changed the settings as you said and the rotation test was successful at 10 amps manual current id. however, the graph only drew angle data from the sine/cosine chip. there is probably no graph from the phases for the same reason - the controller does not know how to measure voltage.
Screenshot_20230606-200221_1.png
evil neodymium :twisted:
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

probably now I have to build a new controller that can measure voltage))
evil neodymium :twisted:
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: IPM Motor - Auto-setup

Post by Pete9008 »

I'm guessing that I've missed something in the code that is needed when using an encoder, will have a look.

The voltage measurement should only affect the phasecheck test, it isn't used in any of the others. Sure we can get it working as is (I might need to do another build that allows larger maxtestud values though).

What result do you get from the phasecheck test with the new settings?

Edit - could you post your parameters?
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

Pete9008 wrote: Tue Jun 06, 2023 5:25 pm
What result do you get from the phasecheck test with the new settings?

Edit - could you post your parameters?
Screenshot_20230606-203057_1.png
Screenshot_20230606-203127_1.png
Screenshot_20230606-203152_1.png
Screenshot_20230606-203225_1.png
Screenshot_20230606-203251_1.png
evil neodymium :twisted:
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

params.json
(1.58 KiB) Downloaded 50 times
Screenshot_20230606-203837_1.png
the current that I indicate in the screenshots, I write in this field before running the test.
evil neodymium :twisted:
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: IPM Motor - Auto-setup

Post by Pete9008 »

New bin file on github that allows "maxtestud" to go up to 100. If your battery voltage is 36V but "udc" is reporting as 180V then I would suggest a "maxtestud" value of 80V.

Also worth increasing "mintesti" back to 15A and then trying the phasecheck again (for a few rotor positions if possible).

The value of "manualid" should have no effect at all on the phasecheck test, it's only used for the test spin modes.

Edit - can't see why "angle" isn't reporting anything. Has you rotor position sensor worked correctly on other code versions with the same parameter setup?
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

however, this current has always affected the test result that in the first version of the firmware that now.
evil neodymium :twisted:
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: IPM Motor - Auto-setup

Post by Pete9008 »

Romale wrote: Tue Jun 06, 2023 5:53 pm however, this current has always affected the test result that in the first version of the firmware that now.
Correct, there was a bug in the first version of the code. Should be fixed now?
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

Screenshot_20230606-210243_1.png
Screenshot_20230606-210358_1.png
installed a new firmware and set the recommended settings. the phase test failed.
evil neodymium :twisted:
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

Pete9008 wrote: Tue Jun 06, 2023 5:49 pm
Edit - can't see why "angle" isn't reporting anything. Has you rotor position sensor worked correctly on other code versions with the same parameter setup?
the angle sensor is working correctly, it is displayed in normal startup mode. and the motor rotates adequately without errors (the sincofs will be found in the old way)
Screenshot_20230606-191342_1_1.png
Screenshot_20230606-192113_1.png
the first is the rotation of the hand, the second when pressing the gas pedal
evil neodymium :twisted:
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

Pete9008 wrote: Tue Jun 06, 2023 6:00 pm Correct, there was a bug in the first version of the code. Should be fixed now?

don't know. it's not for nothing that I signed on each screen what current I prescribed in the manual id. after all, the system's response to the phase test is different for everyone there!
evil neodymium :twisted:
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: IPM Motor - Auto-setup

Post by Pete9008 »

Running out of ideas now :-(

Looks like the angle is working fine, should do exactly the same in the resolver or test spin manual modes :?

Does the rotor positions affect the phasecheck result?

You could try dropping mintesti again (8-10A), or increase maxtesti a little (say 50A)?

I must have made a mistake in the code but can't see anything obvious. Might have to wait till I have access to a F103 based setup to get any further?

Thanks for doing all the tests!
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

now, without changing the settings, I checked the rotation test. the system gave a message that it was running, but nothing happened! and only when I switched to on in the testing section, the motor turned slightly and the graph displayed it on the corner! probably something went wrong in the new firmware, since the rotation test stopped working. now I will check the new settings values on this firmware
Screenshot_20230606-211908_1.png
Screenshot_20230606-211922_1.png
Screenshot_20230606-211942_1.png
evil neodymium :twisted:
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: IPM Motor - Auto-setup

Post by Pete9008 »

No idea what the new manualstart does or how to use it (it was introduced after I ported the code to the F405 so I don't have it). I've always used the buttons at the top for these tests:
startStop.jpg
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

so. I changed the settings as you requested, and with a manual current id of 20 amps, the rotation test was successful. however, the graph is still only one of two! I also tried to run a phase test and got two different answers depending on the specified current manual id
Screenshot_20230606-212804_1.png
Screenshot_20230606-212820_1.png
Screenshot_20230606-212855_1.png
Screenshot_20230606-212919_1.png
evil neodymium :twisted:
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: IPM Motor - Auto-setup

Post by Pete9008 »

Looks like the phase test is just reporting on noise and giving a random result. :-(

Probably something simple in the code but I can't see it. Do you have a scope there, could you catch a il1 current waveform while the test runs?
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

No, alas. I don't have that. I still can't allocate money for the purchase
evil neodymium :twisted:
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: IPM Motor - Auto-setup

Post by Pete9008 »

Shame the binary logging isn't a little further forward. A log of what's going on would make debugging this a lot easier.

Some progress there, the test spin does look like it's working which is good, but can't think of anything else worth trying on the phasecheck or angle measurement at the moment.

Let me have a think about what else we could try.
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

no problem! I am ready for any tests. It's you who are doing a great job for everyone here, I'm just trying the finished one
evil neodymium :twisted:
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: IPM Motor - Auto-setup

Post by Pete9008 »

Thanks for that, it's just frustrating when it doesn't work!

Just checked what the manualstart parameter does and it won't work for these tests. It starts the inverter in MOD_RUN not MOD_MANUAL so won't execute any of the test code. The message you had must have been from an earlier start using the buttons?
User avatar
Romale
Posts: 441
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 204 times
Been thanked: 45 times

Re: IPM Motor - Auto-setup

Post by Romale »

I ran all the recent tests in the old way with the button at the very top of the interface
evil neodymium :twisted:
Post Reply