This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
TI数字信号处理库,出现了一个Q31的格式,按照IQ格式的理解就是小数点在第31位上,那具体是什么意思呢?
手册里说需要转换成Q31格式,搞得我一头雾水 .
例程里,有这么一句 xn=(long)(2147483648*(sin(Rad) + cos(Rad*2.3567))/2); //Q31
从long的角度来看,第一位始终是1,也就是始终是负值. 具体请看附件
这句话很好理解,是将 (sin(Rad) + cos(Rad*2.3567))/2 这个数转换成 Q31的格式,所以,2^31 = 2147483648。三角原理告诉我们,(sin(Rad) + cos(Rad*2.3567))/2 绝对值不会大于1。使用31位分辨率来表示一个绝对值小于1的小数。