Simulink PID controller apparently doing nothing

1 次查看(过去 30 天)
Here is my open loop system.
I run the model and plot it in the workspace
subplot(1,2,1)
plot(FV)
ylim([-1 1.5])
xlabel('time (min)')
ylabel('F/V, 1/min')
title('F/V vs. time')
subplot(1,2,2)
plot(CB)
ylim([-1 1.5])
xlabel('time (min)')
ylabel('C_{B} (mol/Liter)')
title('C_{B} vs. time')
Next, I add a PID controller. P = 1, I = 1, and D = 0 (as per the homework instructions)
I run the output again in the workspace
subplot(1,2,1)
plot(FV1)
ylim([-1 1.5])
xlabel('time (min)')
ylabel('F/V, 1/min')
title('F/V vs. time')
subplot(1,2,2)
plot(CB2)
ylim([-1 1.5])
xlabel('time (min)')
ylabel('C_{B} (mol/Liter)')
title('C_{B} vs. time')
I'm not seeing any response that would indicate a controller, in fact, all that happens is that the concentration of B reaches a higher steady state with the controller. I haven't used a controller before, so I wonder if I am doing something incorrectly. Thanks
As a side note, I also get this message
Warning: Using a default value of 0.2 for maximum step
size. The simulation step size will be equal to or less
than this value. You can disable this diagnostic by
setting 'Automatic solver parameter selection'
diagnostic to 'none' in the Diagnostics page of the
configuration parameters dialog

回答(1 个)

Arkadiy Turevskiy
Arkadiy Turevskiy 2015-9-28
编辑:Arkadiy Turevskiy 2015-9-28
I cannot reproduce this behavior. When I run your setup, I definitely see closed-loop response getting to 1 in steady-state. Maybe there is some sort of issue with variable names somehow getting overridden? Try using scopes instead of "to workspace" blocks and see if you get the same results.
I am attaching the model that shows everything working fine.(created in 15b)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by