Pacejka = [car.Tire.Cdy, car.Tire.Ccy, car.Tire.Cby];
F_zf = car.Fzf;
F_zr = car.Fzr;
Cf = prod(Pacejka) * F_zf;
Cr = prod(Pacejka) * F_zr;
m = car.m;
lf = car.lf;
lr = car.lr;
Iz = car.I;
velocity = 40;
A = [(-Cf - Cr)/(m*velocity) ((Cr*lr - Cf*lf)/(m*velocity^2) - 1); ...
    (Cr*lr - Cf*lf)/Iz (-Cf*lf^2 - Cr*lr^2)/(velocity*Iz)];
B = [Cf/(m*velocity); (Cf*lf)/Iz];
C = [-1 -(lf/velocity)];
D = [0];
sys = ss(A,B,C,D);
TF = tf(sys);
assignin('base', ['TF_' num2str(velocity)], TF);
save(['Offline_Telemetry\LateralRegulation\TF_' num2str(velocity)], ['TF_' num2str(velocity)]);