Please refer to the following discussion which addresses the issue you are facing: https://in.mathworks.com/matlabcentral/answers/339701-getting-the-error-message-derivative-of-state-x-in-block-xxx-at-time-xx-is-not-finite-the-simula
Basically, such issues occur when the model has instability. Below is information on three tools that may assist you in further improving the model stability if you are not already familiar with them:
1. Solver Profiler: The Solver Profiler can help you visualize your model dynamics and see where they may be unstable. Using the Solver Profile is described at this link: https://www.mathworks.com/help/simulink/ug/examine-solver-behavior-using-solver-profiler.html
2. Log the Simulink states, so you may view their values after running the simulation (perhaps stop the simulation before the error or use the above approach to remove the error): https://www.mathworks.com/help/simulink/examples/logging-states-in-structure-format.html
3. Use Stepping Options to pause the simulation and view signal values before the error occurs: https://www.mathworks.com/help/simulink/ug/simulation-stepper-interface.html