Sample time relation of controller and PWM switching frequecny

27 views (last 30 days)
For the Grid connected PV system, I would like to know the different sample time for different block.
For example 250-kW Grid-Connected PV Array;
We have three sample time
% System frequency (Hz):
Fnom=60;
% Specialized Power Systems sample time (s): Model sample time Ts_Power
Ts_Power=1/(33*Fnom)/100; = 5.05e-06;
% Inverter Control system sample time (s):
Ts_Control=10*Ts_Power; = = 5.05e-05;
% PWM Modulator Parameters
Fc= 33 * Fnom ; % Carrier frequency (Hz)
T_PWM = 1/Fc; = 5.0505e-04
Fig:01
Inside the control block
Fig:02
It is understood that the Ts_Power should be low for generating triangular carrier frequency
  1. My question is that why the Ts_Control (Control block sample time) and T_PWM (PWM switiching time = 1/Fc) are not the same?
  2. Why is Ts_Control ten times less than the T_PWM?
Until the PWM block completes one cycle (T_PWM = 1/Fc), why does control block update ten times?
Definitely, the PWM block will miss the control block output until it completes its cycle.
My understanding is that, they should be same. Even, C2000 controller works that way.
  • Please anybody comments on this sample time issue.

Answers (2)

Joel Van Sickel
Joel Van Sickel on 19 Sep 2023
Hello,
you are correct that the most common approach is to have the switching frequency be the same as the control frequency. However, the two can be decoupled and can be run at different rates. There are various reasons to go either way. Having the control frequency faster can allow for more accurate filters and observers while not having increased switching losses while an increased switching frequency could be used to reduce size of magnetics. You can choose to have them set to the same frequency if that is what you prefer, but for a multilevel converter, you would not need the faster switching frequency in most cases.
  3 Comments
Joel Van Sickel
Joel Van Sickel on 20 Sep 2023
For this example, all it is really doing is effecting the dynamics of the PID controller. It will have a mild effect on controller performance and essentially creates a more accurate integrator. It would be even more useful if digital logging, filtering, PLL, kalman filters, and other observers would potentially perform better with a faster control rate regardless of control signal update. It also opens up opportunities for more advanced switching approaches where PWM duty cycle can be dynamically updated. While this example does not utilize most of those potential improvements, it provides an opportunity for them to be added.
ismail hossain
ismail hossain on 22 Sep 2023
Thank you so much for your technical answer. It gives me a compehensive understanding regarding this subject. I think, I need to study more to grasp the complete idea behind this approach. Any example, book or paper will help me a lot. Again thanks for your valuable time and efforts for answering my concerns.
Also thanks to matlab staff to give us good feelings, while working with matlab.

Sign in to comment.


SANKALP DEV
SANKALP DEV on 20 Sep 2023
Hi Ismail,
I understand that you are concerned about the difference in sample time of Control Block (Ts_Control) and switching time of PWM Modulator Block (T_PWM).
In a grid-Connected PV system, the Control Block is responsible for monitoring and adjusting the operation of inverter based on Power system’s conditions.
The Control Block operates at a sample time of Ts_Control, which in your example is 5.05e-05 seconds. This means that every Ts_Control seconds, the Control Block processes new power system measurements and calculates the required Control signals for the inverter.
The PWM Modulator Block operates with a switching time ('T_PWM') of 5.0505e-04 seconds, which is ten times larger than 'Ts_Control'. However, this doesn't mean the Control Block updates only once every ten PWM cycles. Instead, it updates its Control signals continuously within its own sample time.
For example, within one PWM cycle of 5.0505e-04 seconds, the Control Block updates its Control signals ten times, ensuring the PWM Block receives the most recent instructions. This frequent updating allows the PWM Block to generate accurate PWM waveforms based on current power system conditions.
By updating the Control signals more frequently than the PWM Block's switching time, the Control Block can provide up-to-date instructions to the PWM Block, allowing it to generate the appropriate PWM waveforms based on the current power system conditions.
Hope this answers your questions!
  1 Comment
ismail hossain
ismail hossain on 20 Sep 2023
Thank you so much for your technical answer.
I always love to read comprehensive answers. You are right that the PWM duty cycle has been updated by the latest control loop output. However, the integral controller accumulated errors 10 times before the PWM update. Both are not changing at the same switching frequency. If we want to implement this on C2000, we have to use a multirate timer. I am still confused about the integrator function. It could be beneficial for the filtering signal. I think we need to analyze further.

Sign in to comment.

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!