Power Optimization, Diagnostic Monitoring, and Modeling of Photovoltaic System