how to program a sevcon gen4

Back in 2018 I bought an ME1507 and Sevcon Gen4 Size 6 directly from Motenergy, and had Frodus program the Sevcon and supply his wiring harness for it. Then life got in the way...

FFWD to yesterday, I finally got around to bench testing the rig using two of my Ego lawnmower batteries in series (114 VDC) and a small job box with some SPST switches for control and a 5K ohm pot for speed. Here's a quick vid:

https://youtu.be/VIka9S6Uydc

Low and behold, it works! I think... Since the throttle is so twitchy I'm wondering if it's just because the motor is unloaded, or as mentioned earlier in this thread something may be reversed (sin/cos, or M2/M3). I'll fiddle with it today.

One thing's for certain, it's unfortunate to see nothing has changed when it comes to hobbyists getting the cold shoulder from Sevcon. According to Youtube, Curtis and Kelly have options for the ME1507 if I get frustrated. I definitely won't be buying $900 worth of software and USB dongles for connecting to this thing when I can spend less than that for a new controller that's easier to program.
 
Mattbastard said:
Low and behold, it works! I think... Since the throttle is so twitchy I'm wondering if it's just because the motor is unloaded, or as mentioned earlier in this thread something may be reversed (sin/cos, or M2/M3). I'll fiddle with it today.
If the controller is using phase current control based on throttle input, then the motor speed can go up really fast for very little throttle input, once past the no-load current threshold.

In that case, apply a load to the motor sufficient to require significant current and it would behave "normally".
 
amberwolf said:
Mattbastard said:
Low and behold, it works! I think... Since the throttle is so twitchy I'm wondering if it's just because the motor is unloaded, or as mentioned earlier in this thread something may be reversed (sin/cos, or M2/M3). I'll fiddle with it today.
If the controller is using phase current control based on throttle input, then the motor speed can go up really fast for very little throttle input, once past the no-load current threshold.

In that case, apply a load to the motor sufficient to require significant current and it would behave "normally".

Cool, thanks for the tip. I was speculating that might be the case, I just didn't know what it was technically called. Same with gas engines (light throttle in neutral revs higher than under load). I swapped the encoder leads and the motor didn't spin at all so I know everything's wired correctly.
 
Hi!

Quick introduction: I'm Antoine from France and I try to run a ZERO motorcycle S after than the old motor overheated ( bearings problem) and the hall captors 've been destroyed inside.

I swapped the old 75-5 by a 75-7R motor but it doesn't work straight away. When i pull up the throttle, the motor axle turn 45 degrees and stay in this position.

Does somebody have a dcf file for a 75-7 with a gen4 size4 sevcon controller??

It seems that the position encoder is not the same between the two motors.

I tried the commission procedure with the borgwarner DVT software but the SIN/COS values send by the new encoder are too low ( maybe because it's a 10v and the old is a 5V, i don't know and i don't want to try it and destroy the new encoder if it's not the problem!).

I read this on the unofficial zeromanual :

"The IPM design motor apparently involves custom Zero programming of the Sevcon controller for the encoder, so off the shelf DVT software cannot perform alignment/commissioning but can apply settings / DCF files and restore them."

Could you help me about that?

Have a good day.

Antoine
 
No full power- why?

Hi all,
i have now successfully got my regen working and adjusted the lower battery limits.
So far so good.

