How to get LUT values from the NCO object?

1 visualización (últimos 30 días)
Jay
Jay el 20 de Feb. de 2025
Editada: colordepth el 10 de Mzo. de 2025
I'm trying to learn NCO and MATLAB has the following example.
df = 0.05; % Frequency resolution = 0.05 Hz
minSFDR = 96; % Spurious free dynamic range >= 96 dB
Ts = 1/8000; % Sample period = 1/8000 sec
dphi = pi/2; % Desired phase offset = pi/2;
Nacc = ceil(log2(1/(df*Ts)));
actdf = 1/(Ts*2^Nacc);
Nqacc = ceil((minSFDR-12)/6);
phOffset = 2^Nacc*dphi/(2*pi);
nco = dsp.NCO('PhaseOffset', phOffset,...
'NumDitherBits', 4, ...
'NumQuantizerAccumulatorBits', Nqacc,...
'SamplesPerFrame', 1/Ts, ...
'CustomAccumulatorDataType', numerictype([],Nacc));
With info, I got the following:
>> info(nco)
ans =
struct with fields:
NumPointsLUT: 4097
SineLUTSize: 8194
TheoreticalSFDR: 96
FrequencyResolution: 3.8147e-06
Here is my question. How can I see the actual 4097 LUT values?

Respuestas (1)

colordepth
colordepth el 10 de Mzo. de 2025
Editada: colordepth el 10 de Mzo. de 2025
The documentation for "dsp.NCO" states that it uses the same algorithm as the NCO block, as stated here: https://www.mathworks.com/help/dsp/ref/dsp.nco-system-object.html#bsfy7o1-6. The algorithm description can be found here: https://www.mathworks.com/help/dsp/ref/nco.html#mw_51f00334-ea26-4072-9715-49115eae1159.
If dither is disabled during the construction of the "dsp.NCO" object, it appears that "nco" essentially returns parts of the lookup table as the output. With this understanding, you can infer the lookup table values by adjusting the "SamplesPerFrame" of your NCO object and using an appropriate "Phase Increment".
Alternatively, the Signal Processing Toolbox includes an example implementation of the NCO algorithm. You can access and analyze this example to understand the lookup table by using the following command:
openExample('signal/SFDRMeasurementExample')

Categorías

Más información sobre Measurements and Statistics en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by