The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Simulators >> RF Simulators >> Simulate a Direct Conversion Mixer with Eldo-RF and ADMS https://designers-guide.org/forum/YaBB.pl?num=1216663909 Message started by trumpeu on Jul 21st, 2008, 11:11am |
Title: Simulate a Direct Conversion Mixer with Eldo-RF and ADMS Post by trumpeu on Jul 21st, 2008, 11:11am Hi I was trying simulate a Direct Conversion Mixer with Eldo-RF and ADMS but the sources do not work good and the results off simulation is not agree. The result don't show the constellation both the input and the output. I will describe the SPICE and Verliog AMS archives: Verilog Ams Quote:
Spice: Quote:
Thanks for atention Ps. I use the tutorial http://www.designers-guide.org/Modeling/modeling-rf-systems.pdf for develop this situation Ps. Sorry for the English |
Title: Re: Simulate a Direct Conversion Mixer with Eldo-RF and ADMS Post by pancho_hideboo on Jul 21st, 2008, 5:12pm Why do you set local frequency(FUND2) as 1.1GHz while you state "Direct Conversion Mixer" ? trumpeu wrote on Jul 21st, 2008, 11:11am:
What do you refer as disagreement ? trumpeu wrote on Jul 21st, 2008, 11:11am:
You seem to apply 16QAM signal with carrier frequency of 1.0GHz and Rsymb=20MHz as RF input signal. Show me your constellation results. To plot constellation you have to tune sampling timing of symbol. I can't find even symbol_rate setting in your plot setup. Do you understand difference of constellation and trajectory ? For example, constellation function of Agilent ADS is like following. constellation(i_data, q_data, symbol_rate, delay) Here symbol_rate and delay are required. Even if there is no filter in your setup, you have to delay at least Tsymb/2-Tstep to plot constellation. trumpeu wrote on Jul 21st, 2008, 11:11am:
Although I don't know eldoRF, I guess the above two statement combination is for envelope analysis. trumpeu wrote on Jul 21st, 2008, 11:11am:
In the above, there is no specification of harmonic to observe. To plot constellation or trajectory of V(11), you have to specify harmonic=(1,0), that is 1GHz. Then plot {vr(11), vi(11)}. While, to plot constellation or trajectory of V(22) or V(31), you have to specify harmonic=(-1,1), that is 100MHz. Then plot {vr(22), vi(22)} or {vr(31), vi(31)} . In eldo/ADMS, where do you set such harmonics for envelope analysis ? |
Title: Re: Simulate a Direct Conversion Mixer with Eldo-RF and ADMS Post by trumpeu on Jul 23rd, 2008, 8:15am First thanks for the answer pancho_hideboo wrote on Jul 21st, 2008, 5:12pm:
Sorry I wrote wrong in the last post. FUND2=1GHz. pancho_hideboo wrote on Jul 21st, 2008, 5:12pm:
If I use FUND1=FUND2=1GHz I obtain this constellation(Plot source with v(11).h(1,0)): The plot off in and out has attach IT's OK But IF I will change the verilog source, add a second order intermodulation. I don't see the modification of constellation. I'm thinking that the results of mixer h(1,-1) is different of the dc output h(0,0) but I would like to see in same time. What I think is correct? pancho_hideboo wrote on Jul 21st, 2008, 5:12pm:
Ok, I have used a EZWAVE for plotting the constellation, I have used a TCL archive for tune the sampling: Quote:
pancho_hideboo wrote on Jul 21st, 2008, 5:12pm:
it's same of ADS constellationdiagram(complex(i_data,q_data, T_symbol,delay) pancho_hideboo wrote on Jul 21st, 2008, 5:12pm:
Yes, It's same to ADS envelope analysis trumpeu wrote on Jul 21st, 2008, 11:11am:
In the above, there is no specification of harmonic to observe. And my problem is that I don't see the dc off-set of second order intermodulation thank you for attention |
Title: Re: Simulate a Direct Conversion Mixer with Eldo-RF and ADMS Post by pancho_hideboo on Jul 23rd, 2008, 4:50pm What your question or what you want to know is very unclear. This is also true for your first post. Please explain more clearly. trumpeu wrote on Jul 23rd, 2008, 8:15am:
No. If LO frequency(Fund2) is same as RF frequency(Fund1), you must not do two tone envelope analysis. You have to set netlist like following. Vol 12 0 RPORT=50 four FUND1 MA (1) 50m 0 Vol1 13 0 Rport=50 four FUND1 MA (1) 50m 90 .SST fund1=1GHz NHARM1=3 .modsst 5n 10u trumpeu wrote on Jul 23rd, 2008, 8:15am:
Attached plot is just one. Is this for input(V(11)) or output(V(22)+j*V(31)) ? I think attached figure is input signal's constellation. Also you have to resimulate with one tone envelope analysis, and then you have to plot v(11).h(1). trumpeu wrote on Jul 23rd, 2008, 8:15am:
What is OK ? Explain in detail. There is no output constellation for comparison. trumpeu wrote on Jul 23rd, 2008, 8:15am:
Second order nonlinearity already exists in your Verilog-A code. Do you mean that there is no change in output constellation(V(22)+j*V(31)) even if you change iip2 value ? But you don't show any output constellation and your simulation setup is wrong. trumpeu wrote on Jul 23rd, 2008, 8:15am:
I can't understand the above statements. If you do correct simulation setup where one tone envelope is invoked, you should plot real(v(11).h(1))+j*imag(v(11).h(1)) for input constellation and real(v(22).h(0))+j*real(v(31).h(0)) for output constellation. trumpeu wrote on Jul 23rd, 2008, 8:15am:
Maybe your problem is that you don't understand general RF simulation technique such as HB and Envelope analysis. When I have spare time, I will plot constellation of input and output using your Verilog-A code and Agilent ADS later. |
Title: Re: Simulate a Direct Conversion Mixer with Eldo-RF and ADMS Post by pancho_hideboo on Jul 24th, 2008, 7:45pm This is result of ganho_dB=72, iip3_dBm=-10 and iip2_dBm=10. |
Title: Re: Simulate a Direct Conversion Mixer with Eldo-RF and ADMS Post by pancho_hideboo on Jul 24th, 2008, 7:46pm This is result of ganho_dB=72, iip3_dBm=-10 and iip2_dBm=-30. |
Title: Re: Simulate a Direct Conversion Mixer with Eldo-RF and ADMS Post by pancho_hideboo on Jul 24th, 2008, 8:21pm Different from IM3, there are many types in IM2 definition. See the following. http://www.designers-guide.org/Forum/YaBB.pl?num=1193566207 For example, self mixing of RF input, Half-IF, proximity of two tones in RF, etc. Your Verilog-A is not proper for any type of IM2 which causes inband interference. The following is modified Verilog-A code for RF self mixing or RF two tones in close proximity. But strictly speaking, this implementation is not so proper, you have to scale and limit IM2 implementation. Also you can't express Half-IF with this implementation. Anyway you have to build your own mathematical formulation to model IM2 issue you concern. "trumpeu_iq_down_mixer.va" // trumpeu Demodulator IQ `include "discipline.h" `include "constants.h" module trumpeu_iq_down_mixer(rf_in, lo_i_in, lo_q_in, if_i_out, if_q_out); inout rf_in, lo_i_in, lo_q_in; output if_i_out, if_q_out; electrical rf_in, lo_i_in, lo_q_in; electrical if_i_out, if_q_out; parameter real rin = 50; //input impedance parameter real rout= 50; //output impedance parameter real ganho_dB = 10; //Gain in dB parameter real iip3_dBm = -10; //third order intercept point parameter real iip2_dBm = 2; //second order intercept point real ga, gb, gc, Aiip3, Aiip2, vin, vin2, vout; analog begin @(initial_step) begin //Parameters conversion ga = pow(10, ganho_dB / 20.0); //Gain conversion Aiip3 = sqrt(pow(10, iip3_dBm / 10.0) * 2 * rout * 0.001); gc = (4.0 / 3.0) * ga/(Aiip3*Aiip3); Aiip2 = sqrt(pow(10, iip2_dBm / 10.0) * 2 * rout * 0.001); gb = ga / Aiip2; end // initial_step I(rf_in) <+ V(rf_in) / rin; I(lo_i_in) <+ V(lo_i_in) / rin; I(lo_q_in) <+ V(lo_q_in) / rin; vin = V(rf_in); vin2 = vin * vin; vout = (ga - gc*vin2) * vin; V(if_i_out) <+ vout * V(lo_i_in) + gb*vin2; V(if_q_out) <+ vout * V(lo_q_in) + gb*vin2; end // analog endmodule |
Title: Re: Simulate a Direct Conversion Mixer with Eldo-RF and ADMS Post by pancho_hideboo on Jul 24th, 2008, 8:25pm The following is Agilent ADS netlist I used. Hybrid style netlist of Agilent ADS and Cadence Spectre Syntax. "test_trumpeu_iq_down_mixer.ads" simulator lang=ads Options ResourceUsage=yes UseNutmegFormat=no \ TopDesignName="./data/test_trumpeu_iq_down_mixer.ds" define My_QAM16src( Vout ) parameters Carrier_freq=1 GHz SymbolRate=1 MHz \ Pout_dBm=0 _dBm Rout=50 Ohm num_states=16 Comp_Gain=2 SF=Comp_Gain/2.236 UniformDist=_uniform(-0.5, num_states-0.5) Vcontrol=_randvar(UniformDist, int(time*SymbolRate)) V_Source:SRC3 Vstate_in 0 Type="V_DC" Vdc=Vcontrol SaveCurrent=0 V_Source:SRC4 Vin 0 Type="V_1Tone" V[1]=dbmtov(Pout_dBm, Rout)/2 \ Freq[1]=Carrier_freq Vac=polar(1,0) V SaveCurrent=0 #uselib "sml" , "N_StateMod" N_StateMod:MOD1 Vin Vout Vstate_in \ MaxStates=num_states Fnom=Carrier_freq Rout=Rout \ StateArray=scalearray( SF, list( \ 1, 3, 2-j, 1-j*2, -j*3, -1-j*2, -2-j, -3, \ -2+j, -1+j*2, j*3, 1+j*2, 2+j, j, -1, -j) ) end My_QAM16src simulator lang=spectre global 0 ahdl_include "./trumpeu_iq_down_mixer.va" parameters RF_freq=1G parameters Tsymb=50n parameters Rsymb=1/Tsymb parameters Samples_per_Symbol=10 parameters Tstep=Tsymb/Samples_per_Symbol parameters numSymbols=256 parameters Tstop=numSymbols*Tsymb parameters ganho_dB=72 parameters iip3_dBm=-10 parameters iip2_dBm=10 I0 (rf_in) My_QAM16src + Carrier_freq=RF_freq SymbolRate=Rsymb Pout_dBm=10-ganho_dB Rout=50 I1 (rf_in lo_i_in lo_q_in if_i_out if_q_out) trumpeu_iq_down_mixer + iip3_dBm=iip3_dBm iip2_dBm=iip2_dBm ganho_dB=ganho_dB PORT_LO_I (lo_i_in 0) port num=1 r=50 type=sine freq=RF_freq + dbm=10 sinephase=0 PORT_LO_Q (lo_q_in 0) port num=2 r=50 type=sine freq=RF_freq + dbm=10 sinephase=90 simulator lang=ads HB:Env1 MaxOrder=4 Freq[1]=RF_freq Order[1]=3 FundOversample=2 \ Restart=no UseGear=no EnvIntegOrder=1 EnvBandwidth=1 \ EnvWarnPoorFit=yes EnvUsePoorFit=yes StatusLevel=2 \ SweepVar="time" SweepPlan="Env1_stim" OutputPlan="Env1_Output" SweepPlan: Env1_stim Stop=Tstop Step=Tstep Tran:Env1_tran HB_Sol=1 SteadyState=1 \ Freq[1]=RF_freq Order[1]=3 StatusLevel=3 \ OutputPlan="Env1_Output" Component:tahb_Env1 Module="ATAHB" Type="ModelExtractor" \ Tran_Analysis="Env1_tran" HB_Analysis="Env1" OutputPlan:Env1_Output \ Type="Output" \ UseNodeNestLevel=yes \ NodeNestLevel=0 \ UseEquationNestLevel=yes \ EquationNestLevel=0 \ UseSavedEquationNestLevel=yes \ SavedEquationNestLevel=0 \ SavedEquationName[1]="Rsymb" \ SavedEquationName[2]="Tstep" \ SavedEquationName[3]="Tstop" \ SavedEquationName[4]="Tsymb" \ SavedEquationName[5]="ganho_dB" \ SavedEquationName[6]="iip2_dBm" \ SavedEquationName[7]="iip3_dBm" |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |