2
\$\begingroup\$

Lets talk about Colpitts oscillator again (or the very basic circuit theory if you want). Suppose I modeled circuit as on the schematics below

enter image description here

I am interested in systematic ways of obtaining circuit state-space equations with no ad hoc computations. Modified nodal analysis works fine but for obvious reasons I am iterested in ODEs rather than DAEs. In this simplified circuit there is proper tree (blue edges) and (red) co-tree.

To formulate state equations I need to write KCL for each capacitor and its selected node or supernode (see 19.3 in the link).

Situation is straightforward if I choose \$+\$node \$+v_{C_{\mathrm{b}}^{\mathrm{d}}}\$. Then we are left with \begin{equation} \frac{\mathrm{d}v_{C_{\mathrm{b}}^{\mathrm{d}}}}{\mathrm{d}t} + i_{R_c} - \alpha_{\mathrm{F}}i_{\mathrm{E}} - i_{R_b} = 0 \end{equation}

Problem. Suppose, that I choose + node of \$v_{C_{\mathrm{g}}}\$. As I understand, I should make something called supernode. By definition, supernode is the set of all braneches of the tree incident with the node. In this case it is \$v_{C_{\mathrm{b}}^{\mathrm{g}}}\$. Does it mean, that each time I must go along path of tree until I reach node, where there are only co-tree braneches?

For this example, does it mean, that \begin{equation} \frac{\mathrm{d}v_{C_g}}{\mathrm{d}t} + (1 + \alpha_{\mathrm{F}})i_{\mathrm{E}} + i_{R_{\mathrm{b}}} + i_{L}= 0 \end{equation}

Edit. I ended up with the equation below (with simplified notation \$C_g^b = C_1\$ and \$C_d^b = C_2\$)

\begin{align} \begin{bmatrix} 0 & -\frac{1}{L} & 0 & \frac{1}{L} & 0 \\ \frac{1}{C_g} & -\frac{1}{C_g R_B} & -\frac{1}{C_g R_B} & \frac{1}{C_g R_B} & \frac{1}{C_g R_B}\\ 0 & -\frac{1}{C_{g}^{b}R_B} & -\frac{1}{C_{g}^{b}R_B} & \frac{1}{C_{g}^{b}R_B} & \frac{1}{C_{g}^{b}R_B}\\ -\frac{1}{C_d} & \frac{1}{C_d R_B} & \frac{1}{C_d R_B} & -\frac{1}{C_d R_B} - \frac{1}{C_{d}^{b}R_C} & -\frac{1}{C_d R_B} - \frac{1}{C_{d}^{b}R_C}\\ 0 & \frac{1}{C_d R_B} & \frac{1}{C_d R_B} & -\frac{1}{C_d R_B} - \frac{1}{C_{d}^{b}R_C} & -\frac{1}{C_d R_B} - \frac{1}{C_{d}^{b}R_C} \end{bmatrix} \begin{bmatrix} i_L\\ v_g\\ v_1\\ v_d\\ v_2 \end{bmatrix} + \begin{bmatrix} 0\\ \frac{\alpha - 1}{C_g}\\ \frac{\alpha - 1}{C_g^b}\\ -\frac{\alpha}{C_d}\\ -\frac{\alpha}{C_d^b} \end{bmatrix}\frac{I_s}{\alpha}\left(\mathrm{exp}\,\left(\frac{v_g + v_1}{V_T}\right) - 1\right) + \begin{bmatrix} 0\\ 0\\ 0\\ \frac{1}{R_C C_d}\\ \frac{1}{R_C C_d^b} \end{bmatrix}\overline{U} \end{align}

If I choose \$ C_d = 2C_g\$, Runge-Kutta 45 integration converges with no additional scaling. Using stiff ODE solver implemented in Matlab, I can get all trajectories with values in ranges \$I_s = 10^{-13}\$ while \$C_g = 10^{-12}\$, \$R_b = 10^{5}\$ etc. But when I consider a situation where \$ C_d = C_g\$, integration is immediately singular from the beginning. I also check the process step by step using Euler explicit integration and it clearly showed that the current \$i_E\$ is growing extremely fast after few steps. Is something wrong with the circuit then? For \$\alpha = 0.99\$ and values \$R_c = 400\mathrm{k}\$, \$R_b = 4\mathrm{k}\$, \$C_d = C_g = 25\mathrm{pF}\$, \$L = 125\mathrm{nH}\$, both \$C_{\mathrm{block}} = 10\mathrm{nF}\$, \$\overline{U} = 5-10\mathrm{V}\$ it seems ok. Also simulation with NPN in LTSPICE worked fine. Is my simplified Ebers-Moll model misused?