Unfortunately 2 problems persist and i do not know how on earth to change them:
1. Bike won`t go faster than roughly 100 kph max( actually less), which converts to roughly 3450 rpm - give or take.
The vendors datasheet shows 4300 rpm - so why it does not speed up fully?
Torque-map and motor setup shows its set up to 4500 rpm max.some menus even go as high as 5000

2. no full power, sluggish at startup
according to the vendors datasheet it is set to 350A or about 34 kw.
BUT it will not pull more than 16 kw accelerating which is about 190A Battery side.
AND it does not accelerate instantly...the word sluggish comes to mind - not to call it a lame duck.
the latter might have to do with the "ramp up during.." setups but frankly i do not know how high i might set the values before something explodes !!
Still i am missing about half my power - even if one might believe the 350A being phase amps - the former Kelly accellerated much quicker on 34 KW once up to step...

Anyone knows how to get it
-rev up higher?
-rev up quicker?
-what am i missing?

Screenshot 1.jpg
Screenshot 2.jpg
Screenshot 3.jpg
Screenshot 4.jpg
Screenshot 5.jpg
Screenshot 6.jpg

greets

flo

edit: i am running 24s so 90V nominal...could that change some? see pic showing 72V nominal..
 
Flo, I haven't noticed an appreciable difference with the difference in nominal voltage, but you might as well correct it to actual values. I'm sure it'll be super important somewhere.

Check your Iq max headroom, that's another % factor that directly reduces your current flow.

Also, I'd suggest running a trace monitoring your throttle value, and compare with target current vs actual current. Alternatively target torque vs actual torque. That'll give you an indicator of whether this is a ramp up speed issue or a motor control issue.

There's a Kp and Ki set that was directly used for throttle response, called the "speed control gains" (0x4651). Even in torque control mode, I found that those gains directly influenced the perceived throttle position. To me, that should've been completely deactivated in torque control mode but whatever, it's a thing to check.

Darsey
 
thx darsey

i got the controller porgrammed and paired by the vendor, who is of absolutely no help after purchase...
so i am left with the writeups availible online... leaving much in the dark..

So could you elaborate as where to find the max iq and what indicates the headroom?
tracing throttle would require a scope?
so much for paying a programming fee (twice - as it needed repair after being sold new and never worked...)

KP and KI set .. would that alter the motor characteristics? I mean would that mess up the rideability (stutter eg?)

thx

flo
 
flob said:
thx darsey

i got the controller porgrammed and paired by the vendor, who is of absolutely no help after purchase...
so i am left with the writeups availible online... leaving much in the dark..

So could you elaborate as where to find the max iq and what indicates the headroom?
tracing throttle would require a scope?
so much for paying a programming fee (twice - as it needed repair after being sold new and never worked...)

KP and KI set .. would that alter the motor characteristics? I mean would that mess up the rideability (stutter eg?)

thx

flo

Hey flo, I know the frustration. I've been there, and I think it's a common thing on these Sevcon controllers. You do have a lot of reading to do if you're going to dive into that controller.

Max Iq should be in the PMAC motor parameters. Probably shouldn't have it set higher than ~90%. It means that if you have your max torque set to 100Nm, and everything else is working perfectly, then you'll actually see a max torque of 90Nm. (90%). My understanding of that is it's a safety margin from your Peak motor current, which would then be set to spec sheet values.

If you can't find any particular setting, go to the "tree" view and start typing into the search box. We don't have the same version of DVT but your screenshot shows a Search tab so I'm sure that's where it is for you. the "Trace" does not mean using a scope. It means using the vehicle view. The "wheel" button from the main DVT page instead of the "H" button you use to get to the controller Helper window. That is a live view of all of your TPDO values. You'll need to have your TPDOs programmed
to do this. There are a few pdf's around, very google-able saying how to do that. I believe I had download links posted somewhere in a prior ES comment in this feed. When running the motor, either on the road/dyno or on a bench, those values update live and can be recorded (optionally saving it) and viewed back in that window - called "taking a trace".

Adjusting Kp and Ki values will affect the motor driveability characteristics, possibly fully ruining it. If everything works but you just have low power, then don't change those values. You've got plenty of research to do regarding PI control theory (often discussed as a PID if a damping coefficient is added) before playing with that stuff. But you can still take a trace in the meantime. The point is to know which item is causing your decreased performance. From what I can tell, I doubt those gains (Kp and Ki) are affecting this, it's just something that can happen. Trace first, then look up the generic Max and % limit values, then troubleshoot control gains last.

Also check your DC current limits and temp derate curve. Google for "Sevcon app note", and get as many different documents as you can find to help explain.

Darsey
 
Partial success :)
so i got the bike up to 24 kw and aporox 115 kph (from 16 and90).
did not make such a difference changing the ramp up map, but adjusting nominal voltage to 80V did immediately.


Strange though:
Motor torque is accessible via 2 screens, changing the settings in one and power cycle will set the other to zero.
changing them both and powercycle does change performance.
Even more strange:
after turning bike on again and checking settings the graphs returned to 72V ??? power increased still noticeable..
Any explanation?

Is it possible to set nominal voltage to 90? ( 80 volt controller) without magic smoke?

cheers
flo
 
thanks darsey
for your explanation.
I do have the pdf´s ... unfortunately i really do not understand the logic in e- motors at all..
thats why i i bought a programmed kit.... not needing to have another hobby.

I do design and calculate my own rc slope planes from cfk , in my own milled moulds, build my own cnc , got pretty good at 3d cad, design and build wicked cnc furniture, planes and 2 e-motorbikes, even did mill up an e-guitar for my girl without knowing (FIRST) how an instrument works... heck how much expertise one does need to aquire?
I honestly bought this programmed unit in the hope to merely adjust throttle settings or so... what did i pay 380 Euro for?
Anyway, bike is quite rideable for now, i will inch my way toward 32 kw slowly ...

cheers
flo
 
flob said:
Is it possible to set nominal voltage to 90? ( 80 volt controller) without magic smoke?

cheers
flo

I had my nominal voltage set to 108V on my 80V size6 (as that is my nominal voltage)
I dont know if it helped, I set up the base settings before riding.
I think I got output in the 40Kw range, but not the response I wanted.
 
flob said:
Is it possible to set nominal voltage to 90? ( 80 volt controller) without magic smoke?

cheers
flo

The controller can go up to 103.6 V nominal (28S) and still be in the safe when the battery is fully charged (117,6 V). Not much room to spare to the 119 V functional limit, but mine is set up like tht no problem and Zero motorcycles are all like this too.

Remember to set up the new nominal voltage in all the places it appears in the configuration tree.
 
Thank you both,

have the nominal voltage set to 90 volt now, going from 72 to 80 did up the power considerable going further did not bring any changes on...
still seeing just 270Amps in - opposed to at least 350 or 24kw opposed to 32ish
do not find any values indicating about 70%...of max.
hmmm

anyway got the ramps up to 9000 giving a bit more uumph on startup so will inch my way up slowly.

Anyway regen dialed in about how i like it , seing 4,2 kw max

flo
 
Hi everybody,
anyone out there spotting the reason i might not see full power?
001.JPG
002.JPG
003.JPG
004.JPG
005.JPG
006.JPG
007.JPG
008.JPG
009.JPG
010.JPG
011.JPG
012.JPG
013.JPG
014.JPG

thanks for any ideas.
 
Why 350A max stator current? Try 660 if you have a size 6. (and new torque maps)
Also low battery amps.
Are you sure about the inductance? I set the total inductance first, and it worked. I then realized I should set it half for one phase, not the 2 I was measuring.
I also think your kp sounds low, but I think that is where I was never able to get it right.
I think about 5 was where things started to happen for me, and if I remember correctly when your inductance is higher your kp should be too?
 
Hi,
350A rms was set by the vendor, in his initial reply to my specified wish list he answered 350 A as the controller limit
gen 4 size 4 !!
As for the abreviation RMS ... i believe that accounts for long term (opposed to peak) rght? than it would make sense, otherwise the max should be 420?

Incuctance is 0.10 myH according to Motenergy, but isn`t that part of why he pairs the motor and controller...
i am quite hesitant to change that without knowing of what happens to all other parameters..
have no clue whatsoever kp means or changes...

