2

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?

struct
  • 117
  • 6
  • 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. – user69795 Apr 10 '21 at 18:17
  • Please, see edit – struct Apr 10 '21 at 18:42
  • 3
    @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. – jonk Apr 10 '21 at 19:08
  • @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. – struct Apr 10 '21 at 19:16
  • @struct First, I'm just a hobbyist. Never had any classes in electronics. Not even a DC class. But oscillators are a little more complex to analyze and I only ever attempt them using the s-domain Laplace notation. In those cases I have any experience with, I've been able to assume that I want to find what happens at 180-degrees. So I can just set the imaginary part to zero and solve for the frequency of oscillation as well as attenuation of the passive part (which is usually what I'm analyzing, as I know some gain is needed to sustain it.) – jonk Apr 10 '21 at 19:30
  • @struct I wouldn't even begin using your approach. KCL and KVL still works in Laplace. – jonk Apr 10 '21 at 19:31
  • @jonk in fact in nonlinear case you cant use Laplace transform. Moreover, there is nothing like linear oscillator with stable limit cycle. This is the reason for time domain formulation. But it has nothing to do with the problem I have and what is the merit of the question. – struct Apr 10 '21 at 19:57
  • @struct I would tentatively disagree that Laplace can't be used in the Colpitts case. I've used it successfully in multiple cases with BJT circuits, which as you know are non-linear in large signal. But you know better than I do. :) So we will leave it there. – jonk Apr 10 '21 at 20:04
  • @jonk of course you can obtain build-up condition using Laplace but only for linearized Colpitts. You cant tell however nothing about power or stability of solution (center manifold theorem). Thank you anyway :) – struct Apr 10 '21 at 20:08
  • @struct Ah. I misunderstood the goals. Not for the first time or the last. – jonk Apr 10 '21 at 20:20
  • 1
    @struct You still don't need supernodes, though. ;) Those are provably unnecessary. – jonk Apr 10 '21 at 20:28
  • I have spent some time trying to understand your equations. You seem to use gate and drain, when you mean base and collector. That is confusing. The quantity vbe in your ebers moll should be vg, not vg-v1, because the emitter is grounded. Also, to answer your last question, you should be using the more complete ebers-moll equation. You are using the one only valid for forward biased transistors, but the transistor is often biased off and backwards. – user69795 May 10 '21 at 04:10
  • I dont see how vbe is vg. Also backward biasing is not useful, since vast majority of the modern BJTs can provide this regime. You mean thatthis simplified model cant model saturation mode? – struct May 12 '21 at 05:40

2 Answers2

1

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.

MAM
  • 1,801
  • 13
  • 24
  • You mean something like a*tanh(ie)? – struct May 13 '21 at 16:21
  • Yes that would be my first choice aswell – MAM May 13 '21 at 18:44
  • But then it has vague physical meaning. It would become totally different system. – struct May 15 '21 at 12:51
  • 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. – MAM May 15 '21 at 15:53
  • Does it oscillate if u limit the current? – MAM May 15 '21 at 15:54
  • Also the nodes you have assumed to be ground are not really ground now are they? They are small signal ground, so this model isnt quite right for large signal simulations without limitng i think – MAM May 15 '21 at 15:55
  • Sure it oscillate. But there is no clear interpretation for choice of 'a' in the limitation a*tanh(ie). Also my equations seems to not provide any biasing. Limitation should be provided via Shockely equations. Please see https://www.researchgate.net/publication/306097631_Implementation_of_Chaotic_Colpitts_Oscillator_in_Microwave_Frequency RK45 integration is totally safe even with wide range of values. I mean pF with mH etc. And finally I dont get your comment with grounding. These gnds are just gnds. No change should occur. – struct May 16 '21 at 08:41
  • 1
    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? – MAM May 16 '21 at 12:04
  • Ok, you clearly see something what I cant. Is it possible to make similar option as he did in my schematics? Please note, that I succesfully integrated his three state space equations using Runge-Kutta, I dont care about spice. – struct May 16 '21 at 16:16
  • For a start i think your circuit is not correct for large signal simulations. How did you come up with it? – MAM May 16 '21 at 16:38
  • I just took common emitter Colpitts oscillator with blocking both base and collector. Then I replaced BJT with Ebers-Moll. And thats it. It is exactly what other papers does, right? I dont get why it needs some modificiation as nobody really showed some. – struct May 16 '21 at 16:45
0

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).

Voltage Spike
  • 75,799
  • 36
  • 80
  • 208
  • 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 . – struct May 15 '21 at 06:09
  • @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? – Ste Kulov May 17 '21 at 02:24
  • Ok, but Matlab also has stiff solvers like ode15s with BDF as spice and nothing really change. I doubt its problem in solver – struct May 17 '21 at 05:39
  • 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 – Voltage Spike May 17 '21 at 06:00
  • Of course I don't use the same equations as I clearly stated in the very first comment below your answer. – struct May 17 '21 at 07:59
  • Also I am not sure about what you mean by linearization. Since expected invariant set is a stable limit cycle, eigenvalues of the system have zero real part. In such case, linearization is not enough (Hartmann-Grobmann theorem holds only for hyperbolic equilibria) and one has to deal with center manifold to decide wheter the solution is stable or not. Right? But that is too far if I cant check my results with numeric ones. So is there some singularity in my ODEs and if so, is it possible to rewrite those equations to avoid it? I am lost exactly on THIS. – struct May 17 '21 at 08:18