set the phase offset epwm using c2000 F28379D

57 ビュー (過去 30 日間)
waell telmesani
waell telmesani 2023 年 3 月 13 日
コメント済み: PAULRAJ 2024 年 5 月 30 日
Hi,
I'm trying to set the phase shift if ePWM (1, 2, 3) to 0, 120 , 240 deg using ePWM block but I don't know why it is not working properly it provides wrong phase shift in scope. I would appriciate if any one can help. simple model is attached
Thanks

回答 (3 件)

deiaaldeen
deiaaldeen 2023 年 10 月 26 日
hello sir,
I want to do phase shift between the two legs of full brige inverter. I did exactly what you did but still no phase shift. could you please post your file or teach me ?

Vishwa
Vishwa 2023 年 4 月 20 日
For counting mode set to up-down, phase shift should be given with respect to time period of 2*20e3. Since the timer period is only the period of up-counter/down-counter.
Above pics shows ePWM blocks configurations and the waveforms as seen from scope using external mode.
Hope it helps.
  3 件のコメント
Long Th
Long Th 2023 年 5 月 26 日
How do you show 3 PWMs and Can you help me to do it?
Vishwa
Vishwa 2023 年 5 月 27 日
Sure,
You can follow these steps to visualize ePWM signals in Simulink:
  1. Under Model Settings > Hardware Implementation > Target Hardware Resources > ePWM; find which GPIO Pins your ePWM channels are multiplexed to (you can set your preferred applicable GPIO Pins here also). Refer to below figure.
  2. Add a Digital Input block, this block can configure a GPIO Pin as an input pin. We will use these GPIO Input pins to receive signals from ePWM output pins. In the Digital Input block, configure pin 8, 14 and 15 as Input pins. See below figure.
  3. Now on the launchpad, short the ePWM MUXed GPIO Pins to the GPIO Input pins using jumper cables. In this particular case, I would have shorted GPIO 0 with GPIO 8, GPIO 2 with GPIO 14 and so on.
  4. Under Model Settings > Hardware Implementation > Target Hardware Resources; check External Mode settings.
  5. On Simulink Run the model on hardware using "Monitor and Tune".
Now you should be able to visualise the signals either on scope or on Data Inspector. Please refer to the following documentation for reference: Signal Monitoring and Parameter Tuning over XCP on Serial - MATLAB & Simulink (mathworks.com)
Good luck!
Regards,
Vishwa

サインインしてコメントする。


Cristina
Cristina 2024 年 2 月 27 日
Hi, I have tried to see a PWM signal following the above steps but when simulating I get a 0 signal all the time.
I attach screenshots
I have connected pin 40 to pin 74 which are the GPIO0 and GPIO14 pins.
I know that the "ePWM" block is well configured because I have been able to see the output signal with an oscilloscope, so I think the problem is in executing these steps.
I hope you can help me, thank you in advance.
  2 件のコメント
PAULRAJ
PAULRAJ 2024 年 5 月 30 日
first, try to run your model on external mode using 'monitor and tune' option. if you are able to do that, then you can see the output waveform in the matlab scope. check for the jumper connection to enable the USB/UART serial connectivity.
PAULRAJ
PAULRAJ 2024 年 5 月 30 日

サインインしてコメントする。

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by