Space vector PWM

hello to all,
I am a student of fourth year electrical engineering ....I am new to arduino ...I have to generate 3 sinusoidal waveforms I just wanted to ask if we can generate them using Simulink and then upload them to arduino (mega). will this thing work ?

I dunno... What are your requirements? Frequency, voltage, current, accuracy/resolution?

In general, PWM doesn't make very good sine waves unless they are low-frequency and you filter the PWM. Arduino's PWM is also only 8-bits, and it only goes positive (so you typically have to bias your sine wave at 2.5V).

If they are in the audio range, I'd suggest using an audio editor and your soundcard. ([u]Audacity[/u] is free.)

.I have to generate 3 sinusoidal waveforms

Consecutive?
Concurrent?
Frequency?

Hi,
Space vector PWM, is hinting on VSD type motor control.

Tom... :slight_smile:

Do I understand you right:

For VSD type motors 3 signals of the same frequency and amplitude, and 120° phase shift have to be generated?
Phase shift has to be reversible for left and right movement and breaking?
What about amplitudes?
The signals should use PWM technique for minimal power loss in the power driver stages?

arpansaha:
I just wanted to ask if we can generate them using Simulink and then upload them to arduino (mega). will this thing work ?

Why do this? You just need to calculate the sin look up table in the setup function and then play it back from the loop. Use the same table for all three sin waves and use three phase accumulation pointers 120 degrees apart.
It will not be very fast nor very good with just PWM you need a D/A hung off the Arduino.

Folks the sine waves will be shifted by 120 degrees each let the frequency of pwm be 10Khz. The project is Space vector PWM. I have arduino mega and just need to know if the by using Simulink the pulses can be generated to be applied to the switches. I am a pro and programming is not my strength

Do you mean that Simulink continuously sends amplitude values to the Arduino?

Then you have to establish a protocol for transmitting the values via Serial.
Then create one pulse from each value, eventually from two values (high time and low time) for variable frequency.
Add code to handle broken, delayed or otherwise discontinuous transmission, to prevent damage of the motor and drivers.

Please note that the start of the next pulse affects the PWM duty cycle. When you only transmit the pulse widths, the result will slightly depend on different time bases of Simulink and Arduino, and when the next value has been transmitted and decoded.

can anyone tell how to implement space vector modulation in arduino please

arpansaha:
can anyone tell how to implement space vector modulation in arduino please

Well then no, because people have been trying to tell you how to do it but you keep repeating the same request, and refusing to answer questions.

Without us knowing what you want to do we can't help you further. If you would like to answer the questions asked so far then maybe some one can help you.

  1. What is Simulink doing?
  2. 10KHz sine wave yes but what sample rate? This is probably what makes it impossible because you have to have a PWM frequency that is equal to the sample rate and so the clock to the PWM timer has to be 256 times this.

using matlab interface one can generate svm pulse easily...i have done that (if anyone need help mail me annsthomasmathew@gmail.com)..
now am trying to implement a c code for the same...can someone help me on that??