How to calculate the frequency range of carrier signal for PWM techniques like Sine PWM, Space vector PWM techniques etc.? Is there any relationship between sampling time and carrier frequency?
usually, one chooses the lowest frequency which results in an acceptable ripple amplitude after application of the filter. As a rough estimate, if the "amplitude quantization" should be no more than 10% of the amplitude of the sinus signal, the PWM frequency (= frequency of the triangular signal) has to be the sinus frequency x 63 because 2 * sin-1(0.05) = 5.73°, and 360° / 5.73° = 62.8.
If, for example, the PWM signal drives a motor then the mechanical inertia of the motor might be sufficient as filter. In this case, the PWM frequency has to be high enough to avoid both non-acceptable vibration of the rotor and the shaft and acoustic annoyance from all parts of the motor.
In other cases, one has to insert an electric low pass filter between PWM output and load, the most simple being an LC combination (for high power applications) or an RC combination (for low power).
Choosing a higher frequency lessens the filter requirements but increases the power loss in the output stage.
In the presence of a sinus signal and a triangular signal the easiest way to generate a PWM signal is by comparing these two signals; no need for sampling. For example, many microcontrollers offer one or more comparators which, after configuration, work without interference by the software.
If sampling is necessary, the sampling frequency should be equal to the PWM frequency or an integer multiple thereof. Of course, the maximum conversion time of the ADC has to be smaller or equal to the period of the sampling frequency, T = 1 / f.