How an Instrumentation Amplifier Works.
In one of my previous articles I described how I analyze op-amp circuits. Looking at how various elements behave in the feedback loop is not very interesting: a bunch of formulas and nothing more, and there's plenty of that on the internet already. In my opinion, it will be more interesting to look at the classic instrumentation amplifier circuit; to be precise, we'll derive it through logical reasoning. By the way, for those who don't know, an instrumentation amplifier is designed mainly for precision amplification with high signal fidelity.
The instrumentation amplifier circuit is based on a differential amplifier, which looks like this.

As the name suggests, this circuit amplifies the difference between the signals applied to the non-inverting and inverting inputs.
Suppose all the resistances are equal, Vin1 is 10 volts and Vin2 is 12 volts. Since R3 = R4, half of Vin2, i.e. 6 volts, will be applied to the non-inverting input.

Since the circuit has negative feedback (NFB), the voltages at the non-inverting and inverting inputs will be equal. Moving on: the voltage drop across R1 is 4 volts, and the same voltage drops across R2 (since R1 = R2 and they are in series), so the op-amp output voltage will be 2 volts, which corresponds to the difference of the input voltages. The result shows that we haven't amplified the signal difference, but we've confirmed that this circuit produces it at the output.
To amplify the output signal, let's assume the resistors are not equal, and here we'll have to do a little calculation.


The current flowing through R1 and R2 can be found as follows

The voltage at the non-inverting input is

Since the circuit has feedback, Va = Vb; we substitute the resulting expression into the current formula in place of Va. Then we substitute the current formula into the first expression and get.

Expressing Vout

If R1 = R3 and R2 = R4, then

The last formula makes it clear that the gain is set by the resistor pairs R2,R4 and R1,R3.
But this circuit has several drawbacks: one is low input impedance, the second is that the input impedances differ. The difference in input impedances leads to a zero offset, i.e. even with identical DC voltages Vin1 and Vin2, different currents will flow through resistors R1,R2 and R3,R4, and accordingly the voltages at points Va and Vb will differ.
These drawbacks can be eliminated by adding an op-amp buffer in series with each input.

It should be noted that the resistor values around the differential amplifier must be matched very precisely.
And again we face the task of amplifying the signal; for this we need to add a few resistors as shown in the circuit below. By the way, in a real instrumentation amplifier all the resistors are located inside the package of the instrumentation amplifier itself, except for Rg, which lets you set the required gain.

The most interesting part is left: deriving the formula for the last circuit.
Since the buffers use NFB, the voltages at the non-inverting and inverting inputs tend to equalize, so the voltage drop across Rg will be.

The same current will flow through resistors R5 and create a voltage drop across them.


It was shown above that when resistors R1-R4 are equal, Vout = Va - Vb. That completes the calculation; as you can see, simple rules let you analyze and calculate interesting circuits.
The instrumentation amplifier circuit is based on a differential amplifier, which looks like this.

As the name suggests, this circuit amplifies the difference between the signals applied to the non-inverting and inverting inputs.
Suppose all the resistances are equal, Vin1 is 10 volts and Vin2 is 12 volts. Since R3 = R4, half of Vin2, i.e. 6 volts, will be applied to the non-inverting input.

Since the circuit has negative feedback (NFB), the voltages at the non-inverting and inverting inputs will be equal. Moving on: the voltage drop across R1 is 4 volts, and the same voltage drops across R2 (since R1 = R2 and they are in series), so the op-amp output voltage will be 2 volts, which corresponds to the difference of the input voltages. The result shows that we haven't amplified the signal difference, but we've confirmed that this circuit produces it at the output.
To amplify the output signal, let's assume the resistors are not equal, and here we'll have to do a little calculation.


The current flowing through R1 and R2 can be found as follows

The voltage at the non-inverting input is

Since the circuit has feedback, Va = Vb; we substitute the resulting expression into the current formula in place of Va. Then we substitute the current formula into the first expression and get.

Expressing Vout

If R1 = R3 and R2 = R4, then

The last formula makes it clear that the gain is set by the resistor pairs R2,R4 and R1,R3.
But this circuit has several drawbacks: one is low input impedance, the second is that the input impedances differ. The difference in input impedances leads to a zero offset, i.e. even with identical DC voltages Vin1 and Vin2, different currents will flow through resistors R1,R2 and R3,R4, and accordingly the voltages at points Va and Vb will differ.
These drawbacks can be eliminated by adding an op-amp buffer in series with each input.

It should be noted that the resistor values around the differential amplifier must be matched very precisely.
And again we face the task of amplifying the signal; for this we need to add a few resistors as shown in the circuit below. By the way, in a real instrumentation amplifier all the resistors are located inside the package of the instrumentation amplifier itself, except for Rg, which lets you set the required gain.

The most interesting part is left: deriving the formula for the last circuit.
Since the buffers use NFB, the voltages at the non-inverting and inverting inputs tend to equalize, so the voltage drop across Rg will be.

The same current will flow through resistors R5 and create a voltage drop across them.


It was shown above that when resistors R1-R4 are equal, Vout = Va - Vb. That completes the calculation; as you can see, simple rules let you analyze and calculate interesting circuits.