Azzera filtri
Azzera filtri

Phase quantization error word length with NCO block

1 visualizzazione (ultimi 30 giorni)
Kevin
Kevin il 26 Apr 2013
I've been trying to understand the NCO block in the DSP System Toolbox using the ex_nco_example.
For simplicity I switched off the dither. In the example the accumulator is signed with a word length of 18. And the number of quantized accumulator bits is set to 14. In the documentation it says
The phase quantization error word length is equal to the accumulator word length minus the number of quantized accumulator bits, and the fraction length is zero.
So I was expecting the width of the phase quantization error port to be 4 in this example (18-14). But when I run the model I find the Qerr port has type sfix5. Assuming the documentation is correct I must be misunderstanding something. Could anyone explain why the width is 5, not 4?
On a related note, if I change the phase offset source to be an input port, and connect it to the constant 65536, with an output type of sfix18 and a sample time of 1, I was expecting to get exactly the same behavior as before. But I don't get anything. I'm a novice to using MATLAB, so I'm probably making a silly mistake somewhere, so if anyone can explain what I'm seeing I'd appreciate it. Thanks,

Risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by