PiBoSo Official Forum

GP Bikes => General Discussion => Documentation => Topic started by: PiBoSo on April 28, 2013, 08:53:11 PM

Title: Direct steer
Post by: PiBoSo on April 28, 2013, 08:53:11 PM
To directly control the torque applied to the handlebars, edit profile.ini and add:
Code: [Select]
[hardcore]
directsteer=1
directsteer_maxtorque=30
directsteer_maxtorque2=0.5

Use negative values to invert the forces.
The second torque scales with speed and then is added to the first one.
Title: Re: Direct steer
Post by: PiBoSo on April 28, 2013, 08:53:51 PM
To directly set the steer angle edit profile.ini and add:
Code: [Select]
[hardcore]
directsteer=2
directsteer_maxangle=20

directsteer_maxangle is the max steer angle, in degrees.
Title: Re: Direct steer
Post by: Hispinkness Prior on May 19, 2013, 11:05:20 AM
To directly control the torque applied to the handlebars, edit profile.ini and add:
Code: [Select]
[hardcore]
directsteer=1
directsteer_maxtorque=30
directsteer_maxtorque2=0.5

Use negative values to invert the forces.
The second torque scales with speed and then is added to the first one.
which doc do we put this in?
Title: Re: Direct steer
Post by: HornetMaX on May 19, 2013, 05:39:44 PM
To directly control the torque applied to the handlebars, edit profile.ini and add:
Code: [Select]
[hardcore]
directsteer=1
directsteer_maxtorque=30
directsteer_maxtorque2=0.5

Use negative values to invert the forces.
The second torque scales with speed and then is added to the first one.
which doc do we put this in?
It's written in the text you quoted: profile.ini

MaX.
Title: Re: Direct steer
Post by: iVolution on July 24, 2014, 10:42:16 PM
Just tried the direct steering thing. Cannot see how that is ever going to work with a controller. Once up to speed it seems doable but I think this stuff is meant for when you actually have handlebars.
Title: Re: Direct steer
Post by: Klax75 on July 25, 2014, 03:43:53 AM
I can use DST, it takes a lot of practice. I don't use Default steering anymore.
Title: Re: Direct steer
Post by: Furious on September 21, 2014, 08:07:57 PM
Hi. I'm here to report (or find out how it should be) that direct steer angle doesn't work as intended (as expected).
As I understand when I use a controller, let's say, a driving wheel and I threat the wheel as the handlebars the angle I turn the wheel should be the same as the angle of the handlebars turned in the GP Bikes. No matter of the speed, no mater of the lean angle, the angle I turn the wheel the bars should turn. The feedback I get is the force that go against me turning the wheel, but if I'm able to overcome that force I can turn the handle bars no matter what. That how it does on every racing sim.

But not in GP Bikes :( As the bike gains some speed the steering has no clear connection to what I do with the wheel. And that's a real problem for me in case the simulator I'm building.
Can anyone explain it to me?
Title: Re: Direct steer
Post by: teeds on September 22, 2014, 03:40:40 PM
But not in GP Bikes :( As the bike gains some speed the steering has no clear connection to what I do with the wheel. And that's a real problem for me in case the simulator I'm building.
Can anyone explain it to me?

The same was confusing me while considering the required axis needed for a sit on controller build. I then just resigned myself to that only lean is going to work with this game. I had thought that to be more realistic I'd need 3 directional axis -

1/. Steering
2/. Bike Lean
3/. Rider Lean

But then noticed the game does not have these, so gave up on it. Then I see this direct steer option, which gave me hope, but it does not work as I had expected at all, as with direct steer on you get to steer but now no lean?

So I though OK I ride road bikes, MX bikes and pushbikes, so how do I ride them.....  ??? I Soon found it's not so easy to articulate verbally, for me anyway, can anyone else? Do we need 3 axis as above to get nearer to the real thing?

Title: Re: Direct steer
Post by: PiBoSo on September 22, 2014, 04:59:30 PM
Hi. I'm here to report (or find out how it should be) that direct steer angle doesn't work as intended (as expected).
As I understand when I use a controller, let's say, a driving wheel and I threat the wheel as the handlebars the angle I turn the wheel should be the same as the angle of the handlebars turned in the GP Bikes. No matter of the speed, no mater of the lean angle, the angle I turn the wheel the bars should turn. The feedback I get is the force that go against me turning the wheel, but if I'm able to overcome that force I can turn the handle bars no matter what. That how it does on every racing sim.

But not in GP Bikes :( As the bike gains some speed the steering has no clear connection to what I do with the wheel. And that's a real problem for me in case the simulator I'm building.
Can anyone explain it to me?

Are you using directsteer=2?
Title: Re: Direct steer
Post by: Furious on September 22, 2014, 06:40:44 PM
Yes I do. I can make a video to explain completely how that works for me.
Title: Re: Direct steer
Post by: HornetMaX on September 22, 2014, 07:21:11 PM
The same was confusing me while considering the required axis needed for a sit on controller build. I then just resigned myself to that only lean is going to work with this game. I had thought that to be more realistic I'd need 3 directional axis -

1/. Steering
2/. Bike Lean
3/. Rider Lean

But then noticed the game does not have these, so gave up on it. Then I see this direct steer option, which gave me hope, but it does not work as I had expected at all, as with direct steer on you get to steer but now no lean?

So I though OK I ride road bikes, MX bikes and pushbikes, so how do I ride them.....  ??? I Soon found it's not so easy to articulate verbally, for me anyway, can anyone else? Do we need 3 axis as above to get nearer to the real thing?
On a real bike you don't have an independent bike lean input: the bike leans due to the torque you apply to the handlebar and due to your body movements.
That's why if you use direct steer you have no lean input (and rightly so).

Making a sit-on controller that tries to mimic a real motorbike is tough. Very tough. Most of the people I've seen trying this have given the dream up or have ended up with something much farther from their initial objective (maybe still enjoyable, but that's not the same thing).

From a purely theoretical standpoint you'd need:

Notice how the steering works: you do not dictate the handlebar angle directly. You apply a torque, then GPB "decides" how the handlebar will move due to the combination of your input and the other torques acting on the front head (coming from road-tire interaction, centrifugal forces and gyro torques).

Even with that (which is very very tricky to build), it won't be perfect as you'd miss the interaction between your body and the chassis (which are kind of simulated by 2 input axis for rider lean).
Potentially you could put the same sort of torque sensor on the controller frame lean axis, but then GPB should provide an additional input.

It's a very very high call for a mere passionate.

MaX.

Title: Re: Direct steer
Post by: Furious on September 22, 2014, 07:33:20 PM
I mainly agree with you beside 1 thing.
Quote
Notice how the steering works: you do not dictate the handlebar angle directly. You apply a torque, then GPB "decides" how the handlebar will move due to the combination of your input and the other torques acting on the front head (coming from road-tire interaction, centrifugal forces and gyro torques).

All of the Direct input controllers works other way. You decide of the angle you turn and the sim counters it with the calculated forces put on the steering wheel. Mainly there is no real difference between torque steering and angle steering cause all comes to the 1 thing, the handlebars turn angle. How you compute it doesn't matter. In my opinion the angle steereing is more natural due to the actual, real handlebars turns.

But everything else I agree with. Following, my simulator will have 2 axis (pitch and roll) to simulate acceleration and bike movement. Visual head tracking for VR and defining biker position on the bike ( bikers lean) and the force feedback handlebars. But I need that one last "ingredient" to work right.
Title: Re: Direct steer
Post by: HornetMaX on September 22, 2014, 10:05:34 PM
I mainly agree with you beside 1 thing.
Quote
Notice how the steering works: you do not dictate the handlebar angle directly. You apply a torque, then GPB "decides" how the handlebar will move due to the combination of your input and the other torques acting on the front head (coming from road-tire interaction, centrifugal forces and gyro torques).

All of the Direct input controllers works other way. You decide of the angle you turn and the sim counters it with the calculated forces put on the steering wheel.

I agree,  but in a true physical model you cannot input an angle, you can only input a torque. On your real bike or car, you don't input an angle, you input a torque: the bike/car then "decides the angle" (assuming no power steering for the car). You try to set the angle to what you want applying a torque. So in a usual controller, you set the angle but the sim behind has somehow to convert this into a torque. 

Mainly there is no real difference between torque steering and angle steering cause all comes to the 1 thing, the handlebars turn angle. How you compute it doesn't matter.

I disagree, there's a big difference. The current system (what you find on steering wheels) is easier to implement: you only need a rotational encored + a motor and some electronics to control the motor to produce the desired torque (not that hard). If one had to do what I was saying you'd need a torque sensor and some electronics to make a full control loop on the motor (able to set and maintain a specific position).

I'd need to think a bit more about that whole thing, but my guess would be that with usual systems (g25/27 etc) you should use direct steer angle, but you'll be liable to wide discrepancies between the angle you set and what you see in the game (at least during transient phases).

If you had a controller with a torque sensor, you should use direct steer torque and the overall feeling should be better. But maybe the controller would have to be extremely expensive in order to have the necessary performance.

MaX.
Title: Re: Direct steer
Post by: Furious on September 22, 2014, 10:17:55 PM
I agree that in real life you steer with torque. You use the (force x radius of the steering wheel=) torque to put the wheel in THE ANGLE YOU WANT. And it's the same thing everywhere. We can also say that "direct angle " mode is really also the "give me the torque" mode. Why? Cause if the FF works fine ( calculates the forces on the handlebars depending on the bike dynamics, tires friction ect) and you still want to turn that wheel by using force, you can calculate the force you are working with with the following variables:
- Force produced by FF
- derative by time of angle value.

If the FF forces it with 1 NM but the wheel is not moving, than? You know the answer.

And I still claim that in proper simulator you need the "turnable" handlebars as they turn in RL
Title: Re: Direct steer
Post by: HornetMaX on September 22, 2014, 11:26:51 PM
I agree that in real life you steer with torque. You use the (force x radius of the steering wheel=) torque to put the wheel in THE ANGLE YOU WANT. And it's the same thing everywhere. We can also say that "direct angle " mode is really also the "give me the torque" mode. Why? Cause if the FF works fine ( calculates the forces on the handlebars depending on the bike dynamics, tires friction ect) and you still want to turn that wheel by using force, you can calculate the force you are working with with the following variables:
- Force produced by FF
- derative by time of angle value.
Sure, except that doing time derivatives of noisy signals is messy: if there's too much noise or the signals changes too fast, you end up with extremely large torque signals or, in order to filter them, with delays in the loop. Could be bad.

And I still claim that in proper simulator you need the "turnable" handlebars as they turn in RL
Oh I think you've misunderstood my post (my fault maybe, maybe it wasn't that clear).

In what I was saying, the bars would be turnable, of course (no sense otherwise). The difference would be that the bars output is a torque (and not an angle).
The torque is directly read by a torque sensor, instead of being computed from an angular measurement in an indirect manner.

The bar position will be "set by the game" (more precisely, the control device will have a control loop that will track the target bar position computed by the sim). Of course, applying a torque on the bars will alter the bar angle, as the applied torque is simply added to the "environment" torque by the sim in order to compute the evolution of the (target) bar position.

In a conventional system, the control device sends an angle to the sim and the sim sends a force (feedback) to the control device.
In what I was saying it's the opposite: the control device sends the torque to the sim and the sim sends an angle to the control device (angle that will be implemented by the device, i.e. the bars will turn in this case too). This mimics more naturally the physical model of the bike.

Most likely, generating a torque and reading an angle (usual systems) is cheaper than generating an angle and reading a torque. But the end result may not be the same.
In principle, they are equivalent, in practice it may be a different story.

To a certain degree it is the same difference you can have on these two pedal (or lever) brake systems:

MaX.
Title: Re: Direct steer
Post by: Furious on September 23, 2014, 12:19:17 AM
I agree that in real life you steer with torque. You use the (force x radius of the steering wheel=) torque to put the wheel in THE ANGLE YOU WANT. And it's the same thing everywhere. We can also say that "direct angle " mode is really also the "give me the torque" mode. Why? Cause if the FF works fine ( calculates the forces on the handlebars depending on the bike dynamics, tires friction ect) and you still want to turn that wheel by using force, you can calculate the force you are working with with the following variables:
- Force produced by FF
- derative by time of angle value.
Sure, except that doing time derivatives of noisy signals is messy: if there's too much noise or the signals changes too fast, you end up with extremely large torque signals or, in order to filter them, with delays in the loop. Could be bad.

And I still claim that in proper simulator you need the "turnable" handlebars as they turn in RL
Oh I think you've misunderstood my post (my fault maybe, maybe it wasn't that clear).


