I have experimented a bit with the operational amplifier and decided to create the most simple opamp one could do (OPAMP.lib). This ideal opamp has a low pass filter to limit the bandwidth. The output resistance is also defined by a single series resistor. I have attached a schematic of the near ideal op amp (OPAMP.pdf). Using that opamp with all the transistors from the manufacturers gives a converging and a result which is expected. The initial operation point can be found with increased ITL values....
You made great effort to help so far. Thank you so much. You are right your version still doesn't converge in ac analysis. I continued to investigate what could cause the convergence problems. I kept the design from my first iteration and removed all voltage follower operational ampflifiers (OPA227). I placed voltage followers on both inputs Q3/Q6 relized by B devices as in your example. Then I replaced X8/X7/X12 with a B device calculating the output deviation for the PI controller input. With only...
Q3,Q6,X5,X6,X3/X4 form the most simple operational amplifier. This ampflifier acts as a non inverting ampflifier. The base of Q6 is the ampflifiers input which is controlled by the PI controller. Q4/Q5 is a current source for the differential amplifier. The current is set by R9. If you need the models I can send you these by mail. These models are manufacturer supplied models from their website. I don't want to get in touch with their law department due to make their models public here.
I changed the value of C2 to 100p and R16 to 1k. This results in oscillation of the output (See attachement). The absolutely unrealistic capacitor value was just a try.
The attached schematics desribe a PI controlled output driver for high voltages. Circuit2.pdf and the attached DC analysis for V6 show that the output stage is working as expected. Extending this with a simple PI controller (X13) results in non converging simulation. In the PI controlled approach, V6 is the target voltage divided by 40. I tried the standard things in spice like RSHUNT=10e12 and increasing the tolerance but all of that din't work. The simulation is not even able to find a solution...
I will try that. Are all the ngspice features still available when using this behavior?
Had everyone here ever successfully converted a complex spice model like OPA227 from Texas Instruments to ngspice? I started converting all the vswitch like mentioned in the manual and converted all noiseless resistor parameters but the operation point analysis is still not successful. After hours I gave up being desperate.
I created a few digital elements to make mixed mode simulation possible. Some of them is a simple and gate like this: * * AND models .SUBCKT d_and1 in1 in2 out abridge1 [in1] [in1_d] adc_buf abridge2 [in2] [in2_d] adc_buf a1 [in1_d in2_d] out_d and1 abridge5 [out_d] [out] dac_buf .MODEL adc_buf adc_bridge(in_low=1 in_high=2.5) .MODEL dac_buf dac_bridge(out_low=0 out_high=3.3 out_undef=0) .MODEL and1 d_and(rise_delay=0.5e-9 fall_delay=0.3e-9 input_load=0.5e-12) .ENDS d_and1 This is done by converting...