Editor Version ×
Standard

1.Easy to use and quick to get started

2.The process supports design scales of 300 devices or 1000 pads

3.Supports simple circuit simulation

4.For students, teachers, creators

Profession

1.Brand new interactions and interfaces

2.Smooth support for design sizes of over 5,000 devices or 10,000 pads

3.More rigorous design constraints, more standardized processes

4.For enterprises, more professional users

Ongoing

STD How to simulate a Behavioural Voltage Controlled Oscillator (VCO)

License: Public Domain

Mode: Editors' pick

  • 4.8k
  • 0
  • 0
Update time: 2016-10-20 11:48:09
Creation time: 2015-03-18 21:48:36
Description
Two ways to implement a behavioural Voltage Controlled Oscillator in simulations. This project demonstrates a behavioural voltage controlled oscillator based on an integrator and a similar scheme where the integrator is replaced by the `TIME` function of ngspice (see: http://ngspice.sourceforge.net/docs/ngspice-manual.pdf#subsection.5.1.2 for details). #### Integrator based VCO B_isource_n_vlimiter forms a Voltage Controlled Current Source in parallel with a precision zener-like shunt clamp to provide the voltage limiting function. The output current from this source is integrated by capacitor CINTEGRATOR to generate a voltage, V(integral). The initial voltage across this capacitor is set by a `.ic` spice directive. V(integral) is then used to represent the phase of a sine function. The initial value to the ramp defines the initial phase of the sinusoid. The voltage into the integrator therefore represents frequency. Adding a voltage, V(phi) to represent the phase of the sine source also allows for phase modulation of the source. Applying a Unit Step, U(x), function to the sine function generates a square wave. By applying an inverse sine function to the sine function a triangle waveform is developed. A modulo divide function is used to divide the ramp into contiguous sawtooth segments. #### `TIME` variable based VCO The output voltage of each source is derived from the ngspice built-in variable, 'TIME' multiplied by the input voltage. Since TIME increases linearly, the slope of the ramp function so formed is proportional to the Frequency input control voltage. The ramp is then used to represent the phase of a sine function. Adding an initial value to the ramp defines the initial phase of the sinusoid. Adding a voltage, V(phi) to represent the phase of the sine source also allows for phase modulation of the source. Applying a Unit Step, U(x) function to the sine function generates a square wave. By applying an inverse sine function to the sine function a triangle waveform is developed. The same modulo divide function as used in the integrator based VCO is used to divide the time ramp into contiguous sawtooth segments. Putting V(sawout) or V(triout) of either version of the VCO into a comparator function such a U(x) would then give an adjustable duty cycle pulse output. Note that the frequency control input voltage of either version of the VCO can be negative which reverses polarity of the time ramp and so represents negative frequency: this is best observed on the sawtooth output. Open in Editor then CTRL+R to run the sim.
Design Drawing
schematic diagram
1 /
PCB
1 /
The preview image was not generated, please save it again in the editor.
ID Name Designator Quantity
1 1 CINTEGRATOR 1
2 1T RDCPATH 1
3 PULSE(0 1k 1u) V2 1
4 V=2*ABS( (V(integral)+V(phi)/180)/modulo-INT((V(integral)+V(phi)/180)/modulo) )-1 BSAW 1
5 I=gain*(V(inp,inn) + ( uramp(V(integral)-hilim) - uramp(-V(integral)+lolim) )/Rser) B_ISOURCE_N_VLIMITER 1
6 1 R1,R2 2
7 V=SIN((V(integral)+V(phi)/180)*pi) BSIN 1
8 V=invsin(SIN((V(integral)+V(phi)/180)*pi))*2/pi BTRI 1
9 90 V1 1
10 V=2*(U(SIN((V(integral)+V(phi)/180)*pi))-0.5) BSQR 1

Unfold

Project Attachments
Empty
Project Members
Target complaint
Related Projects
Change a batch
Loading...
Add to album ×

Loading...

reminder ×

Do you need to add this project to the album?

服务时间

周一至周五 9:00~18:00
  • 0755 - 2382 4495
  • 153 6159 2675

服务时间

周一至周五 9:00~18:00
  • 立创EDA微信号

    easyeda

  • QQ交流群

    664186054

  • 立创EDA公众号

    lceda-cn