What do these variables mean?

Discussion in 'Programming' started by Kino, Aug 8, 2016.

  1. Kino

    Kino
    Expand Collapse

    Joined:
    Aug 8, 2016
    Messages:
    2
    In the brakes configuration files you can modify the value of brakeInputSplit and brakeSplitCoef.

    And in drivetrain.lua theres:

    wd.desiredBrakingTorque = wd.brakeTorque * (min(M.brake, wd.brakeInputSplit) + max(M.brake - wd.brakeInputSplit, 0) * wd.brakeSplitCoef)

    And I have no idea what the logic is here. Changing the values of either variable doesn't seem to do a whole lot. Even setting one to 0 has little effect on the brakes.
     
  2. Goosah

    Goosah
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Aug 30, 2013
    Messages:
    790
    This is used to replicate the proportioning valve used in the rear brake circuit of many cars. As a car begins to brake, the weight distribution on the tires shifts towards the front wheels, requiring the rear brakes to do less work, and the fronts to do more. By introducing a knee point and afterwards a reduction of brake torque in the rear circuit, the brakes can work more effectively at a range of braking effort.

    ss+(2016-08-08+at+11.32.02).png

    This is an example of the brake bias on the Bolide. The blue curve indicates the ideal front and rear brake torque under increasing deceleration up to 1.2g. The red curve is the actual brake bias curve used. The green curve is a result I would choose with no proportioning valve. Without a proportioning valve, the green line has to be chosen to not lock up the rear tires first under max braking effort, leaving the brakes almost completely unused in lower effort braking.

    Using the brakeInputSplit (proportion of brake input where the knee point occurs) and brakeSplitCoef (proportion of the initial rate after the knee point), the rear brake now follows a non linear increase in torque, allowing the the red curve to more closely follow the ideal curve. In this example and in general, I have tuned the brake bias to be further forward than ideal, because it allows a greater safety margin when attempting to brake and turn, downshift while braking etc (think arcade automatic drivers).

    ss+(2016-08-08+at+11.43.53).jpg

    For this screenshot of the Brake Torque Graph UI app, I chose a more visually obvious rear brakeInputSplit of 0.5 and a brakeSplitCoef of 0. As I slowly press on the brakes, one can see in this graph of brake torque vs time, that the rear brake torque hits a knee point about halfway, and follows a new slope (of 0) before the front brakes have reached full torque.
     
    • Like Like x 4
  3. Kino

    Kino
    Expand Collapse

    Joined:
    Aug 8, 2016
    Messages:
    2
    Wow that's so helpful, thank you very much. Now I can finish what I started here.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice