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.

TIDA-01168: The meaning of SCALE_ISETD (330)

Part Number: TIDA-01168
Other Parts Discussed in Thread: LM5170

Hello,

I am reading the source codes of TIDA-01168.

I came across the scaling value 330 as SCALE_ISETD in cotrol.h.

The comments said;

/* This scales the ISETD Correctly for the Error amp.
2.5 from error amp equels to 2.5V on ISETA. This happens when duty is approx. 80% */ 

This SCALE_ISETD scales the error amplifier ISETD correctly.
The number 2.5 from the error amplifier is equal to the voltage 2.5V on ISETA.
This voltage occurs when the duty is about 80%.

SCALE_ISETD are used at both line No.282 and No.307.

From DS of LM5170, ISETA2.5V is equivalent to ISETD 80%.
As a result, by limiting the output of the controller by 80%, it can be understood that the output is limited to 50A x 4 = 200A from the circuit constant.

Since the PWM period register is set to 1023, it seems to be a coefficient for scaling the controller output from 0 to 1023, but I do not know how to derive the SCALE ISETD (330).

Could you pls tell me how to derive the value "330" of SCALE ISETD?

Best regards,

ay0689

  • Hello ay0689, 

    thank you for reaching out to me on the e2e forum. I am the author of the reference design and the example code.

    Give me please a day to review the code. It has been already some time since I coded it.

    Best regards, 

    Jiri Panacek

  • Hello, Jiri-san,

    thank you for your prompt reply.

    I am waiting for your explanation about SCALE_ISETD (330).

    Thanks and best regards,

    ay0689

  • Hello, i finally had a chance to look at this more in detail. I believe I understand it (again).

    The output of the digital compensator is clipped in the rage between 0 to 2.5 using this line:

    /* This will limit Value to % duty 
    if ((*Reg).Boost.SetOutput > _IQ(2.5)) { (*Reg).Boost.SetOutput = _IQ(2.5); }
    else if ((*Reg).Boost.SetOutput < _IQ(0.000)) { (*Reg).Boost.SetOutput = _IQ(0.000); }

    You're right that this limits the current to approx. 50A per phase (the supply then enters the constant-current mode). You can simply imagine that the "SetOutput" variable is an analog voltage coming from the external error amplifier. The ISETD pin is nothing else than a low-pass filter with a capacitor connected on the ISETA pin. In other words, it is a D/A converter which converters the PWM to analog voltage with respect to duty cycle. The MCU uses 3.3V for GPIOs and the PWM has 10b resolution. This means that highest number in the duty-cycle register is 1023. This number results in 3.3V on ISETA. 

    Now I simply need to find a number that helps me to convert 0-2.5 (value from the "SetOutput") to the range of dutycycles that corresponds to same analog voltage. 2.5V is about 75% of 3.3V (2.5/3.3)*100.The SCALE_ISETD does the job. I do not use the whole range of dutycycles but I use only about 0-80% therefore my max. value in the duty cycle register is 2.5*330=825 (this uses about 0-80.5% duty cycle -> 0-2.65V on the ISETA pin when the output of the compensator is 0-2.5.

    I wish I could come up with a simpler statement.

    Long story short, you just want to convert 0 - 2.5 from the compensator to 0 - 2.5V on the ISETA pin. 

    PS: This may be also useful when working with LM5170:

    training.ti.com/average-current-mode-control-bidirectional-dcdc-systems

    I hope this helps.

    Best regards, Jiri

  • Hello, Jiri-san,

    thank you for your clear explanation.

    I understood that SCALE_ISETD = (1023*0.8) / 2.5 = 327.36 ≒ 330.

    By the way, I found your tool at https://dev.ti.com/gallery/   .

    I am very interested in this.

    Thanks and best regards,

    ay0689