# Equation of closed and open loop systems

## Introduction

This page explains how to calculate the equation of a closed loop system. We first present the transfer function of an open loop system, then a closed loop system and finally a closed loop system with a controller.

## Open loop

Let’s consider the following open loop system:

The transfert function of the system is given by:

$$\dfrac{y}{u} = G$$

## Closed loop

Let’s now consider the same system in closed loop:

The error $$\epsilon$$ is defined by the difference between the reference (expected value) and the output of the system (the real value):

$$\epsilon = y_c - y$$

The output of the system is given by:

$$y=G.u=G.\epsilon$$

By replacing $$\epsilon$$ in the previous equation we get:

$$y=G.(y_c - y) = G.y_c - G.y$$

This equation can be rewritten to get the transfert function:

$$\frac{y}{y_c} = \frac {G}{1+G}$$

## Closed loop with controller

Let's now assume that a controller is added:

We can deduce the new transfert function:

$$\frac{y}{y_c} = \frac {CG}{1+CG}$$