Incrimental encoders for closed loop $$$

AC, DC, amps, volts and kilowatt. It's all discussed in here
a4x4kiwi
Senior Member
Posts: 772
Joined: Thu, 03 Jan 2008, 19:04
Real Name: Malcolm Faed
Location: Australia
Contact:

Incrimental encoders for closed loop $$$

Post by a4x4kiwi »

OK, here is an update after playing around with closed loop. Sometimes I get one step forward and 2 steps back.

First, the step forward, acceleration is smooth and much stronger once moving.

Now the 2 steps back.

1. There is much less torque from a standing start and I get over current cut back that causes shuddering. I cant help wonder if a 2000PPR rather than 800PPR encoder would help. I cant accelerate any slower as the gains are already at minimum.

2. Now for a weird one. The VFD acts more like a servo driver. When you have stopped with the brake the motor fights the brake. When you let off the brake the vehicle rolls forward or back until it presumably counts enough pulses from after letting off the throttle. Its a bit like being attached to a bungee. Lots of fun but not very practical.

Both the P and I are at minimum. Any higher and the behavior is worse.
I will keep fiddling around with the parameters and see what I can come up with.

Torque control is next.


Last edited by a4x4kiwi on Wed, 24 Feb 2010, 05:00, edited 1 time in total.
Silicon is just sand with attitude.

Blog: http://malfunction.faed.name
Squiggles
Senior Member
Posts: 742
Joined: Wed, 22 Apr 2009, 03:19
Real Name: Neil
Location: Newcastle NSW

Incrimental encoders for closed loop $$$

Post by Squiggles »

I am getting the impression that these VFDs are rather primitive devices and not particularly suited to this application.

With 800ppr if the motor is doing 1rpm it would take less than 150mSec for the controller to detect two pulses. When you consider that the motor is likely to be doing 2000 rpm within 10 sec it is hard to imagine it being at 1 rpm for very long! Even at 10 rpm pulses are 7.5mSec apart surely that is fast enough?

I am not all that familiar with VFD applications, I've seen a few conveyor belts that is about it. I am guessing they don't spend a lot of their lives accelerating from stand still. More likely they run between 50 & 100 % of rated speed, or fixed speed with variable load (thinking conveyors).

There could be a good case for the development of an EV specific VFD.
User avatar
Johny
Senior Member
Posts: 3733
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Incrimental encoders for closed loop $$$

Post by Johny »

Squiggles wrote: I am getting the impression that these VFDs are rather primitive devices and not particularly suited to this application.
I think the reverse is true. The devices are very sophisticated and it's going to take some experimenting to come up with a well-tuned setup. The reason you need so many pulses is that the VFD is actually trying to extract every last NM of torque from the motor at the highest efficiency possible. It's re-calculation the phase, voltage and current with each cycle either from the encoder or from it's "internal" motor model.

a4x4kiwi has proven that he can run OK without the feedback (encoder) but is trying for better control and being honest about the results.

You are correct in that a custom made VFD for EV is the way to go and they exist - at a price. AC Propulsion, Azure Dynamics etc. The experimentation is done for you - and paid for by you.

The proper combination of speed and torque control will finally result in these VFDs doing an admirable job I'm sure.
Squiggles
Senior Member
Posts: 742
Joined: Wed, 22 Apr 2009, 03:19
Real Name: Neil
Location: Newcastle NSW

Incrimental encoders for closed loop $$$

Post by Squiggles »

800ppr, 2000rpm, 1 pulse every 37.5uSec or 533 pulses every 50Hz cycle....man that has got to be enough!

I am betting these industrial VFD aren't as sophisticated as the manufacturers would like you to believe....were talking industrial control here not medical systems. What's in them 6809s and Z80s Image
a4x4kiwi
Senior Member
Posts: 772
Joined: Thu, 03 Jan 2008, 19:04
Real Name: Malcolm Faed
Location: Australia
Contact:

Incrimental encoders for closed loop $$$

Post by a4x4kiwi »

I will keep fiddling with the settings and read the manual again and post progress. I also suspect that a more modern VFD might offer better control.
Silicon is just sand with attitude.

Blog: http://malfunction.faed.name
User avatar
Hemonster
Groupie
Posts: 90
Joined: Mon, 01 Dec 2008, 00:28
Location: Christchurch NZ

Incrimental encoders for closed loop $$$

Post by Hemonster »

Squiggles wrote: 800ppr, 2000rpm, 1 pulse every 37.5uSec or 533 pulses every 50Hz cycle....man that has got to be enough!


Well I thought the high PPR was for low RPM (from starting up to xxx RPM), not much doing with the high RPM. I'm sure they can skip every few pulses at 2000rpm and still do a great job, but you need the high ppr at low revs so you get just as good a control when you want torque to be control best?
Last edited by Hemonster on Wed, 24 Feb 2010, 13:07, edited 1 time in total.
Squiggles
Senior Member
Posts: 742
Joined: Wed, 22 Apr 2009, 03:19
Real Name: Neil
Location: Newcastle NSW