anyone out there knows what the setting slow:eek:n in driver pipeline is meant to do? I have no knowing what a driver pipline is or why it is set to slow? ( 5th pic)
 
Sorry, I thought you had a size 6.
I think your boost current can still be higher, maybe 440A?

Rms is average, not peak on the sine curve like most controllers are rated.
I think it is rms x 1,4 to get the peak value, but I have wrote what I have found about that in my yamaha thread as well as what I found when messing with my sevcon.

Make sure to always save before you make changes, then you can go back if things went wrong..
I would say Kp (and ki)changes how the controller regulates the current to the motor.
There is probably a better explanation to that.

When you raise kp you get faster current delivery, but also overshoot that you might be able to limit with ki if I remember correctly.
You can se in my logs when I tried to set up kp and ki.
 
My understanding is that the slow speed settings are to provide a different set of proportional and integral gains at low speed operation. It allows you to fine tune how smoothly you take-off and park near a standstill. I don't know if it's only for speed control mode or if it actually applied when in torque control mode. Your second last screenshot shows this area. Though your low speed proportional and integral gains are set to 0, with a threshold of 150 rpm. Maybe it actually turns off that setting if the gains are 0? Just like your D-axis gains are also set to 0, but obviously the machine still works.

I too was thinking the 350A limit is bringing down the peak power there. I've always found the actual Nm delivered were less than the theoretical that my controller says I'm getting. Are you able to explain when/where you're at in the speed curve while you're not getting the torque desired? Has the field weakening started yet, or are you still in the base speed range? First taking off, or up in the middle of the flat curve? All of the above, evenly across the board?


