What operation is performed here? When to shift bits and when to shift binary points? To what value scaling is done?
1 view (last 30 days)
Show older comments
I am using TI's Piccolo F28027 C2000 MCU for the application of Field Oriented Control of PMSM motor using Embedded Coder Support Package.
I have referred an example for Model based Code Development from file exchange - "c28027pmsmfoc_ert".
When currents Ia/Ib are sampled through ADC, then these current inputs are scaled. Below is the screenshot of that.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/271314/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/271315/image.png)
Please explain me when to shift bits and when to shift binary points?
And what has been done here, and to what values they are scaled ?
Any help is appreciated.
0 Comments
Answers (1)
Darshan Pandit
on 13 Feb 2020
Hi Sanjeev,
The F28027 is a fixed point processor, and when we read currents from ADCs, these are scaled from ADC Counts to per-unit system applied for embedded system.
I'd suggest you to go through the following post, where I've explained answer to a similar question:
Also, if you would like to understand the per-unit system concepts, applied to embedded systems, you may refer to the following post:
Once you go through these, please let us know if you still have any doubts.
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!