VCO-Sqr - Voltage Controlled Square Wave Oscillator

Old Content - visit altium.com/documentation

Model Kind

General

Model Sub-Kind

Spice Subcircuit

SPICE Prefix

X

SPICE Netlist Template Format

@DESIGNATOR %1 %2 %3 %4 @MODEL #|PARAMS:| ?LOW|LOW=@LOW| ?HIGH|HIGH=@HIGH| ?CYCLE|CYCLE=@CYCLE| ?RISE|RISE=@RISE| ?FALL|FALL=@FALL| ?C1|C1=@C1| ?F1|F1=@F1| ?C2|C2=@C2| ?F2|F2=@F2| ?C3|C3=@C3| ?F3|F3=@F3| ?C4|C4=@C4| ?F4|F4=@F4| ?C5|C5=@C5| ?F5|F5=@F5|

Parameters (definable at component level)

The following component-level parameters are definable for this model type and are listed on the Parameters tab of the Sim Model dialog. To access this dialog, simply double-click on the entry for the simulation model link in the Models region of the Component Properties dialog.

Low

peak output low value (in Volts).

High

peak output high value (in Volts).

Cycle

duty cycle. Possible values can lie in the range 0 to 1.

Rise

rise time (in seconds).

Fall

fall time (in seconds).

C1

input control voltage point 1 (in Volts).

F1

output frequency point 1 (in Hertz).

C2

input control voltage point 2 (in Volts).

F2

output frequency point 2 (in Hertz).

C3

input control voltage point 3 (in Volts).

F3

output frequency point 3 (in Hertz).

C4

input control voltage point 4 (in Volts).

F4

output frequency point 4 (in Hertz).

C5

input control voltage point 5 (in Volts).

F5

output frequency point 5 (in Hertz).

Notes

The parameters C1, C2,... and F1, F2,... define the voltage to frequency conversion function. The C values define input voltage levels and the F values set the respective output frequencies generated for these input levels. Linear interpolation is used to define input/output values between the set points.

The voltage controlled square wave oscillator is not one of the built-in SPICE engine models. It is a complex device and, as such, is defined using the hierarchical sub-circuit syntax.

All of the parameters will normally have a default value assigned. The default should be applicable to most simulations. Generally you do not need to change this value. Entering a value for a parameter on the Parameters tab of the Sim Model dialog will override its specified value in the sub-circuit file.

To check the default values of the model, open the associated sub-circuit (.ckt) file. You can view the content of this file for the model specified on the Model Kind tab of the Sim Model dialog, by clicking on the Model File tab at the bottom of the dialog. The default parameter values are listed in the .SUBCKT line.

The simulation-ready voltage controlled square wave oscillator component (VCO-Sqr) can be found in the Simulation Special Function integrated library (\Library\Simulation\Simulation Special Function.IntLib).

Examples

Consider the voltage controlled square wave oscillator in the above image, with the following characteristics:

  • Pin1 (positive controlling node) is connected to net IN
  • Pin2  (negative controlling node) is connected to net GND
  • Pin3 (positive output node) is connected to net OUT
  • Pin4 (negative output node) is connected to net GND
  • Designator is V1
  • The linked simulation sub-circuit file is SQRVCO.ckt, with the following content:

*Voltage Controlled Square Wave Oscillator
*LOW   = Peak output low value
*HIGH  = Peak output high value
*CYCLE = Duty cycle 
*RISE  = Rise time
*FALL  = Fall time
*C1    = Input control voltage point 1
*C2    = Input control voltage point 2
*C3    = Input control voltage point 3
*C4    = Input control voltage point 4
*C5    = Input control voltage point 5
*F1    = Output frequency point 1
*F2    = Output frequency point 2
*F3    = Output frequency point 3
*F4    = Output frequency point 4
*F5    = Output frequency point 5
* Connections:
*              In+
*              | In-
*              | | Out+
*              | | | Out-
*              | | | |
.SUBCKT SQRVCO 1 2 3 4 PARAMS: C1=0 C2=1 C3=2 C4=3 C5=4 F1=0 F2=1k 
+ F3=2k F4=3k F5=4k LOW=0 HIGH=5 CYCLE=0.5 RISE=1u FALL=1u
A1 %vd(1,2) %vd(3,4) ASQRVCO
.MODEL ASQRVCO square(cntl_array=[{C1} {C2} {C3} {C4} {C5}]
+ freq_array=[{F1} {F2} {F3} {F4} {F5}] out_low={LOW}
+ out_high={HIGH} duty_cycle={CYCLE} rise_time={RISE} fall_time={FALL})
.ENDS SQRVCO

If no overriding values for the parameters are entered on the Parameters tab of the Sim Model dialog the entries in the SPICE netlist would be:

*Schematic Netlist:
XV1 IN 0 OUT 0 SQRVCO
.
.
*Models and Subcircuit:
.SUBCKT SQRVCO 1 2 3 4 PARAMS: C1=0 C2=1 C3=2 C4=3 C5=4 F1=0 F2=1k F3=2k F4=3k
+ F5=4k LOW=0 HIGH=5 CYCLE=0.5 RISE=1u FALL=1u
A1 %vd(1,2) %vd(3,4) ASQRVCO
.MODEL ASQRVCO square(cntl_array=[{C1} {C2} {C3} {C4} {C5}] freq_array=[{F1} {F2}
+ {F3} {F4} {F5}] out_low={LOW} out_high={HIGH} duty_cycle={CYCLE}
+ rise_time={RISE} fall_time={FALL})
.ENDS SQRVCO

The Netlister will evaluate the formulae in the sub-circuit definition using the default parameter values, as defined in the SQRVCO.ckt file.

You are reporting an issue with the following selected text and/or image within the active document:
ALTIUM DESIGNER FREE TRIAL
Altium Designer Free Trial
Let’s get started. First off, are you or your organization already using Altium Designer?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

In that case, why do you need an evaluation license?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Got it. You actually don’t need an evaluation license for that.

Click the button below to download the latest Altium Designer installer.

Download Altium Designer Installer

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Please fill out the form below to get a quote for a new seat of Altium Designer.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

If you are on Altium Subscription, you don’t need an evaluation license.

If you are not an active Altium Subscription member, please fill out the form below to get your free trial.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Why are you looking to evaluate Altium Designer?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

You came to the right place! Please fill out the form below to get your free trial started.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Sounds exciting! Did you know we offer special discounted student licenses? For more information, click here.

In the meantime, feel free to request a free trial by filling out the form below.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Got it. You can download a free Altium Designer Viewer license which is valid for a 6 months.

Please fill out the form below to request one.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

That’s great! Making things is awesome. We have the perfect program for you.

Upverter is a free community-driven platform designed specifically to meet the needs of makers like you.

Click here to give it a try!

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Got it. You can download a free Altium Designer Viewer license which is valid for a 6 months.

Please fill out the form below to request one.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.