\$\endgroup\$
13
  • \$\begingroup\$ Sorry, your graph does not look right. Help me out. Please label the nodes on the schematic and graph, and show assumed cap volts and ind current on schematic. \$\endgroup\$
    – user69795
    Commented Apr 10, 2021 at 18:17
  • \$\begingroup\$ Please, see edit \$\endgroup\$
    – struct
    Commented Apr 10, 2021 at 18:42
  • 3
    \$\begingroup\$ @struct You never need supernodes. Never. And frankly, I think they only tend to confuse people more than help them. I never use them. Not ever. I avoid them like the plague. \$\endgroup\$
    – jonk
    Commented Apr 10, 2021 at 19:08
  • \$\begingroup\$ @jonk Funny :) Can you provide any details how to proceed with my problem? I already tried brute force aproach and integrate system using Runge-Kutta, but equations were incorret since no oscillation occured, moreover, it was preserving initial conditions so I belive it was really conservative stable nonsense system. \$\endgroup\$
    – struct
    Commented Apr 10, 2021 at 19:16
  • 1
    \$\begingroup\$ @struct You still don't need supernodes, though. ;) Those are provably unnecessary. \$\endgroup\$
    – jonk
    Commented Apr 10, 2021 at 20:28

2 Answers 2

1
\$\begingroup\$

Do you really expect the integration to NOT blow up in your formulation? Thinking about it, I would suspect if you choose initial conditions where locally the oscillation criteria is fulfilled then naïve integration of these equations will simply result it the emitter current blowing up.

So as I see it, you need to implement what happens in the real world, i.e you will need some form of additional non-linearity/limiting for what would represent the limited supply voltage/current compliance, this will interact with the diode non linearity and give you stable limit cycles.

Spice for example does something similar with such devices, when it is attempting to converge it limits the slope of the exponential which is what also happens with real devices.

\$\endgroup\$
11
  • \$\begingroup\$ You mean something like a*tanh(ie)? \$\endgroup\$
    – struct
    Commented May 13, 2021 at 16:21
  • \$\begingroup\$ Yes that would be my first choice aswell \$\endgroup\$
    – MAM
    Commented May 13, 2021 at 18:44
  • \$\begingroup\$ But then it has vague physical meaning. It would become totally different system. \$\endgroup\$
    – struct
    Commented May 15, 2021 at 12:51
  • \$\begingroup\$ I dont think so. This is exactly how all real physical systems oscillate. There had to be a limiting process that ensures the poles stay on the jw plane otherwise the output will just grow and grow. Often this is due to the limitations of the device itself ie joule heating but also other physical constraints such as supply. \$\endgroup\$
    – MAM
    Commented May 15, 2021 at 15:53
  • 1
    \$\begingroup\$ I saw the paper and the guy is simulating the oscillator in spice. Look at the schematic, do you see his transistor drain circuitry is connected to a spice voltage supply? This is inherently limited ie, the drain voltage cannot go beyond a certain limit and hence serves as an additional nonlinear limiting element. So im not sure how that shows limiting on the supply is not part of the simulation? \$\endgroup\$
    – MAM
    Commented May 16, 2021 at 12:04
0
\$\begingroup\$

Is my simplified Ebers-Moll model misused?

Yes, you can't use an exponential in a linear model or a set of linear equations unless you check for stability, this is the subject of books and courses (if your really want to go this route, they cover the topic of stability and state space systems in many mutivariable controls classes).

The best route is to linearize the diode about the operating point. This is how spice works. It finds an operating point then creates a linear model about that point, then solves it with a solver, it then advances the timestep and then does it all over again.

The last problem with the whole simulation/circuit model is it also uses ideal sources and there are no parasitics of the components (most real world components have all three R L and C components. For example an SMT resistor will have a few pfs of capacitance in parallel and some inductance from the pads, wires and traces also have inductance and resistance) which will make the behavior differ vastly from a circuit (especially at high frequencies) built in the real world (like on a PCB).

\$\endgroup\$
6
  • \$\begingroup\$ SPICE uses MNA DAEs. I am using ODEs. The cnfusing thing is that you can easily integrate systems with exponentials using Runge-Kutta. For example famous Kennedy's common gate Colpitts and other. So there is no need for linearization. I just dont see why more simple circuits works perfectly but those with blocking capacitors not . \$\endgroup\$
    – struct
    Commented May 15, 2021 at 6:09
  • \$\begingroup\$ @struct From what I remember when briefly screwing around with ngspice code is that using an explicit integration method for solving capacitor/inductor ODEs is only universally stable if you have infinite computing precision. This is why SPICE and other solvers use implicit methods such as Backward Euler, Trapezoidal, or Gear. If my memory is correct, then Backward Euler can be considered a 1st order Runge-Kutta and Trap can be considered a 2nd order one. I don't have MATLAB on my machine but ODE45 sounds like an explicit method...so maybe that's why it breaks easily with minimal changes? \$\endgroup\$
    – Ste Kulov
    Commented May 17, 2021 at 2:24
  • \$\begingroup\$ Ok, but Matlab also has stiff solvers like ode15s with BDF as spice and nothing really change. I doubt its problem in solver \$\endgroup\$
    – struct
    Commented May 17, 2021 at 5:39
  • \$\begingroup\$ The first thing before solving is checking for stability, using spice to check the stability will only work if you're using the same system of equations, the same linearization and the same solver and timestep \$\endgroup\$
    – Voltage Spike
    Commented May 17, 2021 at 6:00
  • \$\begingroup\$ Of course I don't use the same equations as I clearly stated in the very first comment below your answer. \$\endgroup\$
    – struct
    Commented May 17, 2021 at 7:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.