Switched circuit analysis - getting rid of “glue” equations

I have the following circuit: simulate this circuit – Schematic created using CircuitLab

I would like to derive 3 differential equations, describing it, since it has 3 dynamic components [Csh, C1, L1]. So far I have derived:

$$\frac{\partial i_L}{\partial t} = \frac{1}{L1}v_{P1} \tag{1}$$ $$\frac{\partial v}{\partial t} = \frac{1}{C1}i_{C1} \tag{2}$$ $$\frac{\partial v_{sh}}{\partial t} = \frac{1}{C_{sh}}(Iph-i_{D(v_{sh})}-\frac{v-{sh}}{R_{sh}}-\frac{v_{sh}-v}{R_{s}}) \tag{3}$$

Unfortunatelly, I need the following equations to glue the above relations:

$$i_{P1} = i_L+i_{string}-i_{C1} \tag{4}$$ $$v_{sh} = v_{P1} + i_{P1}R_s \tag{5}$$

The problem is, as soon as I substitute the (5) into (3), I get $$\frac{\partial i_{P1}}{\partial t}$$ which I find difficult to derive.

1) I would appreciate, if someone knowledgeable would tell me, whether I can get rid of the derivative of i_P1.

My goal is to derive 3 clean differential equations, that I could (at least theoretically) solve numerically. I know the circuit is non-linear due to the diode. It can be even assumed, that the Iph, Dsh, Rsh are parameters of a non-linear current source (1 element), instead of analyzing them separately.

P.S. The circuit doesn't make sense as it is right now, because it is part of switched circuit. I have left out components, which doesn't affect the active part of the circuit.

• Why are they partial derivatives? – Chu Jan 16 at 21:56