Page 67 of 73

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

Posted: Apr 14 2018 12:32pm
by Lebowski
Busy with some extremely interesting stuff.
DSC02111-800x800.jpg
DSC02111-800x800.jpg (108.74 KiB) Viewed 2768 times
I've started programming on a different chip, one of the 33EV types. Goal is to have sensorless start with full torque at standstill. Relative (sensorless) position at standstill is quite easy, but to get absolute phase information requires a bit more doing. The picture above shows the different versions of analog signal processing that I am considering for processing the current sensor signals. The left one has 4 opamps, the right one 8 at the moment but should be 10... but have already scrapped that one in my mind and am drawing up schematic for version 3....
DSC02110-800x800.jpg
DSC02110-800x800.jpg (128.37 KiB) Viewed 2768 times
The new processor plugges onto the powerPCB. The analog bits plug into the bottom right header of the experimental processor board.

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

Posted: Apr 14 2018 3:28pm
by Altair
Mmmmmm, analog electronics. A slowly disappearing art unfortunately.

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

Posted: Apr 14 2018 5:03pm
by methods
Go for the win

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

Posted: Apr 14 2018 5:06pm
by Arlo1
Altair wrote:
Apr 14 2018 3:28pm
Mmmmmm, analog electronics. A slowly disappearing art unfortunately.
Parts of the system will always have to be analog as there is no other way to determine amplitude and position of things.

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

Posted: Apr 26 2018 4:39am
by Lebowski
Since whereswally606 asked in a PM about the sensorless start with full torque Iam working on, might as well post the status here:

I am at a point where I have a one-shot algoritm to get the double phase out. So the controller IC takes just one look (it does not need multiple, but filtering multiple ones reduces the noise on the measurement) at the current sensors and can tell you where the magnetic field of the rotor is. It does not need rotor rotation or for the rotor to go first through a full rotation, or to run 3 different measurements for the 3 windings.

Unfortunately it cannot tell you the difference between a magnetic North or South... In effect this means you know at which phase to apply current but whether the motor will go forward or backward is a 50-50 chance.

It is very accurate though, the output is in degrees and it can really sense the rotor moving by just a millimeter...

So i am now busy to try to get a distinction between North and South...

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

Posted: Apr 26 2018 6:44am
by izeman
Lebowski wrote:
Apr 26 2018 4:39am
So i am now busy to try to get a distinction between North and South...
that's an easy one: ice bears are in the north, if you see penguins you're at the south pole!!

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

Posted: Apr 26 2018 7:07am
by Altair
Fantastic!

If I understand correctly what you are saying, you are now trying to determine if a particular phase is actually under the influence of a north or south magnet, or between the two.
Wow, under static condition, this must be very though to determine.

I would like to be able to give some suggestions...
Can you micro-pulse the phase to see how the coil reacts?

Sincerely wishing you the best success!

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

Posted: Apr 26 2018 7:22am
by Lebowski
It is actually possible to get absolute phase information (so including north/south) and without pulsing etc... but this signal almost disappears the moment you apply phase current so cannot be counted on as a reliable and ever present source of info...

Still trying to find a workaround, will just take some more time.

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

Posted: Apr 30 2018 2:45am
by Lebowski
nice thing of a bigger chip is larger RAM (8kB, wow :shock: ) so I can sample real-time data and have a look at signal spectra:
(this is a complex spectrum with two notch filters implemented, one at DC and one at a negative frequency)
real time datalogging-800x800.jpg
real time datalogging-800x800.jpg (128.29 KiB) Viewed 2598 times
It was a real #$%@ though to get fast data transmission between the (new to me) laptop and the processor...

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

Posted: May 08 2018 2:03am
by Lebowski
Sensorless torque at standstill, unfortunately direction is still random and can change when switching on/off, so that will be the next thing to work on :D


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

