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.

TMS320F2800137: PI algorithm problem

Part Number: TMS320F2800137

Hello, expert!

1. In the TMS320F137 environment, run the PFC (TIMD0208) program and perform Experiment 2 on the DC current loop. When running the PI algorithm, it was found that no matter how the values of Kp and Ki parameters are modified, the calculation result (TTPLPFC_gi_out) will not change. TTPLPFC_ Gi_ Out always equals 1 (as shown in the figure below), may I ask why?

2、请问一下,下图软件怎么获取,可以提供一下连接嘛?

Best regards!

yong

  • Hello Luo

    It is possible that TTPLPFC_gi_out may be updated some where else after being updated by the current loop. If you want the true value of TTPLPFC_gi_out from the current loop, add a new variable immidiately after TTPLPFC_gi_out in the current loop like below:

    and then look for this new variable in the expression window.

    Thanks

    Amir

  • Hello, expert!

    1、I tried according to what you said, and the result is still the same. The redefined variable value is 1, indicating that the result calculated by PI has always been 1, and the breakpoint shows that the result calculated by PI is also 1

    2、May I ask, how can the software in the following figure be obtained? Can you provide a connection?

    Best regards!

    yong

  • Hello Young

    #define TTPLPFC_GI_PI_KP (float) 0.3496503407
    #define TTPLPFC_GI_PI_KI (float) 0.0020000510

    how did you make these values zero? I dont think you can change these values in setting.h file. After changing these values, did you rebuild the project? I believe these values update to original values after building because values in the setting.h file comes from mainsysconfig. I am not sure why are u getting gi_out as 1. looks like it is saturating. Can you elaborate your experiment condition?

    Thanks

    Amir

  • hi

    Firstly, we will migrate the TIDM02008 program to the F2800137 environment without porting the mainsysconfig file. Instead, we will simply migrate the source and header files, as shown in the following figure:

    secondly

    #Define TTPLPFC_ GI_ PI_ KP (float) 0.3496503407

    #Define TTPLPFC_ GI_ PI_ KI (float) 0.0020000510

    The two macro definitions can be configured with values through setting. h. They have been successfully configured to 0 and will not have any impact after compilation, as shown in the following figure;

    thirdly 

    The experimental conditions were carried out according to the steps and conditions of Experiment 2 in the experimental guide book.

    fourthly

    No, I'm not going to_ Out becomes 1, regardless of how the values of Kp and Ki are adjusted gi_ Ou is always 1, which is definitely incorrect.

    fifthly

    Is there any channel to send my program to you? This is more convenient for you to guide us.

    Best regards!

    Thanks

    yong

  • Hello Yong

    Currently, I am heavily loaded with other works. So I cannot go through your code.

    Since you are not using the mainsysconfig file, I believe some of the value might have changed while porting. I will suggest to do an apple to apple comparison of your code with the original TIDM 2008 code. Also, please go through DCL_runPI_C1.asm file and see how this controller calculates its output. Hopefully it will give some clue.

    Thanks

    Amir