开云体育

Singular matrix


 

Hello everybody,
I'm working on a schematic and encounter a "singular matrix" error.
I know there are as many cause than people in the mankind, but I would like to have advices to avoid this sort of things.
I'm aware that there are a lot of maths in the background too :'(
Thanks a lot in advance for your help.


 

开云体育

There are indeed infinitely many reasons for that error. We can't help much unless you let us see more of what you are doing. Upload your .ASC file AND all the other files required to run the simulation, but not .RAW? and .LOG files or pictures,? in a ZIP archive to Files => Temp.

Go to the web page: /g/LTspice/topics. Click on Files in the list on the left. Then click on Temp. Then click on New Upload in the blue box at top left. Click on Upload File in the drop-down menu. Then send a message to tell us that you did that.

On 2025-03-24 17:59, pilou via groups.io wrote:
Hello everybody,
I'm working on a schematic and encounter a "singular matrix" error.
I know there are as many cause than people in the mankind, but I would like to have advices to avoid this sort of things.
I'm aware that there are a lot of maths in the background too :'(
Thanks a lot in advance for your help.
--
OOO - Own Opinions only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion

Virus-free.


 

Some of the things you can try (no guarantees!) include:
  • Remove voltage sources and replace with "Nortonized" (current) sources.
  • Add a small GSHUNT, perhaps 1e-12 to as much as 1e-10.
  • Add a small CSHUNT, perhaps 1e-15.
  • Use SPICE models for similar (IC or transistor) parts from other manufacturers.
?
Andy
?
?


 

Hello John and Andy,
thanks a lot for your replies.
Please, find my circuit here:
Best regards,
Pascal


 

开云体育

We can't run it , because:

  1. RQ3E100AT_TH symbol has the full path on your computer attached. OK, we can fix that.
  2. RQ3E100AT_TH_Thermal.lib is missing
  3. ?There is a connection between the body of R3 and the wire labelled Vcc. I suspect that is not correct.
On 2025-03-25 13:18, pilou via groups.io wrote:
Hello John and Andy,
thanks a lot for your replies.
Please, find my circuit here:
Best regards,
Pascal
--
OOO - Own Opinions only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion

Virus-free.


 

John,
I'm very sorry. I forget to correct paths into symbol and indeed I forget a lib too.
For R3, it wasn't connected to VCC: the wire was too long ;)
I just re-upload the whole schematic:
Thanks a lot in advance.


 

开云体育

You didn't fix the path in RQ3E100AT_TH, but never mind. I can't see what is causing the singular matrix error.

On 2025-03-25 16:40, pilou via groups.io wrote:
John,
I'm very sorry. I forget to correct paths into symbol and indeed I forget a lib too.
For R3, it wasn't connected to VCC: the wire was too long ;)
I just re-upload the whole schematic:
Thanks a lot in advance.
--
OOO - Own Opinions only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion

Virus-free.


 

开云体育

On 25/03/2025 17:40, pilou via groups.io wrote:
I'm very sorry. I forget to correct paths into symbol and indeed I forget a lib too.
For R3, it wasn't connected to VCC: the wire was too long ;)
I just re-upload the whole schematic:
This circuit runs in 24.1.4, but fails in 24.0.12 with a singular matrix error.

Note: there is a pin (A1) on the thermistor, U7, that is disconnected - it's in the body of the symbol. Perhaps it needs connecting to something.

--
Regards,
Tony


 

On Tue, Mar 25, 2025 at 09:49 AM, John Woodgate wrote:
You didn't fix the path in RQ3E100AT_TH, but never mind. I can't see what is causing the singular matrix error.
Oh god ! Sorry again...
Ok, if you haven't noticed yet, I created a PTC symbol / model based upon John Popelish work. I just added a pin for the temperature.
Maybe you can look if there is something wrong at this stage ?
Thanks a lot,
Pascal


 

开云体育

On 25/03/2025 17:40, pilou via groups.io wrote:
I'm very sorry. I forget to correct paths into symbol and indeed I forget a lib too.
For R3, it wasn't connected to VCC: the wire was too long ;)
I just re-upload the whole schematic:
Are you sure? U2 and J2 are correct?

U2 is configured as an inverting amplifier and is connected to node OUT, which must always be positive. Therefore, U2's output should go negative, but it can't because it doesn't have a negative power rail, it is grounded.

Did you test each stage before connecting it all together?

--
Regards,
Tony


 

On Tue, Mar 25, 2025 at 10:44 AM, Tony Casey wrote:
Are you sure? U2 and J2 are correct?

U2 is configured as an inverting amplifier and is connected to node OUT, which must always be positive. Therefore, U2's output should go negative, but it can't because it doesn't have a negative power rail, it is grounded.
Hi Tony,
thanks a lot for your reply.
Indeed, it's an inverting amplifier.
But if you look closer, no need to negative supply as the amplifier positive input is connected to mid-supply: it acts as a "virtual ground".
I first tested the whole schematic without PTC and it "works" :)


 

开云体育

On 25/03/2025 19:07, pilou via groups.io wrote:
thanks a lot for your reply.
Indeed, it's an inverting amplifier.
But if you look closer, no need to negative supply as the amplifier positive input is connected to mid-supply: it acts as a "virtual ground".
I first tested the whole schematic without PTC and it "works" :)
Sorry. Yes, you're right.

