About SOLAR CHARGE CONTROLLER

I should use simulink to produce the PWM signal as i make a project which i use a pv module with voltage and current sensors to determine the duty cycle which is then converter to pwm signal sent to arduino. this signal is changing with time as the voltage and current of pv module change.