-
Notifications
You must be signed in to change notification settings - Fork 0
How Pitch, Roll and Yaw Gain Affect the Ride
Pitch is the primary control variable for the board. Pitch angle is measured as the difference from the board “setpoint” (typically level) to the current position as shown.
As pitch increases, current demand to the motor increases. The pitch tune can have a linear shape like the figure below. But this produces a very stale and jerky feel.
What makes the board feel better is to have a looser tune close to the setpoint, like this.
This is similar to the steering wheel of a car. You will notice that you can make small changes to your car’s steering wheel without actually changing the direction of the car. This can be referred to as the dead zone or looseness of the tune. This is beneficial for board feel because small changes to terrain won’t affect your current demand as heavily, almost like suspension, and it is easier to prevent free spin while in the air.
Similarly, we can increase the slope of the current demand as we increase the pitch. This will increase how aggressive the tune feels. If current demand goes up very sharply the tune will feel very tight and aggressive. If the tune slopes up very gradually it will feel loose and less lively.
To define this demand curve we assign a series of proportional gain values. Proportional gain (kp) is just a number that is multiplied by pitch to get current demand (eg 1.5 deg pitch and 20 gain (kp) will give us 1.5*20= 30A current demand). So the above current demand curve can be broken down into the following plot of proportional gains.
This give us a current demand equation of current = kp(pitch) * pitch, where the kp(pitch) is a function that selects gain based on the board pitch angle. It is then multiplied by the pitch to give the final current demand.
Now that we have established our pitch tune as the basis of our control scheme, we can add yaw and roll to it.
Roll tilts the board from side to side as shown below.
When applying roll to the tune, we want roll to increase the speed of the board. This is because when we are carving, the board is taking a slightly longer path around our center of mass. To keep up with the rider’s longitudinal velocity (straight line velocity) the board has to speed up. This means that roll should increase our current demand when accelerating and decrease our current demand when braking, such that our new current equation is, current = kp(pitch) * pitch +[kp(pitch) * pitch] * roll_kp(roll), where we have our original demand from pitch, plus a new term for roll demand.
The new term takes the pitch current demand and multiplies it by a roll proportional gain. In this way, pitch is still our primary control factor but it allows modification of the current demand via roll. Our function roll_kp() will select the appropriate roll gain value based on the roll position.
Similar to our pitch tune we can affect the roll dead zone and aggressiveness. A larger dead zone will make the tune feel much looser and more playful, while small dead zone will make the board feel tighter and more race-like. Aggressiveness for roll has to do with the magnitude of the kp values and how quickly they increase with roll.
We can apply the same logic for yaw that we did for roll except for the fact that yaw is not a static position like pitch or roll. There is no orientation where yaw is always zero. Instead yaw is evaluated relative to the previous position. So when we use yaw, we use it as a rate, in degrees per second.
As yaw rate increases we can apply an increasing kp just like roll. However, because the same physics are not at play, a little yaw kp goes a long way. Looseness and aggressiveness have similar trends for yaw as they do for roll.
So our final equation for current demand looks like this: current = kp(pitch) * pitch + [kp(pitch) * pitch] * roll_kp(roll) + [kp(pitch) * pitch] * yaw_kp(yaw). In this final equation we now have function yaw_kp(), which will select an appropriate yaw gain value based on yaw change, and multiplies it by the pitch current demand to produce our yaw current demand component. By utilizing separate kp curves for pitch, roll, and yaw we can individually tune the influence of each signal to produce the ideal board feel and behavior.