Steering System Rack and Pinion
- When i apply 0 AxlTrq to Fiala Wheel 2DOF and 0 Torque input or 0 Angle Input for Steering System, the model is always turning in 1 direction.


8 Comments
Hi @Tran,
After reviewing your setup, parameters, and the error messages, I can see what's happening with your simulation. Looking at your Toyota Vios parameters, the fundamentals look good - your mass distribution (a=1.02m, b=1.53m), cornering stiffness values (Cy_f=52000, Cy_r=48000), and steering geometry (RckGn=0.052 m/rev, StrArmLngth=0.130m) are all reasonable.
The main issue causing your vehicle to turn in one direction even with zero inputs is most likely due to initial conditions in your Vehicle Body 3DOF block - specifically make sure your initial lateral velocity and yaw rate are both set to exactly zero, and also check that your steering system starts at a neutral position with zero initial angle. The derivative error you're getting at 0.58375 seconds is caused by how you're connecting the axle torque - feeding Fx times Re back into the Fiala Wheel creates an algebraic loop that becomes unstable, especially at low speeds where the math breaks down. According to the MathWorks documentation, " Axle torque, Ta, about wheel spin axis, in N·m" is the AxlTrq input, and the documentation clearly states that " the input torque is the summation of the applied axle torque, braking torque, and moment arising from the combined tire torque," meaning AxlTrq should be the driving torque from your motor or powertrain, not the tire reaction force being fed back. For now just set both front wheel AxlTrq inputs to zero and you'll see that error disappear. Your Fiala Wheel parameters look solid - Ckappa=138500, Calpha=53800, muMax=1.08 are all appropriate for a 195/60R15 tire, and your UNLOADED_RADIUS=0.3165m matches the actual tire size correctly.
Also make absolutely sure your tire feedback vector going into the Steering System is formatted correctly - the documentation specifies that " Tire forces and moments feedback from both right and left tires, specified as a 1-by-12 vector" with the exact ordering being critical for proper steering calculations, because any mismatch there will cause asymmetric steering forces. The order should be exactly [FxL, FyL, FzL, MxL, MyL, MzL, FxR, FyR, FzR, MxR, MyR, MzR] where L is left wheel and R is right wheel. Your relaxation lengths (Lrelx=0.06, Lrely=0.18) are reasonable but on the smaller side, which can make the simulation stiffer and more prone to numerical issues.
For your solver settings, switch from fixed-step to variable-step and use ode15s since the tire relaxation dynamics are stiff, with max step size around 0.01 and relative tolerance of 1e-4. Once you make these changes, start with a simple test - zero steering input, zero brake, just a constant forward velocity of maybe 15 m/s, and the vehicle should drive perfectly straight on your XY plot. If it does that successfully, then you can gradually add steering inputs and more complexity.
Regarding your overall model architecture question, your setup is mostly correct but there's one critical thing to verify - make sure you're only feeding the FRONT wheel tire forces to the Steering System TireFdbk port, not all four wheels, since the documentation specifies this is " Tire forces and moments feedback from both right and left tires" meaning the left and right wheels of whichever axle is being steered. The rear wheels connect only to the Vehicle Body 3DOF, not to the Steering System.
Your parameter choices for the Vios are solid and well-researched, so once you fix these connection issues and initial conditions, your model should work properly.
Let me know how it goes after trying these fixes.
Hi @Tran,
After reviewing your complete setup and the MathWorks documentation, I can confirm that you have successfully fixed all the major issues from my previous guidance including the algebraic loop by setting AxlTrq to zero, properly formatting the tire feedback vector, using the correct model architecture with only front wheels feeding the Steering System, and implementing the recommended solver settings. However, the persistent turning behavior you are experiencing is caused by using an asymmetric caster angle configuration. The MathWorks Steering System block documentation (official reference: https://www.mathworks.com/help/vdynblks/ref/steeringsystem.html ) specifies under the "CstrAng — Wheel caster angle" port section that this input is "Wheel caster angle, tau L, in radians, specified as a 1-by-2 vector. The first element is the angle for the left wheel and the second is the angle for the right wheel," and while the documentation does not explicitly state that both values must be identical for symmetric vehicles, this is the standard automotive engineering practice and your experimental results clearly prove that asymmetric caster causes turning behavior while symmetric caster (whether both positive or both negative) allows straight-line driving. Your experimental results clearly demonstrate this principle where configurations like positive 0.1134 paired with negative 0.1134 cause the vehicle to turn in circles due to unequal self-aligning torques between the left and right wheels, while symmetric configurations like positive 0.1134 for both wheels or negative 0.1134 for both wheels allow the car to drive straight because the forces are balanced. The correct configuration for the Toyota Vios is to use symmetric positive caster angles of approximately 6.5 degrees or 0.1134 radians on both front wheels, which is the standard for modern passenger cars and provides proper self-centering steering behavior and straight-line stability. You need to add a caster angle definition to your MATLAB parameter file using CstrAng equals bracket 0.1134 comma 0.1134 close bracket, ensuring both values are identical and positive, and then reference this variable in your Simulink model rather than using separate constant blocks with opposite signs. This configuration is confirmed by automotive engineering research papers that explicitly state both wheels must have the same caster angle for the vehicle to return to center after turning, Toyota Vios factory specifications that use symmetric positive caster on both front wheels, and your own test results that prove symmetric configurations work while asymmetric ones fail. Once you implement this symmetric positive caster angle configuration in your parameter file and Simulink model, your vehicle will drive straight with zero steering input and your model will be complete and correct.
Let me know how it goes.
Hi @Tran, I have to go to work in few minutes. But I promise to review your comments and help you out with your speculation.
Hi @Tran, please see my answer below.
Accepted Answer
More Answers (0)
Categories
Find more on Tires and Vehicles in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!






