how to combine torque control and speed control

AC, DC, amps, volts and kilowatt. It's all discussed in here
Post Reply
steve cai
Noobie
Posts: 10
Joined: Wed, 10 Apr 2013, 19:27
Real Name: steve cai

how to combine torque control and speed control

Post by steve cai » Wed, 10 Apr 2013, 23:24

Dear all
I have read some similiar topics here and tryed both torque control and speed control on a EV with an ac traction motor
Torque control feels more comfortable than speed control. I suppose this mainly because torque control is more fit for human's intention--when i push pedal, i want directly increase motor torque.But in speed control mode torque is produced by a speed loop such as PID or sth.it may not match perfectly. When i was trying speed loop, i could feel torque changed like following a nonlinear curve,to smooth that i have to lower the acceleration rate and deceleration rate then its reaction is too slow and unacceptable.
Meanwhile, i want to improve torque control in some special vehicle applications. i hope a padal can determine a set speed, it means that i have 30% pedal to reach 30% speed(for example) regardless of going up a hill or going down. However adjusting progress can take a bit of long time and it doesn't matter.
it seems that i must apply a speed loop, but pure speed control can not provide as good torque response as torque control
so here comes, how can i control a vehicle speed(ignoring the load change)while have a good enough pedal feel and good torque response of torque control?
begging for advise

steve cai
Noobie
Posts: 10
Joined: Wed, 10 Apr 2013, 19:27
Real Name: steve cai

how to combine torque control and speed control

Post by steve cai » Wed, 10 Apr 2013, 23:35

i have read some posts by weber and coulomb talking about this stuff, but i can't quite get it, are there any more details such as control method diagram can explain how torque and speed control are combined
thanks a lot

User avatar
weber
Site Admin
Posts: 2624
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

how to combine torque control and speed control

Post by weber » Thu, 11 Apr 2013, 03:24

Hi Steve,

How you can implement it, depends of what kind of interface your VSD gives you. Have you read the "AC drive programming and pedal mapping" thread?

Start here (at the beginning) to see how Ross Pink did it by programming an Emerson industrial VSD. And how Johny implemented it with opamps.

viewtopic.php?title=ac-drive-programmin ... 59&start=1

Or start here to see how Coulomb & I did it in C for a Tritium DCU and WaveSculptor.
viewtopic.php?title=ac-drive-programmin ... 859#p30613

However these methods differ in more than just the way they interface to their respective VSDs.

If you can tell us something about your VSD we might be able to help further.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

User avatar
BigMouse
Senior Member
Posts: 600
Joined: Thu, 28 Oct 2010, 02:39
Real Name: Vincent Tannahill
Location: Silicon Valley
Contact:

how to combine torque control and speed control

Post by BigMouse » Thu, 11 Apr 2013, 04:28

It sounds like you're describing a cruise control. Use torque mode for normal driving, then if you want to set a specific speed, use a PI controller to take speed error as an input and output a torque setpoint. That's all a cruise control does.

User avatar
Richo
Senior Member
Posts: 3737
Joined: Mon, 16 Jun 2008, 00:19
Real Name: Richard
Location: Perth, WA

how to combine torque control and speed control

Post by Richo » Thu, 11 Apr 2013, 05:01

Yeah it sounds like cruise control.
If the controller doesn't allow it then the only alternative I can think of is an external circuit that has a complex algorithm do achive your goal but feed a torque signal into your controller.
So the pedal generally gives you torque as per a normal car but when the pedal has been in a similar position for a period of time it switches over to a speed control.So as you go up/down hills the speed stays the same.
Move the pedal a little and it tracks by speed.
move the pedal a lot and goes back to torque mode.
Not easy and would take a lot of fiddling to get right esp if it has to match a particular controller.
The seperate control box would also probably need a tacho feed into it for the speed control.

It would be esier to have the usual curise control dials and buttons to achieve the same thing as it is easier as it has a definite switch between torque and speed control.
So the short answer is NO but the long answer is YES.
Help prevent road rage - get outta my way!

steve cai
Noobie
Posts: 10
Joined: Wed, 10 Apr 2013, 19:27
Real Name: steve cai

how to combine torque control and speed control

Post by steve cai » Fri, 12 Apr 2013, 19:02

weber wrote: Hi Steve,

