Openinverter Parameter Setting Procedure for Beginners

Post Reply
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Openinverter Parameter Setting Procedure for Beginners

Post by james@N52E01 »

This question assumes that you have read and are familiar with the Parameter Documentation Project thread:
viewtopic.php?f=7&t=23&p=110&hilit=Parameter#p110

For a beginner starting out using an openinverter based system for the first time, what would be a good step-by-step process for configuring the parameters for any given inverter and motor system and why? What information will you already need to know about the specific inverter and motor being used before commencing this procedure and what parameters can be determined through this procedure and how?

Please make it clear at the start of your post if your procedure refers to Sine wave control or Field Oriented Control. Please keep the steps in a sequential format for people to follow but feel free to give as much supporting information for each step as you feel is appropriate.
P.S.Mangelsdorf
Posts: 779
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 97 times
Been thanked: 100 times

Re: Openinverter Parameter Setting Procedure for Beginners

Post by P.S.Mangelsdorf »

Copied directly from the Wiki:
https://openinverter.org/wiki/Parameters

Tuning Guide
First you want to find a flat surface - a parking lot etc. so you can drive and stop without checking traffic. Change only one parameter at a time and save settings that work!
1. set fslipmin so that you feel car taking off smoothly and try to change it by +/-0,1Hz and check differences in starting. Save when satisfied.
2. lower boost value in 100 point until motor jitters at start. Then return it to last good value.
3. try lowering ampmin in 0,1 increments and observe throttle travel. When throttle is not just smooth but becomes sluggish return some previous increments until throttle reaction is acceptable.
4. change fweak value in +/-10Hz increments from starting point and observe torque in starting. This value is very dependent on battery voltage and is very subjective.
Now you find a hill or ramp and set car on it. You want to hold car in position on slope just using throttle pedal. If there parameters are not good motor will jump or will feel sluggish
1. add boost if motor is oscillating if it is smooth reduce it in 100 point increments until you get oscillation. Then return to last good value
2. reduce/increase ampmin in 0,25 increments untill you get oscilation in motor and return last good value
Now set the car into a hill to set fslipmax. Warning full throttle will be used. Be sure there is no other traffic!
Set fslipmax to chosen value (guess it at 2xfslipmin if you have no other way) and try to take off with full throttle.
If car feels sluggish with full throttle you have to add more slip.
If motor starts to jitter there is too much slip. Try to reduce it in 0.1Hz increments.
When you feel satisfied with settings save them and go on setting regen and braking effect.
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: Openinverter Parameter Setting Procedure for Beginners

Post by james@N52E01 »

Thanks P.S. Mangelsdorf for responding but this doesn’t answer the question at all, it would help if you had read my question completely before copy/pasting an answer which doesn’t apply. That is the TUNING procedure which assumes you already have a motor/inverter working together in a car capable of moving under its own power.

The question presupposes that these components have not been run or indeed configured to begin with. I posted this question in the beginners section of the forum to help anyone who is attempting to configure and run their inverter/motor for the first time.

To clear up any ambiguity - let’s assume that the openinverter firmware has been installed with only the default parameters set. As stated, the motor and inverter are unspecified hence me asking what specific information needs to be known about each.
P.S.Mangelsdorf
Posts: 779
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 97 times
Been thanked: 100 times

Re: Openinverter Parameter Setting Procedure for Beginners

Post by P.S.Mangelsdorf »

james@N52E01 wrote: Tue Oct 13, 2020 12:58 pm Thanks P.S. Mangelsdorf for responding but this doesn’t answer the question at all, it would help if you had read my question completely before copy/pasting an answer which doesn’t apply.
No need to get snippy.
james@N52E01 wrote: Tue Oct 13, 2020 12:58 pm That is the TUNING procedure which assumes you already have a motor/inverter working together in a car capable of moving under its own power.
I'd consider tuning and configuring to be asking the same thing. Thanks for clarifying your intent.
james@N52E01 wrote: Tue Oct 13, 2020 12:58 pm To clear up any ambiguity - let’s assume that the openinverter firmware has been installed with only the default parameters set. As stated, the motor and inverter are unspecified hence me asking what specific information needs to be known about each.
The same wiki link provides extensive descriptions of what each parameter does and how to set it.
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: Openinverter Parameter Setting Procedure for Beginners

