As crucial parts of various engineering systems, solenoid valves (SVs) operated by electromagnetic solenoid (EMS) are of great importance and their failure may lead to cause unexpected casualties. This failure, characterized by a degradation of the performances of the SVs, could be due to a fluctuations in the EMS parameters. These fluctuations are essentially attributed to the changes in the spring constant, coefficient of friction, inductance, and the resistance of the coil. Preventive maintenance by controlling and monitoring these parameters is necessary to avoid eventual failure of these actuators. The authors propose a new methodology for the functional diagnosis of electromagnetic solenoids (EMS) used in hydraulic systems. The proposed method monitors online the electrical and mechanical parameters varying over time by using artificial neural networks algorithm coupled with an optical fiber polarization squeezer based on EMS for polarization scrambling. First, the MATLAB/Simulink model is proposed to analyze the effect of the parameters on the dynamic EMS model. The result of this simulation is used for training the neural network, then a simulation is proposed using the neural net fitting toolbox to determine the solenoid parameters (Resistance of the coil R, stiffness K and coefficient of friction B of the spring) from the coefficients of the transfer function, established from the model step response. Future work will include not only diagnosing failure modes, but also predicting the remaining life based on the results of monitoring.