How you can implement it, depends of what kind of interface your VSD gives you. Have you read the "AC drive programming and pedal mapping" thread?

Start here (at the beginning) to see how Ross Pink did it by programming an Emerson industrial VSD. And how Johny implemented it with opamps.

viewtopic.php?title=ac-drive-programmin ... 59&start=1

Or start here to see how Coulomb & I did it in C for a Tritium DCU and WaveSculptor.
viewtopic.php?title=ac-drive-programmin ... 859#p30613

However these methods differ in more than just the way they interface to their respective VSDs.

If you can tell us something about your VSD we might be able to help further.


thank you weber
i have read both threads several times but i still can not quite undersatnd your control method, it seems that your point is to make the feel like an ordinary car with an engine, my torque control is close to that.
is your method based on speed loop and it feels like a torque mode?

steve cai
Noobie
Posts: 10
Joined: Wed, 10 Apr 2013, 19:27
Real Name: steve cai

how to combine torque control and speed control

Post by steve cai » Fri, 12 Apr 2013, 19:30

Richo wrote: Yeah it sounds like cruise control.
If the controller doesn't allow it then the only alternative I can think of is an external circuit that has a complex algorithm do achive your goal but feed a torque signal into your controller.
So the pedal generally gives you torque as per a normal car but when the pedal has been in a similar position for a period of time it switches over to a speed control.So as you go up/down hills the speed stays the same.
Move the pedal a little and it tracks by speed.
move the pedal a lot and goes back to torque mode.
Not easy and would take a lot of fiddling to get right esp if it has to match a particular controller.
The seperate control box would also probably need a tacho feed into it for the speed control.

It would be esier to have the usual curise control dials and buttons to achieve the same thing as it is easier as it has a definite switch between torque and speed control.


thank you Richo
i agree with you and BigMouse, i do need a PI speed loop control(at least Integration must be there)
i tried a classic PI speed loop(outer loop) with a current loop(inner loop) based on vector control.
and it turned out not good enough, it can control the speed, but the driving feelings are bad , it is not as smooth as torque control(only a current loop based on vector control)
I tried a EV of Toyota, it feels good and i come to some conclusions:

1.when pedal changes, torque changes immediately and directly
2.speed control take the effect to control vehicle speed "silently" and slowly, "silently" enough that you can hardly notise

User avatar
BigMouse
Senior Member
Posts: 600
Joined: Thu, 28 Oct 2010, 02:39
Real Name: Vincent Tannahill
Location: Silicon Valley
Contact:

how to combine torque control and speed control

Post by BigMouse » Sat, 13 Apr 2013, 00:10

steve cai wrote:i tried a classic PI speed loop(outer loop) with a current loop(inner loop) based on vector control.
and it turned out not good enough, it can control the speed, but the driving feelings are bad , it is not as smooth as torque control(only a current loop based on vector control)
I tried a EV of Toyota, it feels good and i come to some conclusions:

1.when pedal changes, torque changes immediately and directly
2.speed control take the effect to control vehicle speed "silently" and slowly, "silently" enough that you can hardly notise


I think the bottom line is that the you're not meant to be controlling the vehicle speed directly with the pedal position. You do it indirectly by controlling torque. During normal operation, YOU are the PI controller.

steve cai
Noobie
Posts: 10
Joined: Wed, 10 Apr 2013, 19:27
Real Name: steve cai

how to combine torque control and speed control

Post by steve cai » Sat, 13 Apr 2013, 00:55

you are absolutely right
now i have some problems achieving this goal with classic PI, i'm considering to use fuzzy PI control

User avatar
weber
Site Admin
Posts: 2624
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

how to combine torque control and speed control

Post by weber » Sat, 13 Apr 2013, 02:37

Hi Bigmouse and Richo. No, it's not cruise control, and you can certainly do better than either (a) being the speed controller or (b) having something that switches between torque control and speed control.

It's quite possible to have a smooth combination of torque control and speed control as steve cai is asking for. I know because I've done it. I didn't realise that my pedal mapping thread was so unclear on that point. Yes, it can be made to feel like driving an internal-combustion-engine (ICE) car.

But steve, you didn't answer my question. What kind of VSD or motor controller do you have? What is its make and model? When it is running a speed control outer loop, can you still specify a maximum torque or maximum current?