Posted: May 08 2018 3:14am
by izeman
would your sensorless start improvments help with "regular" sensored start in some way as well?
even though the controller/software now (since last autumn's update with hall data integration in sensorless mode) works better than ever, there is still some improvment possible in the (sensored) start situation.
start under heavy load can be very rough and stuttering, and power application is still very "soft". soft so far is great for all day riding, but can be hindersome in cases where you need instant power like wheelies for hopping over a fallen tree or something.

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

Posted: May 08 2018 7:28am
by Altair
Impressive to see that it keeps a constant torque regardless of position, even if you rotate it backwards.
I also agree with izeman that instant startup with full power is a necessity for off-road riding.
I'll continue watching this thread with great interest.

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

Posted: May 08 2018 12:03pm
by Lebowski
izeman wrote:
May 08 2018 3:14am
would your sensorless start improvments help with "regular" sensored start in some way as well?
even though the controller/software now (since last autumn's update with hall data integration in sensorless mode) works better than ever, there is still some improvment possible in the (sensored) start situation.
start under heavy load can be very rough and stuttering, and power application is still very "soft". soft so far is great for all day riding, but can be hindersome in cases where you need instant power like wheelies for hopping over a fallen tree or something.
I mean it would be instead of hall sensored start. And hall sensors divide the electrical rotation into only 6 pieces, so it is quite coarse. The one from the video was setup up for dividing an electrical rotation into 512 pieces, so should be much smoother. But am not there yet :D

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

Posted: May 13 2018 11:46am
by lizardmech
Lebowski wrote:
Apr 14 2018 12:32pm
Busy with some extremely interesting stuff.
DSC02111-800x800.jpg
I've started programming on a different chip, one of the 33EV types. Goal is to have sensorless start with full torque at standstill. Relative (sensorless) position at standstill is quite easy, but to get absolute phase information requires a bit more doing. The picture above shows the different versions of analog signal processing that I am considering for processing the current sensor signals. The left one has 4 opamps, the right one 8 at the moment but should be 10... but have already scrapped that one in my mind and am drawing up schematic for version 3....
DSC02110-800x800.jpg
The new processor plugges onto the powerPCB. The analog bits plug into the bottom right header of the experimental processor board.
Interesting, what is the function of the additional analog processing between the current sense and the MCU?

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

Posted: May 14 2018 2:52am
by Lebowski
Filtering and amplification... basically compensating for the ADC being only 10 bits

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

Posted: May 14 2018 5:11am
by lizardmech
Lebowski wrote:
May 14 2018 2:52am
Filtering and amplification... basically compensating for the ADC being only 10 bits
You could do this really easily with delta sigma based current sense, you could sample the same data sets with different digital filters to simultaneously produce a low latency 10 bit output and a slower high resolution 16bit or 18bit output. I don't think dspic has the needed hardware for that though unfortunately.

How do you maintain sensorless control on your design if you do not have any information regarding motor inductance or resistance? It sounds interesting and quite different to FOC and DTC techniques, or are you keep it secret in the hope of commercializing it or something? I will have to build one next time I'm making some motor control inverters.

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

Posted: May 15 2018 2:30am
by Lebowski
lizardmech wrote:
May 14 2018 5:11am
are you keep it secret in the hope of commercializing it or something?
yes :D

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

Posted: May 15 2018 8:07am
by fechter
Can you sort of quickly pulse the motor while monitoring the polarity of the unused phase to determine if it's going the right direction? Not sure how long it would take to pulse, sense, and reverse if going backwards. Hopefully pretty fast.

Another possible approach would be to ignore the sensing for a few revolutions and just commutate the phases in the desired direction. The magnets should sync to the stator at some point, then increase power.

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

Posted: May 15 2018 10:02am
by lizardmech
I think the second one is more or less how instaspin and most other sensorless ones do it, they quote about 1hz/60RPM as the limit for their observer, there's a force angle variable in the firmware that seems to put it into an open loop mode below certain speeds.

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

Posted: May 15 2018 11:14am
by Lebowski
My goal is to have something which can sense the correct phase even when the motor is (mechanically) locked, so that the motor can provide torque in the correct direction against the mechanical lock. So no cheating by having a necessary small bit of movement to try and figure out which way we're going....

The math is horrendous though, got pages and pages full of sine and cosine etc :D

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

Posted: May 16 2018 8:44am
by fechter
Lebowski wrote:
May 15 2018 11:14am
My goal is to have something which can sense the correct phase even when the motor is (mechanically) locked, so that the motor can provide torque in the correct direction against the mechanical lock. So no cheating by having a necessary small bit of movement to try and figure out which way we're going....

The math is horrendous though, got pages and pages full of sine and cosine etc :D
That would be ideal but I can't think of how to do that without resorting to sensors.

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

Posted: May 16 2018 9:13am
by Altair
The rotor is never actually "locked". It is always slightly moveable by a small amount in the center of a magnetic cog.
Can this be used as a detector by pulsing a phase?

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

Posted: May 16 2018 12:30pm
by Njay
Phase inductance should be different depending on rotor position. If that's enough info, and "easily" measurable, to know the exact rotor position, it's another story. Maybe it's also possible to use a phase to induce current into another phase and from that get position information.

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

Posted: May 16 2018 1:16pm
by lizardmech
Njay wrote:
May 16 2018 12:30pm
Phase inductance should be different depending on rotor position. If that's enough info, and "easily" measurable, to know the exact rotor position, it's another story. Maybe it's also possible to use a phase to induce current into another phase and from that get position information.
I imagine the challenge is current sense range, you need enough to run the motor at full power but somehow have enough resolution to detect very small changes when trying to determine rotor position while unpowered.

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

Posted: May 16 2018 1:32pm
by Lebowski
lizardmech wrote:
May 16 2018 1:16pm
Njay wrote:
May 16 2018 12:30pm
Phase inductance should be different depending on rotor position. If that's enough info, and "easily" measurable, to know the exact rotor position, it's another story. Maybe it's also possible to use a phase to induce current into another phase and from that get position information.
I imagine the challenge is current sense range, you need enough to run the motor at full power but somehow have enough resolution to detect very small changes when trying to determine rotor position while unpowered.
I actually want to sense changes in phase inductances (to deduce position) while powered, i do not want something where i have to alternate between powering and sensing. The video a few posts back was sensing and powering at the same time.
Lizardmech comment about enough resolution ('Dynamic Range') is correct and is the reason for the analog pre-processing.