Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [fixed-point]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
82 views

How does Pre-emphasis mitigate finite precision effects?

"The digitised speech signal $s(n)$ is put through a low order digital system (usually first order FIR filter) to spectrally flatten the signal and make it less susceptible to finite precision ...
Anantha Krishnan's user avatar
5 votes
0 answers
82 views

Efficient computation of 2^x (antilog2) for fixed-point

I've created a log2 AGC for an FPGA project, similar to Dan Boschen's solution in this question. I implemented a hardware version of log2 based on Dan's linked page in the previous question - ...
WannabeDSP's user avatar
0 votes
2 answers
88 views

Fixed point number scheme IIR filter with ADC

I am a student working with digital circuits. I just started a term project with someone else working on an ADC. I need to design a IIR filter in verilog. If the output of an ADC represents 1V by ...
Bowen Liu's user avatar
0 votes
1 answer
142 views

Fixed-point FFT and numeric overflow

I'm working on porting Opus IMDCT/FFT to a fixed point 16-bit DSP with a 48-bit accumulator. I'm trying to do that with 32-bit fixed point numbers to keep the highest possible quality. I'm basing my ...
Giovanni Bajo's user avatar
5 votes
1 answer
400 views

Efficient Log2 and dB from Floating Point and Fixed Point Representation

Floating point representation encodes a binary number using a mantissa $a$ and exponent $b$ according to $(1+a)\cdot 2^b$, where $a$ is an unsigned fractional fixed point number such that $1\le 1+a &...
Dan Boschen's user avatar
  • 51.9k
0 votes
1 answer
76 views

Calculate error introduced into DSP algorithm

Lets take an algorithm as an example, the DCT-II used in JPEG. The formula is as follows: Now the thing is that, the values in M are not integers and many are even less than 1. We have two options: 1)...
quantum231's user avatar
0 votes
1 answer
255 views

Fixed point implementation of IIR filter

I am trying to implement an IIR filter followed by downsampler with the following specifications: fs=18000,order=8,3db freq=[500 1000],downsampling factor=6. ...
Deepa's user avatar
  • 315
4 votes
4 answers
3k views

Fixed point scaling; float -> Q31 -> float

I am new to DSP and I am trying to understand how to work with fixed point operations and in particular the Q31 format. In floating point (full range) I am doing some multiplications, it could be for ...
Zitrax's user avatar
  • 158
1 vote
2 answers
251 views

Fixed point restrictions with respect to DSP

I assume that fixed-point arithmetic can handle most of the traditional linear DSP tasks. As far as I know, there is a restriction for the FFT length with respect to the fixed point bit-depth. Is ...
Gideon Genadi Kogan's user avatar
2 votes
1 answer
314 views

Fixed-Point Filter Design: Where comes the DC-Gain difference between the bode plot and the step response from?

Introduction: What I wanted to achieve I am currently trying to implement a digital fixed-point filter on a STM32-Microcontroller by using the ARM CMSIS-DSP Library Link to reference manual. The ...
Mau5's user avatar
  • 125
0 votes
1 answer
664 views

Calculate the Gain of a fixed-point filter

As the title already says, I would like to know how to calculate the Gain and Phase of a given fixed-point filter at a given frequency. What I've achieved so far: Let's say for example that I have a ...
Mau5's user avatar
  • 125
1 vote
1 answer
299 views

How to apply hann window to unsigned integer ADC

I am using Arm-Cortex M3 Microcontroller and CMSIS for FFT, my microcontroller does not support floating point unit therefore I have to use fixed point (Q15 or Q31) for calculation. Before calculate ...
lojos's user avatar
  • 13
0 votes
1 answer
71 views

Evaluating the accuracy of an integrator

I'm designing a digital signal processing chain that includes integration of a periodic input followed by decimation/resampling. The processor is integer/fixed point only, so the primary source of ...
Campground's user avatar
1 vote
2 answers
815 views

best way to converting data from uint16_t to q15 for least saturation error

Q15 standard is fixed point fraction from -1 to 1 represented by 15 bit, and uint16 is numbers from 0 to 2¹⁶. I have data range from 0 to 2¹², I can directly cast them to Q15 and all the data will ...
mohammadsdtmnd's user avatar
1 vote
2 answers
311 views

Integer v Fractional ADC outputs with FIR Filter Inputs

I have a system I'm working on that inputs an 18 bit ADC output into an FIR filter on a Xilinx FPGA. I'm a little concerned I may be representing the numbers wrong. My ADC outputs a signed 18-bit ...
FooAnon's user avatar
  • 296
0 votes
1 answer
532 views

Modelling and testing fixed point IIR filter with freeware tools

I understand from this other question that prior to implementing a fixed point IIR filter on a particular microcontroller target it's best to create a model using a DSP tool and compare the output to ...
davegravy's user avatar
  • 143
1 vote
1 answer
499 views

How can we correctly use the CMSIS-DSP functions that have fixed-point (Qx) input/outputs?