And while we're at it, how about telling us something about yourself and your project? Are you converting an ICE car to electric? And where do you live (Country, State)?
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

steve cai
Noobie
Posts: 10
Joined: Wed, 10 Apr 2013, 19:27
Real Name: steve cai

how to combine torque control and speed control

Post by steve cai » Sat, 13 Apr 2013, 06:09

weber wrote: Hi Bigmouse and Richo. No, it's not cruise control, and you can certainly do better than either (a) being the speed controller or (b) having something that switches between torque control and speed control.

It's quite possible to have a smooth combination of torque control and speed control as steve cai is asking for. I know because I've done it. I didn't realise that my pedal mapping thread was so unclear on that point. Yes, it can be made to feel like driving an internal-combustion-engine (ICE) car.

But steve, you didn't answer my question. What kind of VSD or motor controller do you have? What is its make and model? When it is running a speed control outer loop, can you still specify a maximum torque or maximum current?

And while we're at it, how about telling us something about yourself and your project? Are you converting an ICE car to electric? And where do you live (Country, State)?


thank you weber,now i live in Asia,i googled my problem and found some creative threads here. so i was wondering whether i can discuss it with you guys
i and some of my friends bought an EV with a DC traction motor, it is cheap and not made well,so we began to re-equip it , replacing the dc motor with an induction motor, we made our own controller , some friends did the hardware thing, and i mainly concern about the motor-driving and vehicle control
now after a year or so, our controller seems ready and my software based on vector control works well, i can always control the current(with a current loop) and motor follows my torque command at all speeds. to answer your question , yes,i can still specify a maximum torque or maximum current running a speed loop.
we finally tested it on the EV we bought, and i found torque mode works well , but a speed mode with a PID outer loop doesn't have the right "pedal feel"
do you do vector control as well or do you do V/f ? Would you please describe your method more detailed, thanks a lot

User avatar
weber
Site Admin
Posts: 2624
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

how to combine torque control and speed control

Post by weber » Sun, 14 Apr 2013, 00:19

Hi Steve. I think anyone who has tried them would agree with you that pure speed control from the accelerator feels terrible, and that pure torque control is acceptable, but doesn't give regenerative braking, and is not what we are used to in ICE vehicles.

To implement my blended-torque-and-speed accelerator feel, the AC motor controller definitely needs to use a vector control method. You can't do this with scalar control (V/f). But it doesn't matter if the vector method is Direct Torque Control (DTC) or Field Oriented Control (FOC). I note that "vector control" is often treated as synonomous only with FOC here. And it doesn't matter if it is closed-loop (sensor) or open-loop (sensorless), although better results will always be obtained with closed loop, using a speed sensor such as a rotary encoder.

The motor controller I'm using is the Tritium WaveSculptor 200, which I understand uses a DTC method, specifically Space Vector Modulation (SVM). But that's not essential.

So far we've only been talking about the lowest level of control. To implement my blended-torque-and-speed accelerator feel, the controller needs to have both torque and speed control loops, but it doesn't matter whether this is implemented as torque control with the ability to limit speed, or as speed control with the ability to limit torque. But I will talk in terms of the latter. And of course a torque limit and a limit on active-current (i.e. not including magnetising current) are essentially the same thing.

My method uses a function that has 2 inputs:
The pedal position (p) and
the actual speed of the motor (s).
And it gives 2 outputs:
The requested speed of the motor (S), and
the torque limit (T).

The function assumes that these values are all normalised. That is, the inputs are all scaled from pedal volts and motor rpm to dimensionless numbers between 0 and 1, which you can think of as 0% to 100%. And the outputs are numbers between 0 and 1 which may then need to be scaled back to rpm and amps or newton-metres.

There is an optional 3rd input which is the maximum regen-braking torque (k) as a proportion of maximum forward torque. This may come from a potentiometer on the dashboard. Otherwise it is set to a constant value, typically 0.25, in the function or its call.

This function should be called at least 10 times a second, and preferably 20 or more times a second, for a smooth feel.

I have already described this function in 3 different ways.
1. In algebraic formulae.
2. In graphs.
3. In the actual C source-code that we use in the Tritium Driver Controls unit that reads the pedal and CAN bus speed telemetry, and sends CAN-bus commands to the WaveSculptor motor controller.
These descriptions are here viewtopic.php?title=ac-drive-programmin ... 859#p30613
and here viewtopic.php?title=ac-drive-programmin ... t=3&t=1859 which I understand you have already read.

