Questions tagged [fixed-point]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
3answers
42 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 ...
0
votes
0answers
26 views

Do twiddle factors of the fixed-point DFT have to be scaled to the input signal?

I have sensor data that is digitized by a 12-bit ADC that has analog range -1.65 to 1.65 V. The digital sensor data has thus scaling $3.3\cdot 2^{-12}$. I need to perform fixed-point DFT using ...
0
votes
0answers
18 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 ...
1
vote
1answer
53 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 ...
1
vote
0answers
20 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 ...
0
votes
0answers
31 views

Reducing hardware demands for an adaptive and complex-coefficient FIR filter

I want to implement a complex-coefficient FIR filter with adaptive coefficients in hardware (FPGA). The inputs to this filter are the I and Q channel as separate wires. The outputs are the filtered I ...
0
votes
2answers
147 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 ...
0
votes
2answers
73 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?
1
vote
2answers
320 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 ...
1
vote
0answers
49 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 ...
1
vote
1answer
126 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 ...
0
votes
2answers
52 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 ...
-1
votes
1answer
524 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 ...
1
vote
1answer
357 views

How to convert floating point code to fixed point?

I am working on converting a floating point MATLAB code into fixed point C code. The code is to be run on a DSP platform, the specifics of which are yet to be decided. I'm new to floating point to ...
2
votes
1answer
576 views

Multiplication of fixed-point numbers

I'm trying to understand the professor who wrote about Q2-fixed-point number 1.01 and 1.11 which should be multiplied. I don't understand anything. Multiply the Q2-fixed-point number 1.01 and ...
1
vote
1answer
35 views

Is it necessary to scale a signal for quantization noise analysis?

I am doing a series of tests to analyse the round-off (quantization) noise performance of single and two stage biquad cascades (direct form 1), at different sampling rates. The system I am simulating ...
1
vote
0answers
168 views

Fixed point Error Spectrum Shaping (noise shaping) for biquads

Based on that article and all the resources on the internet that advise the use of noise shaping for fixed-point filter implementations, I tried to make a few simulations on Matlab for the biquad I'm ...
1
vote
0answers
353 views

Converting floating point IIR to fixed point arithmetic, given its difference equation

Is there some general way to perform the task given in the question? I have a filter given as follows: ...
2
votes
2answers
702 views

Trouble with fixed-point arithmetic 2nd order IIR implementation in c

DSP newcomer here! I am tinkering around with a TI DSP and am trying to implement a second order IIR filter in C. Input is 16 bit 2's complement, as is the output, the accumulator is 32 bit wide. I ...
2
votes
1answer
197 views

Optimization of Filter Coefficients to Given Word Length

It seems to me that this is a difficult mathematical problem where research is still carried on: Is there an efficient way to find fixed-point coefficients whose zeros are closest to those calculated ...
1
vote
1answer
79 views

Implementation of IIR Filter in dsPIC 33EP - Q15

