mitigation for peaks caused by limited fractional divider in PLLs

This commit is contained in:
Jan Käberich 2020-09-20 10:13:06 +02:00
parent fc3ce7a828
commit 57b4ebfb26
23 changed files with 654 additions and 274 deletions

Binary file not shown.

View file

@ -193,9 +193,9 @@ SpectrumAnalyzer::SpectrumAnalyzer(AppWindow *window)
settings.f_stop = 1050000000;
ConstrainAndUpdateFrequencies();
SetRBW(10000);
settings.pointNum = 1001;
settings.WindowType = 1;
settings.Detector = 0;
settings.pointNum = 1001;
settings.SignalID = 0;
// }
@ -230,6 +230,12 @@ void SpectrumAnalyzer::NewDatapoint(Protocol::SpectrumAnalyzerResult d)
void SpectrumAnalyzer::SettingsChanged()
{
if(settings.f_stop - settings.f_start >= 1000) {
settings.pointNum = 1001;
} else {
settings.pointNum = settings.f_stop - settings.f_start + 1;
}
if(window->getDevice()) {
window->getDevice()->Configure(settings);
}

View file

@ -41,7 +41,7 @@ private:
Preferences &pref;
Protocol::SpectrumAnalyzerSettings settings;
Protocol::SpectrumAnalyzerSettings settings;
unsigned int averages;
TraceModel traceModel;
TraceMarkerModel *markerModel;

View file

@ -20,6 +20,7 @@
#include <fstream>
#include <QDateTime>
#include "unit.h"
#include <queue>
#include "CustomWidgets/toggleswitch.h"
#include "Device/manualcontroldialog.h"
#include "Traces/tracemodel.h"
@ -472,7 +473,7 @@ void VNA::initializeDevice()
removeDefaultCal->setEnabled(false);
}
// Configure initial state of device
window->getDevice()->Configure(settings);
SettingsChanged();
}
void VNA::deviceDisconnected()
@ -538,6 +539,7 @@ void VNA::UpdateStatusPanel()
void VNA::SettingsChanged()
{
settings.suppressPeaks = pref.Acquisition.suppressPeaks ? 1 : 0;
if(window->getDevice()) {
window->getDevice()->Configure(settings);
}

View file

@ -67,6 +67,7 @@ PreferencesDialog::PreferencesDialog(Preferences *pref, QWidget *parent) :
p->Startup.DefaultSweep.points = ui->StartupSweepPoints->value();
p->Startup.DefaultSweep.excitation = ui->StartupSweepLevel->value();
p->Acquisition.alwaysExciteBothPorts = ui->AcquisitionAlwaysExciteBoth->isChecked();
p->Acquisition.suppressPeaks = ui->AcquisitionSuppressPeaks->isChecked();
accept();
});
@ -93,6 +94,7 @@ void PreferencesDialog::setInitialGUIState()
ui->StartupSweepLevel->setValue(p->Startup.DefaultSweep.excitation);
ui->AcquisitionAlwaysExciteBoth->setChecked(p->Acquisition.alwaysExciteBothPorts);
ui->AcquisitionSuppressPeaks->setChecked(p->Acquisition.suppressPeaks);
}
void Preferences::load()

View file

@ -48,6 +48,7 @@ public:
} Startup;
struct {
bool alwaysExciteBothPorts;
bool suppressPeaks;
} Acquisition;
private:
using SettingDescription = struct {
@ -55,7 +56,7 @@ private:
QString name;
QVariant def;
};
const std::array<SettingDescription, 8> descr = {{
const std::array<SettingDescription, 9> descr = {{
{&Startup.ConnectToFirstDevice, "Startup.ConnectToFirstDevice", true},
{&Startup.RememberSweepSettings, "Startup.RememberSweepSettings", false},
{&Startup.DefaultSweep.start, "Startup.DefaultSweep.start", 1000000.0},
@ -64,6 +65,7 @@ private:
{&Startup.DefaultSweep.bandwidth, "Startup.DefaultSweep.bandwidth", 1000.0},
{&Startup.DefaultSweep.excitation, "Startup.DefaultSweep.excitation", -10.00},
{&Acquisition.alwaysExciteBothPorts, "Acquisition.alwaysExciteBothPorts", true},
{&Acquisition.suppressPeaks, "Acquisition.suppressPeaks", true},
}};
};

View file

@ -241,6 +241,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="AcquisitionSuppressPeaks">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Due to limited fractional divider settings, the source and 1.LO PLLs are not able to reach every frequency exactly. At some specific frequencies this causes the final IF to shift. At these frequencies there will be a positive or negative peak in the trace measurement that is not actually there.&lt;br/&gt;&lt;br/&gt;Checking this option shifts the 2.LO for points where this could be an issue. This will remove the peaks but slow down the sweep slightly.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Suppress invalid peaks</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">