ADC_PID_EPWM simulation
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi Community members,
I am a beginner in PID simulation.
I use ADC block to generate a voltage/digital number at Time Scope0. but it gives 0 values all the time. Why?
PID is tuned by Automatic generator and then I can get the results at Time Scope 4,5,6.
Vref is 2V which is compared with my ADC values through Adder/Subtractor. the result of Adder/Subtractor is shown in Time Scope3 .
The Problem is why do i get always 0 amplitude at Time Scope0? Is there any problem in ADC settings to run the simulation?


MATLAB2021b version
Please suggest to simulate this PID based ADC conversion and genrating ePWM signals.
Thanks
Kind Regards
Arsalan
답변 (1개)
Anudeep Kumar
2025년 4월 25일
편집: Anudeep Kumar
2025년 4월 27일
Hey Muhammad,
I tried to reproduce your model based on the figure and tried to dig deeper in the issue you are facing. I believe there could be two possible reasons :
- ADC Block output is Always zero: You need to check if the ADC block is configured correctly based on your board’s configuration and what output is it producing. Check the reference voltage, resolution and other properties and the input to it.
- Zero-Order Hold Block: The Zero order hold block samples its input at a specified interval. If the sample time is not aligned with the simulation, or the input is always zero at the sample instant, the output will be 0. So make sure the sample time of the zero order hold block is configured correctly.
I am attaching here the documentation for the ADC and the ZOH block for better understand how to configure them to achieve your goal.
In addition, I am attaching a few examples and a MATLAB Answer link that might help you simulate PID based ADC conversion and generate EPWM signal.
How to convert PID output Signal to a PWM signal in simulink? :
ADC-PWM Synchronization using ADC Interrupt:
Control Peripherals Examples:
https://www.mathworks.com/help/ti-c2000/examples.html?s_tid=CRUX_topnav&category=control-peripherals
Hope the above links guide you in the right direction.
댓글 수: 0
커뮤니티
더 많은 답변 보기: Power Electronics Community
참고 항목
카테고리
Help Center 및 File Exchange에서 PID Controller Tuning에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!