No ePWM output with reference to ADC input while using Launchxl-F28379D

33 views (last 30 days)
Rahul Subrahmanian
Rahul Subrahmanian on 22 Mar 2022
Hello everyone,
I am trying to generate PWM pulses for my full bridge inverter from Launchxl-F28379D by using Embedded Coder Support Package for Texas Instruments C2000 Processors. The reference for the PWM pulses are given to the Launchxl-F28379D through the ADC input pin.
Specification of input reference wave - Sine wave (0-3 V pk-pk, freuency varying from 10 kHz to 25kHz).
When I tested the model, there were no PWM pulses generated from the ePWM module. After that I tested the model using monitor and tune option. The ADC output was observed through the scope and it was not same as the input sine wave. It was highly distorted and it was not following the input frequency. What may be the possible reason for this ?
Is it possibe to generate ePWM with reference to a Sine wave with (0-3 V pk-pk, freuency varying from 10 kHz to 25kHz) ?
What are the settings that should be considered while doing this experiment ?
How do I select sample time in ADC block ?
Please ask if any other details regarding this is needed.
Thank you.

Answers (1)

Aditya Padmanabha
Aditya Padmanabha on 7 Apr 2022
Hi Rahul,
If we consider 25KHz as the frequency of Sine wave and if we consider atleast 10 signal samples per one sine wave cycle, you need to configure the ADC to trigger sampling and read the result at 250K.
The typical ADC operation consists of trigger start of conversion and read the sample once it is ready. There is a finite amount of delay present between these two events depending upon SOCx acqusition window parameter. When you trigger this using software we are waiting for the some time to have the sample ready and then reading the data. Reducing the acqusition window time may result in incorrect sample value so it is not advisable.
You have to use other trigger mechanism like ePWM period to trigger ADC event and read the ADC data inside ADC EOC ISR so that there is no wait in software to read the ADC sample. You can refer to our shipping example ADC-PWM Synchronization Using ADC Interrupt - MATLAB & Simulink Example (mathworks.com) on how to do this.
We use similar strategies to read ADC data at 200KHz in our power conversion examples like Closed Loop Control of a DC-DC Buck Converter - MATLAB & Simulink Example (mathworks.com).
Hope this helps.
Thanks,
Aditya

Community Treasure Hunt

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

Start Hunting!

Translated by