# Magic Formula: Calculating of lateral forces

To obtain lateral force according to slip angles, I use Pacejka Magic Formula, but my graph's style is not similar with picture which i added. I cannot find where the mistake is.

clear all
clc
a1y=-22.1;
a2y=1011;
a3y=1078;
a4y=1.82;
a5y=0.208;
a6y=0.00;
a7y=-0.354;
a8y=0.707;
Fz=2;
Sh=-0.28;
Sv=-118;
Cy=1.5;
Dy=a1y*Fz^2+a2y*Fz;
BCDy=a3y*sind(a4y*atand(a5y*Fz));
By=BCDy/(Cy*Dy);
Ey=a6y*Fz^2+a7y*Fz+a8y;
alpha_r=-10:0.01:10;
plot(alpha_r,PCKy)


• could you reference the paper where you got the coefficients and the graph? I've done enough work on Pacejka, to know that different people approach it differently – NMech Dec 11 '20 at 9:11
• I use Wong - Theory of Ground Vehicles. I cannot add pages of the book because of copyright :) – voo Dec 11 '20 at 9:12
• It would help if you also detailed chapter and maybe even page. – NMech Dec 11 '20 at 9:13
• Pages 60-63 contain my problem – voo Dec 11 '20 at 9:14

PCKy=(Dy*sind(Cy*atand(By*rad2deg(alpha_r+Sh) - Ey*(By*rad2deg(alpha_r+Sh) - atand(By*rad2deg(alpha_r+Sh))))))+Sv;
PCKy=(Dy*sind(Cy*atand(By*(alpha_r+Sh) - Ey*(By*(alpha_r+Sh) - atand(By*(alpha_r+Sh))))))+Sv;