Package: pmsm-pm-temp-predict
PMSM_PM_Temp_PredictPMSM_PM_Temp_Predict is a project aimed at predicting the temperature of the permanent magnet in a Permanent Magnet Synchronous Motor (PMSM). The temperature of the permanent magnet is an important parameter that affects the performance and reliability of the motorDescriptionThis project utilizes machine learning techniques to develop a predictive model for estimating the temperature of the permanent magnet in a PMSM. The model takes into account various input parameters such as motor operating conditions, electrical voltages and currents, and environmental factors to make accurate temperature predictions. More specifically: the Random Forest Regressor is used for this project.FeaturesAPI integration: The project provides an API that exposes the trained model, allowing other applications or systems to make temperature predictions programmaticallyFeature scaling: input data is normalized to meet regression model requirementsSingle sample processing: API contains the function to predict single temperature value based on current motor stateData frame processing: API allows you to processpandasDataFrameand get results for a huge amount of samples with one function call.Getting StartedTo get started with the PMSM_PM_Temp_Predict project, follow these simple steps:Install package withpip install pmsm-pm-temp-predictThis command will install this python package and all required dependencies.Integrate the trained model into your application using the provided APIStart making temperature predictions using the API and your collected dataFor detailed instructions and usage examples, please refer to the documentation included in the repository.ContributingContributions to the PMSM_PM_Temp_Predict project are welcome. If you encounter any issues or have suggestions for improvements, please open an issue in the repository or submit a pull request with your proposed changes.APITwo functions are provided by API of this package:Single sample processingtemp_predict(u_q, u_d, i_d, i_q, coolant, stator_winding)parametertypedescriptionu_qfloatq-component of the motor voltage in Vu_dfloatd-component of motor voltage in Vi_dfloatq-component of the motor current in Ai_qfloatd-component of the motor current in Acoolantfloatcoolant temperature in В°Cstator_windingfloatstator winding temperature in В°Creturn valueis a singlefloatvalue which represents predicted temperature of the motor's permanent magnet.Code exampleimportpmsm_pm_temp_predictaspms
print("Predicted permanent magnet temperature is: ",temp_predict(-0.450682,-0.350055,0.004419,0.000328,18.805172,19.086670))Output:Predictedpermanentmagnettemperatureis:24.849657903061008DataFrameprocessingtemp_predict_df(df)parametertypedescriptiondfpandas DataFramea pandas DataFrame object containing columns similar to the parameters of the temp_predict functionreturn valueis anarrayof predicted temperatures of the motor's permanent magnet.Code exampleimportpmsm_pm_temp_predictaspms
print("Predicted permanent magnet temperature is: ",temp_predict(-0.450682,-0.350055,0.004419,0.000328,18.805172,19.086670))print("Predicted permanent magnet temperature is: ",temp_predict_df(pd.DataFrame({'coolant':[18.805172],'stator_winding':[19.086670],'u_q':[-0.450682],'u_d':[-0.350055],'i_d':[0.004419],'i_q':[0.000328]})))Output:Predictedpermanentmagnettemperatureis:[24.8496579]