Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Sample time in C-script ?

0 votes
1,066 views

Hi everybody,

I'm working on the MPPT control through c-script for a DC-DC converter (PLECS Standalone). The code is implemented but I don't understand when i choose a sample time of 1/(switch frequency) (setup of the c-script-block) the model doesn't work. I reduced the sample time at 0.05 and i have the good behaviour. As shown in the figure, the top signal represents the adapted voltage of the pv panel when a irradiation change occur and a sample time of 0.05. 

The next figure shows the voltage signal when i change the sample time of the c-script setup (1/switch frequency)

Thank you for your help and response

Cheers

 

  

asked Aug 27, 2020 by MichaelBR (12 points)
Hi there, are you able to post your model?
Hi, sure. In attached you have the model
Hi, up because i don't understand what happens with the sample time. Thank you

1 Answer

0 votes
This is a control issue.  Your perturb and observe will not work effectively at the switching frequency.  Your determination of a value of 0.05 seconds makes sense, as that looks to be about the time-constant of your buck converter in response to a step-change in modulation index.
answered Aug 28, 2020 by Bryan Lieblick (1,905 points)
Hi, so it would be a control problem and not a setup problem of sample-time? I built a PWM signal with a frequency of 100kHz in order to have a bandwith of the minimum duty cycle calculated firstly
...