You are right. I Misunderstood and I agree now. I think the subject is cleared and I'm happy w both understant eachothers perspective. We shouldn't go "off topic" no more in this thread. ;) Maybe some moderator can split it or something.
Title: Re: Direct steer
Post by: doubledragoncc on October 30, 2014, 01:48:14 PM
Hi guys.

@Max

Quote :- In what I was saying, the bars would be turnable, of course (no sense otherwise). The difference would be that the bars output is a torque (and not an angle).
The torque is directly read by a torque sensor, instead of being computed from an angular measurement in an indirect manner.

The bar position will be "set by the game" (more precisely, the control device will have a control loop that will track the target bar position computed by the sim). Of course, applying a torque on the bars will alter the bar angle, as the applied torque is simply added to the "environment" torque by the sim in order to compute the evolution of the (target) bar position.

In a conventional system, the control device sends an angle to the sim and the sim sends a force (feedback) to the control device.
In what I was saying it's the opposite: the control device sends the torque to the sim and the sim sends an angle to the control device (angle that will be implemented by the device, i.e. the bars will turn in this case too). This mimics more naturally the physical model of the bike.

Most likely, generating a torque and reading an angle (usual systems) is cheaper than generating an angle and reading a torque. But the end result may not be the same.
In principle, they are equivalent, in practice it may be a different story.

To a certain degree it is the same difference you can have on these two pedal (or lever) brake systems:

    The usual system: you have a spring of known stiffness and a position sensor (usually a potentiometer): from the position sensor and the stiffness you can compute the force applied.
    The better system: a load cell, where there's no actual movement (past a certain point) and a torque is directly read.

Unquote


I thought I would add a bit of actual testing with load-cells and other ways to implement real life physics into a control system. I have been testing for a long time and the truth is that the way you think about it is almost impossible to simulate correctly. The biggest problem is that when using a load-cell for torque output to the sim, it is FAR to sensitive when just sitting  in a room. I will try and explain it as best I can, but it is something you need to FEEL to really understand. With a load-cell you have practically only a few millimeters of movement at most, now imagine if the thumbstick on a gamepad which most use for steering, could only move 1 to 2mm each left or right, it would be impossible to control the steering of the bike. Not only this but with load-cells would need to have one for the left and one for the right inputs, this would take 2 axis on a controller to input to the sim. A load-cell has to go through a load-cell accelerometer to be able to communicate to the computer as a load-cell has 4 connections but every control board for analog input works on a 3 connector system and also has to have the measurements from the load-cell interpreted to a voltage output for the control board to send the signal to the computer, then to the sim the right way.

I hope this clears the point of how difficult it is to simulate just one input needed for Direct Steer, as it all leads back to the difference of sitting in a room and riding a real bike. I am working on new designs and have just contacted Leo Bodnar about making a bike system together. He is very interested and if there is anyone who can find an electronic answer to this problem it will be Leo.

I think this is the only true way to have the control of the bike, but wonder if it is leading away from reality as to the fact that too many are expecting a sim to be able to be 100% like in real life when in reality you can NOT simulate the forces of nature sitting in a room as apposed to being on a real bike. There has to be a point of limitation and many forget that a sim should be for everyone not just the experts at it.

This is a great thread and very helpful to understanding how you are all dealing with direct steer. The more posted here the more it will be able to help each user of it.

Keep it sunny side up guys

DD   
Title: Re: Direct steer
Post by: HornetMaX on October 30, 2014, 02:05:02 PM
The biggest problem is that when using a load-cell for torque output to the sim, it is FAR to sensitive when just sitting  in a room. I will try and explain it as best I can, but it is something you need to FEEL to really understand. With a load-cell you have practically only a few millimeters of movement at most, now imagine if the thumbstick on a gamepad which most use for steering, could only move 1 to 2mm each left or right, it would be impossible to control the steering of the bike.
Hi DD,

I mentioned load cells only as an analogy, for a steering input they may not be the right solution (what one would really need is a torque sensor).

Notice however that theoretically in my configuration the load cell is mounted on the part that realizes the angle, so the whole thing would move even if the load cell has zero movement intrinsically.

MaX.
Title: Re: Direct steer
Post by: doubledragoncc on October 30, 2014, 03:17:58 PM
Thanks for that Max.

OK, so now we have 1 axis input for left torque, 1 axis for right input torque, 1 for lean angle left and right and still no rider lean!!! Thats 3 physical inputs for 2 actions and no software to support it not even GPB I think?, as his coding for the torque is for only one input axis if L am correct, or not?

With this said you also have to consider the actual movement you are making with the bars and having to separate the 2 actions, your talking a lot of work and money for this to happen and be reliable, precise, and realistic as possible. I have been working on a design that actually has this, but it is something that would have to be very very robust, pretty heavy and expensive. I reality, in order to have a controller work realistically, the sim would have to be written so that it has an axis input for left and an input axis for right when it come to a measurement for torque or any kind of pressure input as they can only be measured individually. The only possible way l have been playing with is pure accelerometers and gyros, but not found one yet that is quick enough for the right signal for steering response.  I am hoping that Leo Bodnar will be able to help with this. I am working on new designs with Direct Steer as a main point and am putting a proposal together to send Leo next week.

All your thoughts are of great help Max, you give so much to this community, thanx buddy

DD
Title: Re: Direct steer
Post by: doubledragoncc on October 30, 2014, 03:25:04 PM
OH l just had a brainfart..........

What if l used 2 load-cells and wired them some way that one gave a possitive reading and the other a negative to on axis, and while both were not being applied pressure the axis would be centered, then depending on which load-cell received pressure, the axis would think of a left or right input????

I am not an electronics guy to that degree, but as far as l know load-cells work only one way, BUT maybe l can think along this line more, what you think MAX?

