I modeled a PV panel (Voc = 37.7V and Isc = 8.72A) in simulink with Rs and Rsh being dynamic. I tried to use it with a buck converter and a resistive load. The controlled current source cannot work without an input capacitor, I added a capacitor of 50*10^-6. It works fine but with an overshoot of 20A. Also, when I changing the load resistor a little bit , I get output current of 12A. You can see the picture below.
Did anyone face this issue?