Scaling of generated duty cycle from simulink to NXP MCU expresso environment
Show older comments
I have developed the FOC model for PMSM, the generated code has been integrated with driver code in NXP MCU expresso environment,while integrating the generated duty cycle values with duty 0 to 100% for example my duty cycle value ranges between -0.8 to 0.8 i mapped to duty 0 to 100% using the equation
duty=map(scale_va,0,1642,0,4000);
scale_va=(rty.Va*1000+820);
My issue is duty varies between only 0 and 100 iam not getting the in between values like 20% or 30% or 45%,
help me in this regard to scale the duty cycle values to duty 0 to 100%.
Accepted Answer
More Answers (0)
Categories
Find more on Embedded Coder Supported Hardware 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!