Lebowski's motor controller IC, schematic & setup, new v2.A1

Lebowski said:
looking at the hex, your pwm freq is very low at 8kHz, what output stage do you run ? deadtime is extremely low at 300 nsec (for an 8kHz output stage). Typically you see 6kHz adn 2000 nsec deadtime for big IGBT's, or 20kHz and 500 nsec for FETs...

there is no fieldweakening current in the hex...

As output stage I found a reference design from TI http://www.ti.com/tool/TIDA-00364. It is rated at 8KHz to have an efficiency > 95% at this frequency. The Output is a very very clean quare with no spikes even on this short deadtime.

The fieldweaking was switched on later and results in a great increase of speed :D
 
izeman said:
kywalda said:
Why will voltage rise? Isn't it constant (battery voltage)? So when climbing a hill with full throttle in dr3 the phase current will rise to max.
https://endless-sphere.com/forums/viewtopic.php?f=2&t=35278

A lot of math! I'll read it next weekend :)
 
Lebowski said:
As mentioned above, the delay in the system is important. I don't think it comes from the gate drivers, I would have a look at the RC filters in both the hall and current sensor lines...

Oups - I don't have any RC filters in the hall lines...

The current sensor line filters is this 1K / 10n?

Cur-sen-rc-filter.png
 
kywalda said:
Lebowski said:
As mentioned above, the delay in the system is important. I don't think it comes from the gate drivers, I would have a look at the RC filters in both the hall and current sensor lines...

Oups - I don't have any RC filters in the hall lines...

The current sensor line filters is this 1K / 10n?


yep those are the RC filters
 
kywalda said:
Lebowski said:
looking at the hex, your pwm freq is very low at 8kHz, what output stage do you run ? deadtime is extremely low at 300 nsec (for an 8kHz output stage). Typically you see 6kHz adn 2000 nsec deadtime for big IGBT's, or 20kHz and 500 nsec for FETs...

there is no fieldweakening current in the hex...

As output stage I found a reference design from TI http://www.ti.com/tool/TIDA-00364. It is rated at 8KHz to have an efficiency > 95% at this frequency. The Output is a very very clean quare with no spikes even on this short deadtime.

The fieldweaking was switched on later and results in a great increase of speed :D

Don't take my word for it but that looks like it could be switched faster. I would also set a longer deadtime, 5 or 600 nsec.

Remember, if you do change the pwm frequency and autocomplete the pwm menu you will get a different f_sample (option g)
This is a significant change propagating all throughout the IC, you will need to do re-do ALL menu's even if some numbers (like L and R) look unchanged...
 
I have a problem with the start of the motor in the sensorless mode
The bike needs some help.
It needs your help in configuration.
The engine comes from the RXH peugeot.
Battery 176V 80Ah
Probably it is a bosch SMG

http://www.em-motive.com/index.php?id=198

I could not find anything interesting about it on the web.
Maybe this information seems interesting, but I do not know German very well



Code:
V2.91
0x7EB8  0x0000  0xFFFF  0xFFFF  0x795E  0x0040  0x9F05  0x57AB                  
0x08D1  0x000A  0x0000  0x07AE  0x0018  0x0000  0x01E0  0xFFFF                  
0xF852  0xFFE8  0x0000  0xFE20  0x0000  0x4CCD  0x0018  0x0000                  
0x01E0  0xFFFF  0xB333  0xFFE8  0x0000  0xFE20  0xFAB5  0xFF06                  
0xFFFF  0xFFFF  0x409A  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF                  
0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0x00E9  0x3157                  
0x0512  0x026F  0x027C  0x0505  0x082A  0x000F  0x0005  0x000F                  
0x0033  0x1111  0xFFFF  0x7FBC  0x0000  0x008F  0x0047  0x03FA                  
0x03FA  0x03FA  0x0BB7  0x02D5  0x0024  0x0592  0x0006  0x0C19                  
0xFFFE  0x0910  0x1000  0x0000  0x0000  0xFFFF  0xFFFF  0xFFFF                  
0x0088  0x0313  0x0004  0x0000  0x047B  0x0047  0x023D  0x011E                  
0x0418  0x0258  0x0064  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0x0003                  
0x0000  0x0078  0x0000  0x0000  0xFFFD  0x0000  0xFF88  0x0000                  
0x0000  0x0005  0x0000  0x0064  0xFFFB  0x0000  0xFF9C  0x000C                  
0x0000  0x00F0  0xFFF4  0x0000  0xFF10  0x02EB  0x47F4  0x038D                  
0x0221  0x011E  0x0042  0x011B  0x026F  0x000F  0x005D  0x2AA8                  
0x0000  0x03E8  0x03B6  0x6000  0x00AB  0x009B  0x4000  0xFFFF                  
0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF                  
0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF                  
0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF                  
0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF                  
0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF                  
0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0x0000                  
0x099B  0x0000  0x0005  0x1080  0x8F07  0x0003  0x7738  0x01BD                  
0x03B3  0x0000  0x7FBC  0x0032  0x00A6  0x0000  0xFFFF  0xFFFF                  
0x0000  0x000A  0x0000  0x8000  0x0435  0x0000  0x0000  0x0000                  
0x0000  0x0000  0x0000  0x0000  0x0000  0x0000  0x0000  0xFFFF                  
0x0000  0x0000  0x0000  0x8000  0x2815  0x0000  0xFFD0  0x0000                  
0x0000  0x0000  0x0000  0x0000  0x0000  0x0000  0x0000  0xFFFF                  
0x0000  0x0000  0x0000  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF                  
0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xFFFF                  
0xFFFF  0xFFFF  0xFFFF  0xFFFF  0xAAAA  0x6666  0x4924  0x38E3                  
0x2E8B  0x2762  0x2222  0x1E1E  0x1AF2  0x1861  0x1642  0x147A                  
0x12F6  0x11A7  0x1084  0x0F83  0x0EA0  0x0DD6  0x0D20  0x0C7C                  
0x0BE8  0x0B60  0x0AE4  0x0A72  0x0A0A  0x09A9  0x094F  0x08FB                  
0x08AD  0x0864  0x0820  *
[youtube] https://www.youtube.com/embed/sZMwGbZde7g [/youtube]
 