DD
Title: Re: Direct steer
Post by: HornetMaX on October 30, 2014, 03:53:11 PM
For sure a single load cell is "one direction only".
Combining two is theoretically possible (not sure it's easy in practice).
But again, I don't think that load cells on a steering axis are the way to go.

To be honest, doing what I described may turn out to be very complex, which would explain why it hasn't been done yet.

MaX.
Title: Re: Direct steer
Post by: doubledragoncc on October 30, 2014, 04:16:54 PM
Too true buddy.
 
The one thing that l still dont know though is the fact that, is direct steer more realistic than normal steering only because of the physics behind it in real life, or is normal steering still realistic, but not requiring so many inputs. Put another way. Does this mean normal steering in GPB is wrong so far as the physics go, ei: not realistic from input to how the bike reacts? meaning that normal steering is just an arcade input as apposed to a sim?

To put it plainly. Is it necessary to have a complicated controller or one that gives the same end effect, the right input and feels good, but everyone can afford?
Title: Re: Direct steer
Post by: HornetMaX on October 30, 2014, 08:50:45 PM
Personally, I think it's hard to say if direct steer or normal steer is more realistic.
Theoretically, with direct steer you have the same input (handlebar torque) as on a real bike.
But in practice normal steer seems to be closer (in terms of ease of use, at least) of what you experience on a real bike.

MaX.
Title: Re: Direct steer
Post by: h106frp on December 24, 2014, 01:10:16 AM
An old thread, reading due to some servo stuff i am tinkering with(force feedback tinkering) and noticed a misunderstanding in the thread. Do this all the time at work so...

To measure torque the sensor required is a strain gauge bridge attached to the steering tube, the elements are at 45 degrees (to the long axis of the tube) to sense torsional stresses only (the twisting)  in the tube. The output is resolved using a whetstone bridge formed by the strain gauges, 2 wires supply the constant voltage supply, 2 are the output. The sensor gives + and - magnitudes for clockwise and anticlockwise torsional loads so only 1 'sensor' is required. The output is small and requires an amplifier to raise the signal to something suitable for a microprocessor, you can get a higher output using semi-conductor gauges rather than the more usual foil type gauges. All very standard engineering and could easily be applied to extract the torque in the steering tube.

Restraining the force feedback force will create an output from the sensor which will be your total steer input.

Yes, i do have a 'nerdy' day job  :D



Title: Re: Direct steer
Post by: HornetMaX on December 24, 2014, 09:17:12 AM
Indeed. But in GPB the torque input (using DST) is not the total steer input, it's just the rider-generated torque, so you should "subtract" the force feedback from the output of your sensor and feed that into GPB. That may prove to be a bit tricky to do properly.

In your experience, how would such sensor perform in terms of resolution, response time, noise etc ?
Would it be OK for our purpose ?

MaX.
Title: Re: Direct steer
Post by: h106frp on December 24, 2014, 09:54:13 AM
The sensor has incredible resolution and is only limited by the noise level in the complete system, probably the AD converter of the microcontroller, band width at the sensor is theoretically infinite using DC excited bridge, the limit will be the microcontroller sampling rate, it will be well beyond the response of the servo system anyway as this will be the response time limit due to the motor inertia.

Using shielded cables and shielding the sensor grids the noise level can probably be ignored for this application, the trick is to raise the torque locally by reducing the shaft cross section where the sensor is mounted and use a reasonable exciting voltage say 10 or 12 volts, the voltage is limited by the gauges ability to sink the heat into the substrate, using an aluminum tube and a gauge with a decent grid area lets you sink quite a bit of power without the gauge heating and possibly drifting - we are in the world of instrumentation quality measurements at this point :) and probably far more accurate than we require for a controller.

As an aside, side sticks for combat aircraft use strain gauge technology as a more reliable method of measuring input forces rather than just displacements.

Last time i looked you could get foil type gauges from RS, low noise, low offset, high input impedance op-amps are cheap and easily available these days, so its doable for home engineering.

The sensor could be used to generate the servo demand vs torque base calibration as well to give you your base values to offset rider input.

Google 'strain gauge shaft torque measurement' to get an idea of the arrangement, its not as complex as it sounds :) and has been used for years.

The big advantage of this approach is you get a true torque measurement, trying to use load cells you will have to resolve the turning moments and you get errors from bending forces etc.

edit:You can get strain gauge bits on the but, but noticed these..
http://www.hella.com/microsite-electronics/512.html (http://www.hella.com/microsite-electronics/512.html)
They use the 'skin effect' to sense the stresses in the steering tube and output angle and torque for electric steering systems, looks like you could pull one from a scrasp car to try, seems vauxhalls and fiats use them in the power steering system so i guess many others as well, some on the bay for merivas have the complete mini colum so would probably be a good starting point.
Title: Re: Direct steer
Post by: HornetMaX on December 24, 2014, 11:04:11 AM
Very interesting. I guess the real reason why none of this has already reached the game market is that there's no software accepting torque as an input. Except GPB, of course :)

Also, probably car sims do not really need that, the feeling is good enough with classical input devices with FFB. But no one realy knows that for sure, until somebody tries this out.

MaX.

Title: Re: Direct steer
Post by: h106frp on December 25, 2014, 11:58:43 AM
Thinking a bit more, the strain gauge will measure rider input only as its the reaction to the FF trying to obtain bar angular position, if you release the bars - no torque generated in the steer tube. As long as the end stops are on the input gear and not the bar end it would always work as the motor would not produce any torque in the steer tube above that generated by the inertia of the bars/top yoke.

Might be the way to go, shall have a look on the junk shelves at work after Christmas and see what fruit the can bear :)

Need to get a bar system working first though, just snagged prilla RS125 bars on ebay, they have the top yoke and bars as one unit so easier to work with and just got a servo working properly from a scooter motor, gearing system is the next hurdle. Just going to try and get the steer axis working first as this seems the most important for proper feel.

Happy Christmas to all.. time for turkey and sprouts :)
Title: Re: Direct steer
Post by: HornetMaX on December 25, 2014, 01:23:10 PM
Thinking a bit more, the strain gauge will measure rider input only as its the reaction to the FF trying to obtain bar angular position, if you release the bars - no torque generated in the steer tube
Hmm .. that would be the case if the the angular position dictated by GPB was perfectly implemented by the device (i.e. infinite torque, infinite bandwidth, or let's just settle for "big enough"). Or, in a practically useless case, if the handlebars were fixed, not movable.

Imagine this: the motor applies zero torque, the rider 1Nm. As the bars are rotating freely (or almost), the strain gauge will measure nothing at all. So they don't measure directly the rider torque, but something that depends on both, rider torque and motor torque.

I'm under the impression you will have to go down a more complex way (something like what described in what you posted a while ago: http://forum.piboso.com/index.php?topic=1781.msg25111#msg25111 (http://forum.piboso.com/index.php?topic=1781.msg25111#msg25111)).

Essentially, you know the torque applied by the motor, you know what the strain gauge sensor sees: you now have to compute the rider-applied torque. Even if the strain sensor is "near-perfect", you have to keep the motor dynamics into account.

MaX.
Title: Re: Direct steer
Post by: h106frp on December 25, 2014, 03:36:38 PM
But if the force feedback is 0 torque the rider cannot input a torque either, just displace the bars, only a reaction between both creates a resultant torque
Title: Re: Direct steer
Post by: HornetMaX on December 25, 2014, 04:14:29 PM
But if the force feedback is 0 torque the rider cannot input a torque either, just displace the bars, only a reaction between both creates a resultant torque
Hmm ... there will be no force feedback, at least not as we know it.

GPB will dictate a bar position (angle), a control loop will use the motor to put the bars at that angle. GPB will not have to pass a FFB signal to the device, only the current bar position. The control loop will take care of putting the bars at that position (and holding them there), generating the necessary torque.

Imagine the bars are in the middle, and the rider is applying 1Nm left: to keep the bars there the control loop will have to generate 1Nm right: your sensor will pick up exactly 1Nm (with the correct sign), the rider-applied torque.

Now imagine that the environment torque (in GPB) goes down (for whichever reason): the front will turn left a bit.
The new position is passed to the device and in order to move the bars to the new position the torque generated by the device will go down: as the rider torque is still 1Nm, the bars will turn left. All fine up to here.

Once the final position is reached, the device will generate 1Nm right, to perfectly balance the 1Nm left generated by the rider.
But in the transient phase let's assume the device torque was 0.5Nm right: the sensor will no longer pick up 1Nm, even if the rider torque is still 1Nm. That's because the bars (the real ones and the GPB ones) are turning and some torque is spent to accelerate them.

That "missing" torque can in principle be computed (measuring the angular acceleration of the bars and knowing the inertia), but it's typically much better to use a proper observer.

MaX.
Title: Re: Direct steer
Post by: h106frp on December 25, 2014, 06:03:04 PM
Lucky I have a 'proper' servo controller, can choose between torque or position in the feedback loop. We should be able to compute velocity and acceleration from the rate of change in angular position. I think this will need to wait until I get the steering rig built sometime in the new year.
Title: Re: Direct steer
Post by: HornetMaX on December 25, 2014, 08:35:17 PM
Lucky I have a 'proper' servo controller, can choose between torque or position in the feedback loop. We should be able to compute velocity and acceleration from the rate of change in angular position. I think this will need to wait until I get the steering rig built sometime in the new year.
You should set it on 'position' (set point given by GPB). But I fear that computing velocity and acceleration from the angular position won't be enough.

The other approach (the usual one) would be to set your controller to torque and have its set point taken from GPB FFB output.
The angular position of the bars would then be the input of GPB. In that configuration, Direct Steer Angle is what makes sense.

Plenty of things to play with :)

MaX.
Title: Re: Direct steer
Post by: h106frp on December 25, 2014, 09:59:59 PM
Think i will start with torque mode control until i get the mechanical side built as i suspect this will take a while to get right, then dabble with the other modes and monitor signals from the servo controller to see what works best. I know from experience that low frequency acceleration is a pain to measure directly as the output from an accelerometer will be small, velocity and displacement are easier then differentiate/integrate as required to get acceleration.

Thanks for the input, its very much a 'chicken and egg' type problem and needs a lot of thought/trial and error to get right :) If i get something that's better than my old thrustmaster bars i will be quite happy, spring return like a joystick just feels all wrong to me. Decent analogue throttle and brake will be a bit improvement as well especially with the higher power bike physics.

Just wondering if a MEMS gyro might be a better way of measuring bar rotational velocity?
Title: Re: Direct steer
Post by: HornetMaX on December 26, 2014, 10:26:25 AM
MEMS could be an option, for both speed and acceleration. Still to be checked if it's really needed.

If I find the time, I can try to write down the overall system (in something like matlab/simulink, or maybe just hand-write the equations): probably worth to spend a bit of time thinking before taking the jump :)

@admins: maybe we could clean up this thread (and leave only Piboso's posts) and split the interesting discussion to a separate post.

MaX.
Title: Re: Direct steer
Post by: h106frp on December 26, 2014, 10:57:24 AM
That would be great, still struggling with all the parameter interactions. MEMS is surprisingly cheap and looks fairly simple to implement.

Sorry for causing the thread to divert, discussion just seemed to evolve :)
Title: Re: Direct steer
Post by: HornetMaX on March 03, 2015, 08:55:29 PM
To directly control the torque applied to the handlebars, edit profile.ini and add:
Code: [Select]
[hardcore]
directsteer=1
directsteer_maxtorque=30
directsteer_maxtorque2=0.5

Use negative values to invert the forces.
The second torque scales with speed and then is added to the first one.

Not sure I get the "second torque" part right: how does it scale with speed exactly ?

MaX.
Title: Re: Direct steer
Post by: tseklias on March 03, 2015, 11:07:14 PM
To directly control the torque applied to the handlebars, edit profile.ini and add:
Code: [Select]
[hardcore]
directsteer=1
directsteer_maxtorque=30
directsteer_maxtorque2=0.5

Use negative values to invert the forces.
The second torque scales with speed and then is added to the first one.

@Piboso, can the two types of diret steer you provide be split out in two different controllers working at the same time?

eg: can i connect two logitech g25s and use one for handlebar steer and the other one for lean steer?
Title: Re: Direct steer
Post by: PiBoSo on March 04, 2015, 03:14:40 PM
To directly control the torque applied to the handlebars, edit profile.ini and add:
Code: [Select]
[hardcore]
directsteer=1
directsteer_maxtorque=30
directsteer_maxtorque2=0.5

