Measurement of dc offset with operational amplifier.
How to measure DC offset?
I use a capacitor to separate the AC component from the signal.
The differential amplifier returns the difference of the signal with a DC component and without a DC component.
The integrator smooths out the measurement and since it is in opposite phase, the last op amp just reverses the phase.
Change the voltage of the DC source and run the simulation.