Contents
Tyres
Slip and the Magic Formula
How a tyre makes force by slipping, and the formula the app reads a tyre's force from.
A tyre grips by slipping. To push sideways its tread must travel a little askew of where the wheel points; to drive or brake it must turn a little faster or slower than the road passes. The force grows with the slip, peaks, and falls away. Every model in the app reads that force from one formula, Pacejka's Magic Formula, with coefficients fitted to test data.
Slip angle and slip ratio
The slip angle is the angle between where the wheel points and where its contact patch goes. The slip ratio is how much faster the tread turns than the road passes under it:
- the contact patch's velocity in the wheel's own axes, x forward and y to the left
- the wheel's spin rate
- the tyre's effective rolling radius
The app takes positive when the wheel travels to the right of where it points, so the tyre pushes left and positive slip makes positive side force. That is the opposite of ISO 8855's slip angle; see Axes, signs and units. is positive driving and negative braking; is a locked wheel.
The Magic Formula
One expression gives the side force against slip angle and the drive force against slip ratio, each with its own coefficients:
- the slip: in radians for , for
- the peak, the friction coefficient times the load
- the shape: how far the force falls past the peak
- the stiffness factor; is the slope through the origin
- the curvature near the peak
- the shifts off the origin, zero for this tyre at zero camber
The formula is fitted, not derived: nothing in a tyre computes a sine of an arctangent. What it has going for it is that four numbers with plain meanings reproduce measured curves closely, and that the same shape serves both directions.
Load sensitivity
Each of , , and is a short polynomial in the load. The ones that matter most are the friction coefficient and the cornering stiffness, the slope at zero slip. Both are written against the load's change from the file's nominal load , 950 N for this tyre:
- the file's coefficients
- scaling factors, 1 unless you scale the tyre
is negative for every real tyre: the friction coefficient falls as the load grows. That is why load transfer costs grip. In a corner the outside tyre gains what the inside one loses, but it gains less grip than the inside one loses, and the axle that moves more load loses more of its pair's grip (Load transfer).
The app takes the cornering stiffness as the second line of equation (5) does, from the formula itself across ±0.1°. It is the same as to within the formula's curvature over that small slip.
The drive force has the same form, with its own coefficients: the template's tyre peaks at a slip ratio near 0.1, with a friction coefficient of 1.70 at its nominal load.
Which way a file points
Tyre files do not agree on a sign. Some state the side force positive for positive slip, as the app's convention does; others, the template's tyre among them, the other way round. In the template's file the cornering stiffness coefficient is negative, so its is negative for positive .
The app reads a file as it is, then finds which way its side force points by its slope across ±2° at the nominal load. When the slope is negative the app turns the side force and the aligning moment round, once, for every vehicle model. Fig. 3 shows the template's tyre as the models use it.
The Tyres tool's fit and "Fitted data" charts show the file's own sense, so on the template's tyre the side force there is negative for positive slip.
What the model assumes
- Pure slip: the side force at zero slip ratio and the drive force at zero slip angle. Both at once, combined slip, has its own weighting functions in the same file and is not on this page.
- Zero camber and the nominal pressure. The MF 6.1 and 6.2 files add camber and pressure terms; at zero camber and nominal pressure MF 5.2 and MF 6.x are the same equations.
- Steady state: the force is there as soon as the slip is. The transient models add a lag, the tyre building its force over a relaxation length.
- The tyre's temperature and wear are those of the test.
In the app
Tyres draws "Lateral force Fy vs slip angle", "Peak lateral μ vs load" and "Cornering stiffness vs load" for each tyre in the library, in the sense the vehicle models use. "Fitted data" draws the fitted model over the rig data it came from, in the file's sense.
Vehicle Dynamics › Balance & loads lists each axle's cornering stiffness, "Cornering stiff. F/R".
The template's tyre is a generic Formula Student 18×6-10 MF 6.2 model, set from class-level targets rather than any one test.
Check it yourself
The script evaluates equation (3) for both forces at three loads from the coefficients in example_tyre.m, with the cornering stiffness and the file's sign, and compares them with the app's. Paste your own file's coefficients into example_tyre.m to read your tyre.
>> magic_formula Quantity This script PaceDynamics Diff ----------------------------------------------------------------------------- F_y at 2 deg, 690 N [N] -676.872 -676.872 0% F_y at 5 deg, 690 N [N] -1204.36 -1204.36 0% F_y at 10 deg, 690 N [N] -1255.96 -1255.96 0% F_y at 2 deg, 950 N [N] -854.523 -854.523 2.7e-14% F_y at 5 deg, 950 N [N] -1579.84 -1579.84 1.4e-14% F_y at 10 deg, 950 N [N] -1686.5 -1686.5 0% F_y at 2 deg, 1400 N [N] -1041.48 -1041.48 0% F_y at 5 deg, 1400 N [N] -2082.24 -2082.24 2.2e-14% F_y at 10 deg, 1400 N [N] -2378.89 -2378.89 0% F_x at kappa 0.05, 690 N [N] 862.736 862.736 0% F_x at kappa 0.10, 690 N [N] 1176.07 1176.07 0% F_x at kappa 0.20, 690 N [N] 1139.24 1139.24 0% F_x at kappa 0.05, 950 N [N] 1242.03 1242.03 0% F_x at kappa 0.10, 950 N [N] 1605.88 1605.88 0% F_x at kappa 0.20, 950 N [N] 1488.52 1488.52 0% F_x at kappa 0.05, 1400 N [N] 1949.23 1949.23 0% F_x at kappa 0.10, 1400 N [N] 2275.69 2275.69 0% F_x at kappa 0.20, 1400 N [N] 1986.66 1986.66 0% Cornering stiffness, 690 N [N/rad] 20851.3 20851.3 0% Cornering stiffness, 950 N [N/rad] 25996.4 25996.4 2.8e-14% Cornering stiffness, 1400 N [N/rad] 31038.6 31038.6 0% Sign of F_y at positive slip [-] -1 -1 0% All 22 quantities agree with PaceDynamics (largest difference 2.8e-14 %).
The script
%% Slip and the Magic Formula: a tyre's force from its slip % % Companion to the documentation page "Slip and the Magic Formula". Runs unchanged in GNU % Octave (7 or later) and MATLAB. Edit the tyre in example_tyre.m, or copy the % coefficients of your own .tir file into it, and run: % % >> magic_formula % % Pure slip, at zero camber and the nominal pressure: % % F = D sin( C atan( B x - E (B x - atan(B x)) ) ) + S_V, x = slip + S_H % % with x the slip angle alpha [rad] for the side force F_y and the slip ratio kappa % for the drive and brake force F_x. D is the peak (mu times the load), C the shape, % B the stiffness factor (B C D is the slope through the origin), E the curvature, and % S_H and S_V shift the curve off the origin. Each is a short polynomial in the load % change dfz = (F_z - F_z0) / F_z0 with the file's coefficients. % % At zero camber MF 5.2 and MF 6.1/6.2 are the same equations; they differ in how % camber enters. % % Reference: H. B. Pacejka, Tyre and Vehicle Dynamics, 3rd ed. (Butterworth-Heinemann, % 2012), ch. 4.3. % % Part of the PaceDynamics documentation, https://pacedyn.dev/docs % SPDX-License-Identifier: MIT [t, app] = example_tyre(); sgn = @(x) 2 * (x >= 0) - 1; % the formula's sign: +1 at zero %% Both forces at each load [N] deg = pi / 180; fy = zeros(numel(app.loads), numel(app.alphaDeg)); fx = zeros(numel(app.loads), numel(app.kappa)); Ca = zeros(1, numel(app.loads)); for i = 1:numel(app.loads) Fz = max(1, app.loads(i)); Fz0 = t.LFZO * t.FNOMIN; % nominal load, scaled dfz = (Fz - Fz0) / Fz0; % Lateral mu_y = (t.PDY1 + t.PDY2 * dfz) * t.LMUY; C_y = t.PCY1 * t.LCY; D_y = mu_y * Fz; K_ya = t.PKY1 * Fz0 * sin(t.PKY4 * atan(Fz / (t.PKY2 * Fz0))) * t.LKY; % cornering stiffness [N/rad] B_y = K_ya / (C_y * D_y); S_Hy = (t.PHY1 + t.PHY2 * dfz) * t.LHY; S_Vy = Fz * (t.PVY1 + t.PVY2 * dfz) * t.LVY * t.LMUY; F_y = @(alpha) D_y * sin(C_y * atan(B_y * (alpha + S_Hy) ... - min(1, (t.PEY1 + t.PEY2 * dfz) * (1 - t.PEY3 * sgn(alpha + S_Hy)) * t.LEY) ... * (B_y * (alpha + S_Hy) - atan(B_y * (alpha + S_Hy))))) + S_Vy; % Longitudinal mu_x = (t.PDX1 + t.PDX2 * dfz) * t.LMUX; C_x = t.PCX1 * t.LCX; D_x = mu_x * Fz; K_xk = Fz * (t.PKX1 + t.PKX2 * dfz) * exp(t.PKX3 * dfz) * t.LKX; % slip stiffness [N per unit slip] B_x = K_xk / (C_x * D_x); S_Hx = (t.PHX1 + t.PHX2 * dfz) * t.LHX; S_Vx = Fz * (t.PVX1 + t.PVX2 * dfz) * t.LVX * t.LMUX; F_x = @(kappa) D_x * sin(C_x * atan(B_x * (kappa + S_Hx) ... - min(1, (t.PEX1 + t.PEX2 * dfz + t.PEX3 * dfz^2) * (1 - t.PEX4 * sgn(kappa + S_Hx)) * t.LEX) ... * (B_x * (kappa + S_Hx) - atan(B_x * (kappa + S_Hx))))) + S_Vx; for j = 1:numel(app.alphaDeg), fy(i, j) = F_y(app.alphaDeg(j) * deg); end for j = 1:numel(app.kappa), fx(i, j) = F_x(app.kappa(j)); end % The slope through the origin, as the app takes it: a difference across +-0.1 deg. e = 0.1 * deg; Ca(i) = abs(F_y(e) - F_y(-e)) / (2 * e); if app.loads(i) == t.FNOMIN % Which way the file's force points: the slope across +-2 deg, at the nominal load. sign_fy = sgn(F_y(2 * deg) - F_y(-2 * deg)); end end %% Against the app for i = 1:numel(app.loads) for j = 1:numel(app.alphaDeg) pd_compare(sprintf('F_y at %2g deg, %4g N [N]', app.alphaDeg(j), app.loads(i)), fy(i, j), app.fy(i, j)); end end for i = 1:numel(app.loads) for j = 1:numel(app.kappa) pd_compare(sprintf('F_x at kappa %4.2f, %4g N [N]', app.kappa(j), app.loads(i)), fx(i, j), app.fx(i, j)); end end for i = 1:numel(app.loads) pd_compare(sprintf('Cornering stiffness, %4g N [N/rad]', app.loads(i)), Ca(i), app.corneringStiffness(i)); end pd_compare('Sign of F_y at positive slip [-]', sign_fy, app.fySign); pd_compare();
Download: magic_formula.m · example_tyre.m · pd_compare.m. The scripts are MIT licensed.
Further reading
- H. B. Pacejka, Tyre and Vehicle Dynamics, 3rd ed. (Butterworth-Heinemann, 2012), ch. 4, on the Magic Formula.
- W. F. Milliken and D. L. Milliken, Race Car Vehicle Dynamics (SAE, 1995), ch. 2, on tyre behaviour.
- E. Bakker, L. Nyborg and H. B. Pacejka, "Tyre modelling for use in vehicle dynamics studies", SAE paper 870421 (1987). The formula's first publication.