Hi Eden Li,
Back in the dark ages when operations on floating point were very costly most of the DSP programming was done on integers and one of the most used representation was Q15 format used for 16bit native MCU/DSP.
In this format all number are scaled from -1 to 0.9999.
You calculations are correct but you stopped in the middle - you got only the real number for kq and kd coefficients.
Since the computations are carried on fixed point, you need to scale these 2 factors in the range of [-1:1)
This scaling is done in 2 stages.
1: first compute the scaling coefficients: it is basically a shift left proper value
kd_shift = ceil(log(kd)/log(2))
kq_shift = ceil(log(kq)/log(2))
2: compute the scaled quantities for the coefficients
kdf = kd*2^(-kd_shift)
kqf = kq*2^(-kq_shift)
Using this mathematical trick you ensure the higher computational precision. Basically you can represent a real number as real = (fraction)<<(fraction_shift)
You can get details about floating point/fixed point mathematics here.
For your convenience i made a small m script to compute the factors that you need to use for math computations using the NXP toolbox. Please find it attached: