Interafacing data converter with fixed point model
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a fixed point model with inputs in the range -0.5 to +0.5 and datatype-fixdt(1,32,31). It simulates well as expected.
Next, I need to interface with simulink data converter block and check the response from this model. I have set the voltage range as -10V to +10V and output data type as int 16. Then I used the convert datatype model to perform the translation of ADC outputs(int16) to fixdt(1,32,31). But I get the outputs from the model as zero. Could anybody guide me in this regard to solve this problem?
댓글 수: 0
답변 (1개)
Muthukumar Ganesan
2022년 7월 23일
Hi,
fixdt(1,32,31) can represent the range -1 to +1. Since initially your voltage range is -0.5 to +0.5, you get proper results. In the modified range -10 to +10, this cannot be fully represented in fixdt(1,32,31). You have to increase the word length fixdt(1,36,31) or decrease fraction length fixdt(1,32,27).
Hope this helps.
Thanks
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!