The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 1st, 2024, 7:12pm
Pages: 1
Send Topic Print
VCO model from the Verilog-AMS section (Read 2526 times)
trond
Senior Member
****
Offline



Posts: 168
Glasgow, Scotland
VCO model from the Verilog-AMS section
Aug 11th, 2005, 7:12am
 
I was wondering whether there is a way of modelling the VCO from the AMS section so that it accepts negative voltages and has the lowest output frequency when the input is at its most negative value. I initially changed the switching points for the phase to also take negative values into consideration; however,  then I will end up with the same output frequency for two identical input values, one being positive and one being negative. Can anyone please suggest a way of having a VCO accepting negative input values?

Thanks.
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: VCO model from the Verilog-AMS section
Reply #1 - Aug 11th, 2005, 9:29pm
 
Can you post the model you have? It's hard to see why this should be a problem without some idea as to what your model looks like.

Most VCO models tend to work by converting the input voltage to a frequency (gain*V(in)+fc) and then integrating that (using idtmod), and then using this as the phase for sin() or cos(). If modelled like this, negative input voltages wouldn't be a problem - provided that the overall frequency remains positive.

In other words:

Code:
inst_freq = gain*V(vin)+fc;
phase = idtmod(inst_freq,0,1);
V(vout) <+ amp*sin(2*`PI*phase);
 



Regards,

Andrew.

Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.