概述
Saturation and Wrapping
Consider an 8-bit unsigned word with binary-point-only scaling of
2-5. Suppose this data type must represent a sine
wave that ranges from -4 to 4. For values between 0 and 4, the word can represent
these numbers without regard to overflow. This is not the case with negative
numbers. If overflows saturate, all negative values are set to zero, which is the
smallest number representable by the data type. The saturation of overflows is shown
in the following figure.
If overflows wrap, all negative values are set to the appropriate positive value.
The wrapping of overflows is shown in the following figure.
Note
For most control applications, saturation is the safer way of dealing with
fixed-point overflow. However, some processor architectures allow automatic
saturation by hardware. If hardware saturation is not available, then extra
software is required, resulting in larger, slower programs. This cost is
justified in some designs — perhaps for safety reasons. Other designs
accept wrapping to obtain the smallest, fastest software.
The Simulink® software supports saturation and wrapping for all fixed-point data
types. You can select saturation or wrapping for fixed-point Simulink blocks with the Saturate on integer overflow
check box.
最后
以上就是大意面包为你收集整理的matlab phasewrapping,Saturation and Wrapping的全部内容,希望文章能够帮你解决matlab phasewrapping,Saturation and Wrapping所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复