This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DPLibFlt CNTL_2P2Z_Drv F28M36

Other Parts Discussed in Thread: CONTROLSUITE

HI,

I am working on F28M36, it has 32-bit floating point CPU.

I need to use CNTL_2P2Z.asm of DPLibFlt.

I have calculate the coefficients( b2,b1,b0,a2,a1 ) which are used in the CNTL_2P2Z.asm

But there is a limitation that the Doc stated that

the Acceptable Range of Variable or of the variable being pointed to us Float:[0,1)

for example how can I transfer the coefficients( b2,b1,b0,a2,a1 )  into that acceptable range?

Gc2(z)=(12.16z^-2  -26.91z^-1  +14.87) / ( 1-1.473 z^-1  + 0.473z^-2 )

Thanks & Regards

Tom Chen

  • Hi Tom,

    Divide the complete equation by 100 and use it as the gain.

    Regards,

    Gautam

  • thanks I will try it .

    but one more question

    could f28m36 could use other DPlib library for example f2803x (CNTL_3P3Z、PFC block etc )?

  • could f28m36 could use other DPlib library for example f2803x (CNTL_3P3Z、PFC block etc )?

    You should be able to use but do try DPlib from this folder too:

    C:\ti\controlSUITE\libs\app_libs\digital_power\f28M35x_v1.1

    Regards,

    Gautam

  • yes, I will try the 

    C:\ti\controlSUITE\libs\app_libs\digital_power\f28M35x_v1.1

    first. 

    and as for the f2803x (CNTL_3P3Z、PFC block etc ) 

    I will try it because the  (CNTL_3P3Z、PFC block etc ) is not in the folder f28M35x_v1.1

    thank you very much

    Tom Chen

  • I will try it because the  (CNTL_3P3Z、PFC block etc ) is not in the folder f28M35x_v1.1

    Yes, that's true. Do try and let us know how it goes.

    Regards,

    Gautam

  • Tom,

    The Floating point 2p2z should work with coeff greater than 1.0, i'll file this as a documentation bug. 

    You cannot just divide by 100, the coefficients will be fixed by the model and the ADC feedback scaling. 

    Regards

    Manish Bhardwaj

  • Manish said:
    You cannot just divide by 100, the coefficients will be fixed by the model and the ADC feedback scaling.

    Thanks Manish for pointing that out. I've personally not used the DPLib but for the control loops I develop I do slow it down and speed up by factors by altering the gains.

    Regards,

    Gautam

  • Hi, Manish . The Floating point 2p2z should work with coeff greater than 1.0 . So the controller coefficient 

    Gc2(z)=(12.16z^-2  -26.91z^-1  +14.87) / ( 1-1.473 z^-1  + 0.473z^-2 ) could be directly feed to the ( b2,b1,b0,a2,a1 )??

    and the coeff greater than 1.0 , could 0.473z^-2  feed to that variable?  coeff greater than 1.0 really make me confused.

    thanks in advanced,

    Tom Chen

  • Tom, 

    Yes the b2, b1, a0 and a1 can be greater than 1.0, they can be anything that the single precision floating point value allows. Yes you can feed these values directly to the controller coefficients. As i said this is a bug in the documentation it should say for the coefficients any value withing the floating point scope is permissible. 

    In you design of the compensator have you accounted for the ADC and PWM scaling? If yes, then you have no control over what the coefficients will be  if you are getting Gc2(z)=(12.16z^-2  -26.91z^-1  +14.87) / ( 1-1.473 z^-1  + 0.473z^-2 ) you will need to write 12.16 and 26.91 to the coefficients value. 

    Where is the confusion?

  • The point I confused is the CNTL_2P2P.asm discrete transfer function is ( b2z^-2+b1z^-1+b0 ) / (1-a1z^-1-a2z^-2)

    and the Gc2(z)=(12.16z^-2  -26.91z^-1  +14.87) / ( 1-1.473 z^-1  + 0.473z^-2 )  is the control law I got from Matlab so could I feed the coefficient  b2=12.16, b1= -26.91 , b0=14.87 , a1= 1.473 , a2= - 0.473

    My question is could the parameter be negative (b1, a2) for the .asm file ? 

    and the "If yes, then you have no control over what the coefficients will be" means if I don't count for the scaling there will be something  missed in this control law, right?

    The last question is the scaling issue could be found in the "Concerto F28M36x Technical Reference Manual (Rev. B) .pdf "?