Incrimental encoders for closed loop $$$

Post by Squiggles »

Hemonster wrote:
Well I thought the high PPR was for low RPM (from starting up to xxx RPM), not much doing with the high RPM. I'm sure they can skip every few pulses at 2000rpm and still do a great job, but you need the high ppr at low revs so you get just as good a control when you want torque to be control best?


Yeah, I think you are right, but I am betting that industrial controllers are not too worried about SMOOTH acceleration under full load from stopped. My guess is that they wack some pre-set minimum starting current/voltage into the motor and once it gets a bit of speed up they switch into a proper control mode. Nothing like a bit of inertia to smooth things out. And lumps of coal sure don't give a damn about comfort!
User avatar
acmotor
Senior Member
Posts: 3605
Joined: Thu, 26 Apr 2007, 03:30
Real Name: Tuarn
Location: Perth,Australia

Incrimental encoders for closed loop $$$

Post by acmotor »

Squiggles, Having worked with VFDs for years and some in position controlled servo appliactions I can assure you there is absolutely nothing simple in their intelligence. (I'm talking the VVC and vector control types)
You correctly sight pre-sets and as Johny alludes, the complexity of the settings and user options is the challenge. I still only really have a handle on some of the parameters, the rest I adjust until it works ! There are presets for start voltage/frequency/magnetising etc etc etc.

Typical computer style, VFDs only do what you ask them and if you don't understand what you are asking then you won't be happy with the results.
Rest assured also that the VFD is likely to be doing its absolute best in efficiency .... one of their biggest selling points.

Smooth operation is an absolute yes at normal full load. I guess though that the same may not be the case when we push the IM and VFD past normal limits. Responses aimed at protecting the equipment may result.
In the DC world this just means black control boxes and vapourised commutators !

Hang in there, it will all work out !

Mal, I know the bungee feel. Great for hill hold. I set minimum frequency for function at stop at 0.1Hz, that solved the issue.

Reverse in torque mode is a challenge as my existing accelerator PU only gives me 0-10V not +-10V. Normal reverse seemed to be ignored. Maybe need to set an offset when "reverse" selected ?
iMiEV MY12     110,230km in pure Electric and loving it !
a4x4kiwi
Senior Member
Posts: 772
Joined: Thu, 03 Jan 2008, 19:04
Real Name: Malcolm Faed
Location: Australia
Contact:

Incrimental encoders for closed loop $$$

Post by a4x4kiwi »

Thanks for the tips. I need a few more chucks of time to fiddle around and re-read various settings in the manual.

Do you have full smooth torque from a standing start in speed closed loop?


All, I don't mean to discourage others from taking this path. We are breaking new ground and there is going to be a lot of trial and error until we get it right. Hang in there.
Silicon is just sand with attitude.

Blog: http://malfunction.faed.name
User avatar
acmotor
Senior Member
Posts: 3605
Joined: Thu, 26 Apr 2007, 03:30
Real Name: Tuarn
Location: Perth,Australia

Incrimental encoders for closed loop $$$

Post by acmotor »

Turn down factor is something like 1000:1 so if 4000RPM max set then control becomes a bit stop start below 4RPM. Given that I would use 0.1Hz as the lowest setting (cutoff) (~3RPM) I never saw any shudder on the old 4096ppr encoder.
I've still not fitted the 1024ppr encoder so can't report on that yet.
iMiEV MY12     110,230km in pure Electric and loving it !
a4x4kiwi
Senior Member
Posts: 772
Joined: Thu, 03 Jan 2008, 19:04
Real Name: Malcolm Faed
Location: Australia
Contact:

Incrimental encoders for closed loop $$$

Post by a4x4kiwi »

Slowly getting there. the .1 helped. Still not so smooth at stop, and start but slowly working it out.

The acceleration good. It gives the full 100% current when the acceleration ramp is 4s. I am sure the batteries didn't like it. :)

Do you find that as you coast under regen down to stopped there is a lurch as you stop? This gets worse with a higher switching frequency. I am still running at 3khz.

Ac. your experience is invaluable. Thanks.
Silicon is just sand with attitude.

Blog: http://malfunction.faed.name
User avatar
acmotor
Senior Member
Posts: 3605
Joined: Thu, 26 Apr 2007, 03:30
Real Name: Tuarn
Location: Perth,Australia

Incrimental encoders for closed loop $$$

Post by acmotor »

Presently I run ramps of 0.5 sec and let the VFD current limits naturally extend the ramp time (parts of the VFD smarts). This is very smooth and holds the motor current at the VFD 97.5A max independent of how much extra accelerator you supply. It also means that you can accelerate up a hill when normal ramp of say 4 sec is too fast.
This works up to 50Hz on standard motor or about 150Hz on 200V configuration.

Yes, I see some regen lurch at stop if the cutoff f is too low or ramp too long.
The above is all in speed mode. Torque mode has no problem (except my control over regen, that then needs to be a negative torque demand via brake pedal ?)
iMiEV MY12     110,230km in pure Electric and loving it !
User avatar
woody
Senior Member
Posts: 1716
Joined: Sat, 21 Jun 2008, 02:03
Real Name: Anthony Wood
Location: Mt Colah

Incrimental encoders for closed loop $$$

Post by woody »

unsolicited, inexperienced advice:

For regen / negative torque demand, can you plug you 0-5V P5B in as a -10V to 10V input, add say -2.5V offset, and use a multiplier 4x what you normally would? Bonus points for a dead zone in the middle and/or an S curve.
Planned EV: '63 Cortina using AC and LiFePO4 Battery Pack
User avatar
woody
Senior Member
Posts: 1716
Joined: Sat, 21 Jun 2008, 02:03
Real Name: Anthony Wood
Location: Mt Colah

Incrimental encoders for closed loop $$$

Post by woody »

With the motor fighting the brakes at very slow speed, is the controller trying to maintain a minimum speed of 0.1 Hz / 6rpm, rather than freewheeling?
Planned EV: '63 Cortina using AC and LiFePO4 Battery Pack
User avatar
acmotor
Senior Member
Posts: 3605
Joined: Thu, 26 Apr 2007, 03:30
Real Name: Tuarn
Location: Perth,Australia

Incrimental encoders for closed loop $$$

Post by acmotor »

The VFD has a complex set of reference options as you've probably seen, including summation of many reference numbers including offsets and scaling (and ramp shape). I did manage to enter a preset reference at 50% and scale up the accelerator demand to get negative torque for regen in torque mode. I just didn't quite follow how to stop reverse direction of motor i.e. to tell the motor clockwise only.... Oh penny drop par 100 clockwise/both direction... I'll try that.

No the min speed is the 'start of coast (freewheel)' point or what ever mode you have set for function at stop. e.g. DC injection brakiing or coast etc. So no need to have brakes fight motor. But yes you can get that if your ramp is too long i.e. longer than the fast braking time for the vehicle.
iMiEV MY12     110,230km in pure Electric and loving it !
procrastination inc
Groupie
Posts: 57
Joined: Wed, 21 Oct 2009, 03:45

Incrimental encoders for closed loop $$$

Post by procrastination inc »

a4x4kiwi wrote: I already have a proximity sensor on a toothed gear with a resolution of 40 pulses per revolution. Unfortunately this resolution is no good for using closed loop where you ideally need several hundred PPR. I have tried to run closed loop with this but the drives output is quite random.


would 200 pulses be enough?

5 proxys mounted around the gear so they are incrementally indexed 1.8 degrees off with the signal wires all feeding the controller input (through diodes?) might give you what you need.

Around the sprocket at:
0 deg
73.8 deg
147.6 deg
221.4 deg
295.2 deg

Probably need quite fine resolution on the proxys so you don't just get a permanent on

bga
Senior Member
Posts: 492
Joined: Mon, 01 Sep 2008, 19:27
Real Name: Bruce Armstrong
Location: Perth WA

Incrimental encoders for closed loop $$$

Post by bga »

By the time you get all that working nicely, it would have probably been easier and cheaper to have gone with an encoder that has lots of pulses per rev.

500-1000 was my original guess before this thread appeared.

As AC motor has pointed out, it's the low speed that is the problem. At the very start, the controller needs good speed estimates to allow the field to be generated precisely enough for lots of smooth torque.

At the other end, 1000 PPR at 4500 RPM is 75,000 pulses per second. So the controller would have to be tolerant of a 75KHz pulse frequency to work at this speed.

Losing the pulse train can cause servos to misbehave very badly.

AC Motor:
Do you know if the controllers use the quadrature edges for finer positioning accuracy? Potentially, this can make a 500 PPR encoder have 2000 position steps per revolution.



It's not the end of the world, but I can see it from here.
User avatar
acmotor
Senior Member
Posts: 3605
Joined: Thu, 26 Apr 2007, 03:30
Real Name: Tuarn
Location: Perth,Australia

Incrimental encoders for closed loop $$$

Post by acmotor »

Yes, most VFDs seem to use quadrature and quite intelligent encoder pulse missing logic often allowing the user to use sensorless feedback as a fallback (fine at higher revs). I ran the VLT5000 to ~273kHz on a nominal 65kHz input connection (4000RPM and 4096ppr encoder in the original setup) and this performed OK so there is plenty of overhead !

Keep in mind that quadrature can potentially quad the ppr if the encoder is A/B (sine cos) type but does expect the mark space ratio and relative phase to be 1:1 / 90deg othewise the low end RPM read fluctuates wildly. i.e. not a substitute for ppr at low revs.

The VFD text I've read suggests at least 1000ppr before quadrature for full torque at zero RPM. An EV does not have to hold ! full torque at zero RPM of course (Gross rear wheel spin should see to that
Image ) so less that 1000ppr should work.
iMiEV MY12     110,230km in pure Electric and loving it !
User avatar
woody
Senior Member
Posts: 1716
Joined: Sat, 21 Jun 2008, 02:03
Real Name: Anthony Wood
Location: Mt Colah

