Questions tagged [fixed-point]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
33 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.
0
votes
1answer
36 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&...
2
votes
3answers
98 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 ...
0
votes
2answers
59 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 ...
0
votes
0answers
22 views

how to do initialization of random vectors in matlab

I have to generate random vectors for $\mathbf{p}^{(0)}$, $\mathbf{u}_l^{(0)}$, and $\mathbf{v}_l^{(0)}$ for $l=1\ldots L$. Now I am confused about how to generate these vectors as $l=1\ldots L$ is ...
3
votes
2answers
131 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 ...
2
votes
1answer
67 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): ...
0
votes
1answer
83 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 ...
0
votes
0answers
29 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 ...
2
votes
0answers
53 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 ...
1
vote
1answer
40 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 ...
3
votes
0answers
30 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 ...
1
vote
0answers
73 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 ...
0
votes
0answers
28 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 = \...
2
votes
1answer
65 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 ...
2
votes
1answer
103 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 ...
2
votes
0answers
73 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/...
1
vote
2answers
59 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 ...
3
votes
4answers
491 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 ?...
0
votes
1answer
26 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 ...
6
votes
7answers
3k 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 ...
1
vote
2answers
175 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
19 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
197 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
26 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
2answers
244 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
110 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
637 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
60 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
187 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
70 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
660 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
484 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
718 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
42 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
232 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
431 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
892 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
251 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
100 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
308 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
274 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
100 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
763 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
161 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
277 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: ...
3
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
6k 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
2k 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
235 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 ...