Developing control structures using visual programming

Among the high-level programming languages are visual languages, which enable users to create computer programs by manipulating graphic elements. Many of these languages are based on the “box and arrows” approach, in which boxes, circles, etc., are treated as objects on the screen connected by arrows, lines, or arcs. Users are attracted to visual languages for a variety of reasons. The human brain processes images much more naturally than text, after all.

  • Random access vs sequential access. The nature of text is sequential, whereas the nature of figures is random, either in local or global visual representation.
  • Rate of transfer. Human senses and mind can naturally process images in real time, figures, thus, are easier to access and decode.
  • Dimension of expressions. Figures are multidimensional, whereas text is unidimensional by nature. Figures provide visual properties such as color, shape, size, and direction, which allows the information to be codified in a much more compact manner.
  • Concrete vs Abstract. An image can serve as a concrete metaphor that helps convey abstract concepts more clearly. 

Control theory has historically been taught to engineers using block diagrams. Generally, block diagrams and visual representations of systems are advantageous for presenting information due to the following reasons:

  • Since they indicate the signal flow path, they are more informative.
  • They demonstrate the hardware design of the system, and 
  • They are easier to code. Block diagrams allow engineers to understand a system at a glance rather than acquiring information sequentially through lines of code.

To write embedded code for a control experiment, engineers must write their algorithms in lower-level languages used by digital controllers (such as C, C++, and assembly code), which is generally outside the expertise of control system designers. To overcome this coding challenge, the HAPiWEC project enables the physical testing and debugging of controllers for wave energy systems using fast prototyping techniques, including model-based design, modular hardware/software, and automatic generation of code from high-level visual languages.

Simulink (a visual programming language) is used in the HAPiWEC project to develop real-time controllers for the low level and high level control structures of the wave energy converter. Low-level controls include torque and current control of generators through the use of power electronics.  Figures below illustrate the design of such a low-level controller, which is implemented in a C2000 digital signal controller from Texas Instruments.

Today the HAPIWEC team got to see the system working, but more interestingly, they also got to see how to control it remotely. How was this done? We will discuss this in a future post.
A photograph of the experimental test bed for the controller system.