Hi Nupur,
By looking at your error, it appears that the problem is an out of range input to the Lookup Table block named “Hitch Contact Yaw Moment”. This problem can be tackled by putting a Saturation block before the input to the Lookup Table:
This resolves the current error in your model but it reveals another runtime error: Derivative of state '2' in block 'Two_Vehicle_Hitched/Leading Vehicle/state/xdot ext/Integrator' at time 0.2875 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)
Increasing Solver Step Size is infeasible for your model. So, we change the Solver to ODE14 which can run the simulation at the current Step Size. According to me, changing solver to ODE14 worked for your model because, the error “Derivative of state '2' is not finite” suggests a division by zero or algebraic loop in the model. ODE14x’s extrapolation handles such cases by dynamically adjusting integration order and iterative refinement. ODE3 cannot handle abrupt changes in the signal. Thus, it might overshoot and produce numerical instabilities like non-finite derivatives. Using the ODE14x solver fixes the error you were having with the Lookup Table as well so you don't need to use the Saturation block like above. This could be because of the reduced instability in your model after changing the solver, it does not produce out of range inputs for Lookup Table.
In a nutshell, changing solver type to ODE14x solves the issue and your model runs without error. I have attached the working model for your reference.
You can follow the below links to take a look at MATLAB documentation to learn more about solvers:
I hope this solves the issue!