OwO 2020/06/09 22:00
It's trace noise. Looking at the code the time taken per frequency point is:
+ 1.6ms synthesizer wait
+ 7ms acquisition (2.3ms * 3 channels)
+ 0.5ms RF switch wait (0.16ms * 3)
(All timings are fixed, they are specified as number of "periods", each
period being 0.1666... ms which is two IF periods.)
That adds to 9.1ms, but ecal measurements happen once every 5 points so
the average time is around 10ms. Synthesizer wait can probably be
reduced to 0.5ms, but reducing acquisition time will increase noise. IMO
the best way to increase sweep rate is to switch to 3 separate lower
cost mixers (IAM-81008) so the 3 channels can be acquired
simultaneously. Having a simultaneous reference path also means
synthesizer phase noise can be canceled out, meaning less noise to begin
with.
You can reduce MEASUREMENT_NPERIODS_NORMAL in the code to reduce
acquisition time (more noise), and increase MEASUREMENT_ECAL_INTERVAL to
reduce ecal overhead (causes slower response to thermal drift).
On 09/06/2020 21:41, Reinier Gerritsen wrote:
> Hi Gabriel,
>
> What is currently the limiting factor in the sweep rate? PLL settling
> time? CPU speed, UART datarate, analog circuitry settling time? IF
> frequency?
> Can you shed a light? Is there some improvement possible, maybe with
> reduced specs?
> Thanks,
> Reinier
>
> Op 9-6-2020 om 13:46 schreef Gabriel Tenma White:
>> NanoVNA-QT defaults to an averaging factor of 2. The sweep rate is
>> around 100 points/s, so 22 seconds for 1024 points is about right.
>>
>> A segmented scan will be FAR slower than a continuous scan. Every
>> time you write to any of the sweep parameter registers
>> (start/stop/step frequency, points count) ecal is reset, and the
>> first sweep following that is several times slower. That's also why
>> when you turn on the device you see a slow sweep that takes a few
>> seconds. The recommended usage is to set sweep params once (and
>> whenever the user changes it), and then continuously read from the
>> FIFO. When you are not reading from the FIFO the sweep is still
>> happening and the FIFO overflows (while still being filled with old
>> data). That's why you need to clear the FIFO to do single scans.
>> Ideally you should have a background thread that continuously reads
>> the FIFO, and on-demand scans can simply wait for the correct number
>> of points and return the last full sweep.
>>
>>
>>
>>
>