Your modeling seems good.
But did you think to change the configuration of the solver ?
By default, a simulink model is in variable-step. change it to fixed-step, with your own simulation parameters.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/176507/image.jpeg)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!