Attachments

  • 1.1_TdPKH_2014_Bauer-6.pdf
    1.1 MB · Views: 66
Hi Volttan, haven't looked at the hex yet but, what is your application ? The controller can do sensorless start when the load on the motor is low (for instance with a propellor in a boat or plane) but when the load is high you need hall sensors.

For sensorless start, in the misc menu ( from the main menu option 'n') are two parameters, 'wiggle rate' and 'wiggle amplitude'. It needs some experimenting with these parameters to get the best sensorless start (reasonable values for wiggle range: from 5 to 45, for wiggle rate: 5 to 20).

If you need full torque start then you need to add hall sensors or something equivalent (ask Arlo1, he uses a magnet on the end of the motor shaft and a resolver IC)
 
I also found once you have the current senors calibrated perfectly the senseless starts are WAY better!
 
Arlo1 said:
I also found once you have the current senors calibrated perfectly the senseless starts are WAY better!
i haven't found any difference. and everytime i do the current calibration i get slightly different values. it's only some mV, but as the total offset is 30mV max, i don't know how accurate it is.
and lebowski says in the manual to leave it at default. maybe he wants to comment on that?!
 
It's not easy to get them perfect. In my case calibration works best at 1/8th the current settings I usually run
 
How to correctly set Kerpm?
Do I have to know what is the U / F = const for this electric motor? As in the case of a classic induction motor.
In my bike I have 176 Vmax batteries,
 
Volttan said:
How to correctly set Kerpm?
Do I have to know what is the U / F = const for this electric motor? As in the case of a classic induction motor.
In my bike I have 176 Vmax batteries,
no. you can set that to whatever you like to LIMIT the rpm. if you don't want to limit, set it to some extremely high value.
 
Volttan said:
How to correctly set Kerpm?
Do I have to know what is the U / F = const for this electric motor? As in the case of a classic induction motor.
In my bike I have 176 Vmax batteries,

OK, so looking at the hex:

-pwm freq is rather low at 5 kHz but should be no problem, depends on output stage
-currents are low for the sensors used, but should work
-throttle looks good
-in the erpm menu all look good except
Code:
e) erpm boundary between dr2 & dr23: 96 erpm
f) erpm boundary between dr23 & dr3: 288 erpm
I would change to 1000 erpm for e and 1500 for f. If everything runs you can try to lower these but for a first test, 1000 and 1500.

in the FOC menu
Code:
 measured inductance: 1151.2 uH
 measured resistance: 113.6 mOhm
these look really wrong (especially the inductance) but you are using a very low (20A) measurement current for what are (I guess) around 900A current sensors...

in the misc menu I would go back to the autocomplete values, wiggle rate and range are a bit too high..

Also, I would upgrade your 2.91 to 2.93...
 
izeman said:
Arlo1 said:
I also found once you have the current senors calibrated perfectly the senseless starts are WAY better!
i haven't found any difference. and everytime i do the current calibration i get slightly different values. it's only some mV, but as the total offset is 30mV max, i don't know how accurate it is.
and lebowski says in the manual to leave it at default. maybe he wants to comment on that?!
leave at default :) unless it really runs bad and current sensor calibration improves it. Current sensors, due to their magnetic material, have a constantly changing offset and are therefore calibration is not 100% reliable. If you look at the datasheet of an ACS758 for instance, they give an offset of only a few mV. This makes me say, ok, forget about the unreliable calibration and just leave it at default.
 
