Inverter-motor tune

Post Reply
User avatar
madius
Posts: 23
Joined: Mon May 18, 2020 3:15 pm
Has thanked: 13 times

Inverter-motor tune

Post by madius »

Hello every one,

my name is Alejandro, and is my first time posting on forum.
I have a controller build with a "STM32 V3 mini" development board and a IGBT UPS power unit.
All hardware is working fine, I have already calibrated current sensors, encoder and voltage meter.
On start 2 mode motor turns very nice, but when goes with start 1 only turns at 6 or 7 rpm at max throttle.
I am working with an asynchronous motor, 120V, 4 poles (2 pairs), 50Hz.

My parameter list are:
"boost": 1700,
"fweak": 34,
"fconst": 180,
"udcnom": 0,
"fslipmin": 2,
"fslipmax": 4,
"fslipconstmax": 5,
"polepairs": 2,
"respolepairs": 1,
"encmode": 0,
"fmax": 200,
"numimp": 1000,
"dirchrpm": 100,
"dirmode": 1,
"snsm": 12,
"pwmfrq": 1,
"pwmpol": 0,
"deadtime": 63,
"ocurlim": 200,
"il1gain": 2.59,
"il2gain": 2,
"udcgain": 3.28,
"udcofs": 0,
"udclim": 200,
"snshs": 0,
"bmslimhigh": 50,
"bmslimlow": -1,
"udcmin": 70,
"udcmax": 120,
"idcmax": 200,
"idcmin": -200,
"tmphsmax": 85,
"tmpmmax": 300,
"throtmax": 100,
"throtmin": -100,
"iacmax": 200,
"ifltrise": 10,
"ifltfall": 3,
"chargemode": 0,
"chargecur": 0,
"chargekp": 80,
"chargeki": 10,
"chargeflt": 8,
"chargemax": 90,
"potmin": 0,
"potmax": 4080,
"pot2min": 15,
"pot2max": 4095,
"potmode": 0,
"throtramp": 100,
"throtramprpm": 20000,
"ampmin": 10,
"slipstart": 50,
"brknompedal": -50,
"regenramp": 100,
"brknom": 30,
"brkmax": -30,
"brkcruise": -30,
"brkrampstr": 10,
"brkhistr": 1000,
"brkhistp": 1000,
"brkout": -50,
"idlespeed": -100,
"idlethrotlim": 50,
"idlemode": 0,
"speedkp": 0.25,
"speedflt": 5,
"cruisemode": 0,
"udcsw": 70,
"udcswbuck": 540,
"tripmode": 0,
"pwmfunc": 0,
"pwmgain": 100,
"pwmofs": 0,
"canspeed": 0,
"canperiod": 0,
"fslipspnt": 0,
"ampnom": 0
I already try everything by changing parameters and I can't get it to work even a little bit well.
I would appreciate very much if someone could take the time to read this and help me.
Thank you very much.
Attachments
params.json
(1.36 KiB) Downloaded 119 times
User avatar
madius
Posts: 23
Joined: Mon May 18, 2020 3:15 pm
Has thanked: 13 times

Re: Inverter-motor tune

Post by madius »

Ok, I found out that the problem is the encoder reading.
I'm using a CUI INC capactive type encoder, model AMT10. I tried different options of pulses per revolution and I can't get the correct speed reading, looking at the pulses in the oscilloscope I know that the encoder works well.
The reading I have in the web interface is always lower than the real one, I am trying to find the relation between one and the other.
Is there any recommendation about the encoder?
number of pulses per revolution suggested?

thanks!
arber333
Posts: 3567
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 134 times
Been thanked: 337 times
Contact:

Re: Inverter-motor tune

Post by arber333 »

madius wrote: Mon Sep 28, 2020 4:18 pm Is there any recommendation about the encoder?
number of pulses per revolution suggested?

