I'd like to be able to look at the output of the LNA in the AD9361 Simulink model. I've been able to modify the model to get the output from the IQ demod, but no further back towards the receive antenna. The issue is that when I take the output from the LNA, I still get the spectrum from roughly -5.5 to +5.5MHz. I'm not sure how to set the spectral display. It seems that the issue is with the inherited sample rate in the spectral display, but I don't see how to adjust that.
One other question. In the LNA, I see that NF (noise figure) is used as a variable to set the noise contribution of the LNA, but I don't see where in the model where NF is actually defined/quantified.
Can you indicate the block at the output of which you are connecting the spectrum analyzer.
As for the NF variable, it can be found as follows. Right click RF_RX block, select Mask->View Mask. Then select Initialization tab in the Mask Editor. You'll find NF extrapolated from the noise figure values in the datasheet using interp1 MATLAB function.
This is what I'm doing. I've created an extra output from RF_Rx, from the LNA. I then moved the output of the block from DDC_Filters_Rx to this new output of RF_Rx. Thanks!
The x-axis limits in the spectrum analyzers are indeed inherited. You can modify them by doing two things.
1. Double-click the CW Source block. Increase the Oversampling to value larger than the default value of 1.5.
2. Double-click the ad9361_RX block. In the denominator for the setting, Step Size RF Simulation (s), you will see the default value of 1.5. Update this value to the new Oversampling value used in the CW Source block.
The default range of -5.76 MHz to 5.76 MHz can be calculated from the default settings of the CW Source block.
x_lim_max = 0.5*Oversampling/ Sample time(s) = 0.5*1.5/1.302e-07 = 5.76e+06
x_lim_min = -0.5*Oversampling/ Sample time(s) = 0.5*1.5/1.302e-07 = -5.76e+06
Thank you Srikanth, that was very helpful. Next question - I have my spectrum analyzer connected to the output of the LNA as I have described above. I also increased the oversampling rate so that the sample rate is now 11GHz (the sims do take a while:)). When I do this, I can see the spectrum out to 5GHz, but I don't see the signal near 2GHz where I expect it. Does the model actually do frequency translation, or does it just add in phase noise and IP3 effects. The RF signal going into the model is at 2MHz, and the LO input to the model only contains phase noise.
The model takes into account the non-idealities present in the process of converting real passband signal to complex baseband, but doesn't actually implement this step.
In fact, if you select Display->Signals & Ports->Port Data Types, you will see the data types of the various signals connecting the blocks. You will find that the input going into ad9361_RX in the top level view of the model is of type complex double.
OK, thank you again for the quick response. I'm looking at the output of the LNA, and have the oversampling rate set to 1.5 (default), so looking at +/-5MHz. I see nothing but noise at the LNA output, same at the LNA input. I can see the 2 MHz RF in the baseband spectrum analyzer, but I don't see it in the signal chain until after the demod.