Use negative values to invert the forces.
The second torque scales with speed and then is added to the first one.

Not sure I get the "second torque" part right: how does it scale with speed exactly ?

MaX.

Linearly.
Title: Re: Direct steer
Post by: HornetMaX on March 04, 2015, 08:00:31 PM
speed (in m/s I guess) * 0.5 ?

Isn't there any limitation to the max torque a rider can generate with direct steer torque ?
Also, is there any limitation on the torque the virtual rider generates (in direct steer angle and in usual non-direct steer mode) ?

MaX.
Title: Re: Direct steer
Post by: passerBy on April 19, 2017, 03:02:43 AM
@Piboso,
Could you please explain the second DS mode in more detail? From what I can tell, it's more of a hybrid. Do I understand it correctly that it's more of an angle command up to higher speeds, where it starts acting more like the directsteer=1 angle to torque mapping (to a certain degree)?

Also, I think it would be better to have the max angle parameter optional, so that if it's missing or set to 0, the actual angle would be taken from the bike's lock every time the bike is changed. Ideally, with the soft-lock in FFB wheels being set to the same angle (multiplied by 2, of course).
Title: Re: Direct steer
Post by: PiBoSo on April 19, 2017, 08:26:40 PM
@Piboso,
Could you please explain the second DS mode in more detail? From what I can tell, it's more of a hybrid. Do I understand it correctly that it's more of an angle command up to higher speeds, where it starts acting more like the directsteer=1 angle to torque mapping (to a certain degree)?

Also, I think it would be better to have the max angle parameter optional, so that if it's missing or set to 0, the actual angle would be taken from the bike's lock every time the bike is changed. Ideally, with the soft-lock in FFB wheels being set to the same angle (multiplied by 2, of course).

The second direct steer mode is meant for a real handlebar with force feedback.
A PID controller uses torque to reach the target steer set by the input.
The "maxangle" parameter is meant to be the max lock of the real handlebar. It is needed to match real and virtual rotation.

Unlike the first directsteer mode, it is not hybrid. It uses the same PID controller regardless of bike velocity and "lowspeed" control.
Title: Re: Direct steer
Post by: passerBy on April 20, 2017, 12:07:05 AM
The second direct steer mode is meant for a real handlebar with force feedback.
A PID controller uses torque to reach the target steer set by the input.
The "maxangle" parameter is meant to be the max lock of the real handlebar. It is needed to match real and virtual rotation.

Unlike the first directsteer mode, it is not hybrid. It uses the same PID controller regardless of bike velocity and "lowspeed" control.
In other words, if the controller's lock (times two) and the max angle value are both set to the bike's lock angle, the physics engine will always try to turn the virtual handlebars to the exact same angle as the current angle of the controller, even if it would take extreme amounts of rider's input torque, right? And at the same time, it tries to set the controller's angle so that it would exactly match the virtual bars to the best of the force feedback abilities.

And if I had a strong enough direct drive wheel (preferably with a handlebars addon), it would give me an experience coming very close to real life.

Judging by the jolts my Logitech G27 generates sometimes even on lower FFB levels, I think a direct drive wheel might be simply dangerous. Maybe it makes sense to add some kind of an FFB filter that would smooth out these peaks?
Also, in the center it feels too vague. Would be great if there was an option to set the "minimum force" for FFB as in other titles (WRS and KRP users would benefit from this as well).
Title: Re: Direct steer
Post by: HornetMaX on April 21, 2017, 08:40:12 AM
In other words, if the controller's lock (times two) and the max angle value are both set to the bike's lock angle, the physics engine will always try to turn the virtual handlebars to the exact same angle as the current angle of the controller, even if it would take extreme amounts of rider's input torque, right?
If I recall correctly, there's a cap to the force the virtual rider can generate (rest is OK, GPB will try to align its virtual bars to the angle you have on your wheel/controller, via the PID control loop).

And at the same time, it tries to set the controller's angle so that it would exactly match the virtual bars to the best of the force feedback abilities.
No. With DS2/DSA it's you dictating the angle to GPB, not GPB dictating the angle to your wheel. You can't have both at the same time.
You set the angle on your wheel (fighting the FFB sent by GPB to your wheel) and GPB tries to match it.
This means that strictly speaking, the two angles (your controller's one and GPB's virtual bars one) will not be identical at any given time: when you change suddenly your controller's angle, it will take some time to GPB to align and it may align in a smooth manner or it may overshoot it and oscillate a bit around it, it all depends on the PID settings and the bike physics. But it may be that the tracking (virtual bars following your real bars) is good enough to be unnoticeable.
 
