The LTSpice manual gives an example of how to do this:
* calling a subcircuit
*
* This is the circuit
X1 in out 0 divider top=9K bot=1K
V1 in 0 pulse(0 1 0 .5m .5m 0 1m)
* This is the subcircuit
.subckt divider A B C
R1 A B {top}
R2 B C {bot}
.ends divider
.tran 3m
.end
The full syntax is given as:
Syntax: Xxxx n1 n2 n3... <subckt name> [<parameter>=<expression>]
The rules for writing expressions are given in the section of the manual on "arbitrary behavioral voltage and current sources".
Having succeeding in my attempt, thanks to user jonk for pointing out this link, I'm showing the results as a reference.
With the aforementioned panel characteristics, stripping the panel down to its single cells (a series of 72 of them to form a single module) yields a saturation current \$I_0 = 8.0411\cdot10^{-10}\:A\$ and an open circuit voltage \$V_{OC,cell} = V_{OC}/72=0.5788\:V\$.
Following the method exposed in the link, I computed the emission coefficient \$N=\frac{38.6V_{OC}}{\ln(I_{SC}/I_0)}\$, which is then used to scale the SPICE diode model according to the following equations:
\begin{eqnarray}
XTI &=& 3N\\
IS &=& I_0\\
EG &=& 1.11N
\end{eqnarray}
where \$XTI\$ is the exponent temperature coefficient, \$IS\$ is the saturation current and \$EG\$ is the energy gap.
The above is accomplished by writing a .subckt/.ends model in a plain text file (*.txt) as follows:
.subckt panel_diode Anode Kathode
D1 A K D1
.model D1 D(LEVEL=1 IS=8.0411e-10 N=72.2592 EG=80.2077 XTI=216.7776)
.ends
As simple as that, what remains to do is to import the newly created model into the simulation tool and use it to implement the panel model as described in the question. As can be seen by a simulation of the behaviour of the model thus created, its V-I (green curve) and V-P (red curve) characteristics are what one would expect from a solar panel. Quantitatively, the maximum power point lies at \$V_{MPP}=35.6\:V\$, \$I_{MPP}=3.5\:A\$ and corresponds to \$122\:W\$, against the nominal \$33.6\:V\$, \$3.3\:A\$ and \$110\:W\$, respectively. Anyhow, this seems a rather good result, since the model doesn't account for any non idealities.
![enter image description here](https://i.stack.imgur.com/mHd0A.png)
Best Answer