My car shakes if I leave them at 0
 
Lebowski said:
Also, I would upgrade your 2.91 to 2.93...

I just made updates to 2.93.
I will test tomorrow


Arlo1:

Do you have any idea how to make an encoder for my motor?
The motor has a built-in resolver, maybe there is a converter resolver to the hall?


IMG_6313.JPG
 
Just guesses Voltan
That position sensor looks like it may be possible to replace the circular PCB with a much simpler one with 3 honeywell hall sensors on it, to plug straight into Mr lebowski's system. One of the nice things about lebowski's code is that the hall signals don't have to be accurately at any particular angle (it is nicer if the switchings are spaced out somewhat though....)
 
bobc said:
Just guesses Voltan
That position sensor looks like it may be possible to replace the circular PCB with a much simpler one with 3 honeywell hall sensors on it, to plug straight into Mr lebowski's system. One of the nice things about lebowski's code is that the hall signals don't have to be accurately at any particular angle (it is nicer if the switchings are spaced out somewhat though....)

What sensors do you think?
The rotor is made of steel without magnets.
 
Volttan said:
Lebowski said:
Also, I would upgrade your 2.91 to 2.93...

I just made updates to 2.93.
I will test tomorrow


Arlo1:

Do you have any idea how to make an encoder for my motor?
The motor has a built-in resolver, maybe there is a converter resolver to the hall?



TI makes a resolver-to-digital chip:
http://www.ti.com/lsds/ti/sensing-products/resolver-encoder-ssc/resolver-encoder-ssc-products.page#p158=Encoder

with something like the chip above you can feed the top 3 bits of the output signal into the hall inputs of the controller IC.
 
With just the standard three Hall-effect sensors, how can a sinewave drive manage to control the three phases when the motor is at very low speed? Basically, the Hall sensors just tell the controller when to change the polarity of the phase, but until the next signal arrives, the controller doesn't know where exactly the rotor is located. So it cannot know how much current to send to the phase at any particular point, to create a sinusoidal current shape.

I assume that at higher speeds, the controller is able internally to generate a sinusoidal frequency that is synchronized with the pulses from the Halls, and from there can generate the current curve.

But the low-speed part (from start) stumps me. Does the controller drives the motor with a squarewave?
If so, at what ERPM does it changes to sine? Or is it a gradual change from one to the other?
 
The controller IC basically runs a PLL, which in practise does what you say:"able internally to generate a sinusoidal frequency that is synchronized with the pulses from the Halls".

The PLL is basically a filter for the hall info. It smoothes out the hall steps. Looking at the in and output signals it performs this interpolation you mention.

If you look at the phase info, at extremely low speed you will see a staircase with 6 steps (as the motor slowly rotates and triggers new hall combos). As the speed goes
up the steps will more and more become a smooth ramp.

The controller IC does not (ever) drive the motor with a squarewave. Lets say the hall steps are at 20, 80, etc (each time plus 60) degrees.
When the hall combo says 20 degrees, phase A is driven with Amplitude*sin(20), phase B with Amplitude*sin(140), phase C with Amplitude*sin(260). So a 120 degree
shift for each phase. Since in this example sin(20) is 0.34, phase A is driven with 34% of Amplitude. At extremely slow speed the output signals will go in 6 steps through a
sine wave. And it always drives all 3 phases, not like a China controller where only 2 out of 3 are driven.
 
Thanks for that excellent explanation, Bas.
I didn't choose the right word when I mentionned "squarewave", but I was thinking about the 6-step drive that is standard with non-sinusoidal drives.
When you are in the 6-step mode at extremely slow speed, the "staircase" you mention is not multiple steps of AMPLITUDE on a phase signal, right? It just refers to the 6-step sequence of 3 phases for a single mechanical step of the motor?

On another point, if I want to know the commutation frequency of the controller, is it the number of magnet poles x the RPM of the motor, divided by 60 to get the result in Hz ?

Thanks again for taking the time to improve our personal culture :wink:
 
Volttan said:
Lebowski said:
Do you have any idea how to make an encoder for my motor?
The motor has a built-in resolver, maybe there is a converter resolver to the hall?

I would try to use the built-in resolver. There seems to be 16 sensors. The output has 6 pins. One for Vcc, one for GND, 4 for the signals (parallel 4 sensors) - maybe...

Try to find Vcc (maybe RED mostly 5V) and GND (black?) and put an oscyloscope to the others. With some luck you'll have nice square-signals, when you turn the wheel.
 
Back
Top