On paper there may be a "dual" strategy but it would need an input device that today does not exist: GPB sends the bars angle to the wheel and the wheel tries to align to that angle (fighting your input, using a control loop like the PID in DSA). At the same time the wheel reads the torque you apply to it (only that torque, net of the torque it generates by itself) and sends it to GPB (that's hence DST/DS1). But again, there's zero warranty that would be any better than DSA/DS2 and we have no such device available.

Also, in the center it feels too vague. Would be great if there was an option to set the "minimum force" for FFB as in other titles (WRS and KRP users would benefit from this as well).
I suspect PiBoSo just does not like the idea of adding artificial FFB stuff.
Title: Re: Direct steer
Post by: passerBy on April 21, 2017, 09:33:13 AM
In other words, if the controller's lock (times two) and the max angle value are both set to the bike's lock angle, the physics engine will always try to turn the virtual handlebars to the exact same angle as the current angle of the controller, even if it would take extreme amounts of rider's input torque, right?
If I recall correctly, there's a cap to the force the virtual rider can generate (rest is OK, GPB will try to align its virtual bars to the angle you have on your wheel/controller, via the PID control loop).
Well, that makes sense. Would be nice to be able to actually create a customized rider using a set of parameters including the maximum force.

Quote
And at the same time, it tries to set the controller's angle so that it would exactly match the virtual bars to the best of the force feedback abilities.
No. With DS2/DSA it's you dictating the angle to GPB, not GPB dictating the angle to your wheel. You can't have both at the same time.
You set the angle on your wheel (fighting the FFB sent by GPB to your wheel) and GPB tries to match it.
I shift my weight to a side (using the rider L/R lean), the bars drop to that side. Also, on a slope the bars tend to turn into the direction of the slope. Not to mention that I do feel what appears to be meaningful FFB (albeit with some weird jolts happening even while at a standstill and with the infamous Logitech's empty center problem), which doesn't appear to be purely reactive at all.

You really need to give the DS2 + FFB a try, Max. I know you won't believe me that it is this good, but at least give it a try when you can (remember to keep the steering ratio 1:1, though).

Quote
This means that strictly speaking, the two angles (your controller's one and GPB's virtual bars one) will not be identical at any given time: when you change suddenly your controller's angle, it will take some time to GPB to align and it may align in a smooth manner or it may overshoot it and oscillate a bit around it, it all depends on the PID settings and the bike physics. But it may be that the tracking (virtual bars following your real bars) is good enough to be unnoticeable.
That's a pretty obvious idea. And it made me assume that the DS2 could be a hybrid mode. Also, this is why I thought a hybrid mode could be a good middle ground for those not wanting to learn any of the two current direct steering modes. After all, nothing prevents us from uncoupling the virtual bars from the controller completely to handle some instantaneous high steering rate stabilization action (or a banal tank-slapper for that matter).
 
Quote
On paper there may be a "dual" strategy but it would need an input device that today does not exist: GPB sends the bars angle to the wheel and the wheel tries to align to that angle (fighting your input, using a control loop like the PID in DSA). At the same time the wheel reads the torque you apply to it (only that torque, net of the torque it generates by itself) and sends it to GPB (that's hence DST/DS1). But again, there's zero warranty that would be any better than DSA/DS2 and we have no such device available.
I'm pretty sure that's exactly how the directeer=2 mode works. Except, it takes the resulting angle and derives the torque you apply from it.
Might sound like a sloppy solution (no way to go around that), but the bottom line here is that it works. It works so good in fact, I forgot about any other sims beside GPB and MXB. Now, if only there was a way to do something about the violent shaking of the wheel with no apparent reason...

Quote
Also, in the center it feels too vague. Would be great if there was an option to set the "minimum force" for FFB as in other titles (WRS and KRP users would benefit from this as well).
I suspect PiBoSo just does not like the idea of adding artificial FFB stuff.
Oh, come on, it's not artificial stuff. It's just a filter and a sort of an equalizer (by the way, why have nobody thought of an actual equalizer for FFB devices yet?). And contrary to so called canned effects, these two things would be extremely helpful.
Title: Re: Direct steer
Post by: HornetMaX on April 21, 2017, 10:44:45 AM
I shift my weight to a side (using the rider L/R lean), the bars drop to that side. Also, on a slope the bars tend to turn into the direction of the slope.
That's normal: bike leaning, the front tends to fall inside, so GPB will send to the wheel a torque to make your bars turn accordingly. If you don't compensate that exactly with your hands, your bars will turn. I see no issue here.

You really need to give the DS2 + FFB a try, Max. I know you won't believe me that it is this good, but at least give it a try when you can (remember to keep the steering ratio 1:1, though).
I never said it's not good. I actually proposed it to PiBoSo as an alternative to DST. I've always told to others that DSA/DS2 is on paper a better approach with the input devices we have (joypad and FFB wheels).


Quote
On paper there may be a "dual" strategy but it would need an input device that today does not exist: GPB sends the bars angle to the wheel and the wheel tries to align to that angle (fighting your input, using a control loop like the PID in DSA). At the same time the wheel reads the torque you apply to it (only that torque, net of the torque it generates by itself) and sends it to GPB (that's hence DST/DS1). But again, there's zero warranty that would be any better than DSA/DS2 and we have no such device available.
I'm pretty sure that's exactly how the directeer=2 mode works. Except, it takes the resulting angle and derives the torque you apply from it.
What DS2 does (as explained by PiBoSo) is very different from what I describe above.
Title: Re: Direct steer
Post by: passerBy on April 21, 2017, 02:47:37 PM
Now I remember what my idea looked like back at the time.
Make the controller wheel behave like the wheels-fork-handlebars assembly scaled down to the abilities of the FFB. Based on the current wheel angle (and probably its turning rate), compute the summary torque acting on the fork from "that side", divide it by the torque value considered maximal (while still retaining enough dynamic range) and let the user handle the "fork" as the user sees fit. That will most likely lead to the angle change. Rinse and repeat.

In other words, a physical real life object would be turned into the solver itself, i. e., no post-processing virtual to real angle matching through torque (aren't the FFB spikes related to the matching effort?).

What's wrong with my proposition then?
Title: Re: Direct steer
Post by: HornetMaX on April 21, 2017, 08:36:10 PM
Some tracking will always be needed, no matter what.
You have 2 options: the controller can send GPB a torque (DST/DS1) or an angle (DSA/DS2).

If the controller sends an angle, then GPB needs a control loop (the PID PiBoSo mentioned) to align the virtual handlebars to the angle sent by the controller. Also, it will send back to the controller the FFB signal (torque acting on the virtual handlebars minus the rider-generated torque). This is what you are doing with your wheel and DS2/DSA. Nice and simple.

If the controller sends a torque, GPB will apply that torque to the virtual handlebars (that's DS1/DST) and send back the FFB signal just like before (torque acting on the virtual handlebars minus the rider-generated torque). The problem is that the angular position of your wheel will diverge from the angular position of the virtual bars, unless you put in a control loop somewhere. Here you basically have two options: either this control loop is done in GPB (but that would require GPB also receiving then wheel angular position and being aware of the wheel physical params like the inertia, to tune the control loop), either you put that control loop in the controller itself. In that case GPB sends back to the controller the angle of the virtual bars and the controller will try to track it. In any case, it's very messy.

There's no possible solution without any tracking, unless you're ready to accept that your wheel angle will not match the virtual bars angle (which, of course, is not good at all).
Title: Re: Direct steer
Post by: passerBy on April 22, 2017, 10:26:29 AM
I would still try my 3rd option if I could.
Again, simply take the current controller's angle as the angle of the virtual fork that will be used to compute the forces acting on the front wheel, that will be converted into the resulting torque on the fork. This torque will be divided by the value taken for a maximum possible torque (everything above that will be clipped-out) and sent to the controller. After that the user has to deal with the resulting controller torque, with the controller ending up at some new (or the old) angle. This angle is not used as a guide to turn the virtual handlebars to, but is simply taken as the new virtual bars position.

Yes, it's possible to get ridiculous with the bars like this due to the controller usually not providing adequate FFB. The user needs to keep that in mind and don't do anything stupid like turning the controller to full lock at speed. However, the better the controller at least in terms of the sheer FFB torque is, the more natural result should be.
Title: Re: Direct steer
Post by: HornetMaX on April 22, 2017, 04:39:10 PM
I would still try my 3rd option if I could.
Again, simply take the current controller's angle as the angle of the virtual fork that will be used to compute the forces acting on the front wheel
Can't do. The physical model does not take an angle as input. The angle is a state variable, not an input.
Title: Re: Direct steer
Post by: passerBy on April 23, 2017, 09:00:18 AM
I would still try my 3rd option if I could.
Again, simply take the current controller's angle as the angle of the virtual fork that will be used to compute the forces acting on the front wheel
Can't do. The physical model does not take an angle as input. The angle is a state variable, not an input.
Rather "can't do using the current approach and algorithms".
Title: Re: Direct steer
Post by: HornetMaX on April 23, 2017, 09:26:57 AM
I would still try my 3rd option if I could.
Again, simply take the current controller's angle as the angle of the virtual fork that will be used to compute the forces acting on the front wheel
Can't do. The physical model does not take an angle as input. The angle is a state variable, not an input.
Rather "can't do using the current approach and algorithms".
No, sorry.

Again, simply take the current controller's angle as the angle of the virtual fork that will be used to compute the forces acting on the front wheel, that will be converted into the resulting torque on the fork.
Up to here, it's more or less DSA/DS2: the PID computes the "the forces acting on the front wheel", but only the rider-generated part of these forces, in fact.
The rest, the torque applied to the front by the environment (bike dynamics, road , gravity etc) is computed by the overall physics.

This torque will be divided by the value taken for a maximum possible torque (everything above that will be clipped-out) and sent to the controller.
Hmmm ... let's say you apply 1N right, the environment 1N left. What do you have as FFB torque ? GPB returns 1N left (environment torque). I'm under the impression you expect 2N left.

After that the user has to deal with the resulting controller torque, with the controller ending up at some new (or the old) angle. This angle is not used as a guide to turn the virtual handlebars to, but is simply taken as the new virtual bars position.
And that's what you can't do.

The equation is Torque = Inertia * acceleration = : you can't set the velocity to whichever input you receive.

That's why DSA/DS2 does what it does: get an angle as input, compute the torque via the PID loop so that this input angle is tracked, followed reasonably close. This is doable because the input angle is NOT the real angle (just like in the normal steering mode, the lean input is not the real bike lean, but the target that the virtual rider tries to track).
Title: Re: Direct steer
Post by: passerBy on April 23, 2017, 03:00:08 PM
Again, simply take the current controller's angle as the angle of the virtual fork that will be used to compute the forces acting on the front wheel, that will be converted into the resulting torque on the fork.
Up to here, it's more or less DSA/DS2: the PID computes the "the forces acting on the front wheel", but only the rider-generated part of these forces, in fact.
The rest, the torque applied to the front by the environment (bike dynamics, road , gravity etc) is computed by the overall physics.
Well, I understood that. It's just that I'm not happy with the spikes in the FFB, and I have reasons to suspect they might have something to do with the PID. Wanting to eliminate it from the loop is the reason behind my proposal.

Quote
This torque will be divided by the value taken for a maximum possible torque (everything above that will be clipped-out) and sent to the controller.
Hmmm ... let's say you apply 1N right, the environment 1N left. What do you have as FFB torque ? GPB returns 1N left (environment torque). I'm under the impression you expect 2N left.
If we are talking about my system, it would look different to that. GPB would compute an FFB effort of 1 N*m CCW and send it to the controller. If I wanted the bars/wheel to stay at the same angle, I would have to counter the FFB with 1 N*m CW.

Quote
After that the user has to deal with the resulting controller torque, with the controller ending up at some new (or the old) angle. This angle is not used as a guide to turn the virtual handlebars to, but is simply taken as the new virtual bars position.
And that's what you can't do.

The equation is Torque = Inertia * acceleration = : you can't set the velocity to whichever input you receive.
You could store the current angle value and the delta between this angle and the one from the previous step. That way you'd have the angular position, the rotational velocity and the rotational acceleration information.

Quote
That's why DSA/DS2 does what it does: get an angle as input, compute the torque via the PID loop so that this input angle is tracked, followed reasonably close. This is doable because the input angle is NOT the real angle (just like in the normal steering mode, the lean input is not the real bike lean, but the target that the virtual rider tries to track).
That is not something I don't know already.
Title: Re: Direct steer
Post by: HornetMaX on April 23, 2017, 03:14:05 PM
Well, I understood that. It's just that I'm not happy with the spikes in the FFB, and I have reasons to suspect they might have something to do with the PID. Wanting to eliminate it from the loop is the reason behind my proposal.
The torque you feel in the FFB does not come from the PID.
That said, when I look at the telemetry data, the values of the steering torque (with usual steering) looks high and very noisy.

Quote
And that's what you can't do.

The equation is Torque = Inertia * acceleration = : you can't set the velocity to whichever input you receive.
You could store the current angle value and the delta between this angle and the one from the previous step. That way you'd have the angular position, the rotational velocity and the rotational acceleration information.
And what would you do with these (even overlooking the fact they would be very noisy) ?!
Try to write down the equations, you'll see what you're asking to do can't be done.
Title: Re: Direct steer
Post by: Lee-h on January 24, 2018, 06:42:07 AM
Dose direct steer work with gp bikes beta 13 because I just tried it and the bike just keeps falling over like it has no balance
Title: Re: Direct steer
Post by: poumpouny on January 24, 2018, 06:54:41 AM
The virtual rider doesn't work in Direct Steer mode, you have to do the balance yourself, like in real life. That's exactly the point with Direct Steer !
Title: Re: Direct steer
Post by: Lee-h on January 26, 2018, 09:24:19 PM
Thanks for the info, after some practice I can know say this is the best GP Bike Game ever I love this mode using my old Thrustmaster Freestyler Bike controller nice one PiBoSo Great Job  :)