Control variable

From Wikipedia, the free encyclopedia
Jump to: navigation, search

The term control variable has different meanings, depending on the area/place in which it is used. The control variable is something that is constant and unchanged in an experiment. Further, a control variable strongly influences values; it is held constant to test the relative impact of independent variables.

Experimental examples[edit]

In scientific experimentation, a control variable is the one element that must not be changed throughout an experiment because it also affects the other independent variables being tested, thus affecting the outcome of the experiment. For example, in the experimental verification of Boyle's law (P = T / V), where Pressure, Temperature, and Volume are all variables; to test the resultant changes to any of these variables requires at least one of the other variables to be kept constant. This is in order to see comparable experimental results in the remaining variables. Essentially, a controlled variable is what is kept the same throughout the experiment. It's also a process of science.

Other candidates for controlled variables might be, for example, if you are testing a product's effects on two plants, the soil type and the pot shape may be two controlled variables. Duration of sunlight and amount of water might be others.

In control theory[edit]

In control theory, controlled variable is the variable that the controller attempts to control. Imagine a thermostat that is controlling the temperature in your room using a heater. The temperature is the controlled variable. The controller knows the target room temperature it should achieve and hold, and attempts to turn the heater ON and OFF (alternately it can regulate the power that is fed into the heater) in a manner so that the controlled variable will come and stay close to its target value regardless the heat-flow out and in of the room through walls, doors, windows, etc.

In computer programming[edit]

In computer programming, a control variable is a program variable that is used to regulate the flow of control of the program.

Examples[edit]

  • A loop control variable is used to regulate the number of times the body of a program loop is executed; it is incremented (or decremented when counting down) each time the loop body is executed.
  • A single control variable can identify the present state of a computer program.

See also[edit]