Kp and Ki
As far as the Kp and Ki settings anywhere in the controller, they're based on the P and I from a PID controller. (wikipedia has a good explanation, and this Matlab youtube video is a gem: https://youtu.be/YPD1_rcXBIE). If you have a setpoint, a current state, and an offset between the two, then you need to decide how to correct that difference. These settings are for instantaneous magnetic fields needed, but it's easier to explain using an anology with speeds:
If you're driving at 0mph but want to go 10mph, you have an offset of 10mph. How much throttle do you apply?

The Proportional gain (Kp) is the gain that says how much of that throttle to apply, proportionally with the difference. 5mph would see half the throttle as 0, and you continue to taper off linearly as you reach 10. The actual formulas for proportional gains are the same physical math as calculating a spring force. In that case, the Kp would be the spring's stiffness. More squish = more reaction force. Also like a spring, a car will oscillate if it only has springs and no damper. (hint: the Kd in a PID controller) so in a PI controller, you need to be careful not to apply too much proportional gain or you'll have oscillations.

Imagine the engine was underpowered from what you expected, and you're not actually reaching the target at all with your predicted Kp. The Integral gain (Ki) keeps adding up the difference over time and if you're never reaching the target then eventually it becomes a significant factor to affect the overall gain and make up the difference. It essentially applies more and more throttle the longer it takes you to reach the target speed. (or in this case, more and more magnetic field until the rotor hits the alignment position it was supposed to be at) The thing is, this factor significantly affects stability. You need to keep the Ki values small in all PI and PID controllers because they don't care if you're super close to the target. You can be 0.1mph off the target speed but it'll still put the foot to the floor if it's taken a while to get there. PI and PID controls are super common in temp controllers.

Now, whatever Sevcon did under the hood, there are a few correction factors in there because a gain of 0 should remove that factor altogether. So, they don't exactly follow a perfectly true PI controller, but the general logic still applies. Too much Kp causes oscillation, not enough Kp causes slow or insufficient reaction. Too much Ki causes unstable operation, too little results in offset, and insufficient control. Would've been nice if there was a derivative function too, but that'd be too easy and we wouldn't be struggling so much. :)
 
Hi darsey,
thanks for the explanation.

Well what i am missing is what makes electric riding so special: basically 100% torque from 0 rpm - simple as that. (and the reason to change from kelly).
It starts pulling at about 12kph and does so up to approx 100kph, than tappers off...

Anyway i raised the max current to 400A for a test and it did not produce any change - quite unsurprising when pulling only 270A anyway...

I than focused on kp, ki and pid and while reading up on it i found most papers mentioning to find max and then back off some to produce a stable system...all of them mentioned that there is always some bandwidth.
I figured that there may be some leeway and raised pk from 2,5 to 2,7 and that made a slight but noticeable difference in acceleration.
I guess i will creep up slowly to 3 hoping to save me adjusting ki and dampening...
It did not increase overall power though.

My next suspect is inductance:

Motenergy website:
Screenshot_ME1115.png

My config in the software:
motor incuctance.png

Reading up did not find me a suitable paper on bldc engines but it surely affects the power of an electric spool and thus an electric motor too.
As i do not know if the inserted 89 mH being calculated or meassured i am a little unsure of changing that.
Especially i do not know if raising or lowering would be the way to go.. and how big a step ?

flo
 
When you read the values with the motor running, does the inductance move around a little?
If it dosent it is wrong. If it does it is reasonable, but not necessarily right. You can try half it in that case, and make a new torque map. I think you got the values when aligning the position sensor if I remember correctly?
 
Hi,
i will check if inductance moves around...
I do not know where the values originate from... as said i bought this "fully" programmed... i did not align the position sensor...
so i would need to create a new torque map with it too? :roll:

flo
 
Back
Top