Post by james@N52E01 »

Not trying to be snippy, again this is the beginners section of the forum. This question is aimed at helping beginners. The question presupposes you have read and are familiar with what each of the parameters actually are. What I am looking for is a set of basic instructions, step by step, for a beginner, detailing all of the information you need to know in advance and explaining how the other parameters can be determined.

A beginner is not going to be able to work through the parameter table from top to bottom and be able to determine what information they should already know in advance and what information they will have to work out through testing, the sequence of events that will shape that testing process and how then to separate that process into individual parameters.

I know this is a big ask and not a simple question at all but this is foundational knowledge that needs to be shared in order to make the openinverter solution accessible to a wider audience
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Openinverter Parameter Setting Procedure for Beginners

Post by Isaac96 »

I'll assume sine, since I've got no experience with FOC.

So we have a few parameters which are specific to the power stage and need to be set correctly before power even gets turned on.
These are deadtime, pwmpol, and pwmfrq.
Deadtime requires either some datasheet reading or some careful experimentation with an oscilloscope, or somebody else's numbers. If it is too high, you'll lose some power and may get some bad behavior; if it's too low you'll get excessive heat or a dead powerstage.
PwmPol is either positive or negative; if you don't know, ask someone else! This should not be touched unless you know it needs to be changed. Positive means that the PWM outputs go positive to turn on the respective IGBT; negative means they go negative for that. If this is wrong, your powerstage will die instantly. It's usually positive.
PwmFrq can usually be left at 8.8. Setting it too high will make the inverter heat; setting it too low will make the motor jumpier and make it heat up more. Some powerstages (Tesla?) work well with 17.6KHz, but most are better at 8.8.

Now some parameters for induction motors.
Boost, fweak, fconst, udcnom, fslipmin, fslipmax, fslipconstmax, fmin.

Boost determines the voltage applied at 0 RPM in order to overcome the stator resistance. It very much depends on your specific setup, and is a big part of the tuning procedure. A good starting value is 3000.
Fweak is the frequency at which the motor sees full voltage; this is the maximum power point, where RPM is at the limit of the constant-torque area. Setting this lower will provide more low-end power but a quicker falloff at higher speeds. For a 2-polepair motor (most induction motors) the RPM at which this frequency is reached is 30 * fweak - so 200hz fweak equals 6000RPM. A good starting point would be 120. Again, this is part of the tuning procedure.
Fconst is a weird one - I haven't used it, but here's my understanding of it:
At this frequency, slip can be reduced in order to form a 'constant power' region, where as RPM increases torque decreases. I'm not sure when this is useful, anyone else have an idea?
Udcnom - this is a parameter for scaling other settings. Set it to about the nominal voltage of your pack and it will step boost and fweak as your battery voltage changes (I hear it does other things as well, anyone know it better?)
Fslipmin is the minimum slip frequency. Slip is the frequency difference between the stator (the inverter output) and the rotor (which changes as speed increases). This frequency difference is what creates torque. So fslipmin is the 'lowest torque' setting, and is usually set up to produce the best efficiency. Start with 1 - 1.5.
Fslipmax -- the maximum slip frequency. This determines the maximum torque, but be careful -- if it goes too high, you'll get 'breakdown' and the motor won't produce any torque! Set it as high as you can, back it down if the motor starts to jitter. 3 is a good starting point.
Fslipconstmax is the slip limit when frequency (=speed) is between the fconst and fweak levels -- someone else please weigh in on this one.
Fmin is the minimum applied frequency. This is going to be hidden in future releases IIRC, if you can still see it drop it down to 0.2 or so.


That should be a good start towards comprehensive parameter documentation. Lots more parameters but I don't have 2 hours to write about all of them and also don't know them all very well.

-Isaac
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: Openinverter Parameter Setting Procedure for Beginners

Post by james@N52E01 »

Thanks Isaac96 that’s plenty to be starting with. So before even trying to power up any motor you need to know the dead time, pwmpol and pwmfrq.

