Skip to main content
Visitor II
January 11, 2024
Question

STM32G474 FMAC for 3p3z controller

  • January 11, 2024
  • 1 reply
  • 2035 views

Hi all,

I am trying to study the buck converter program provided by ST for the STM32G474 discovery kit. From previous study, I know that buck converter uses the 3p3z (3 poles 3 zeros) structure to calculate the current output, as shown in the figure below, where the equation of this structure can be written as follows. 

OFN_1-1704956047725.png

OFN_0-1704955992301.png

In the sample code, the IIR filer in the FMAC register is used to represent this controller, the structure diagram of IIR filer and the corresponding equation can be written as follows.

OFN_2-1704956342348.png

OFN_3-1704956380277.png

where X is the vector representing {x0, x1, x2, x3}, Y' is the vector represent {y1, y2, y3} and Y is the output y0.

From the information given, A is the vector representing {a1, a2, a3} in the IIR filter and B is the vector representing {b0, b1, b2, b3} in the IIR filter. From my understanding, the values in this 2 vector should be identical to the parameters in the 3p3z controller, however, when I study the program, I see that this is only the case for vector A, for vector B, despite still having the same magnitude, it is defined as {-B0, -B1, -B2, -B3} (i.e. b0 from the IIR value = -B0 from the 3p3z controller). My problem is, where is this negative sign from, because I see the two case identical and cannot understand why a -1 factor is multiplied for each entry for vector B

OFN_4-1704957011418.png

Thanks.

Regards,

Joshua

 

 

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    February 29, 2024

    Hi @OFN ,

     

    Just looking to the application note AN5305 and I found the following answer to your question

    My problem is, where is this negative sign from, because I see the two case identical and cannot understand why a -1 factor is multiplied for each entry for vector B


    fmac.PNG

    I hope this helps, even if it is a late reply.

    -Amel