How to get LUT values from the NCO object?

조회 수: 3 (최근 30일)
Jay
Jay 2025년 2월 20일
편집: colordepth 2025년 3월 10일
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?

답변 (1개)

colordepth
colordepth 2025년 3월 10일
편집: colordepth 2025년 3월 10일
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')

카테고리

Help CenterFile Exchange에서 Measurements and Statistics에 대해 자세히 알아보기

태그

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by