Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Moved]: colpitts oscillator pspice

Status
Not open for further replies.

darkbasic

Newbie level 4
Newbie level 4
Joined
Jan 18, 2015
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
55
hpscan002.jpghpscan005.jpghpscan006.jpg

Hi,
I'm trying to simulate exercise 13.21(a) from Sedra-Smith, with:
  • Vcc=5V
and the following BJT model:
Code:
.model modn NPN(Is=6.734f Xti=3 Eg=1.11 Vaf=74.03 Bf=416.4 Ne=1.259 Ise=6.734f Ikf=66.78m Xtb=1.5
Br=.7371 Nc=2 Isc=0 Ikr=0 Rc=1 Cjc=3.638p Mjc=.3085 Vjc=.75 Fc=.5 Cje=4.493p Mje=.2593 Vje=.75
Tr=239.5n Tf=301.2p Itf=.4 Vtf=4 Xtf=2 Rb=10)

This is the circuit in pspice:

oscillatore1.png

(I had to put R2=1f because otherwise the simulation didn't converge)

Since I have two conditions for oscillation:

Code:
Im{A*B(jw)}=0
Code:
A*B(jw0)=1

but three electrical reactancesto size, then I have one degree of freedom so I chosed C1=L.

I also chosed I = 1*10^-6 A which should be fine because the BJT works in the forward-active region.

Unfortunaly when I simulate it I get very different results when I change the Run Time or Max Step Size values:

oscillatore2.pngoscillatore3.pngoscillatore4.pngoscillatore6.png

What's wrong? :-(

- - - Updated - - -

This is the project file, including the models library if someone wants to try it:
https://drive.google.com/file/d/0Bwe9Wtc-5xF1S0xQb2F2Mkh0REk/view?usp=sharing

Thanks
 

Re: colpitts oscillator pspice

You made a mistake...
The bias circuit has not been considered and not shown for simplicity and the author has put an equivalent circuit only.But you have to bias this oscillator to make it functional.
I couldn't see any bias circuit for proper operation but there should be...
 

Re: colpitts oscillator pspice

Hi, thanks for your answer. Why do I need to bias the circuit and how should I do it? The only DC requirement I know is the BJT working in the forward-active region which is satisfied:

**broken link removed**

P.S.
I forgot to say f=100 kHz.
 

The calculation seems correct to me, as well as the circuit, even if a value of 1uA is a little bit too low. I think you should try using at least 2uA. However your simulation much probably doesn't work because you used batteries for Vcc and -Vcc supply. This means these voltages are supposed to be there from -inf, then capacitor and inductors are supposed (by the simulator) to be charged. The faster way to sove the problem should be using instead two pulse generators (0-->5V for Vcc and 0-->-5V for -Vcc) with duration and period longer than simulation duration.
Also I think the output capacitor is definitely too high , use instead a 10uF, for instance.
Last, you have to observe the output for a much longer time (1 second or even more)
 

It should work if you have your simulator setup correctly. Make sure your max time-step is small enough.
 

Attachments

  • osc_100k.png
    osc_100k.png
    28.3 KB · Views: 105

The calculation seems correct to me, as well as the circuit, even if a value of 1uA is a little bit too low. I think you should try using at least 2uA. However your simulation much probably doesn't work because you used batteries for Vcc and -Vcc supply. This means these voltages are supposed to be there from -inf, then capacitor and inductors are supposed (by the simulator) to be charged. The faster way to sove the problem should be using instead two pulse generators (0-->5V for Vcc and 0-->-5V for -Vcc) with duration and period longer than simulation duration.
Also I think the output capacitor is definitely too high , use instead a 10uF, for instance.
Last, you have to observe the output for a much longer time (1 second or even more)

Thank you very much for checking my circuit and for your advices. Unfortunately I already tried with both a bigger current and a longer simulation duration without results.

Here is the circuit with two pulse generators and a 10uF output capacity:

oscillatore_pulse1.jpegoscillatore_pulse2.jpeg

It still doesn't work and now the output is completely flat :(


It should work if you have your simulator setup correctly. Make sure your max time-step is small enough.

Thanks for your answer, this is with a 300us run time (the one you used) and with a VERY small 100ps max step size:

oscillatore_a_bit_smaller_step.png

It took quite a few time to simulate.



To prove a different max step size will lead to a different result I did one more simulation with an EVEN LOWER max step size: 10ps

oscillatore_very_small_step.png

It took way more time, and I got a completely different result.


In your circuit I noticed you attached C2 to VS2 instead of ground, why? You also don't have an output capacitor and a load resistance. Can you please try to simulate my very same circuit to see if it leads to correct results for you? Thanks
 

I've just tried with microcap, I=3uA, max step size=1us and I see oscillations starting after about 1.5 seconds. Are you sure you can leave the field PER of the generators blank ? Please check the behaviour of the two power supply.
Later I'll check better your simulation
 

I've just tried with microcap, I=3uA, max step size=1us and I see oscillations starting after about 1.5 seconds.

Did you remember to to size the reactances accordingly? Otherwise if you just modify the current generator you don't get 100kHz oscillations anymore.

I did size the reactances one more time with a 10uA current, this is what I got:

pspice1.png

Unfortunately I can't manage to simulate it even with a 1ms Run Time and 1us Max Step size, it's simply too slow...

pspice3.pngpspice2.png


I'm really starting to think I will need to make some modifications to be able to simulate it, but which ones?


Are you sure you can leave the field PER of the generators blank ? Please check the behaviour of the two power supply.

Yes, I checked them and they seem to work fine.

Later I'll check better your simulation

Thanks, it's really appreciated.

P.S.
Sei Italiano anche tu!?
 

In your circuit I noticed you attached C2 to VS2 instead of ground, why? You also don't have an output capacitor and a load resistance. Can you please try to simulate my very same circuit to see if it leads to correct results for you? Thanks

Should make no difference. My time step max is set to 10 nS to obtain the result. Can you set your simulator to use "initial conditions" during TA?

- - - Updated - - -

I think your simulator's problem is handling the initial conditions. I tried a few other simulators, and not all handle this problem very well. One simulator took over 100 mS of CPU time to start showing oscillations.
Some things you could try to see if this is your problem:
a) Run TA but with "calculate initial operating DC bias disabled."
b) Run with a 1 mA current source to see if you get any oscillations. Try a max time-step of 100 nS and simulate for say 50 mS.

The last plot shows that even with a 100 uA current source this one simulator took 40 mS to show start of oscillations.
 

Attachments

  • osc1_100k.png
    osc1_100k.png
    31.1 KB · Views: 93
  • osc_100k_slow.png
    osc_100k_slow.png
    9.7 KB · Views: 91
Last edited:
Finally I found the problem(s), there were many of them!

1) The biggest one were the initial conditions (thanks E-design!). After selecting "Skip the initial transient bias point calculation" (SKIPBP) in PSpice simulation's options everything got better.
2) Another big problem was in the math: I didn't size reactances well. I did it well, but just barely. In fact assuming A*B(jw0)=1 you barely get a persistent oscillation and a small rounging is enough to let it fade. So I assumed A*B(jw0)=100 when sizing reactances.
3) I had to put another small resistor in the project (R2=1f) because otherwise the simulation didn't converge, but it seems it was too small and I still had convergence problems in some circumstances. So I changed it to 1 mOhm instead.
4) The output capacitor took a long time to load (which wasn't a problem), but also lead to convergence problems in some circumstances. So I changed it to 1nF.
5) I also increased the current generator I1 to 1mA to get the oscillations sooner.
6) Finally I sized the reactances once again, assuming L=C1*10^3 to get more realistic values.
7) Now THD is ~1% for the first 50 harmonics!

circuit1.pngcircuit2.pngcircuit3.pngcircuit4.pngcircuit5.pngcircuit6.pngcircuit7.png

Thanks to everybody, I would have never made it if it wasn't for your help!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top