PWM Reading & eCAP probblem with TI C2000 f28379d & Simulink
8 ビュー (過去 30 日間)
古いコメントを表示
Hi, I'm trying to create a control system for a RC car with TI C2000 f28379d & Simulink, the project includes:
- On CPU2: four encoders for measuring wheel speed, reading PWM commands (steering/throttle) from TX-RX.
- On CPU1: IMU 6dof reading (I2CA), use of serials SCIA/SCIB and PWM output for servo/ESC (ePWM1/ePWM2)
The two programs communicate through the IPC blocks.
For encoders and PWM commands reading I referred to "RC_Demo_C2000_Control_Unit.slx" from https://it.mathworks.com/matlabcentral/fileexchange/63857-remote-control-racecar-using-simulink-and-texas-instruments-c2000
Testing the system I realized there are errors on reading commands: I read sporadically unwanted peaks (see image).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/193217/image.png)
In the attached image I use a PWM with a high logic level of 1.5ms.
I did several tests with two different TX-RX pairs:
- one with 50Hz output frequency where there are sporadic peaks (PWM with high logic level of 1.5ms duration)
- the other with 100Hz output frequency where I get much more frequent peaks. (PWM with high logic level of 1.5ms duration)
Below is the configuration used:
- ENCODER_A:P24(eCAP1)
- ENCODER_B:P25(eCAP2)
- ENCODER_C:P14(eCAP3)
- ENCODER_D:P15(eCAP4)
- throttle:P16(eCAP5)
- steering:P29(eCAP6)
Here are the files I use: https://drive.google.com/drive/folders/1dfzXy4Ba3aSeai4P4Q269gKx3z1NeBnx?usp=sharing
Any ideas to solve the problem?
Thanks.
0 件のコメント
回答 (1 件)
Venkatesh Chilapur
2018 年 8 月 6 日
Please ensure Overflow/Underflow scenario are causing the behavior. You may want to log the values to ensure the inputs to ePWM block are within the desired range.
0 件のコメント
コミュニティ
その他の回答 パワー エレクトロニクス コミュニティ
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!