This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello everybody.
I modeled a boost converter in MATLAB and the simulation file works perfectly.
When I want to create a 20kHz PWM signal, the board cannot be able to generate even reasonable signals. For the timer period, I have used 5000, and for CMPA, I used 2500.
One time, I connected GPIO32 (pin 2) to pin 40 (epwmA) and one time, I connected pin 40 to ADCIN0 (pin30). None of them could be the solution. Surprisingly, the simulation DOES NOT start from a time period far from 0 sec.
Do you know how this problem can be resolved?
Faisal,
I will likely need the MW team to comment, but given the holidays the response time may be slower than normal(both from TI and MW).
Can you clarify what you mean by connecting pin 2 to pin 40, and/or pin30 to pin 40? Are these the Launchpad pin numbers? The PWM config block should also contain the GPIO/mux output you want the PWM to come out on. You'll need to use the schematic to determine which ePWMA/GPIO combo you'll want, in addition to the ADC channel your input is coming in on.
Best,
Matthew
Hi,
To make sure that ePWM is working, one time, I used ADC block to see the ON-OFF signals generated by the PWM block, and one time, I used GPIO to do the same task.
Pin 40 is EPWM01 and I can get the ON-OFF signals from that pin but when I connect the output of the EPWM pin to ADC or GPIO to be used in my Simulation file to turn that SWITCH on and off, I get zero or unmeaningful results.
My question is that what is my mistake? I have checked everywhere and others could do the same thing and get results but mine does not work.
Faisal,
Can you comment on how often you initiate either and ADC read or read of the GPIO input state? We would need to ensure this is at least 2x the ePWM frequency to accurately detect a state change.
I would think there is a way in Matlab to take the ePWM output directly to another node for simulation purposes so you don't have to do the above, but I'm not sure.
Best,
Matthew
I have tried the following sampling rates to read signals (the tested have been done separately for each sampling rate):
0.001, 0.0001, 0.00001, 0.005, 0.0005, 0.00005
By choosing 1e-6, the board cannot transmit the signal to MATLAB and I get an error.
Faisal,
I'm going to ping the MW team so they can give some more color on the tools and how to accomplish what we need.
Best,
Matthew
Hi,
We would recommend the following example that may help you!
DC/DC Buck Converter Example - File Exchange - MATLAB Central (mathworks.com)
In addition to this you can contact our support for further assistance from MathWorks:
Hi,
Those models need Digital Power Buck Converter BoosterPack which is not my case. Also, the way that has been used to simulate the DC/DC converter is different than what I am looking for.
I contacted the MATLAB support team and I heard that they cannot be able to assist me.
Thanks