PID

From SweepMe! Wiki
Revision as of 14:18, 2 December 2020 by Afischer (talk | contribs) (Created page with "This module is used to create a PID control loop in order to reach a measured value at one module by changing the sweep value (set value) of another module. == Usage == The...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This module is used to create a PID control loop in order to reach a measured value at one module by changing the sweep value (set value) of another module.

Usage

The PID module must always be used in conjunction with another module that creates a repetition as the PID module is just calculating one next value for the output. Typically, the repetition is done via a Loop module thar runs infinitely and is only stopped by a Condition module.

Therefore the following modules are typically needed in on branch:

  1. A module that creates a repetition, e.g. Loop
  2. A module that is returning a measurement value, e.g. a Logger module with a driver for a temperature sensor
  3. A module that applies the output value of the PID modules, e.g. an SMU module with a driver for power supply
  4. the PID module itself
  5. A Delay module to create equi-distant time distance between the points.
  6. A Condition module to stop or skip the Loop module in case it is running endlessly.

GUI options

Set value (target)

Please, enter a value for the set value. It can be a fixed value or a parameter from another modules. It also possible to sweep over different set values, for example to do measurements at different temperatures which are stabilized by the PID module.

Actual value

This value must be a paraemter from another module. The PID module will try to change the output so that the actual value conincided with the given set value.

kP, kI, KD

The parameters kP, kI, and kD are the three prefactors of the proportional, the integral, and the differential part of a PID controller. They can be set to 0 if you like to switch off one part of the PID controller. For example, PI controller can be achieved by using kD = 0. The unit of each prefactor depends on the unit of the actual value and the unit of how the output value is used and thus depends on each scenario.

  • The unit of kP is the unit of the output parameter divided by the unit of the actual value.
  • The unit of kI is the unit of the output parameter divided by the unit of the actual value times seconds.
  • The unit of kD is the unit of the output parameter divided by the unit of the actual value per seconds.

Output, min. and Output, max.

Output, min. and Output, max. are the limits that the output value of the PID module can be. The unit of both parameters is in units of how the output value of the PID module is later on used in another module. For example, if the output value of PID module is used to set a current in A of a power supply, and the current should be between 0 A and 10 A, then the Output, min and Output, max must be set to 0 and 10, respectively.


Return values

The PID parameters returns a couple of parameters:

Output

The Output value is the most important parameter. It must be used as the Sweep value in another module. The unit of the Output has the unit of the Sweep mode that is used in the module where the Output value is used as Sweep value.