help required for fixed point conversion

2 views (last 30 days)
Gary on 19 Jun 2022
Answered: Gary on 17 Jul 2022
I am using R14A and I have modelled angle tracking observer algoirthm in simulink. I have simulated model wih floating point and it works well. I used fixed point advisor. Although there are no errors, but the output is zero. Can anybody help us withthis.
Gary on 27 Jun 2022
Could anybody help me to fix the overflow wraps in the model?

Sign in to comment.

Answers (2)

Ayush Kumar Jaiswal
Ayush Kumar Jaiswal on 19 Jun 2022
Edited: Ayush Kumar Jaiswal on 19 Jun 2022
The problem of getting all the output as zeros could potentially be related to the proposed data type settings which results in overflows. You could verfiy that in the histograms produced after simulation.
Try increasing the word length in the Settings section of the fixed point tool, allowing more room for calculation and hence avoiding overflows.
Gary on 21 Jun 2022
No. Float system gives perfect output. Fixed point model gives output zero. As I said earlier, I wanted to know the method of troubleshooting the problem. I am unable to find proper tutorials in this regard. All I could find is usage of fixed point advisor and not how to fix the problem when it occurs

Sign in to comment.

Gary on 17 Jul 2022
Finally, I got this model working in fixed point. I have learnt two lessons. First increase the size (16,32,48 etc) and secondly reduce the input range. By iterating between these two factors, I could finally get the result. Thank you all for all the help provided


Find more on Manual Performance Optimization in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by