IPM Motor - Auto-setup
- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
Re: IPM Motor - Auto-setup
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.
evil neodymium 

- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
Re: IPM Motor - Auto-setup
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 

- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
Re: IPM Motor - Auto-setup
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 

-
- Posts: 1801
- Joined: Sun Apr 03, 2022 1:57 pm
- Has thanked: 102 times
- Been thanked: 350 times
Re: IPM Motor - Auto-setup
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.

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.
- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
Re: IPM Motor - Auto-setup
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.
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.
evil neodymium 

- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
Re: IPM Motor - Auto-setup
probably now I have to build a new controller that can measure voltage))
evil neodymium 

-
- Posts: 1801
- Joined: Sun Apr 03, 2022 1:57 pm
- Has thanked: 102 times
- Been thanked: 350 times
Re: IPM Motor - Auto-setup
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?
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?
- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
Re: IPM Motor - Auto-setup
the current that I indicate in the screenshots, I write in this field before running the test.
evil neodymium 

-
- Posts: 1801
- Joined: Sun Apr 03, 2022 1:57 pm
- Has thanked: 102 times
- Been thanked: 350 times
Re: IPM Motor - Auto-setup
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?
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?
- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
Re: IPM Motor - Auto-setup
however, this current has always affected the test result that in the first version of the firmware that now.
evil neodymium 

-
- Posts: 1801
- Joined: Sun Apr 03, 2022 1:57 pm
- Has thanked: 102 times
- Been thanked: 350 times
Re: IPM Motor - Auto-setup
Correct, there was a bug in the first version of the code. Should be fixed now?
- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
Re: IPM Motor - Auto-setup
installed a new firmware and set the recommended settings. the phase test failed.
evil neodymium 

- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
Re: IPM Motor - Auto-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)
the first is the rotation of the hand, the second when pressing the gas pedal
evil neodymium 

- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
Re: IPM Motor - Auto-setup
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 

-
- Posts: 1801
- Joined: Sun Apr 03, 2022 1:57 pm
- Has thanked: 102 times
- Been thanked: 350 times
Re: IPM Motor - Auto-setup
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!

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!
- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
Re: IPM Motor - Auto-setup
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
evil neodymium 

-
- Posts: 1801
- Joined: Sun Apr 03, 2022 1:57 pm
- Has thanked: 102 times
- Been thanked: 350 times
Re: IPM Motor - Auto-setup
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:
- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
Re: IPM Motor - Auto-setup
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
evil neodymium 

-
- Posts: 1801
- Joined: Sun Apr 03, 2022 1:57 pm
- Has thanked: 102 times
- Been thanked: 350 times
Re: IPM Motor - Auto-setup
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?

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?
- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
Re: IPM Motor - Auto-setup
No, alas. I don't have that. I still can't allocate money for the purchase
evil neodymium 

-
- Posts: 1801
- Joined: Sun Apr 03, 2022 1:57 pm
- Has thanked: 102 times
- Been thanked: 350 times
Re: IPM Motor - Auto-setup
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.
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.
- Romale
- Posts: 524
- Joined: Fri May 20, 2022 4:16 pm
- Location: Romania
- Has thanked: 303 times
- Been thanked: 75 times
Re: IPM Motor - Auto-setup
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 

-
- Posts: 1801
- Joined: Sun Apr 03, 2022 1:57 pm
- Has thanked: 102 times
- Been thanked: 350 times
Re: IPM Motor - Auto-setup
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?
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?