I want to use Arm CMSIS-DSP library functions to perform matrix-vector multiplications on integers. It seems that the library, instead of integers, mainly supports operations on fixed-point numbers in ...
Reza's user avatar
  • 113
4 votes
1 answer
521 views

Wrong result when realizing fixed-point biquad IIR filter

I'm implementing a fixed-point direct form I biquad filter with Q1.15 precision. I use fraction saving to improve quantization error. However, my function gives me the different results compared by ...
DSP novice's user avatar
5 votes
3 answers
1k views

Why does the Direct form I become our first choice for fixed-point implementation?

I heard that the Direct form II transposed is better for floating-point and the Direct form I is better for fixed-point. Is it true? I understand that DF2 and DF1T should never be used in fixed-point ...
ZR Han's user avatar
  • 3,248
0 votes
2 answers
68 views

Why we sometime use some values of fixed point and floating point both in dsp?

I have been writing kernels for a communication dsp device, which uses cmac/cmad operation on fixed and floating point numbers. I am not very clear why both types is used in the same operation.
Nits r's user avatar
  • 11
1 vote
1 answer
829 views

Fixed point saturation and round

Another question related to fixed point saturation and rounding. Say using notation S<WL, FW> where S means it is signed number, WL is the full bitwidth, and FW is the fractional bitwidth. So S&...
hbf's user avatar
  • 13
2 votes
3 answers
830 views

Implementation of CIC filter using floating point

I am trying to implement a CIC filter and was reading through the literature and found that CIC filter cannot be implemented using floating point. I am unable to understand why that would happen. The ...
arun_kol's user avatar
0 votes
2 answers
131 views

DSP signal filtering and number formats

I'm working on a dsPIC33, using Audio Codec Board - Proto to read audio samples and for reproduction. In order to implement a relatively simple signal processing algorithm, I'm reading audio samples ...
smiljanic997's user avatar
3 votes
2 answers
534 views

High-pass filter with quantized (fixed-point) coefficients

I have a high pass IIR filter with numerator b = [0.997688673703782,-1.995377347407564,0.997688673703782]; and denominator ...
ZR Han's user avatar
  • 3,248
2 votes
1 answer
133 views

State-space filters in fixed-point?

I am having difficulties implementing state-space filters in (32-bit) fixed-point. This is because the coefficients have a huge dynamic range, for example (MATLAB code): ...
Danijel's user avatar
  • 492
1 vote
1 answer
199 views

How to evaluate fixed-point implementation of LMS filter is correct?

I am having an LMS block with 6 filter coefficients. The value of filter coefficients are 0.0001 0.00045 0.2535 0.546536 0.0000243 0.3423 I have tried to ...
Deepa's user avatar
  • 315
0 votes
0 answers
57 views

Efficient way to calculate eigen-values of a 2x2 matrix

I'm working on an algorithm that works based on finding the eigen-values of a 2x2 complex covariance matrix. However, from a fixed-point implementation point of view, finding eigen-value of a matrix ...
vmontazeri's user avatar
2 votes
0 answers
169 views

Strange behavior in fixed-point FFT

This is a problem I encountered some time ago while doing my thesis, which still now, I am not sure to understand. By then, I was implementing the circular correlation in an FPGA using this Xilinx FFT ...
danipascual's user avatar
1 vote
1 answer
52 views

signed 2's complement of a negative number for Integer = 3 and Fraction = 9

I am working on signed 2's complement for my fractions coefficients. Below code can be used for positive inputs. However for a negative 2's complement when I added LSB with 1, then an error pops. I ...
hari's user avatar
  • 13
3 votes
0 answers
67 views

Are there any tools for generating fixed point filter implementations?

It's very easy to make a filter in Scipy or many other tools, but implementing this filter in fixed point in C or VHDL/Verilog is always a chore. I mean, in theory it's just a matter of adequately ...
Pepijn's user avatar
  • 248
1 vote
0 answers
86 views

Problem with natural logarithmic function in fixed point notation

I am facing a problem with natural logarithmic function in fixed-point notation. Let's say $$x = 0.54, \qquad\text{then}\qquad \ln(x) = -0.616186, \qquad\text{a negative number} \tag{1}$$ Then in ...
rkc's user avatar
  • 59
0 votes
0 answers
36 views

Changing Coherence function from float to fixed point

I want to calculate the coherence between two audio signals. After referring a few websites, I found that the coherence is calculated by using the equation $(1)$ which is as follows $$\rm Coherence = \...
rkc's user avatar
  • 59
2 votes
1 answer
156 views

Clear examples of Fixed Point Algorithm Specification Block Diagram for FPGA Implementer

I have been working on converting a simple, floating point algorithm to fixed point and need to create a block diagram to help the guy who will implement this on an FPGA. As often is the case, the ...
rhz's user avatar
  • 447
2 votes
1 answer
252 views

How to improve accuracy while converting floating point coefficients to fixed point in the case of an all pole IIR filter

