mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-05 22:45:23 +00:00
mitigation for peaks caused by limited fractional divider in PLLs
This commit is contained in:
parent
fc3ce7a828
commit
57b4ebfb26
23 changed files with 654 additions and 274 deletions
Binary file not shown.
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ private:
|
|||
|
||||
Preferences &pref;
|
||||
|
||||
Protocol::SpectrumAnalyzerSettings settings;
|
||||
Protocol::SpectrumAnalyzerSettings settings;
|
||||
unsigned int averages;
|
||||
TraceModel traceModel;
|
||||
TraceMarkerModel *markerModel;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
}};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -241,6 +241,16 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="AcquisitionSuppressPeaks">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>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.<br/><br/>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.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Suppress invalid peaks</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue