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.


2 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.
Answers (0)
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
