Best way to capture sine wave in speedgoat hardware.

12 views (last 30 days)
I didn't find a speedgoat forum, so I will post this here, dont hesitate to point me in the right direction.
Note that I searched their website for examples/documentation but couldn't find anything.
The sine wave is generated from a microcontroller using SVPWM and hooked to a speedgoat machine, what is the best way to capture this signal so it can be feed to my motor model in Simulink? Can it be done using PWM-capture module? or should I use some ADC, I have doubts regarding ADC because PWM is actually digital.
The generated sine wave is 10Hz-70Hz and the switching frequency 50Khz.
Thanks

Answers (1)

Anshuman
Anshuman on 3 Dec 2024
Hello Gonzalo,
As per my understanding, using an ADC would be a straightforward method to capture the analog equivalent of the PWM signal. The microcontroller can output the PWM signal through a low-pass filter to reconstruct the analog sine wave, which can then be sampled by the ADC.
You can try to design a low-pass filter with a cutoff frequency slightly higher than your maximum sine wave frequency (70 Hz) but much lower than the switching frequency (50 kHz) to remove the high-frequency PWM components while preserving the sine wave shape.
Now you can use an ADC to sample the filtered analog signal. Ensure the ADC sampling rate is sufficiently high (at least 10 times the maximum sine wave frequency, i.e., >700 Hz) to capture the sine wave accurately.
Feed the ADC data into Simulink using the appropriate Speedgoat I/O blocks. You can process the captured data within Simulink to interface it with your motor model.
Hope it helps!
  1 Comment
EV
EV on 19 Dec 2024
when we are using PWM capture in speedgoat only duty cycle showing correctly remaining all showing wrong values in millions...how to capture correctly

Sign in to comment.

Categories

Find more on Speedgoat Target Computers and I/O Hardware in Help Center and File Exchange

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!