ADC_PID_EPWM simulation

6 次查看(过去 30 天)
Muhammad Arsalan Athar
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
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 :
  1. 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.
  2. 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:
Hope the above links guide you in the right direction.

社区

更多回答在  Power Electronics Control

类别

Help CenterFile Exchange 中查找有关 PID Controller Tuning 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by