Interafacing data converter with fixed point model

1 次查看(过去 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?

回答(1 个)

Muthukumar Ganesan
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
  1 个评论
Gary
Gary 2022-7-25
Hi
I have connected a source which varies from -0.5V to +0.5V to ADC simulink module. The output of which is connected to my model. The ADC outputs a int16 data and all that I have to do is to interface to a already converted fixed type model whose inputs are defined as fixdt(1,32,31).

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

标签

产品


版本

R2014b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by