¿ªÔÆÌåÓý

Re: Possible g;itch in stepping parameters


 

The reason this happens is the braces on the?
.meas xxx param yyy lines.

That has a special effect of fixing the meas result to the first one. Remove all the braces! You don't ever need them for .param directives, anyway.

--
Regards,
Tony


On Thu, 1 May 2025, 01:43 Bell, Dave via , <Dave.Bell=[email protected]> wrote:

Of course, the error is more likely with me, but:

?

I¡¯m experimenting with a simple solar cell/array simulator I can reuse with larger models.

It¡¯s working and stable, at a wide range of open circuit voltages and short circuit currnts, and with different Diode models.

(A current source across a string of ¡®N¡¯ diodes of known Vfwd)

?

But when I inserted a .step of the Voc parameter, while it seems to simulate correctly, I got a weird .measure result.

?

.param Voc 75

.step param Voc list 32 45 75

.param Vc 0.8921

.param Vc2 0.7451

.param Isc 1.2

?

.param nCells {Voc/Vc}

.param nCells2 {Voc/Vc2}

.meas nC PARAM {nCells}???????????????????????? ; here to annotate in the log file

.meas nC2 PARAM {nCells2}???? ?????????????? ; here to annotate in the log file

?

From the log file:

?

.step voc=32

.step voc=45

.step voc=75

?

Measurement: nc

? step??? 84.0712924560027

???? 1??????? 84.0713

???? 2??????? 84.0713

???? 3??????? 84.0713

?

Measurement: nc2

? step??? 100.657629848343

???? 1??????? 100.658

???? 2??????? 100.658

???? 3??????? 100.658

?

How can nc or nc2 remain the same at all three different values of Voc?

The voltages and currents correvtly follow the stepped Voc, but just those two .measures are wrong/

?

Dave

?

?

Join [email protected] to automatically receive all group messages.