Incrimental encoders for closed loop $$$

Post by woody »

What buzzwords should I be looking out for in an industrial controller?
ABB has "Dynamic Torque Control" (tm)

is there an equivalent industrial application to an EV?

Conveyor and crane are similar, but the crane is more position control than torque control.

High speed extruder?

Is PID control something to investigate? Configure the controller to match torque and speed to the pedal position?

Do most controllers have the low level access like control techniques does to allow things like instantish change from Star to Delta including a 60 degree phase shift?
Planned EV: '63 Cortina using AC and LiFePO4 Battery Pack
User avatar
Johny
Senior Member
Posts: 3733
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Incrimental encoders for closed loop $$$

Post by Johny »

Most controller will have the ability the change parameter sets. Danfoss and Lenze both allow you to configure a digital input to change par. sets. This lets you set one par. set for Star and one set for Delta (I've gone right off star delta switch but that's another story).

Things I think are a must:
- Analog input Torque control
- Vector Space motor control
- DC Bus (of course)
- Internal DC BUS capacitor precharge (not involving SCRs).
- Facility for encoder

Almost a must:
- Two analog inputs (so a speed/torque arrangement can be done externally if the drive can't do it).

Nice to have:
- Brake resistor IGBT (pretty easy to do externally and lots of brake resistor controllers available for < $400).
- Autotune. You don't do this very often (once) and you can do it on another drive and copy the measurements if necessary.

I have found that just about every manufacturer has a hype term for Vector control (Vector Space, etc.).

The IP rating is kind of up to you. I prefer to provide my own water/dust proofing and avoid the weight that comes with an IP5x/6x enclosure.

Edit: Added encoder capability as a must.
Last edited by Johny on Fri, 19 Mar 2010, 04:58, edited 1 time in total.
a4x4kiwi
Senior Member
Posts: 772
Joined: Thu, 03 Jan 2008, 19:04
Real Name: Malcolm Faed
Location: Australia
Contact:

Incrimental encoders for closed loop $$$

Post by a4x4kiwi »

Add to that 2 frequency outputs (scalable) that are to drive a speedo and tacho. - this is more for the benefit of those with a newer car than woody.

I use the tacho to show current x 10.
Silicon is just sand with attitude.

Blog: http://malfunction.faed.name
User avatar
woody
Senior Member
Posts: 1716
Joined: Sat, 21 Jun 2008, 02:03
Real Name: Anthony Wood
Location: Mt Colah

Incrimental encoders for closed loop $$$

Post by woody »

Johny wrote: Things I think are a must:
- Analog input Torque control
- Vector Space motor control
- DC Bus (of course)
- Facility for encoder
- Internal DC BUS capacitor precharge (not involving SCRs).
Is an external precharge a big deal? Telemecanique have that as an arrangement: [IMG=uploads/311/BusPowered.png]
a4x4kiwi wrote: Add to that 2 frequency outputs (scalable) that are to drive a speedo and tacho. - this is more for the benefit of those with a newer car than woody.
If you're taking out the gearbox which usually includes the speedo drive, then the easiest thing is to put semi-modern instrument internals (90s speedo from a wrecker) into your instruments.

In this case, you'd want 2+ outputs - separate odometer + speedometer (unless the mechanism matches your speedo's sweep (e.g. 2 degrees per kmh) + tacho if you have one.

This is my plan B, in case SOGOS (Sawn off Gearbox Output Shaft) is a bust.

Analogue outputs would be good for driving other gauges (Temp, Amps, Fuel, Gauge)
Planned EV: '63 Cortina using AC and LiFePO4 Battery Pack
User avatar
Johny
Senior Member
Posts: 3733
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Incrimental encoders for closed loop $$$

Post by Johny »

I guess I haven't considered outputs much as I will be using the encoder output for the speedo so it works even with the VFD turned off.
I haven't included the VFD in any systems that don't involve actual traction power - paranoid I guess. Oh, not true, I use an analogue output to feed the instruments for a 0-1000VDC Bus signal and a digital output to turn on brake light when gen. current goes above a nominal value. But - nothing critical or safety related (if VFD is down there won't be regen. braking). I regard the speedo as a safety issue - I want to know how fast I'm being flat-towed. Image
Post Reply