13

An 8086 used less than 30k transistors. The 8087, which is the FPU for the 8086, is reported to use 45k transistors. Faster FPUs can be even larger in terms of gate count. So the cost in silicon die area of an FPU can be significant (over 2X?). Power and thus heat is proportional on the order of the number of transistors toggling outputs at similar rates. ...


11

what is fraction saving? can you write a code.so that i can understand more clearly? Let's call the quantizer operator $\operatorname{Quant}\{\cdot\}$ . So the output of the quantizer, with $v[n]$ going in, is $$y[n] = \operatorname{Quant}\{ v[n] \}$$ which we shall model as an additive error source: $$y[n] = v[n] + q[n]$$ No matter how the ...


9

the general polynomial form is: $$\begin{align} f(u) &= \sum\limits_{n=0}^{N} \ a_n \ u^n \\ \\ &= a_{\small{0}} + \Bigg(a_{\small{1}} + \bigg(a_{\small{2}} + \Big(a_{\small{3}} + \,... \big(a_{\small{N-2}} + (a_{\small{N-1}} + a_{\small{N}} \,u \,)u \, \big)u \ ...\Big)u \, \bigg)u \, \Bigg)u\\ \end{align}$$ the latter form is using Horner's ...


7

Let's assume that we are dealing with unsigned number types. If you would use all $a+b$ bits for the integer part then the set of possible numbers would be: $$\left\{0, 1, 2, 3, \dots, 2^{a+b}-1\right\}.$$ These numbers can be divided by $2^b$ (or multiplied by $2^{-b}$) to take use of $b$ bits for the fractional part, resulting in this set of possible ...


7

Why not use floating point: Floating point is big Floating point is power-hungry Floating point that is fast and fully IEEE compliant is really big and really power hungry, so most fast floating point units sacrifice IEEE compliance Floating point is good when you have a problem where you don't know the range of the input data beforehand. In many many DSP ...


5

The denominator (recursive coefficients Ai) look OK: the poles of your system are at 45 degree angles ($\pi/4$), with magnitude 0.68 (which is not very aggressive for a notch filter; in my opinion they should be more like 0.9). But your numerator has its roots very near $z=1$, which corresponds to frequency 0 instead of the desired $\pi/4$ for implementing ...


5

For an unsigned fixed-point, the representation for a $N$-bit binary number $x$ is $$x=\frac{1}{2^b}\sum_{n=0}^{N-1}2^n x_n, \quad \text{where $x_n$ is the $n^{\rm th}$ bit value of $x$}$$ For this $N$-bit binary number you can get values from $0$ to $2^N -1$ since the smallest number is the $N$-bit all-zeros ($x_n =0\ \forall n$), and the largest is the $...


5

the first thing that one must understand when doing fixed-point arithmetic is that, at the basic level, it is integer arithmetic with some scaling factors applied. perhaps just one scaling factor applied. this scaling factor is directly related to the position of the binary point. unless the chip is a fixed-point DSP or similar, the binary point is ...


5

Be careful with that version of the Cookbook. I did not actually write it, although I gave permission to Doug to write it. He has a few typographic errors. The original has been moved. I think this is maybe where it lives now but there appears to be a CR/LF problem with the file. Anyway, to do trancendentals with a fixed-point processor is difficult but ...


5

There are certainly FPUs on DSP chips such as the TMS320X family from TI or STM32F4xx series powerful microcontrollers from ST [see comment below]. These chips are powerful both in terms of FLOPS and also in terms of electrical power consumption (especially the former). However, there are so many applications that are restricted by energy or power, such as ...


5

One thing to consider when implementing an IIR filter, whatever the order, is quantization and limit cycles. Let me show you with a quick example with your original filter $y[n] = a*x[n]+(1-a)*y[n-1]$ Let a = 0.005 and say that we use 16-bit signed coefficients. $a_{fixedpoint} = a * 32768 = 164$ Let's assume that the input and output are 16-bit ...


4

As mentioned in the comments, your question is pretty confusing and confused, so I might not be able to answer all your smaller questions, but I'll try to shed some light on the topic. This should help you understand what's going on, and hopefully this understanding will help you answer all further questions by yourself. In the following I assume two's ...


4

i want in fixed point,the q formats are 8,16,24,the computation time should be very less,and the coeffficents are constant they are not time varying. i guess i would recommend, Direct Form I. use an accumulator that with word width equal to the sum of word widths of signal and coefficient. so there's no accumulation of quantization error until the last ...


4

