Simulink - PID Controller Tuning - Strange graphs

Hello, I'm trying to tune PID controller in Simulink (system with delay). My "model" in Simulink looks like this:
I used Cohen-Coon method to find parameters of PID controller. Input parameters for PID controller are all right but when i start the simulation I keep getting these "not smooth" graphs (via picture) and I don't know why. I already tried to change model settings -> solver -> min and max step size but there is no difference.
I would be grateful for any help with this problem.

댓글 수: 3

Sam Chak
Sam Chak 2022년 4월 9일
편집: Sam Chak 2022년 4월 9일
If you request for proper help, please provide info about the design parameters in the PID controller block and the time delay in the Transport Delay block.
It is set like this
Sam Chak
Sam Chak 2022년 4월 9일
편집: Sam Chak 2022년 4월 9일
Edit: moved my comment to Answer.

댓글을 달려면 로그인하십시오.

 채택된 답변

Sam Chak
Sam Chak 2022년 4월 9일

1 개 추천

The spikes in the your original output signal was caused by the derivative filter in the PID controller block. More accurately, it's because you tuned the PID control gains manually using the Cohen-Coon method and directly inserted these 3 values into the block, without taking the effect of the derivative filter (N = 100 by default) into account.
There are generally two approaches to handle this situation:
  1. Tune the filter coefficient until you obtain a desired smooth output.
  2. Use the Ideal PID controller instead.

댓글 수: 2

Thank you very much for your time, i appreciate it.
I tried to create the same model that you did (the ideal PID controller) and my results are not same to yours. I don't know where might be the problem.
I think i just figured it out. I had bad value in step block by mistake.
Thanks very much!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Sam Chak
Sam Chak 2022년 4월 9일
편집: Sam Chak 2022년 4월 9일

1 개 추천

This is strange.
I only set the max step size = 1e-3 in the solver config paramaters to produce a smoother output signal. The rest of the settings remain unchanged.
Can you check the each value in the control gain block?
P = 0.8958
I = 0.210930325
D = 0.6073524

댓글 수: 2

It was probably because of Step time value in Step block (it was 1 and I changed it to 0). Now it seems to be smooth.
👍 Good to hear that it works!

댓글을 달려면 로그인하십시오.

카테고리

제품

릴리스

R2022a

질문:

2022년 4월 9일

댓글:

2022년 4월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by