User Tools

Site Tools


eeros_architecture:control_system:blocks

This is an old revision of the document!


Blocks

EEROS's control system is mainly made up of blocks. A block can have several inputs and outputs, which carry signals. These signals are transformed from inputs to outputs by the algorithm of the block.

Inputs and Outputs

Every output carries a signal. An input simply refers to a connected output.  //Input und Output Type// This makes sure that each input is connected to a single output. On the other hand, an output can carry its signal to many inputs.

Predefined Blocks

Build your control system by instantiating all the necessary blocks. For example:

  Step<> step(0.0, -3.14159265359, 5);
  step.setName("step 1");
  step.getOut().getSignal().setName("phi_desired");
 
  Sum<3> sum;
  sum.setName("adds feedback");
  sum.getOut().getSignal().setName("control signal");
  sum.getIn(0).connect(step.getOut());
 
  Gain<> posController(174.5); // kp=174.5
  posController.setName("gain block for position control");

Each block has inputs and/or outputs. Name the output in a meaningful way and assign a physical unit to each of the outputs. The signals which connect the different blocks will be created automatically.

The block step is created with an initial output value of 0.0. After 5 seconds this values steps to -pi. step has a single output with the dimension 1.

Output signals are created together with the blocks. On the other side, there is no need to generate and name input signals.

Signals

The signals used to connect the blocks can be of different types. They can be parametrized with the aid of template parameters. Supported types are

  • Arithmetic (int, double …)
  • Logic (bool)
  • Vector (Vector2, Vector3, Vector4)
  • Matrix

Each signal can be assigned a name and a unit. All dimensions of a signal share the same name and unit.

As an example we look at a block which does summation. Two signals, each of dimension 3, will be added together.

  Sum<2,Vector3> sum;
  sum.setName("adds feedback");
  sum.getOut().getSignal().setName("control signal");

This is shown in the following diagram:  //Summation block with threedimensional signals//

The functions getIn() and getOut() return an input or output signal, respectively. With the summation block, getOut() returns the single output signal.

Making Connections

When all necessary blocks have been created the blocks must be wired together.

  sum.getIn(0).connect(step.getOut());
  sum.getIn(1).connect(gain.getOut());	
  posController.getIn().connect(sum.getOut());

getIn(0) returns the first input signal. With getIn(1) you will get the second input signal.

eeros_architecture/control_system/blocks.1444829464.txt.gz · Last modified: 2015/10/14 15:31 by graf