Bridge circuits
Copyright (C) 2022 Miodrag Bolic
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details <https://www.gnu.org/licenses/>.
% Changing the path from main_folder to a particular chapter
main_path=fileparts(which('Main_Content.mlx'));
%addpath(append(main_path,'/Chapter2'))
cd (append(main_path,'/Chapter3/Bridges'))
addpath(append(main_path,'/Service'))
SAVE_FLAG=0; % saving the figures in a file
Introduction
In this notebook, we will introduce the bridge circuit, and show how to connect it to the instrumentation amplifier and how to linearize it.
Bridge circuit
Bridge circuit is show for the figure below. The outout is shown when the resistor R3 changed its value from in the range of 3%.
set_param('bridge1/R1','R','120');
set_param('bridge1/R2','R','120');
set_param('bridge1/R3','R','120');
set_param('bridge1/R4','R','120');
simOut = sim('bridge1', 'CaptureErrors', 'on');
Quarter bridge
% Changing input resistance of R3 over 2 sec from 120Ohm -3% to 120 +3%
R_range=[R_nominal-R_nominal*percentage_change/100, R_nominal+R_nominal*percentage_change/100];
deltaR=(R_range(2)-R_range(1))/length(Rin(:,1));
Rin(:,2)=R_range(1):deltaR:R_range(2)-deltaR;
model_name = 'quarter_bridge';
set_param('quarter_bridge/R1','R','120');
set_param('quarter_bridge/R2','R','120');
set_param('quarter_bridge/R4','R','120');
simOut1 = sim('quarter_bridge', 'CaptureErrors', 'on');
plot(Rin(:,2),simOut1.voltage_out.Data(1:length(Rin(:,2)),1))
title('Response of a quarter bridge')
xlabel('Resistance R3 (Ohm)')
Quarter bridge with the instrumentation amplifier
Rin(:,2)=R_nominal+sin(2*pi*1.2*t);
model_name = 'quarter_bridge_with_IA';
set_param('quarter_bridge_with_IA/R1','R','120');
set_param('quarter_bridge_with_IA/R2','R','120');
set_param('quarter_bridge_with_IA/R4','R','120');
out=sim(model_name)
out =
Simulink.SimulationOutput:
ScopeData: [1x1 struct]
logsout: [1x1 Simulink.SimulationData.Dataset]
simout: [1x1 timeseries]
tout: [6126x1 double]
SimulationMetadata: [1x1 Simulink.SimulationMetadata]
ErrorMessage: [0x0 char]
temp_vin = out.simout.Data(:,1);
temp_vout = out.simout.Data(:,2);
plot(out.simout.Time,temp_vin,'LineWidth',1);
plot(out.simout.Time,temp_vout,'LineWidth',1);
title('Input and output of the amplifier');
legend({'Potential difference accross the bridge','Output'});
annonation_save('b)',"Fig3.7b.jpg", SAVE_FLAG);
Linearized quarter bridge
% Changing input resistance of R3 over 2 sec from 120Ohm -3% to 120 +3%
Rin(:,2)=R_nominal+sin(2*pi*1.2*t);
model_name = 'LinearizedBridge';
out=sim(model_name)
out =
Simulink.SimulationOutput:
ScopeData: [1x1 struct]
logsout: [1x1 Simulink.SimulationData.Dataset]
simout: [1x1 timeseries]
tout: [5932x1 double]
SimulationMetadata: [1x1 Simulink.SimulationMetadata]
ErrorMessage: [0x0 char]
temp_vin = out.simout.Data(:,1);
temp_vout = out.simout.Data(:,2);
%plot(out.simout.Time,temp_vin,'LineWidth',1);
plot(out.simout.Time,temp_vout,'LineWidth',1);
title('Output of the bridge');
annonation_save('a)',"Fig3.9a.jpg", SAVE_FLAG);
%legend({'Voltage over the bridge','Output'});
R_range=[R_nominal-R_nominal*percentage_change/100, R_nominal+R_nominal*percentage_change/100];
deltaR=(R_range(2)-R_range(1))/length(Rin(:,1));
Rin(:,2)=R_range(1):deltaR:R_range(2)-deltaR;
out=sim(model_name)
out =
Simulink.SimulationOutput:
ScopeData: [1x1 struct]
logsout: [1x1 Simulink.SimulationData.Dataset]
simout: [1x1 timeseries]
tout: [6006x1 double]
SimulationMetadata: [1x1 Simulink.SimulationMetadata]
ErrorMessage: [0x0 char]
temp_vin = out.simout.Data(:,1);
temp_vout = out.simout.Data(:,2);
plot(Rin(100:end,2)-R_nominal,temp_vout(100:end-1))
title('Linearized quarter bridge')
xlabel('\Delta R (\Omega)')
annonation_save('b)',"Fig3.9b.jpg", SAVE_FLAG);
Exersizes
Excersize 1: What is the Sensitivity of the quarter bridge if the sensitivity is computed as range of the output voltages/reference voltage?