Which inverter specific parameters need to be known before trying to send power to the motor or before commencing any kind of tuning procedure?
MattsAwesomeStuff
Posts: 912
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 300 times
Been thanked: 186 times

Re: Openinverter Parameter Setting Procedure for Beginners

Post by MattsAwesomeStuff »

I am with James. A data dump is like learning how to converse in another language by reading the dictionary. Not only is it intimidating, and lengthy, and mostly unnecessary, but you don't even know enough about the language to understand the dictionary. You almost have to have a deep understanding before you can have a basic understanding. But that's just not how being a beginner works. It's not really a matter of effort, there isn't a viable path to having useful knowledge. Except... for some. Some people can just learn this way, and they can't imagine how others can't. I'm not one of them.

Isaac - Everything you wrote was completely new to me. Thank you for writing it up. That's a great start.

I see parameters as "If you see X issue, you might tweak..." but basic idiotproofing procedure is vital for people like me and, I suspect James.

This conversation is going to be extremely helpful to me.

(James, seemed snippy to me, be a bit more gracious of those trying to help, even if they're not helpful to you in what they do. Everyone who replies is investing their time and energy in you if it's not working for you).
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Openinverter Parameter Setting Procedure for Beginners

Post by Isaac96 »

james@N52E01 wrote: Tue Oct 13, 2020 8:01 pm Thanks Isaac96 that’s plenty to be starting with. So before even trying to power up any motor you need to know the dead time, pwmpol and pwmfrq.

Which inverter specific parameters need to be known before trying to send power to the motor or before commencing any kind of tuning procedure?
I'd say those are about the only dangerous inverter parameters. The rest might cause not-working, but they won't detonate your power stage.
Things like current sensor gain are fairly important (especially for FOC, but that's a can of worms I know nothing about). But for a first spin they aren't really needed if you're careful with your ampnom settings in manual mode.
MattsAwesomeStuff wrote: Wed Oct 14, 2020 9:32 am I am with James. A data dump is like learning how to converse in another language by reading the dictionary. Not only is it intimidating, and lengthy, and mostly unnecessary, but you don't even know enough about the language to understand the dictionary. You almost have to have a deep understanding before you can have a basic understanding. But that's just not how being a beginner works. It's not really a matter of effort, there isn't a viable path to having useful knowledge. Except... for some. Some people can just learn this way, and they can't imagine how others can't. I'm not one of them.

Isaac - Everything you wrote was completely new to me. Thank you for writing it up. That's a great start.

I see parameters as "If you see X issue, you might tweak..." but basic idiotproofing procedure is vital for people like me and, I suspect James.

This conversation is going to be extremely helpful to me.

I'd say we aren't yet at the stage of 'If you see X issue, tweak this' with all these systems. General rules are always the most difficult to write (just ask Einstein about that.)
Arber has been doing a great job of explaining how different parameters affect his drivetrain. But that doesn't work for everyone, since he has certain problems and doesn't have others, and then no two drivetrains are alike.
Perhaps we could have many people working together with different setups to try to get basic tuning rules. This isn't idiotproof yet, and it might be a while. Fortunately it seems like everyone is discovering how the system works by themselves, which means that we might already have 10 different perspectives that can all be brought together. Again, lots of work and lots of pain, but the payoff is pretty darn good.

-Isaac
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: Openinverter Parameter Setting Procedure for Beginners

Post by james@N52E01 »

Thanks again for posting this info Isaac, there is a lot here we can build on. I’m going to try out what you posted next week.

For deadtime, there are some posts on the forum about what this figure is for certain inverters. There are also posts where people have worked this figure out for themselves with a scope but I couldn’t find a simple explanation of what that procedure looked like in a way that would make sense to a beginner. Is it fair to say then that this procedure would be too complicated for a beginner with a scope and that we should wait for someone else to work it out for us or is this something we could be talked through with a simple tutorial?

Part of my reason for asking is that there are a couple of parameter files already in the wiki for certain inverters but honestly I’m surprised there aren’t more given the 100+ projects currently being worked on.
https://openinverter.org/wiki/Configuration_Files

It would be great if people could keep adding to these files, once I have a Gen 3 Prius inverter and motor working correctly together I’ll be sure to post there too.

Sorry if it seems like I have only latched on to the first part of your first post but this really feels like a good place to start. There’s lots to unpack as we work through so I’ll try to keep the questions sequential. Having someone with experience like yourself onboard is going to benefit a lot of people in the long run.
User avatar
johu
Site Admin
Posts: 5834
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 162 times
Been thanked: 1046 times
Contact:

Re: Openinverter Parameter Setting Procedure for Beginners

Post by johu »

This spawns an idea. What if you had a button on the web interface saying "Post my parameters to openinverter". It would then ask things like motor model, inverter model, nominal battery voltage as metadata to go along with the parameters.

On the server side I'd set up a small database that holds the parameter sets grouped by category. So if someone posts for inverter A and Motor X but you have inverter A and motor Y you could grab the motor parameters from one parameter set and the inverter from another. Things like regen settings could be ignored altogether as they are application specific.

Hmm, sounds like a nice Patreon goal :)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: Openinverter Parameter Setting Procedure for Beginners