it really depends on how the DFT is defined. usually we define the DFT and inverse DFT as: $$ X[k] = \sum\limits_{n=0}^{N-1} x[n] \ e^{-j 2 \pi \tfrac{nk}{N}} $$ $$ x[n] = \frac{1}{N} \sum\limits_{k=0}^{N-1} X[k] \ e^{+j 2 \pi \tfrac{nk}{N}} $$ but they could just as well be defined as $$ X[k] = \frac{1}{N} \sum\limits_{n=0}^{N-1} x[n] \ e^{-j 2 \pi \...


4

Make your block diagram At each point where significant quantization can happen, add noise Analyze your system's behavior with that added noise If you know that the quantization effects will be essentially random, and if the following stages tend to low-pass or band-pass filter, then model the quantization noise as Gaussian with $x_n \sim N(0, q/12)$, where ...


3

There are errors in the presented answer. Here's the same but corrected and rewritten a bit: 1.01 * 1.11 -------------- carry: 1 1 1.1111 (shift right 1.11 with sign extension) 0.000 + 0.01 (2's complement of 1.11) -------------- = 0.0011 Here, 2's complement means negation, which is done by flipping each bit and adding ...


3

Eventhough I have not implemented a fixed-point FFT before, here is answer for integer based representation for which I could still say that, as you have shortly defined, the minimum bit-width to create a proper dynamic range (to avoid clipping or overflow) of the output of an $N$-point FFT is determined by the expected maximum amplitude at the FFT output. ...


3

well, i see little value in factoring an FIR into quadratics and implementing them in cascade. it won't be computationally cheaper and it's not better from a quantization noise POV if your FIR has access to an accumulator that is double width. perhaps it will help with limiting coefficient range so that it's less likely that you have non-zero ...


3

I think you need to use the floor() or round() functions in MATLAB, to emulate fixed-point variables and operations. So you have to know the range of the fixed-point value and the precision of it. The ratio of the range to the precision is the dynamic range and you get 6.02 dB and one bit of word width every doubling of that ratio. If you convert: ...


3

If you have lots of memory, I would recommend that you use a look-up table. You could use Matlab/Octave/Python to generate the look-up table in C/C++. You can combine a look-up table with interpolation in order to reduce the memory requirements. You can exploit the symmetry of the sinh function in order to reduce the memory requirements by half. Second ...


3

I designed a lot of DSP algorithms and I would usually be the one implementing them in an FPGA. I rarely had to explain the internals of an algorithm to other people. That beind said, it is a good idea to represent the number of bits (I usually used the s:m:f notation from Sony Playstation 2) in a block diagram/design document for every components. You ...


3

One problem with your design is that the quantized numerator coefficients don't add up to zero anymore, so you lose the desired notch at DC. That can be done differently, because even with quantized coefficients you can have a (double) zero at DC. Just make sure that $b[0]=b[2]$ and $b[1]=-2b[0]$. The real problem is the denominator polynomial. It is well ...


3

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? "Better" is a relative term, but generally yes. Direct Form II filters require less memory which is often an important consideration in floating-point calculations. Direct Form I filters require more memory, but the ...


2

Although not specific to fixed point, I would highly recommend the "Math Toolkit for Real-Time Programming" book by Jack Crenshaw. It comes with a CD with the source code.


2

it's an approximation. a better approximation is in this answer: $$ \arctan(u) \approx \frac{u}{f(u^2)} \quad \quad -1 \le u \le 1 $$ where $$ \begin{align} f(u^2)& = \sum\limits_{n=0}^{4} \ a_n \ u^{2n} \\ a_0 & = 1.0 \\ a_1 & = 0.33288950512027 \\ a_2 & = -0.08467922817644 \\ a_3 & = 0.03252232640125 \\ a_4 & = -...


2

TI has IQMath libraries for all of their fixed point microcontrollers. I have found them to be a goldmine of fixed-point math and DSP functions not necessarily limited to TI chips. MSP430 C28X


2

The formula expresses the difference between the largest, and smallest numbers we can represent with an integer/fractional representation. Consider a simple example, such as 2.2 (where there are 2 integer bits and 2 fractional bits in our fixed point representation). If we're using two's complement (signed) binary, the largest positive number we can ...


2

The " & 0xffff" operation is questionable. It works for positive numbers but for negative numbers it will mask out the sign bit as well, so you will turn everything into positive numbers. For the DF1, it would be better to delay the shift and mask until you return the actual output and do the conversion to short. This way you can keep the state ...


2

It is definitely a difficult mathematical problem (integer programming), but I don't see much research going on in the DSP community. I do not know about the maths community. There were some important papers in the early 1980's on the optimum design of FIR filters with quantized coefficients: D. M. Kodek, "Design of Optimal Finite Wordlength FIR Digital ...


2

There's an old trick you can use: $$1\cdot x=x$$ So you don't need to multiply with a factor that equals $1$.


Only top voted, non community-wiki answers of a minimum length are eligible