thanks!
Usually encoders use 64 pulses or maybe 128 or 256 pulses per rotation.
If they are AB type then you need to divide stated pulses by 4 to get to the PPR of each channel. Because they usually count upslope as well as downslope. You would need to provide more data, like a full P/N. What is your PPR count?
From what i can see you probably need a pullup resistor on each channel since this encoder pulls signal down on pulse.

For ACIM I recommend simple AB inductive inverter similar to CAM or crankshaft sensors. You can mount it on a shaft, but you need to fit a toothed wheel with even teeth number. This will be pulse count. You can get a simple inductive CAM sensor and try if it generates signal while some ferrous metal passes underneath.
http://86.43.94.97/moodlecp9a/mod/gloss ... ive+Sensor

There is also a good option of a simple ABZ application where you only need AB signals. If you can have access to a lathe you can make a fitting for magnet and another for the chip plate. Everything is centered that way. I find the digital sensor very accurate. I use it in my car for PMSM motor position. You can also get a chip for sin/cos output.
https://www.rls.si/eng/rmf44-rotary-mag ... tal-flange
User avatar
madius
Posts: 23
Joined: Mon May 18, 2020 3:15 pm
Has thanked: 13 times

Re: Inverter-motor tune

Post by madius »

Thanks for your reply arber333.

I keep testing.
In "start 2" mode the encoder reads correctly, I turn the motor at 300rpm, the pulses on the oscilloscope are correct and I read 300rpm on the web interface.
But when I go to "start 1" mode the motor turns at maximum 6rpm. If I change the "numimp" parameter in half, it spins super fast like 6000rpm. I don't understand what happens.
Now I am with 200ppr on my encoder, but i already tested with 1000, 256, 512, 48 and always its the same.
Is it correct to think that if in "start 2" mode I read the motor revolutions correctly, it means that my HW and encoder parameters configuration are correct?

Some info of my setup:
- Code version 4.90.R-sine
- Encoder A signal inputs on PA6 port
- Encoder B signal inputs on PA7 port
- My motor is 4 poles, 1430rpm, 50Hz

thanks
arber333
Posts: 3567
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 134 times
Been thanked: 337 times
Contact:

Re: Inverter-motor tune

Post by arber333 »

madius wrote: Mon Sep 28, 2020 8:23 pm Thanks for your reply arber333.

I keep testing.
In "start 2" mode the encoder reads correctly, I turn the motor at 300rpm, the pulses on the oscilloscope are correct and I read 300rpm on the web interface.
But when I go to "start 1" mode the motor turns at maximum 6rpm. If I change the "numimp" parameter in half, it spins super fast like 6000rpm. I don't understand what happens.
What happens is brain sees wrong number of pulses and commands wrong excitation to the core,

First you need to determine how many pulses you got on a single channel. If you look at encoder PPR number you will either see a number for each channel or a joint number. This joint number you have to divide by 4 because encoder receivers read both edges of a pulse. So you have 2x channel and 2x reading of single pulse. Therefore if you have 2048PPR encoder each of your channels will output 512 pulses.

You need to check which encoder P/N you have and see what position your DIP switches are. See here:
https://www.cuidevices.com/product/resource/amt10.pdf
User avatar
madius
Posts: 23
Joined: Mon May 18, 2020 3:15 pm
Has thanked: 13 times

Re: Inverter-motor tune

Post by madius »

When I said tested with differents PPR, I configure DIP switches of encoder respectivly.
Insist, when I test on "start 2" o "manual" mode the speed value on web interface is correct.
But not on "start 1" mode.
arber333
Posts: 3567
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 134 times
Been thanked: 337 times
Contact:

Re: Inverter-motor tune

Post by arber333 »

madius wrote: Mon Sep 28, 2020 10:56 pm When I said tested with differents PPR, I configure DIP switches of encoder respectivly.
Insist, when I test on "start 2" o "manual" mode the speed value on web interface is correct.
But not on "start 1" mode.
Maybe you have trouble with filtering. Can you scope the signals A and B on your PCB? behind the RC filter?
Hm... from your first post it seems you are connecting only single channel encoder mode. To use that you need to take off board some resistors and caps and connect channel PA2 back onto PA6. Both signals complement the final picture inside main chip.

