The ride comfort is controlled by the suspension system. In this article, an active suspension system is used to control vehicle vibration. Vehicle oscillations are simulated by a quarter-dynamic model with five state variables. This model includes the influence of the hydraulic actuator in the form of linear differential equations. This is a completely novel model. Besides, the OSMC algorithm is proposed to control the operation of the active suspension system. The controller parameters are optimized by the in-loop algorithm. According to the results of the study, under normal oscillation situations, the maximum and average values of the sprung mass were significantly reduced when the OSMC algorithm was applied. In dangerous situations, the wheel is completely separated from the road surface if the vehicle uses only the passive suspension system or active suspension system with a conventional linear control algorithm. In contrast, the interaction between the wheel and the road surface is always guaranteed when the OSMC algorithm is used to control the operation of the active suspension system. The efficiency that this algorithm brings is very high.