I’m using a Plexim RT Box to control my power converter. In the control file, I’m using PWM blocks. When I configure these blocks, I have same values for the switching frequency “fSw” and the sampling frequency “fSapmling” in my model. However, in the drop-down menu “Update”, that I configure as “on carrier minimum”, “on carrier maximum”, “on carrier minimum/maximum”, I have the same result, a sample every “1/fSampling”. I was waiting for 2 samples when I have the configuration “on carrier minimum/maximum”. Is anybody notice this issue ?
With PWM Out block, the modulation index (M) is updated with the simulation step, i.e., “fSampling” in your case. However, the digital outputs are refined by the FPGA, enabling the resolution of 7.5 ns. Therefore, PWM edges can occur in between the simulation step.As given in the “Help” section of the PWM Out block,with “On carrier minimum” - M will be sampled when the carrier reaches its minimumwith “On carrier maximum” - M will be sampled when the carrier reaches its maximumwith “On carrier minimum/ maximum” - M will be sampled when the carrier reaches its minimum or maximum, whichever comes first – only once per simulation step with “Immediately” - M will be updated after each simulation step of the RT Box
Run the attached model to view and compare the results.