LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID Control of Light Intensity

Hi guys,

 

In my project, i'm doing continuous control and monitoring a room's light intensity. I simulate this application by using a LDR as my sensor and a 9V bulb as my final control element. I'm using TIP120 to manipulate the amount of current flowing into the bulb. That's all have been working fine.

 

The problem is, when connected to PID controller (LabVIEW v.6) and trying to tune the controller. I'm using Ziegler-Nichols Closed Loop method, and find it the controller unable to maintain the intensity of the bulb as per my setpoint. It just going choppy, fully ON and fully OFF in fast response. I already tried different parameters for the PID controller but the results were the same. Attached is my process response.

 

 

LI.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Appreciate any helps from you guys. I already manage to tune my temperature control loop, and this is my second control loop.

 

Thanks in advance.

0 Kudos
Message 1 of 8
(5,066 Views)

Hi HeRel,

 

are you in any way related to Mathew? It seems you have to control the very same window blinds...

 

It seems you need to tune the PID parameters. Ziegler-Nichols may have problems with very slow reactions of your  actuator...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(5,059 Views)

Hi GerdW,


It seems that my problem is same with Matthew's. I would like to have the PID Controller to maintain the actuator (bulb) at certain level according to my setpoint.


I'm referring to your diagram, I need further clarifications. But I believe this is not continuous control right, as yours is comparing the level of brightness with constant value. Another thing is what is the final block that is before the bar indicator and shift register?

 

I need to control the brightness at level that can be change accordingly. I think there's some tweaks that need to be done with the controller, but I'm not so sure.

 

Thanks.

 

 

 

0 Kudos
Message 3 of 8
(5,047 Views)

Hi HeRel,

 

the function is called "In Range and Coerce", found in the comparison palette...

 

The example is made according to Mathew's request. Its not intended for control of light level...

 

You may use your PID control, but you need a strong P part with just low I part. The light level usually doesn't change very fast! Also window blinds aren't moved that fast, so you may use an I part, that reacts mayber after 5mins...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(5,043 Views)

GerdW,

 

I thought you meant similar solution of mine with Matthew's.

 

Yeah, I believe that I need to play with the parameters. Light intensity changes can be detected instantly by LDR, so I believe it is a fast process. Anyways, your suggestion meaning that I have to use big gain with small I time right?

 

Another thing is what value we plug in to the Integral in Simple PID.vi if we need a zero? Is it 0 or 9999 coz I used another program that are using 9999 for the lowest value of Integral.

 

Thanks.

0 Kudos
Message 5 of 8
(5,040 Views)

Btw,

 

I just can test your suggestion tomorrow, as all my project's material is in the lab.

 

Thanks.

0 Kudos
Message 6 of 8
(5,039 Views)

Hi HeRel,

 

just look into the SimplePID.vi to see how it calculates the I part. Then decide yourself which integral constant you need to provide...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 8
(5,033 Views)

GerdW,

 

I have tried several parameter configurations, but the result is always the same. The actuator just goes on and off again and again without any proper control level.

 

I wonder what is the tuning method suitable for this type of application.

 

 

Another question is on my temperature control, signal from my PID controller also going either full on or fully off, but in slow manner. What do I have to adjust in order for the controller signal output more stabilize.

0 Kudos
Message 8 of 8
(4,995 Views)