Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Block diagrams

Block diagrams are a graphical representation of a dynamical system. We first encountered block diagrams in the introductory lecture. They are widely used in control systems engineering to represent the flow of signals through a system.

In this section, we will learn about a specialized type of block diagram known as a simulation diagram. These are the type of block diagrams used in simulation software such as MATLAB Simulink.

Ingredients of block diagrams

Block diagrams consist of three different types of blocks connected by arrows that indicate the flow of signals. The types of blocks are:

Gain blocks

These blocks multiply the input signal by a constant value (the gain) to produce the output signal. They are represented by triangles or rectangles with the gain value written inside. Gains can be positive or negative.

Add/Sum junctions

These blocks sum multiple input signals to produce a single output signal. They are represented by circles or rectangles with a combination of plus (+) and minus (−) signs inside to indicate which inputs get added or subtracted. If there are no signs, assume all inputs are summed.

Integrator blocks

These blocks perform integration on the input signal to produce the output signal. They are represented by rectangles with the integral symbol \int or 1s\frac{1}{s} inside. This is because 1s\frac{1}{s} is the transfer function for integration.

Transfer functions

These blocks represent a general LTI system written as a transfer function. They are represented by rectangles with the transfer function written inside. Integrators are special cases of transfer functions.

Constructing a block diagram

How do we construct a representation of a set of ODEs without using any differentiation? The key is to start with the fully differentiated terms, and integrate down to the original variables. Here are the concrete steps.

We will illustrate these steps through several examples.

Spring-mass-damper system

First, consider a simple spring-mass-damper system with equation of motion

mx¨+bx˙+kx=fm \ddot x + b \dot x + k x = f

Step 1: Isolate the highest-order derivative x¨\ddot x:

x¨=1m(fbx˙kx)\ddot x = \frac{1}{m}\left( f - b \dot x - k x \right)

Step 2: Create a chain of two integrators to reduce x¨\ddot x down to xx. We will also add labels to the signals on the arrows to keep track of the variables.

Step 3: Place a summing junction to combine the terms on the right-hand side of Eq. (2). Our summing junction will have three inputs: one for the input force +f+f, one for the term bx˙-b \dot x, and one for the term kx-k x. We also include a gain block of 1m\frac{1}{m} to multiply the entire sum.

Step 4: Draw feedback loops to connect the state variables x˙\dot x and xx back to the summing junction through gain blocks of bb and kk, respectively. Also include the force ff as an input.

And that’s it! We have constructed the block diagram for the spring-mass system.

Example: double spring-mass-damper

We now consider a more complex example: a double rotational spring-mass-damper system. Here is the physical diagram:

Double rotational spring-mass-damper system.

Figure 8:Double rotational spring-mass-damper system.

We derived the equations of motion for this system in the solution to Problem 2 in the rotational mechanics section. The equations are:

J1θ¨1+b1θ˙1+k1θ1+k2(θ1θ2)=0J2θ¨2+b2θ˙2k2(θ1θ2)=T\begin{aligned} J_1 \ddot\theta_1 + b_1\dot\theta_1 + k_1\theta_1 + k_2(\theta_1-\theta_2) &= 0 \\ J_2 \ddot\theta_2 + b_2\dot\theta_2 - k_2(\theta_1-\theta_2) &= T \end{aligned}

We start by isolating the highest-order derivatives:

θ¨1=1J1(b1θ˙1k1θ1k2(θ1θ2))θ¨2=1J2(Tb2θ˙2+k2(θ1θ2))\begin{aligned} \ddot\theta_1 &= \frac{1}{J_1}\left( - b_1\dot\theta_1 - k_1\theta_1 - k_2(\theta_1-\theta_2) \right) \\ \ddot\theta_2 &= \frac{1}{J_2}\left( T - b_2\dot\theta_2 + k_2(\theta_1-\theta_2) \right) \end{aligned}

With two equations, we need two chains of integrators, one for each θi\theta_i. Then, we add summing junctions and feedback loops as before. Here is the final block diagram:

Block diagram for the double rotational spring-mass-damper system of .

Figure 9:Block diagram for the double rotational spring-mass-damper system of Figure 8.

Example: DC motor

Next, let’s look at the block diagram for a DC motor. The equations of motion we derived in the section on DC motors are:

Ldidt+Ri+vb=vinvb=KωJω˙+bω=TTLT=Ki\begin{aligned} L \frac{\dd i}{\dd t} + R\, i + v_b &= v_\textsf{in} \\ v_b &= K \omega \\ J \dot \omega + b\,\omega &= T - T_L \\ T &= K i \end{aligned}

This block diagram has a nice representation because it allows us to clearly separate the electrical and mechanical subsystems, connected by motor constants Kb=Kt=KK_b = K_t = K.