I am implementing an IIR controller in dsPIC 33EP (16-bit, fixed-point, two's complement, wrap-around, 40-bit accumulator, 32-bit multiply, 12-bit ADC) and I am using cascaded, Direct Form I second ...
4
votes
1answer
218 views

Problems with implementation of a band-stop filter on an MCU (dsPIC) using fixed-point arithmetic

I'm trying to implement a band-stop (notch) filter on a microcontroller dsPIC33EP64GS506 to filter out a $100\textrm{ Hz}$ component from an input signal. The ...
1
vote
0answers
223 views

I have 24-bit data in two's complement 32-bit integers. I need Q31 data

I have been trying to learn about Q31 format (as well as Q15), but I am having trouble understanding how it works. So my CODEC is giving me 24-bit two's complement data. I have converted this data ...
0
votes
1answer
90 views

$\rm Q$ number format singed or unsigned?

I am studying $\rm Q$ number formats and in a few places it's used to represent $2$'s complement fixed point numbers , and other places it's used to represent unsigned fixed point numbers. Given a $\...
0
votes
1answer
376 views

What are the largest FIR filter lengths used in practice?

This is a rather general set of questions. I'm interested in knowing up to what orders, direct form FIR filters are considered useful for practical applications (both in hardware and software)? ...
3
votes
1answer
126 views

Why is the frequency response different based on the amplitude of the impulse I feed into the filter?

I am working on a 2-pole IIR high-pass filter. The filter is fixed point and it is causing me some issues. I believe I'm just misunderstanding something. I am implementing everything in Octave for ...
0
votes
1answer
248 views

Testing filter code w/ Octave

I want to test some code generated by this site. I selected Bessel LP 1st sample rate $600\textrm{ Hz}$ corner $8\textrm{ Hz}$ long $10\textrm{ bit}$. If I adjust the code for octave to be: ...
2
votes
2answers
2k views

Minimum bit-width for fixed point FFT outputs

I was wondering if there is a formula to determine what the best case (minimum) bit-width should be for the imaginary and real outputs of an fixed-point FFT, assuming an input bit width of $M$ ($M$ ...
2
votes
3answers
5k views

How do I calculate the range of a fixed-point number with $a$ integer bits and $b $ fractional bits?

What does fixed-point number range represents? Why we use formula $2^a - 2^{-b}$, why minus $2^{-b}$? Where $a$ is number of integer bits, and $b$ is number of fractional bits. If we have for example ...
2
votes
0answers
1k views

Simple (Arduino) digital butterworth filter : why do I see oscillations?

I want to filter deviations from an ADC over time (low pass), not very critical. So I first tried exponential averaging, something like y= (7*y+x)/8. That gave useful results, but there is an obvious ...
0
votes
0answers
204 views

Which algorithms one can use for matrix inversion (for beamforming application MVDR/LCMV) in Fixed Point?

I have implemented beamformer(MVDR/LCMV) for speech enhancement in matlab, now I am trying to convert it to fixed point implementation. during the weight calculation step correlation matrix inversion ...
0
votes
1answer
38 views

scanning an image for projected points

I'm projecting a series of points onto a surface and then recording their locations in the corresponding image. However, if one goes pixel by pixel a single point may, at times, take up multiple ...
0
votes
0answers
165 views

fixed point implementation of 1/x

I am trying to use fixed point to implement the function 1/x for the integer from 1 to 2048. My plan is that I use fixed point representation for some picked integers as entries in one lookup table ...
0
votes
0answers
581 views

Fixing drift in a recursive fixed point filter

I'm implementing a 80-72-64-48 multi pass moving average filter for a embedded system in C and in fixed point. The implementation is a circular buffer where i'm keeping a running sum and calculating ...
0
votes
0answers
100 views

Orthogonality test on fixed point FFT

I have tried the following methods to test the orthogonality on Fixed point FFT implementation. FFT: Y = A*x, where A = FFT basis and x = input, Y= FFT output If the input (x) is set to A-1(A ...
3
votes
2answers
619 views

Are SOS structures better for linear phase FIR filters?

I've seen many discussions suggesting that SOS's are often/usually the preferred structure for fixed point hardware filter implementations, since they preserve conjugate pairs, etc., but I've never ...
5
votes
2answers
4k views

best implementation of a real-time, fixed-point iir filter with constant coefficients

I have implemented IIR filter in direct form, parallel form, and cascade form. The input in all the cases is a kronecker delta function. How to judge which implementation is better is in real time and ...
0
votes
2answers
460 views

Fixed point conversions

Have following questions about Fixed point conversion format. Suppose I want to change Fixed Point format as X1(m1,n1) (→) X2(m2,n2),m1+n1=m2+n2[Word length same], n2>n1[ Higher Fractionlength] ...
0
votes
0answers
97 views

Fixed Point queries-1

I would really appreciate if I can get answers to following Fixed point queries(part-1): Converting a real number x to fixed point fraction X(m,n) [1] says: m = ceil(log2(max[abs(xmin,xmax)+1])) { ...
8
votes
4answers
1k views

Books/resources for implementing various mathematical functions in fixed point arithmetic for DSP purposes

I'm looking for books or resources that cover the following in detail: implementing mathematical functions (e.g., logarithm, exponential, sine, cosine, inverse) in fixed point arithmetic for DSP ...
2
votes
1answer
2k views

inverse Fixed point number (number^-1) [closed]

Could someone please provide a method for inverting random fixed point numbers. I have as an input both positive and negative floating point numbers that should be converted into fixed point and then ...
0
votes
0answers
648 views

How to Prevent overflow/saturation in fixed point implementation of Fast Data Projection Algorithm

I am trying to implement an algorithm in real-time on a Fixed point DSP (The Blackfin from Analog Devices). The algorithm does a lot of stuff, but in the middle it performs an algorithm called "Fast ...
1
vote
0answers
94 views

DSP implementation recommended bibliography (good books-material related to fixed/floating point-optimization) [closed]

I am doing my first steps in embedded systems and there is a big deal of fixed point code and of course DSP optimized code.I would like please if possible to recommend any book/material related to ...
5
votes
1answer
13k views

Understanding Q formats

I have some misunderstandings with Q format. Please help me in understanding this. If I say Q8 [unsigned] then there will be $8$ fractional bits. Is it ? How can I represent a $1$ and $1.5$ in this ...
4
votes
1answer
1k views

Fixed-point and ARM CMSIS-DSP FIR filters

I am using Q1.15 fixed-point values to represent a 12-bit signed integer value. I was wondering if it matters if I use the 11 MSB or LSB of the fractional part to represent my 11 magnitude bits? Only ...
4
votes
1answer
2k views

Converting ADC output to fixed-point format

I want to convert the two's complement, 16-bit output from an ADC into a generic fixed-point format, $\rm Qm.n$, where $\rm m$ is the number of integer bits and $\rm n$ is the number of fraction bits. ...
4
votes
1answer
2k views

Converting floating point number to Q-notation fixed point number in C/Java?

I am trying to convert from a floating point number to a Q-notation signed 16-bit fixed point number (e.g. Q15). How can this be done in C or Java? I searched online but could not find any available ...
5
votes
1answer
458 views

Derivation of fixed-point $\tt atan2$ with self-normalization

I'm trying to understand the maths behind this Fast fixed-point $\tt atan2$ calculation with self-normalization. In particular, equation $(2)$ for theta1 appears to ...
8
votes
1answer
5k views

Fixed point multiplication with negative numbers

I am stumped on a simple problem. Let's say I have two 4 bit numbers in Q0.3 format. One sign bit and three fractional bits. So I can represent $-1$ through to $0.875$. Let's now say I wish to do ...
1
vote
0answers
127 views

Word-length optimization of a fixed point chain of multipliers

Let's suppose a chain of 6 multipliers: $b = a_1*a_2*a_3*a_4*a_5*a_6*a_7$, where $b$ is the output, and $a_i$ the inputs with 16 bits. How can I optimize the word lengths of the output of each ...