0
\$\begingroup\$

I am trying to simulate Bubba Oscillator using MATLAB, so far i have had success getting both sinusoidal and cosine curves from below circuit : enter image description here

I have used finite gain op-amp with gain = 100000; and rest of the values are marked in the circuit.

The results that i got were : enter image description here

enter image description here

My questions are :

1.) How can i make the graphs more smoothers, instead of that peaky shape that they follow?

2.) How can i make the graphs with reference y point as 0 i.e symmetry about x-axis?

3.) How can i make the amplitude to -1 <--> +1?

Any help would be appreciated. Thanks in advance...

\$\endgroup\$
1
\$\begingroup\$

The issue is to do with displaying and something call refinement (more of an issue for variable timestep algorithms)

[img]

under simulation -> model config -> data import/export ... there is an "additional parameters" expand. In there is "refine factor" which defaults to 1. Change this number enter image description here

[img]

\$\endgroup\$
  • \$\begingroup\$ +1, @JonRB Thanks , once again.. What about the other two of my questions? How do i make my amplitude +-1 & symmetry around x-axis? \$\endgroup\$ – Dravidian Oct 4 '17 at 8:33
  • \$\begingroup\$ Can i manipulate something in my circuit to give the desired result??? \$\endgroup\$ – Dravidian Oct 4 '17 at 8:39
  • \$\begingroup\$ To make it symmetrical use a blocking capacitor. To make it +-1V use a final gain stage (or change the internal gain of the oscilator) \$\endgroup\$ – JonRB Oct 4 '17 at 9:01
1
\$\begingroup\$

1) not sure of how ml works, but spice simulators are smart and regulate the time step depending on how confident they are of the solution they found. With (co)sinusoids they usually are very confident and you can see 4 or 5 points per period, connected by straight lines (linear interpolation). Solution: force Matlab to use your timestep, set it to 1/10 of the period or less.

2) either post process the data, subtracting the average calculated on a single whole period or on a large (100ish) number of periods, or AC couple your voltage probes. Since you are doing circuit simulation I would go with AC coupling. Put a big (some Fs) cap between the voltage probe and the node you wanna probe, and a big resistor (1G) to ground, on the voltage probe side.

3) This is not so easy. Try manually tuning the 1.4 M resistor and see if you can obtain reliable operation. If you want an automated circuit to do this for you, it is an entirely different question, search for Automatic Gain Control.

\$\endgroup\$
1
\$\begingroup\$

Well, no matter how small your time step will be, the circuit you are using is a phase shift oscillator and unless there is something in the circuit that limits the overall amplitude (like a non-linear device) the amplitude of the sine wave produced will tend to distort at the peaks as the op-amp output reaches saturation against the power rail.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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