Block diagram for the DC motor system of Eq. .

Figure 10:Block diagram for the DC motor system of Eq. (5).

If we want, we can even collapse each subsystem into a single transfer function block to get a higher-level view of the system. For example, the electrical subsystem has ODE:

Ldidt+Ri=vinvbL \frac{\dd i}{\dd t} + R\, i = v_\textsf{in} - v_b

Taking the Laplace transform and rearranging, we have

I(s)Vin(s)Vb(s)=1Ls+R\frac{I(s)}{V_\textsf{in}(s) - V_b(s)} = \frac{1}{L s + R}

Likewise, the mechanical subsystem has transfer function

Ω(s)T(s)TL(s)=1Js+b\frac{\Omega(s)}{T(s) - T_L(s)} = \frac{1}{J s + b}

Substituting these into the block diagram gives a more compact diagram.

Simplified block diagram of  with subsystems collapsed into transfer function blocks.

Figure 11:Simplified block diagram of Figure 10 with subsystems collapsed into transfer function blocks.

Recovering equations of motion

Given a block diagram, we can also recover the equations of motion by following the signal flow and writing equations for each summing junction and block. Let’s illustrate this with the spring-mass-damper example from earlier.

Spring-mass-damper block diagram with labels removed.

Figure 12:Spring-mass-damper block diagram with labels removed.

Starting from the output xx, we can work our wa backwards through the integrators, labeling the intermediate signals as needed.

Spring-mass-damper block diagram with labels included.

Figure 13:Spring-mass-damper block diagram with labels included.

From here, the equations of motion can be read off directly by looking at the summing junction and gain blocks. We have

x¨=1m(fbx˙kx)\ddot x = \frac{1}{m}\left( f - b \dot x - k x \right)

Rearranging, we obtain the familiar equation of motion:

mx¨+bx˙+kx=fm \ddot x + b \dot x + k x = f

Example: interlaced loops

The method shown above can fail if there are interlaced loops, or non-consecutive integrations. Consider the example below:

Block diagram with interlaced loops.

Figure 14:Block diagram with interlaced loops.

In this case, we cannot propagate xx backwards to the second integrator because of the intermediate summing junction. In such cases, we add new variables for the signals we cannot identify, and include additional equations for the intermediate summing junctions. Here is how it works for this example.

Block diagram with interlaced loops and labeled signals.

Figure 15:Block diagram with interlaced loops and labeled signals.

We now write one equation for each summing junction and obtain our final equations of motion representing this block diagram:

z˙=aubyy˙=z+cu\boxed{\begin{aligned} \dot z &= a u - b y \\ \dot y &= z + c u \end{aligned}}

From here, we can eliminate the intermediate variable zz to get a single ODE relating uu to yy if we wish, or we can leave it as-is (it’s still a valid representation of the system!).

Input derivatives

So far, we have seen how to construct block diagrams for systems of ODEs that do not contain input derivatives. What happens if the equations of motion do contain input derivatives? For example, consider the following generic system:

x¨˙+a2x¨+a1x˙+a0x=b2u¨+b1u˙+b0u\dddot x + a_2 \ddot x + a_1 \dot x + a_0 x = b_2 \ddot u + b_1 \dot u + b_0 u

At first glance, it may seem impossible to construct a block diagram for this system without using differentiation. However, there are tricks we can use to rewrite the system into an equivalent form that does not contain input derivatives. These tricks generally boil down to introducing extra variables and equations. We will show two different methods.

First method (controllable form)

The transfer function from uu to xx is

XU=b2s2+b1s+b0s3+a2s2+a1s+a0\frac{X}{U} = \frac{b_2 s^2 + b_1 s + b_0}{s^3 + a_2 s^2 + a_1 s + a_0}

Let’s define an intermediate variable ZZ and write the system as a cascade of two systems so UZXU \to Z \to X:

ZU=1s3+a2s2+a1s+a0XZ=b2s2+b1s+b0\begin{aligned} \frac{Z}{U} &= \frac{1}{s^3 + a_2 s^2 + a_1 s + a_0} \\ \frac{X}{Z} &= b_2 s^2 + b_1 s + b_0 \end{aligned}

Multiplying this out and converting back to the time domain, we have

z¨˙+a2z¨+a1z˙+a0z=ub2z¨+b1z˙+b0z=x\begin{aligned} \dddot z + a_2 \ddot z + a_1 \dot z + a_0 z &= u \\ b_2 \ddot z + b_1 \dot z + b_0 z &= x \end{aligned}

This is now a system of ODEs (2 equations in unknowns x,zx,z)equivalent to Eq. (12). But critically, it contains no input derivatives! This is called the controllable canonical form.