Post by james@N52E01 »

Amazing idea, if you’re using a smartphone and connecting to the ESP8266 I guess you can just say “use without internet” to get around it blocking your internet access.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Openinverter Parameter Setting Procedure for Beginners

Post by Isaac96 »

Sounds great. Yes, deadtime is pretty difficult to find out; a good digital scope can help, but proven numbers are better; there are only so many power stages around and they are all being documented at some point.

There is one issue with separating motor and inverter parameters; different deadtime and PWM frequency settings can affect how the motor behaves, so people do need to be aware.
It also needs to be made clear that these are in no way 'perfect tunes', since so much depends on the specific setup, and even the bends in your wires. So there shouldn't be posts cropping up like "I loaded the parameters, and it doesn't work all the time! Please give me a better config file!"
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: Openinverter Parameter Setting Procedure for Beginners

Post by james@N52E01 »

That’s interesting to note. This is where Johannes’s suggestion of allowing people to easily catalogue and post their config files will be extremely helpful as it will help reduce a lot of work through differential analysis.

If you find one inverter/motor config file is not working as well with your setup than another, you can just revert individual parameters until you see improvement. Also by comparing the similarities between many files for people using similar/the same setup we can identify which parameters vary by setup type (and possibly why) and which are essentially fixed values for that motor/inverter combination
User avatar
jalovick
Posts: 96
Joined: Mon Mar 11, 2019 10:14 am
Location: Sydney, Australia
Has thanked: 10 times
Been thanked: 6 times

Re: Openinverter Parameter Setting Procedure for Beginners

Post by jalovick »

johu wrote: Fri Oct 16, 2020 10:24 am This spawns an idea. What if you had a button on the web interface saying "Post my parameters to openinverter". It would then ask things like motor model, inverter model, nominal battery voltage as metadata to go along with the parameters.

On the server side I'd set up a small database that holds the parameter sets grouped by category. So if someone posts for inverter A and Motor X but you have inverter A and motor Y you could grab the motor parameters from one parameter set and the inverter from another. Things like regen settings could be ignored altogether as they are application specific.

Hmm, sounds like a nice Patreon goal :)
It does sound like a great idea. Maybe some of the most common parameters can be set up as selectable profiles in the firmware, a bit like a base map in 3rd party ICE ECU's. It allows people to get going without a lot of confusing set-up.

I'd contribute towards that.

Jamie
User avatar
jalovick
Posts: 96
Joined: Mon Mar 11, 2019 10:14 am
Location: Sydney, Australia
Has thanked: 10 times
Been thanked: 6 times

Re: Openinverter Parameter Setting Procedure for Beginners

Post by jalovick »

I had another thought, is auto-tuning of a motor possible, if the motor and resolver parameters are known? Like an automated FOC tuning process like in the recent videos by yourself and Damien, but using sensor feedback to know when the tune is correct?
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: Openinverter Parameter Setting Procedure for Beginners

Post by james@N52E01 »

That’s how I tune ebike motors in FOC using a VESC (although it only uses back EMF and not a resolver).
Post Reply