© 2022 IEEE.In case of load change at the output of the converters, the inductor and capacitor sizes in the converters should also change. Otherwise, there will be distortions in the dynamic response of the converter in terms of performance criteria such as settling time, rise time and maximum overshoot amount. This paper presents to improve the control's performances optimization using particle swarm optimization (PSO) of the system consisting of a buck converter based on sliding mode control (SMC) under variable conditions. Thus, a stable control structure has created by calculating the optimal values of the coefficients in the sliding mode control structure with the PSO method. The input source is taken as direct source (DC) source voltage at variable conditions. Buck Converter output voltage has been tested on variable loads. The modeling is done in MATLAB/Simulink software.