Hello everyone, I have a specific question, but I ...
# xschem
w
Hello everyone, I have a specific question, but I know that there are people with experience here. I'm testing an envelope detector project with Mosfet with Xschem and Ngspice. Considering the conversion gain definition *(20*log(rms(Vout)/rms(Vin)))*, I created a scheme with a sinusoidal source at the input with frequency of 2.4GHz and amplitude varying with
foreach
loop. So, using transient analysis (
tran 0.41n 3u 0 4p
), I used
meas tran dorms RMS v(do) from=0 to=3u
;
meas tran dinrms RMS v(din) from=0 to=3u
and
let cg = dorms/dinrms
for each amplitude value. I would like to know if this simulation schematic that I created makes sense and its the best way for obtain this simulation.
s
this query reaches a complexity level where to give a tangible help it is probably better to attach the schematic file(s) :-)
w
Right, sir. These are the schematic files. As I needed the gain depending on the input, I used a loop and the simulation takes time.
s
Thank you , looking at it...
I have refactored a bit your test schematic to remove absolute paths in the symbol instances. the attached
tar.gz
file creates a
conv_detector
directory. Start xschem inside this directory. I think your approach is correct. This is not a small signal analysis so no .AC can be used. I have made some mesurements in xschem and the values for
dinrms
,
dorms
and
cg
confirm the printed values. Image shows the results for the highest
amp
param value.
I have not understood exactly what is the purpose of the circuit. For very low input amplitudes the circuit operates linearly (AC coupler + LP filter) and filtered
do
goes quickly to zero. Anyway i am not a UHF expert so I might just be ignorant :-)
🙌🏼 1
w
I appreciate your help @Stefan Schippers. I know this was a very specific query. Knowing that it made no sense to do the AC simulation, I was having doubts about this schematic that I used, with the aim of getting the output DC voltage for each input value. This circuit detects the envelope of an ASK modulated signal. Thank you very very much. 😃