--
Regards,
Tony


 

开云体育

On 25/03/2025 19:07, pilou via groups.io wrote:
Thanks a lot for your reply.
Indeed, it's an inverting amplifier.
But if you look closer, no need to negative supply as the amplifier positive input is connected to mid-supply: it acts as a "virtual ground".
I first tested the whole schematic without PTC and it "works" :)
I tested the whole schematic by removing the PTC and with R2 grounded, in a .OP analysis, and it didn't work in either 24.0.12 or 24.1.5 , although the errors are different:

24.1.5
Convergence Failure:? Time step too small; initial timepoint: trouble with instance "J2"

24.0.12
Singular matrix:? Check nodes v2#branch and u2:vn
?? Iteration No. 4
Singular matrix:? Check nodes v2#branch and u2:vn
?? Iteration No. 1
Singular matrix:? Check nodes v2#branch and u2:vn
?? Iteration No. 1
Singular matrix:? Check nodes v2#branch and u2:vn
?? Iteration No. 1
Singular matrix:? Check nodes v2#branch and u2:vn
?? Iteration No. 1
Singular matrix:? Check nodes v2#branch and u2:vn
?? Iteration No. 1
Singular matrix:? Check nodes v2#branch and u2:vn
?? Iteration No. 1
Singular matrix:? Check nodes v2#branch and u2:vn
?? Iteration No. 1
Starting source stepping with srcstepmethod=1
Source Step = 3.0303%
Source stepping failed

Singular matrix:? Check nodes u2:vn and u2:vp
?? Iteration No. 4
Fatal Error: Singular matrix:? check nodes u2:vn and u2:vp
?? Iteration No. 4

You can't conclude much from the errors.

If I also remove J1 as well, the circuit does simulate in 24.1.x, but not in 24.0.12 and foldback occurs at ~7.7A.

Hope that's helpful.

--
Regards,
Tony






 

开云体育

On 25/03/2025 19:07, pilou via groups.io wrote:
thanks a lot for your reply.
Indeed, it's an inverting amplifier.
But if you look closer, no need to negative supply as the amplifier positive input is connected to mid-supply: it acts as a "virtual ground".
I first tested the whole schematic without PTC and it "works" :)
Update:

Change V2 from 13VDC to:

PULSE(0 13 0 100u 0 1 2 1)

.. and the whole simulation works OK in both 24.0.12 and 24.1.5. You might also try using the "startup" switch in the .TRAN directive, which also works:

.TRAN 1 startup

--
Regards,
Tony


 

Hello Tony,
I hope you're doing well ?
Thanks you so much for your help, indeed it works on my side too with "startup" option.
How did you find that ? It's almost magic for me :)
However, I didn't try yet with PULSE(0 13 0 100u 0 1 2 1)
I tried with another PTC model and it does the "singular matrix" error again.
But it was worth a try !
Thanks you so much, I keep on :)


 

开云体育

On 27/03/2025 18:24, pilou via groups.io wrote:
I hope you're doing well ?
Thanks you so much for your help, indeed it works on my side too with "startup" option.
How did you find that ? It's almost magic for me :)
However, I didn't try yet with PULSE(0 13 0 100u 0 1 2 1)
I tried with another PTC model and it does the "singular matrix" error again.
But it was worth a try !
Thanks you so much, I keep on :)
The clue was that LTspice always failed to find the initial solution, i.e. the matrix state at time=0, rather than failure mid-way through the analysis, which is what happens in some problems.

From the point of view of this schematic, the difference is that with the "startup" switch, all DC voltage sources start at 0 and ramp up over the initial 20μs just like a real power supply (well, much faster, really), whereas if you use a "virtual" startup condition by using a pulse specification, you can do this one DC source at a time. Obviously, "startup" is much simpler to do.

I don't know where the exact problem was, since you say that all parts tested OK on their own. Sometimes the solution to a problem is more important than a complete understanding of the problem itself.? ;-)

--
Regards,
Tony