Why are my discrete controllers not identical
조회 수: 2 (최근 30일)
이전 댓글 표시
I am simulating a simple closed loop speed controller for a DC motor in Simulink.
I have a continuous PI controller working just fine.
I have then discretized the continuous controller and implemented it in two different, but equivalent ways, and it seems that the two discrete implementations provide different results, even though they are supposed to be equivalent.
Both discrete controllers are obtained by the same discretization method (Tustin), but one is implemented as a single discrete transfer function, whereas the other is implemented as a sum of the P and I parts individually.
The attached model contains all setup in the InitFcn callback, and illustrates both the continuous controller as well as both of the discrete controllers.
The "Decomposed Discrete Control Structure" tracks the continuous controller reasonably well, whereas the "Discrete Transfer Function Control Structure" has large deviations, and is even unstable for longer sample times. Conversely, the issue is resolved for faster sample times.
댓글 수: 2
채택된 답변
추가 답변 (1개)
Birdman
2017년 10월 24일
Hi Morten,
The issue with your controller design was challenging. But I think I have managed to solve it.
Firstly, we need to look at your closed loop system response for your C controller which has Kp=0.5 and Ki=15. With this controller, we need to see how fast the system behaves. Therefore, we need to look for RISE TIME of the closed loop system. It is 0.0088 seconds. Now, in this situation, I would like to make some recall about sampling frequency. According to the Nyquist rule, if you do not want to missample the signal you are observing, you need to choose a sampling frequency which is 15-20 times greater than the signal. In this situation, since the rise time for your controller is 0.0088 seconds, you need to divide this value to at least 15, at most 20. This means, you need to choose a sampling time less than 0.00044 seconds in order not to lose the original signal. Therefore, when you increase the sampling rate(for instance 0.0001 seconds), the discrete time controller works well.
Hope this helps. Make sure to change your sampling rate to less than 0.00044 seconds, or redesign the controller. But in command line, make sure to check the step response characteristics every single time in case that your signal is too fast.
댓글 수: 2
Walter Roberson
2017년 10월 24일
Nyquist only requires sampling at twice the rate of changes, but sampling even further can help clarify whether your signal is really at the rate you think it is.
참고 항목
카테고리
Help Center 및 File Exchange에서 Classical Control Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!