Regarding Perturb and Observe Implementatuion Using C block

Support Communities Code Generation and Implementation Regarding Perturb and Observe Implementatuion Using C block

This topic contains 5 replies, has 2 voices, and was last updated by  motahhir 1 year, 11 months ago.

  • Author
    Posts
  • #9320

    Albert Dunford
    Participant

    Is it possible to implement Perturb and Observe algorithm using C block in PSIM?

    Will following code work for Perturb and Observe algorithm in C Block?

    If (Power_new-Power_old>0)
    Vref=Vref+0.1;

    else
    Vref=Vref-0.1;

    Is it correct to Equate V*I to Power_old by using one time step delay?

  • #9321

    Albert Dunford
    Participant

    You will be able to implement your MPPT algorithm with the C block. I will not comment on the accuracy of your code.

    Some comments about the c block,
    Static variables will only be initialized once at the beginning and can be used to hold remember a value from a previous timestep. A regular variable definition will cause the variable to be re-initialized every time step. Also the c block will run at every time step, if you want to define a sampling rate for the c block you should put a ZOH element on all of the inputs to the c block which will force it to execute at the defined rate.

  • #9322

    Albert Dunford
    Participant

    Is it possible to use sample and hold element for all the inputs to C block? Will it force C block to execute at the defined rate?

  • #9323

    Albert Dunford
    Participant

    use the ZOH hold block on the inputs to the c block to force the c block to execute at a defined sample rate.

    Do NOT USE the sample and hold block to accomplish this, it needs to be the ZOH.

  • #18196

    motahhir
    Participant

    Please download go to the below link, and the download the file, it contains your request:
    https://www.researchgate.net/publication/313368387_MPPT_under_PSIM?ev=prf_high

  • #18197

    motahhir
    Participant

    Please go to the below link, and the download the file, it contains your request:
    https://www.researchgate.net/publication/313368387_MPPT_under_PSIM?ev=prf_high

You must be logged in to reply to this topic.