Control blocks

Control blocks are those related to the creation of control loops.

PID

PID Static block allows the user to build a PID (Proportional, Integral and Derivative) controller with fixed gains.

PID block

As can be seen in the figure above, PID Static block has a button that enables or disables the block to be commanded from the 1x PDI Tuning software.

PID block - Command button

The upper-right button is used to activate 'Command PID'. For more information on this command, please refer to the Tuning section of the 1x PDI Tuning user manual.

Each command button has a different ID that allows the user to identify it during the command.

Note

To avoid disabling a block by mistake, the following warning message appears when disabling it:

Warning message when disabling the command

  • The PID mathematical implementation in Veronte Autopilot 1x is the following:

    Where:

  • Inputs

    yc: Target value, desired set-point of the controlled variable.

    y: Closed loop, value of the controlled variable.

    (Optional) dy: Derivative of the controlled variable (computed numerically from 'y' if not connected).

    (Optional) usat: Previously applied control action after saturation (used for anti-windup and respect). If not connected a value of zero is assumed.

    (Optional) ff: Feed-forward control, this value is added to the 'u' output before applying the output limits. If not connected a value of zero is assumed.

    (Optional) respect: When TRUE the output 'u' is equal to the input 'usat' (except in the first step, for safety reasons) and the integral component is estimated with the information in 'y' and 'yc'. When FALSE the PID works as usual. If not connected a value of FALSE is assumed.

    (Optional) enable integral: When TRUE the the PID works as usual. When FALSE the integral is exponentially discharged. If not connected a value of TRUE is assumed.

    (Optional) i0: If connected, this value is used to initialize the integral part of the PID when in on_focus or respect.

  • Outputs

    u: Control output after applying PID limits.

    p: Proportional part of the output before the PID limits are applied.

    i: Integral part of the output before the PID limits are applied.

    d: Derivative part of the output before the PID limits are applied.

  • Configuration menu:

    Double click on the block to open its configuration menu.

    PID block configuration

    1. yc: Input variable.
    2. y: Feedback variable.
    3. Invert: Apply a -1 gain .
    4. Wrap: Perform a [-pi, pi] wrap.
    5. Parallel/Standard: In parallel mode, PID gains are independent. In standard mode, I & D gains are scaled by P gain.
    6. KP: Proportional gain.
    7. 1/TI: Integral gain.
    8. Imax: Maximum value for integral term. Value must be possitive and the limit applied is symmetrical ([-Imax, Imax]).
    9. tau: Time constant for the derivative term first order LPF.
    10. TD: Derivative gain.
    11. TA: Anti-windup gain. Recommended value around x10 KI. Unloads integral term if output is saturated.
    12. Uf: Output offset. Feedforward value is also applied at this point.
    13. Min/Max: Output limits. Users can manually enter a value or select a variable.
    14. u: PID output.
    15. On focus respect: If respect is enabled, when the PID is first executed, an initial I value will be applied so that 'u' = 'usat' for the first iteration.
    16. Proportional/Derivative Beta: yc scaling for proportional and derivative terms. Unless necessary, value should always be 1.
    17. Integral disable: Disables integral term if (yc - y) > Error limit.


    Tip

    Remember to always use 'wrap' for direction controllers, such as 'Heading' or 'Yaw' PIDs. This will allow the UAV to always turn in the right direction.

T-Sched PID

T-Sched PDI block is a PID (Proportional, Integral and Derivative) controller with table scheduled parameters. It allows to scale most PID parameters using an external variable, usually the speed (Ground speed or IAS).

TSched PID block

It works in a very similar way to the PID Static block, except that in that block the gains are fixed and in the TSched block they are adjusted for different values of the input variable.

For this reason, the inputs and outputs are the same, but in this block an additional input is added:

  • Input

    var: Scaling variable for gain scheduling used to interpolate in the table to obtain the PID parameters.

  • Configuration menu

    Double click on the block to open its configuration menu.

    TSched PID block configuration

    In this block, the PID gains for the different values of the input variable must be entered in the table above instead of in the diagram. To add more values, simply click on add and to remove them, click on remove.

    If the variable is outside the limits, the values of the closest point will be applied. Values between points are linearly interpolated.

    In addition, clicking on "Table Generator" will bring up another configuration menu:

    TSched PID block configuration - Table Generator

    This is another option to enter the PID gains for different values of the input variable, instead of manually entering all the gains, the Table Generator will generate them according to the parameters to be configured:

    • Type: Depending on the type of function selected, the gains are calculated differently.

      • Inverse: It will calculate the different gains with an inverse function.
      • Proportional: It will calculate the different gains with a proportional function.
      • Quadratic: It will calculate the different gains with a quadratic function.

      Type Result (Kp)
      Inverse Kpi VVi
      Proportional Kpi ViV
      Quadratic Kpi Vi2V2

    • Reference cow: Users must select the reference values from which the other values will be calculated.

    • Range: The minimum and maximum values of the input variable between which the gains have to be calculated have to be defined.

    Then just click on "Apply" and the maximum number of points that the table allows will be generated.

Example

Example of Table Generator


© 2026 Embention. All rights reserved.