MATLAB Answers

PID controller in Discrete mode

조회 수: 3(최근 30일)
Pratik Panchal
Pratik Panchal 2019년 4월 3일
답변: Tanmay Das 2020년 6월 18일
Hello guys,
I've a simulink model where I am controlling my plant with a PI Controller in Discrete mode. I am planning to bring the model to FPGA. Currently I am simulating the model at same sampling time & it runs perfectly. But in practice, my controller speed is slower by a factor of 10000 sampling time steps. i.e. My plant will update 10000 before my controller gives an output. I tried doing this by changing the sampling time of the PID Block to 10000 & kept the sampling time of the rest of the blocks as 1 (same as before). However, my controller is not able to control the error. Can anyone give me Info regarding this? I'm new in discrete simulations with Simulink. Thank you in advance.

답변(1개)

Tanmay Das
Tanmay Das 2020년 6월 18일
Hi Pratik,
I have the understanding that you have a hardware PID controller which has a delay of 10000 * Ts (where Ts is the sampling time) i.e. u(t-10000*Ts) is fed as input to the plant. In that case you just need to add a ‘Delay of 10000 just after the PID controller and before the Plant.
You can refer to Delay block in order to know more.
However as per my theoretical knowledge, in case of unstable system (e.g. Water-tank, magnetic levitation etc), if control input is delayed into the plant then error signal will increase constantly, and the system will eventually become out of control. So, you may get some error in Simulink after a certain time in case you are handling unstable system. So, I will recommend you go for a stable system if you want to use the same PID controller.

Community Treasure Hunt

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

Start Hunting!

Translated by