We can implement the first equation the standard way, but now we’re integrating derivatives of zz rather than derivatives of xx. Then, we can create the output xx using gain blocks and summing junctions from zz and its derivatives. Here is the result.

Diagram representing Eq.  using controllable canonical form.

Figure 16:Diagram representing Eq. (12) using controllable canonical form.

Second method (observable form)

In the second approach, we define a sequence of auxiliary variables, starting with the output. Define z3=xz_3 = x. Eq. (12) can then be rewritten as

z¨˙3+a2z¨3+a1z˙3+a0z3=b2u¨+b1u˙+b0u\boxed{\dddot{z}_3} + \boxed{a_2 \ddot z_3} + a_1 \dot z_3 + a_0 z_3 = \boxed{b_2 \ddot u} + b_1 \dot u + b_0 u

Collect the highest-order (boxed) terms on the left and define z2=z˙3a2z3b2uz_2 = \dot z_3 - a_2 z_3 - b_2 u. Substituting into Eq. (16) gives

z¨2+a1z˙3+a0z3=b1u˙+b0u\boxed{\ddot{z}_2} + \boxed{a_1 \dot z_3} + a_0 z_3 = \boxed{b_1 \dot u} + b_0 u

Continuing this process, we define z1=z˙2a1z3b1uz_1 = \dot z_2 - a_1 z_3 - b_1 u and substitute into Eq. (17):

z˙1+a0z3=b0u\dot{z}_1 + a_0 z_3 = b_0 u

This contains no input derivatives, so we can stop. Collecting the equations where we defined z1z_1, z2z_2, and z3z_3, together with Eq. (18), we have

z˙1=a0z3+b0uz˙2=z1+a1z3+b1uz˙3=z2+a2z3+b2ux=z3\begin{aligned} \dot z_1 &= - a_0 z_3 + b_0 u \\ \dot z_2 &= z_1 + a_1 z_3 + b_1 u \\ \dot z_3 &= z_2 + a_2 z_3 + b_2 u \\ x &= z_3 \end{aligned}

This is now a system of ODEs (4 equations in unknowns x,z1,z2,z3x,z_1,z_2,z_3) equivalent to Eq. (12). Again, there are no input derivatives! This is called the observable canonical form.

From here, we can construct separate chains of integrators for z1z_1, z2z_2, and z3z_3, and connect them with summing junctions and gain blocks as needed. Here is the result.

Diagram representing Eq.  using observable canonical form.

Figure 17:Diagram representing Eq. (12) using observable canonical form.

This diagram looks completely different from the previous one, but it represents the same system dynamics. This reinforces our earlier point that there are often multiple valid ways to draw block diagrams for the same system.


Test your knowledge

Solution to Exercise 1 #

Our first step is to isolate the highest-order derivatives:

α¨=4α˙3(αω)ω˙=12(f+3(αω))\begin{aligned} \ddot{\alpha} &= - 4\dot{\alpha} -3(\alpha-\omega) \\ \dot{\omega} &= \frac{1}{2}\bigl(f + 3(\alpha - \omega)\bigr) \end{aligned}

We noticed the group 3(αω)3(\alpha-\omega) appears in both equations, so we kept it grouped to minimize the number of blocks and arrows needed in the final diagram. Next, we create two chains of integrators, one for α\alpha and one for ω\omega, and connect the summation junctions and feedback loops as needed. Here is the final block diagram:

Block diagram representing the system of equations .

Figure 18:Block diagram representing the system of equations (20).

Solution to Exercise 2 #

Let’s begin by labeling the internal signals surrounding the integrators, since it is not easy to get to them from the output directly. We will call the output of the second integrator zz.

Labeled version of the block diagram of .

Figure 20:Labeled version of the block diagram of Figure 19.

Now we can write one equation of motion for each summing junction:

z¨=a(f+dybz)y=c(zdy)\begin{aligned} \ddot z &= a\,( f + d y - b z ) \\ y &= c\,(z - d y) \end{aligned}

This is a legitimate system of ODEs representing the block diagram. If we want an even simpler representation, we can eliminate zz and obtain a single ODE relating ff and yy. First, rearrange the second equation to get

z=(1c+d)yz = \left( \frac{1}{c} + d \right) y

Substituting into the first equation gives

(1c+d)y¨=a(f+dyb(1c+d)y)\left( \frac{1}{c} + d\right) \ddot y = a \left( f + d y - b \left( \frac{1}{c} + d \right) y \right)

Rearranging and simplifying, we have

(1c+d)y¨+a(bc+bdd)y=af\left( \frac{1}{c} + d\right)\ddot y + a\left( \frac{b}{c} + bd - d \right) y = a f