how can I know which data types I need precisely?
1 view (last 30 days)
Show older comments
I have simulated a PI controller in simulink in double precision format, as the showed picture:

and then when I change the addition and multiplication to single precision 32bit, I got a slight error around 100mv difference between the target and the output.
again, I have implemented the controller in DSP in C code and the there I used single precision. so my question is how to know if the single precision is enough or the double precision is needed? I meanfor me when I look at the single precision seems enough in term of precision but the outcome is slighlty difference also in DSP compared to double precision in Simulink.
I know it is a stupid question, I looked on the net the difference and it shows not so much on which one to choose.
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!