I am having an all pole IIR filter of order 5 with floating point filter coefficients ...
Deepa's user avatar
  • 315
5 votes
1 answer
832 views

Friendliest python library for fixed point algorithm simulation

My primary programming language is python. Is anyone aware of solid python libraries to simulate fixed point algorithms in python? A quick google search revealed this: https://pypi.org/project/...
rhz's user avatar
  • 447
2 votes
2 answers
135 views

Fixed Point Design Resources

Can anyone point me to good methodologies for designing fixed point versions of possibly nonlinear signal processing algorithms? Are there any systematic methods other than simulation for optimizing ...
rhz's user avatar
  • 447
3 votes
6 answers
3k views

Single pole IIR filter, fixed point design

We want to do a fixed point implementation of the single pole IIR filter: $y[n] = a\cdot x[n] + (1 - a)\cdot y[n-1] \quad ;\qquad 0<a<1$ What are the main design considerations to think about ?...
voy82's user avatar
  • 41
0 votes
1 answer
112 views

How to specify the input data bit width for fixed point implementation in windowed OFDM?

I am implementing a fixed point model of Windowed OFDM and to quantize the input data, I used 16 bits(complex) to encode it. But I am not sure how do we specify the minimum number of bits that should ...
samz12's user avatar
  • 37
6 votes
7 answers
4k views

Why is there no FPU on (most) DSP chips?

Why is there no FPU (Floating Point Unit) on most DSP chips? I found several answers such as this one that explain advantages of fixed point approach such as smaller power consumption, higher speed ...
user1042840's user avatar
0 votes
2 answers
360 views

FFT error when number of samples growth - Matlab/octave

I see when I increase number of samples, the imaginary error part of the FFT growth due to the error of sin(n*pi)!=0 where n is the index of the sample in Matlab or octave. Is there anyway to force ...
learner8059's user avatar
0 votes
0 answers
22 views

What is the meaning of these Fixed Point Properties e.g.CustomSectionInputDataType?

I was trying tom implement a Butterworth filter and i came across a example on Mathworks site which emphasizes to customize various terms related to the filter. Following are some of the terms i could ...
nebulla's user avatar
1 vote
1 answer
345 views

Methods to evaluate the quality of an IIR Filter fixed-point implementation

I'm implementing a scattered look-ahead IIR filter in Matlab/VHDL, basically I convert an order-2 IIR filter into an order-4 IIR in order to take advantage of the pipelining of an FPGA. (reference ...
Ben's user avatar
  • 3,777
1 vote
0 answers
34 views

CoeffFracLength negative or larger than the CoeffWordLength [Fixed-Point Filter Properties in Matlab]

I have been reading the fixed-point filter properties in Matlab and I have found that the parameter "CoeffFracLength" can be either zero, negative or positive. And also, it can be larger than the ...
Kevin's user avatar
  • 23
0 votes
2 answers
443 views

Floating point to fixed point in C

I've been trying to make a digital filter. I've used the following transfer function to get my digital coefficients https://gyazo.com/00195ef119f0b2ff93fa5855715abdc9 Which i've then transfered to ...
Chriserke's user avatar
0 votes
2 answers
179 views

Hyperbolic sine "sinh" in fixed-point?

As part of an audio peaking filter calculation, I need to implement hyperbolic sine ("sinh") function in a fixed-point arithmetic (fixed-point DSP processor). What is the proper way to do this?
Danijel's user avatar
  • 492
1 vote
2 answers
930 views

Conversion from Floating point representation to Fixed point representation

I have written a matlab function for a constellation mapper and I want to create a Fixed-point version of that code for implementation on FPGA. I know matlab has a specific toolbox for fixed-point ...
Mohamed's user avatar
  • 13
1 vote
0 answers
72 views

How to calculate the magnitude of rounding error in N-bit signed fixed-point arithmetic?

In example take into consideration 11-bit <11,5> signed fixed-point arithmetic. 000000.11111 - 0.96875 000001.00000 - 1 so the error magnitude will ...
roffensive's user avatar
1 vote
1 answer
289 views

VHDL fixed point implementation of IIR filter

I have a filter described by the following transfer function H(z): $$H(z) = \frac{156 - 156z^{-2}}{16384 - 32443z^{-1}+16073z^{-2}}$$ How will this be implemented with the first term in the ...
keffe's user avatar
  • 113
1 vote
2 answers
108 views

Audio Bit Depth "mapping" from DAW to Audio card: is this correct?

Let say I'm generating a 1 kHz sine wave within my DAW, using some synth (Sytrus in my case). I normalize it, so it play at max "digital" amplitude 0db. Thus, any sample of the signal would gets a ...
markzzz's user avatar
  • 45
-1 votes
1 answer
967 views

What is the correct way to handle Saturation on a DSP?

Let's say I have 16 bit fixed point DSP, and am performing a multiply accumulate operation in a loop- What would be the correct way to check for saturation of the accumulated value? As far as I ...
Naveen's user avatar
  • 53