手动控制pid控制器 [英] Manual control of a pid controller

查看:106
本文介绍了手动控制pid控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天,

我需要您的支持,如何使用PID控制器手动控制高功率LED的温度。我有两个GUI,一个从Led读取温度,第二个用于打开/关闭Leds,同时使用滑块控制控制Led亮度。读取温度的GUI上有一个PID控制器应用程序。这个控制器的输出是我想用来增加或减少Led亮度的,它总是改变Led温度。如何使用这个PID控制器来控制Led亮度是我无法掌握的。 GUI上的滑块从0%缩放到100%。我认为控制器的输出应该是百分比,这将使我相应地调整滑块。我的问题是这种类型的布局会产生一个输出有效控制LED亮度。

如果是的话,如果有人可以告诉我如何实现这一点,我会很高兴。附上这篇文章是我在网上找到的一个教程的修改代码。

PID控制器。

如果有人能指导我,我会非常感激关于如何开发图表的教程。我希望在图表上显示设定值,过程值和输出值。感谢大家支持常规支持。

祝你好运。



[edit] SHOUTING已删除 - OriginalGriff [/ edit]

解决方案

 SteadyError + =错误; 
float integral = Ki * SteadyError;
float deltaTime =(LastCorrectionTime - DateTime.Now.Ticks)/ 500000 0
if (SteadyError > MaxSteadyError )SteadyError = MaxSteadyError;
if (SteadyError < MinSteadyError)SteadyError = MinSteadyError;
if (错误< -270)错误+ = 360 ;
if (错误> 270 )error - = 360 ;
float derivative = Kd *(错误 - PrevError);



http://stackoverflow.com/questions/3902713/pid-controller-integral-term-causing-extreme-不稳定 [ ^ ]


Good day to all,
Please i need your support on how to manually control the temperature of High Power Leds using PID controller. I have two GUIs,one reads the temperature from the Led while the second is used to ON/OFF the Leds and at the same time controls the Led brightness using slider control.The GUI that reads the temperature has a PID controller application on it.The output from this controller is what i want to use to increase or decrease the Led brightness which invariable changes the Led temperature.How to go about using this PID controller to control the Led brightness is what i have not been able to grasp well.The slider on the GUI is scaled from 0% to 100%.My thinking is that the output from the controller should be in percentage which will make me to adjust the slider accordingly.My question is that will this type of arrangment produce an output that will efficiently control the Led brightness.
If yes,i would be glad if somebody could put me through on how to accomplish that. Attached to this post is a modified code of a tutorial on
PID controller which i found on the net.
Again i would be very grateful if somebody could direct me to a tutorial on how to develop a graph. i wish to display the Setpoint,Process value and the output value on a graph.Thank you all for the usual Support.
Best regards.

[edit]SHOUTING removed - OriginalGriff[/edit]

解决方案

SteadyError += error ;
float integral = Ki * SteadyError;
float deltaTime = (LastCorrectionTime - DateTime.Now.Ticks) / 500000.0
if ( SteadyError > MaxSteadyError ) SteadyError = MaxSteadyError;
if ( SteadyError < MinSteadyError ) SteadyError = MinSteadyError;
if (error < -270) error += 360;
if (error >  270) error -= 360;
float derivative = Kd * (error - PrevError);


http://stackoverflow.com/questions/3902713/pid-controller-integral-term-causing-extreme-instability[^]


这篇关于手动控制pid控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