Skip to content

ddt() causes singular matrix #156

Description

@serjaio

Casting the derivative of a voltage to a voltage brings about a "singular matrix" issue in NGSPICE and fails to converge.
Here's a test file debug.va

`include "discipline.h"
module modulename (x,debug);
  inout 		x,debug;
  electrical 	x,debug;
  parameter real alpha=0.2;

  analog begin
	//I(x)	    <+ ddt( V(x) );
	V(debug)	<+ ddt( V(x) );
  end
endmodule

I simulated with the file bench.sp:

V0 x 0 SIN 0 20 100 0 20
NDUT x debug coco
.model coco modulename
.control 
pre_osdi debug.osdi
tran 1e-6 100e-3
plot v(x) 
plot i(V0) 
nodeset all=0;
.endc
.end

On the other hand, the commented line, casting the derivative of a voltage to a current, behaving like a capacitor, works fine.
I am using ngspice-44 and openvaf 23.5.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions