# Simulation Using Block Diagrams Solving Problems by Visualizing Them First

The use of functional block diagrams as the tools for mathematical modeling, visual programming and simulation has become very popular and continues to be more and more present. The reason behind it has become so popular lies in the fact that by visualizing the interactions between variables, we are able to visualize our problem as well - which is helping us on the way to a solution.

That kind of programming tool was first developed to analyze and simulate dynamic systems, many people used the block diagram as the basis for representing systems and based their model representation on block diagrams. Currently, all popular computer packages designed for system simulation use some form of block diagrams as the primary means of user input of system structure.

Among them, MATLAB’s version of this approach, Simulink is the most popular one.

The main characteristic of simulation with block diagrams is that each of the functional blocks is shown and defined for its corresponding mathematical function; then simple connections or combinations are used to represent typical describing equations.

The whole systems of blocks are used to represent complete simulation models, showing all the significant interactions involved in the response of the system model to input disturbances. Thus, in addition to specific output variables, all the other system variables are shown as well.

Applications like this are popular in all areas of engineering and for different purposes.

## When to use block diagram simulation?

###
**Combining blocks to solve modeling equations**

When faced with any kind of complex calculation problem, our first reaction very often is resistance because we don’t know where to start with solving and programming tools require a certain knowledge base. Using block diagrams to solve this kind of problems is really helpful as just being able to visualize the problem – is bringing us already half way to a solution. After developing your visualization using blocks and connecting them together, you get much closer to a solution and it’s very likely you will get to solve the problem before you have imagined. So, open the software and start putting blocks down! :-)

The image below is showing an example of a detailed mathematical model developed in Matlab Simulink. Using the integration block helped to simplify a complex system of differential equations that are usually inevitable part of reactor models.

###
**Analysis of dynamic problems**

Simulation with block diagrams is very often used to analyze and build dynamic features of the system.

We can use the transfer functions of a model to construct a visual representation of the dynamics of the model. Such a representation is a block diagram. Block diagrams can be used to describe how system components interact with each other. Unlike a schematic diagram, which shows the physical connections, the block diagram shows the cause and effect relations between the components, and thus helps us to understand the system’s dynamics. Block diagrams can also be used to obtain transfer functions for a given system, for cases where the describing differential equations are not given.

### Data mining

Block representation in modeling is becoming extremely popular with data mining and data analyzing tools which are also using visual interpretation of mathematical functions to help interpret data patterns, such us RapidMiner, Orange and other data analysis and visualization tools. Read more about them in this article:

Review of Free High-Quality Tools for "Big Data" Processing

##

Which tool to use?

### Matlab's Simulink

Regardless of which simulation package is used, the underlying structure of the simulation is the same. The tools will also enable you to use their solvers for more complex calculations.

Already mentioned MATLAB’s version Simulink is the most known and used one. It has a variety of different and integrated solvers. In text based-programming language such as e.g., C you need to write your own solver.

### Scilab's XANALOG

There is also an open source tool available, under Scilab, an open source platform similar to Matlab. Their tool for block diagram modeling is called XANALOG and available for download and free use.

Possibilities of functional block diagrams for mathematical modeling, visual programming and simulation are really huge as the visualization is helping us to be more creative and practical.

We will be showing some examples, to follow them make sure to subscribe to our newsletter!