There is a significant discrepancy between the simulation results and the real-world experiments

I am new to px4_sitl.I have designed an attitude controller in Simulink and added my own UAV model in the Gazebo modules. I have achieved co-simulation between Simulink and Gazebo using ROS2 and FASTDDS. However, I have encountered an issue: although the final attitude is stable, there is a significant discrepancy between the simulation results and the real-world experiments. I would like to troubleshoot the problem and determine the root cause. Currently, I suspect there might be an error in the motor model. The controller in Simulink outputs the “actuator_controls0” uORB message, and I would like to understand how this message is gradually transformed into forces and torques in Gazebo. What I currently know is that the motors plugin in Gazebo is responsible for converting the rotational speed into forces, but I am not sure if it also converts them into torques. Furthermore, I am not clear on how this plugin obtains the motor speed. Does anyone have knowledge about the communication relationship between PX4 and Gazebo? Please assist me!
px4 v1.13
ROS2
matlab 2022b