## fixed point parameter scaling

cancel
Showing results for
Did you mean:

## fixed point parameter scaling

227 Views
Contributor II

I do the motor control In the Fixed-Point MCU MC56F84766， I have some questions about parameter scaling:

for example,when we do PID control,

then, we discrete it,

The discrete time domain representation of the recurrent PI algorithm scaled into
the fractional range as

next,

where f16 is a fractional number which must be within the fractional range
<-1, 0.9999>
,if  f16CC1, f16CC2, and f16CC3 is too small or more than 1, we must by  scaling shift , and my question is that after we scaled , how the final result do?
for example 0.5 = 0.2+2*0.3-0.3，and we scaled,

0.5 = 0.2 + 0.5*0.3*2^2 -0.3, we use the math libaray, how do we get the final result?  I guess if by Q format transform?

could you give me some reference doc or source code?

5 Replies
93 Views
NXP TechSupport

Hi, Yuyi,

，f16LowerLimit，可以确保PID输出在这个范围内。

BR

XiangJun Rong

93 Views
NXP TechSupport

Hi, YuYi,

Regarding your question for parameter scaling, from the formula:

BR

XiangJun Rong

93 Views
Contributor II

Dear  xiangjun

93 Views
NXP TechSupport

Hi, YuYi

PID控制有好几个版本， 你能把介绍这个函数的文档贴过来吗？我记得比列和积分的每个参数有两部分组成， 一部分是参数，一部分是scale即移位，这个移位可以是正数也可以是负数，即可以左移也可以右移。

BR

XiangJunRong

93 Views
Contributor II