Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How can I design quantizer with MATLAB?

Status
Not open for further replies.

laperla

Full Member level 4
Joined
Oct 17, 2009
Messages
191
Helped
2
Reputation
4
Reaction score
3
Trophy points
1,298
Activity points
2,364
Hi
How can I design a 10-bit quantizer function that gets a
vector of decision levels errors?
 

you could just use the floor function:

y=floor(511*x)+511;

where x is your analog signal between [-1, +1] and y is your quantized signal between [0 and 1024] in this case.
 
  • Like
Reactions: rezazarei

    laperla

    Points: 2
    Helpful Answer Positive Rating

    rezazarei

    Points: 2
    Helpful Answer Positive Rating
    V

    Points: 2
    Helpful Answer Positive Rating
I want to write MATLAB program for design 10-bit quantizer function
Then write funcion for caculate IND and DNL
 
Well, the quantizer in my previous post is ideal so the DNL/INL will also be ideal.

If you want a "less" ideal quantizer you could implement a flash type as:
ref=[-512:511]/512;
fs=1e6; % sampling rate
f=31*fs/8192; input frequency, 31 is an odd number for coherent sampling, 8192 is the number of samples
x=sin(2*pi*f*(0:8191)/fs); % the input signal
for ii=1:8192
y(ii)=sum(x(ii)>ref); % the quantizer
end
plot(y)
then, using some immagination, you can add your non-linearities to the reference and see what happens to the DNL/INL
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top