I don't think I can do better than those 3 kinds of explanation, unless you can give me more detail on what aspect is unclear to you.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

User avatar
Richo
Senior Member
Posts: 3737
Joined: Mon, 16 Jun 2008, 00:19
Real Name: Richard
Location: Perth, WA

how to combine torque control and speed control

Post by Richo » Mon, 15 Apr 2013, 08:12

weber wrote: Hi Bigmouse and Richo. No, it's not cruise control, and you can certainly do better than either (a) being the speed controller or (b) having something that switches between torque control and speed control.
Cruise control switches between torque control and speed control on any standard vehicle.
Why should an EV be any different.
Steve Cai wrote:I hope a pedal can determine a set speed, it means that i have 30% pedal to reach 30% speed(for example) regardless of going up a hill or going down

And to be fair this sounds like CRUISE CONTROL.(except using the pedal)
weber wrote: It's quite possible to have a smooth combination of torque control and speed control as steve is asking for.

Yep but unless he has these options IN the controller he would be stuck using an external box to produce the response he is after.

Weber will your pedal mapping as it is when you put your pedal to 30% make your eV go the same speed(30% of maximum) up and down hills?
So the short answer is NO but the long answer is YES.
Help prevent road rage - get outta my way!

User avatar
woody
Senior Member
Posts: 1715
Joined: Sat, 21 Jun 2008, 02:03
Real Name: Anthony Wood
Location: Mt Colah

how to combine torque control and speed control

Post by woody » Mon, 15 Apr 2013, 11:57

An ICE pedal isn't pure torque control, there is a speed factor complicated by the gearbox - the throttle has a different effect at high revs vs low revs because the air volume intake is very different.
Planned EV: '63 Cortina using AC and LiFePO4 Battery Pack

User avatar
weber
Site Admin
Posts: 2624
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

how to combine torque control and speed control

Post by weber » Mon, 15 Apr 2013, 17:25

Richo wrote:Cruise control switches between torque control and speed control on any standard vehicle.
Why should an EV be any different.
If cruise control is what you want, then it shouldn't be any different.
Steve Cai wrote:I hope a pedal can determine a set speed, it means that i have 30% pedal to reach 30% speed(for example) regardless of going up a hill or going down