Which board version do you use? V3?

Also if you use deadtime 63, i think it is too short please immediately change it to some larger setting like 85 or even 120. Just to be on the safe side. Well except if you really know the characteristics of your power stage.
User avatar
madius
Posts: 23
Joined: Mon May 18, 2020 3:15 pm
Has thanked: 13 times

Re: Inverter-motor tune

Post by madius »

arber333 wrote: Tue Sep 29, 2020 6:10 am Maybe you have trouble with filtering. Can you scope the signals A and B on your PCB? behind the RC filter?
Yes, I see perfect my signals A and B on the oscilloscope.
arber333 wrote: Tue Sep 29, 2020 6:10 am Hm... from your first post it seems you are connecting only single channel encoder mode. To use that you need to take off board some resistors and caps and connect channel PA2 back onto PA6. Both signals complement the final picture inside main chip.
I am connecting A and B signals of my encoder.
arber333 wrote: Tue Sep 29, 2020 6:10 am Which board version do you use? V3?
I have a board that is based on the V3.
arber333 wrote: Tue Sep 29, 2020 6:10 am Also if you use deadtime 63, i think it is too short please immediately change it to some larger setting like 85 or even 120. Just to be on the safe side. Well except if you really know the characteristics of your power stage.
I calculated my deadtime by reading the data sheets of my IGBTs and drivers and it gave me 1200ns, so I left it at 63 which is 1500ns, is that right?

Is it possible that I have noise or interference on my encoder channels when I am in control mode (start 1) and not when I am in manual mode (start 2)?
In the afternoon I will go back to the lab and take captures of the encoder signals from the oscilloscope.
Parallel to that, I'm putting together an optical encoder for testing.

thanks
User avatar
madius
Posts: 23
Joined: Mon May 18, 2020 3:15 pm
Has thanked: 13 times

Re: Inverter-motor tune

Post by madius »

arber333 wrote: Tue Sep 29, 2020 6:10 am from your first post it seems you are connecting only single channel encoder mode. To use that you need to take off board some resistors and caps and connect channel PA2 back onto PA6. Both signals complement the final picture inside main chip.
I just reread this part.
I don't understand what you are telling me to do.
Should I connect the PA2 port, which is the brake signal input, to the PA6 port (ENC_A) so that the controller detects some special condition?

thanks
arber333
Posts: 3567
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 134 times
Been thanked: 337 times
Contact:

Re: Inverter-motor tune

Post by arber333 »

madius wrote: Tue Sep 29, 2020 2:24 pm
I just reread this part.
I don't understand what you are telling me to do.
Should I connect the PA2 port, which is the brake signal input, to the PA6 port (ENC_A) so that the controller detects some special condition?

thanks
Well I wanted to suggest you to try connecting single channel. See the Rev 3 schematic on how to connect.
This way you could test encoder directly and maybe test each signal.
I also have problem with resolver signal...

There is one more suspect. Thin phase wires. What is the dimension of your phase wires?
User avatar
madius
Posts: 23
Joined: Mon May 18, 2020 3:15 pm
Has thanked: 13 times

Re: Inverter-motor tune

Post by madius »

arber333 wrote: Tue Sep 29, 2020 8:59 pm There is one more suspect. Thin phase wires. What is the dimension of your phase wires?
Yes, the motor cables are thin for now because I'm just doing no-load tests.
arber333
Posts: 3567
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 134 times
Been thanked: 337 times
Contact:

Re: Inverter-motor tune

Post by arber333 »

madius wrote: Wed Sep 30, 2020 2:00 pm
arber333 wrote: Tue Sep 29, 2020 8:59 pm There is one more suspect. Thin phase wires. What is the dimension of your phase wires?
Yes, the motor cables are thin for now because I'm just doing no-load tests.
Maybe if you can use thicker cables of more than 6mm2 resolver will see better picture?
Post Reply