¿ªÔÆÌåÓý

analysis failed matrix is singular


 

Hallo all together,

I want to make an AC - simulation of a Boost Converter by its Laplace transfer function.
For that I have designed a subcircuit Boost.sub , a symbol Boost.asy and a circuit Control.asc
which you can find in Files->Temp->AC-Analysis problem.

1) When I want to simulate the circuit I get the error "Analysis failed matrix is singular"
Where does it come from and how can I prevent it except the option to switch a resistor between
each node and GND which results in wrong bode plot?

2) Does anybody know a tutorial which shows how to design the boost converter as a subcircuit where I can make doubleclick on it and get displayed the inner circuit?

Thank you very much!!!

Best regards,

Patrick



 

Patrick asked:

? ?"1) When I want to simulate the circuit I get the error "Analysis failed matrix is singular"
? ? ??
Where does it come from and how can I prevent it except the option to switch a resistor between?

? ? each node and GND which results in wrong bode plot?"

My somewhat lame explanation is this: ?One of the things that LTspice needs to do, is to invert the matrix of equations that describes the circuit. ?If that matrix is very close to singular (very "stiff" and not easy to manipulate), it means it is unable to successfully invert the matrix. ?In a very very crude sense that is like calculating the ratio between two numbers, both of which are vanishingly close to zero ... can't be done.

If the option you mention to put a resistor between each node and GND, is to add a GSHUNT, you can vary the size of GSHUNT to trade-off between getting it to work, and having it mess up the results. ?Make GSHUNT very small (RSHUNT very large) and see if it helps. ?Helmut is good about finding the right combinations and alternative methods.

By the way, I can't try your simulation because it refers to a model file in a Windows directory that does not exist on my computer. ?(That's why we recommend keeping models together with schematics, and never using absolute filespecs to refer to anything.)

In an .AC simulation, the first thing LTspice needs to do is find the DC operating point. ?After that, it can determine the small-signal equivalent circuit, from which it calculates the AC response. ?I noticed your DC power source has a DC voltage of zero. ?Is that realistic? ?You are asking for the AC response when no power is applied.

Regards,
Andy



 

Hello Patrick,

Your subcircuit was wrong. The correct syntax for your subcircuit should be as shown below. Compare every line to see what I have changed.


*Pinbelegung
*Pin 1: Input
*Pin 2: Output
*Pin 3: GND
*
.subckt Boost in out 0
.param Dq=1 L1=1m R1=1 C1=1m
G1 0 OUT IN 0 =Laplace({Dq}*(1-(s*{L1}/({Dq*Dq*R1}))))
R1 OUT 0 {R1}
C1 OUT 0 {C1}
.ends

Nevertheless this circuit? will not be correctly simulated, because LTspice requires a high frequency roll off. Avoid Laplace.
Your simple function can be replaced by a simple RLC circuit.

Best regards,
Helmut