And to be fair this sounds like CRUISE CONTROL.(except using the pedal
I agree that, taken literally, this would just be cruise control (pure speed control) using the pedal. But steve also said he has tried pure speed control on the pedal and he doesn't like the feel of it. (And neither does anyone else I know who has tried it.) So if you take this literally, he's contradicting himself.
weber wrote:It's quite possible to have a smooth combination of torque control and speed control as steve is asking for.

Yep but unless he has these options IN the controller he would be stuck using an external box to produce the response he is after.
Sure, which is why I asked him to tell us about his controller. It sounds like he is making his own controller. In fact I wouldn't be surprised if he's really working for an asian controller manufacturer and is just getting free consulting out of me.
Weber will your pedal mapping as it is when you put your pedal to 30% make your eV go the same speed(30% of maximum) up and down hills?

Not exactly. But I contend that's not really what he wants. What mine will do is tend towards 30% of maximum speed at about 30% pedal position (assuming max regen factor (k) is set to 0.25). It will go slower than this uphill and faster than this downhill. This is because although it will have a speed setpoint of 30%, the torque limit will be proportional to how far the actual speed is from the setpoint speed. This is the kind of pedal response you actually get with an ICE. As woody said, ICE pedal is not pure torque control. And of course with an EV you get the added advantage that the "engine braking" actually recovers some energy instead of wasting it all.

BTW, my speed setpoint is not linear with pedal position, but quadratic. See the graphs.
viewtopic.php?title=ac-drive-programmin ... 859#p30613
It just happens to give 30% speed for about 30% pedal with the default regen factor of 0.25. I believe a quadratic relationship is similar to what you get with an ICE, possibly for the reason Woody pointed out in the original thread, namely the throttle-valve opening cross section as a function of angle. It's nice to have finer control at lower speeds too.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

User avatar
Richo
Senior Member
Posts: 3737
Joined: Mon, 16 Jun 2008, 00:19
Real Name: Richard
Location: Perth, WA

how to combine torque control and speed control

Post by Richo » Mon, 15 Apr 2013, 21:14

Yes we have had many decades of unusual throttle responses from petrol cars.
I'm sure after 100 years of use we would be used to pure torque control too.
No one in WA has an eV with mapped vs pure torque for me to try so I'll rely on your experience that pure torque is crap.

To me Steve has asked for, and wants, Torque control but also wants a set speed going up and down hills for "special vehicle applications".

So why can't you add more code to your mapped pedal to say that once the pedal has been in the same position for a set amount of time it holds the speed.
This would then mean the vehicle would go the same speed up and down hills.
Think of it as an auto engaging cruise control.
So the short answer is NO but the long answer is YES.
Help prevent road rage - get outta my way!

User avatar
weber
Site Admin
Posts: 2624
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

how to combine torque control and speed control

Post by weber » Tue, 16 Apr 2013, 01:25

Richo wrote:No one in WA has an eV with mapped vs pure torque for me to try so I'll rely on your experience that pure torque is crap.
I'm sorry I've been such a know-it-all. But I didn't say anything of the kind. I said that pure torque control is acceptable, but doesn't give regenerative braking. I said pure speed control from the accelerator feels terrible.

I have never driven a vehicle with pure speed control on the accelerator pedal, but am basing this on Ross Pink's description from
uploads/690/EvanControlMethod.pdf:
Ross Pink wrote:The vehicle was difficult to control wanting to (not unexpectedly) follow the throttle input religiously up to its current limit. This made it jerky and unforgiving in control and requiring you to learn a technique to drive it smoothly
And I seem to remember acmotor tried pure speed control from the pedal and didn't like it, but I haven't been able to find this in the forum.

One way to think about my pedal mapping is that it is torque control where the zero-torque position of the pedal moves up smoothly as the actual speed increases, thereby enabling accelerator-pedal regen (negative torque).
To me Steve has asked for, and wants, Torque control but also wants a set speed going up and down hills for "special vehicle applications".
You may be right. Sorry I jumped on it before.
So why can't you add more code to your mapped pedal to say that once the pedal has been in the same position for a set amount of time it holds the speed.
This would then mean the vehicle would go the same speed up and down hills.
Think of it as an auto engaging cruise control.

I guess I could. But I suspect it would feel bad because it would be too complex a response function, and would have sharp thresholds: 1. You'd have to decide what constitutes "the same [pedal] position", i.e. a dead-band threshold, and 2. there's the time threshold.

What I will do eventually is have a pot on the dash for the "k" parameter, to let me vary the mapping smoothly from pure torque control (no regen), to something closer to speed control. And if ever decide I want a pure speed control option, I think I would implement it with the usual cruise-control button interface for feet-off operation.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

User avatar
Richo
Senior Member
Posts: 3737
Joined: Mon, 16 Jun 2008, 00:19
Real Name: Richard
Location: Perth, WA

how to combine torque control and speed control

Post by Richo » Tue, 16 Apr 2013, 04:42

I coast a lot in my car and TBH my preference would be to have no regen until the brake is pressed.
But I agree your pedal mapping would suit the majority of drivers.

I'm not too sure what "special vehicle application" requires a set speed from the pedal - tourist train buggy thingy taking passengers for a tour through a zoo perhaps?

Still what happens if you floor it and get to terminal velocity(top speed)
According to the diagram you only need 45% of the pedal to get to max speed.
So when you get to terminal velocity and move the pedal from 50-100%-50%repeatedly will the eV respond in anyway?
So the short answer is NO but the long answer is YES.
Help prevent road rage - get outta my way!

User avatar
weber
Site Admin
Posts: 2624
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

how to combine torque control and speed control

Post by weber » Tue, 16 Apr 2013, 06:16

Richo wrote:Still what happens if you floor it and get to terminal velocity(top speed)
According to the diagram you only need 45% of the pedal to get to max speed.
So when you get to terminal velocity and move the pedal from 50-100%-50%repeatedly will the eV respond in anyway?

My EV has gears, so the max speed we're talking about is the maximum safe rpm of the motor, not the speed of the car. So the result will depend on what gear you are in.

If you're in top gear and the pedal is at 45% then you won't get anywhere near top speed unless you're going down enough of a slope that gravity cancels drag. This is because the mapping makes the torque limit proportional to the difference between actual speed and set speed (as if the speed parabola kept going up past 100%). If you actually reach the set speed, you get zero torque. To get enough torque to overcome drag on the flat you will need to be doing considerably lower than top speed. And to actually reach top speed you will need to push the pedal far enough past the 45% position that you command sufficient torque to overcome the drag at top speed. If everything was matched perfectly, this would happen at 100% pedal in top gear and you would soon be arrested for speeding. Image

If you're in first gear then there will be very little drag at max motor speed so it will get close to max motor speed and so not much will happen when the pedal goes 50%-100%-50%. It will only speed up and slow down a little.

Only in neutral gear will the engine revs exactly follow that speed curve on the graph. So in neutral, nothing will change over the last half of the pedal travel. With pure torque control, in neutral, the tiniest movement of the pedal away from zero will take the motor instantly to max rpm.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

steve cai
Noobie
Posts: 10
Joined: Wed, 10 Apr 2013, 19:27
Real Name: steve cai

how to combine torque control and speed control

Post by steve cai » Tue, 16 Apr 2013, 18:23

weber wrote:Sure, which is why I asked him to tell us about his controller. It sounds like he is making his own controller. In fact I wouldn't be surprised if he's really working for an asian controller manufacturer and is just getting free consulting out of me.
No i'm not.otherwise i would try to "sell" our controller to you guys
my day time job is writing code for an Internet company(PHP ,C++).so i said my friends did the hardware thing because my know little about it.
Also it was hard for me to learn how to control a motor(actually i still can not say i understand it well)

By the way, i don't think any asian controller manufacturer would do what i do(testing it on a real vehicle).

steve cai
Noobie
Posts: 10
Joined: Wed, 10 Apr 2013, 19:27
Real Name: steve cai

how to combine torque control and speed control

Post by steve cai » Tue, 16 Apr 2013, 18:45

weber wrote:
Richo wrote:Still what happens if you floor it and get to terminal velocity(top speed)
According to the diagram you only need 45% of the pedal to get to max speed.
So when you get to terminal velocity and move the pedal from 50-100%-50%repeatedly will the eV respond in anyway?

My EV has gears, so the max speed we're talking about is the maximum safe rpm of the motor, not the speed of the car. So the result will depend on what gear you are in.

If you're in top gear and the pedal is at 45% then you won't get anywhere near top speed unless you're going down enough of a slope that gravity cancels drag. This is because the mapping makes the torque limit proportional to the difference between actual speed and set speed (as if the speed parabola kept going up past 100%). If you actually reach the set speed, you get zero torque. To get enough torque to overcome drag on the flat you will need to be doing considerably lower than top speed. And to actually reach top speed you will need to push the pedal far enough past the 45% position that you command sufficient torque to overcome the drag at top speed. If everything was matched perfectly, this would happen at 100% pedal in top gear and you would soon be arrested for speeding. Image

If you're in first gear then there will be very little drag at max motor speed so it will get close to max motor speed and so not much will happen when the pedal goes 50%-100%-50%. It will only speed up and slow down a little.

Only in neutral gear will the engine revs exactly follow that speed curve on the graph. So in neutral, nothing will change over the last half of the pedal travel. With pure torque control, in neutral, the tiniest movement of the pedal away from zero will take the motor instantly to max rpm.


i am getting to understand weber's mapping , so it is a method that dynamically change the limit torque of speedloop output, can i say that?
i agree with what Richo said, it has chance failing to hold speed when going up a hill, if mainly consideration is regeneration when pedal is released i think torque control will be fine using curves below
Image
so i'm still wondering whether pure speed control is really unacceptable or it's just me that can not achieve it? i'm considering dropping this goal , using torque control instead

User avatar
weber
Site Admin
Posts: 2624
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

how to combine torque control and speed control

Post by weber » Tue, 16 Apr 2013, 20:28

My apologies, steve. But you should note that my suspicions did not change my willingness to help.
steve cai wrote:i am getting to understand weber's mapping , so it is a method that dynamically change the limit torque of speedloop output, can i say that?
Yes! That is one perfectly correct way of describing it. But I gave another way of describing it too -- namely as torque control where the zero-torque point of the pedal moves up from zero-pedal as the actual speed increases, but the zero-torque point never goes past about half-pedal.
i agree with what Richo said, it has chance failing to hold speed when going up a hill,
Right. But you just press the accelerator pedal down a little further to compensate, same as you do in an internal-combustion-engine (ICE) vehicle.

The alternative would be to have very "stiff" control of speed, based on the pedal. That is, to be willing to use whatever torque it takes to maintain the speed specified by the pedal. But if you do that, what happens when you see something that makes you take your foot suddenly off the pedal? Unless you do something more complicated like what Richo suggested with thresholds and timeouts, you will lock up the driving wheels with full negative torque, as it tries to achieve zero speed instantly.
if mainly consideration is regeneration when pedal is released i think torque control will be fine using curves below
Yes! But of course what you have shown, is not pure torque control. The sloping part of the "0% throttle" curve requires feedback of the actual speed. This is exactly what happens with my mapping. In fact you can see the same kind of graphs at
viewtopic.php?title=ac-drive-programmin ... 859#p30678
Here's the graph of my default mapping beside yours.

Image Image

You can ignore the light-blue curve, and the related "or Pedal position" on the vertical axis. And imagine mine squashed down to the same height as yours.

The only difference between my graph and yours is that my zero-pedal curve has a constant slope over the entire speed range, where yours has a discontinuity at some arbitrary speed. And you haven't shown what happens at 25%, 50% and 75% pedal.
so i'm still wondering whether pure speed control is really unacceptable or it's just me that can not achieve it?
I expect you achieved it, and it really is unacceptable from the pedal, except possibly with the sort of "auto-switching cruise control" Richo mentioned. Did your experience of pure speed control agree with Ross Pink's above?
i'm considering dropping this goal , using torque control instead

Good idea to drop (pedal based) pure speed control. But please recognise that you are not talking about pure torque control here either, since you are using speed feedback.

Another way of describing my mapping (and the low speed part of the one you have drawn above) is as a "P-only" speed control loop with very low gain. That is, like a PID loop with a low proportional gain and zero integral and differential gains.

Hmm. That leads me to thinking that maybe I can make a smooth (in both pedal position and in time) version of what Richo suggested, simply by adding a small integral gain along with the small proportional gain I have already. Interesting ...
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

steve cai
Noobie
Posts: 10
Joined: Wed, 10 Apr 2013, 19:27
Real Name: steve cai

how to combine torque control and speed control

Post by steve cai » Wed, 17 Apr 2013, 17:33

weber wrote: Hmm. That leads me to thinking that maybe I can make a smooth (in both pedal position and in time) version of what Richo suggested, simply by adding a small integral gain along with the small proportional gain I have already. Interesting ...


i don't think what Richo suggested can really work well , it differs from car to car. like you discussed above, with torque control maybe this EV can reach 70% max speed by just 30% pedal, then hold still the pedal and PI(or PID) of speed loop begin to work , it will slow the speed(even this process take enough long time). wouldn't people feel strange?

unless, you determine a curve that each pedal is corresponding to a speed based on a lot of test , i am sure it is not linear, it may be improved by this way

User avatar
Richo
Senior Member
Posts: 3737
Joined: Mon, 16 Jun 2008, 00:19
Real Name: Richard
Location: Perth, WA

how to combine torque control and speed control

Post by Richo » Wed, 17 Apr 2013, 21:06

steve cai wrote:wouldn't people feel strange?


Don't touch them then Image Image

In reality you are trying to make the vehicle different to everything else.
Tuning the controller will be car specific anyway.
But true using webers pedal mapping and adding an auto engaging cruise control wont give a linear pedal vs speed.

Why can't you copy an aftermarket Cruise control system and use that to set speed like every other car?

So the short answer is NO but the long answer is YES.
Help prevent road rage - get outta my way!

steve cai
Noobie
Posts: 10
Joined: Wed, 10 Apr 2013, 19:27
Real Name: steve cai

how to combine torque control and speed control

Post by steve cai » Wed, 17 Apr 2013, 23:18

Richo wrote:
steve cai wrote:wouldn't people feel strange?


Don't touch them then Image Image

In reality you are trying to make the vehicle different to everything else.
Tuning the controller will be car specific anyway.
But true using webers pedal mapping and adding an auto engaging cruise control wont give a linear pedal vs speed.

Why can't you copy an aftermarket Cruise control system and use that to set speed like every other car?


good idea

Post Reply