MATLAB For Electrical and Electronic Measurements (BEEL456B) - IV-SEMESTER
MATLAB For Electrical and Electronic Measurements (BEEL456B) - IV-SEMESTER
MANUAL – IV-SEMESTER
2023-2024
Prepared by
VISION
:
MISSSION:
To build human values with social responsibilities, entrepreneur skills and professional
M3:
ethics among the Electrical & Electronics Engineers.
1. Experiments ii
1
Design and Analysis of measurement of Resistance using Wheatstone and Kelvin’s double
bridge
2
Design and Analysis of measurement of Inductance using Schering and De-Sauty’s Bridges..
3 Design and Analysis of measurement of Inductance using Maxwell’s and Anderson Bridges.
4 Design and Analysis of measurement of Frequency in Single and Three Phase Circuits.
5 Design and Analysis of measurement of Real Power, Reactive and Power Factor in Three
Phase Circuits.
11 Design and Analysis of Integrating and Successive approximation type Digital Volt Meters.
(1)Along with prescribed hours of teaching –learning process, provide opportunity to perform the
experiments/programmers at their own time, at their own pace, at any place as per their convenience and
repeat any number of times to understand the concept.
(3) Vary different parameters to study the behavior of the circuit without the risk of damaging
equipment/device or injuring themselves
Analysis of measurement of Frequency, Real Power, Reactive and Power Factor, Energy in Three Phase
Circuits
Realize the Current Transformer and Voltage Transformer using Silsbee’s Deflection Method
Aim: To design and find unknown Resistance using Wheatstone and Kelvin’s double
bridge
COMPONENTS REQUIRED:
THEORY:
The Wheatstone bridge is a classic circuit used for measuring resistance precisely. It consists of four
resistors forming a diamond shape, with a voltage source connected across one diagonal and a
voltmeter connected across the other diagonal
Design:
Choose Resistors: Select four resistors (R1, R2, R3, and R4) with known values. R1 and R3 should
have the same resistance, and R2 and R4 should also have the same resistance. The value of R1
and R2 should be different from R3 and R4, but their ratios should be the same.
Construct the Bridge : Connect the resistors to form a diamond shape. Connect R1 and R2 in series,
and similarly, connect R3 and R4 in series. Connect the common point between R1 and R2 to one
terminal of the voltage source, and the other terminal of the voltage source to the common point
between R3 and R4. Connect the voltmeter across the remaining diagonal of the diamond.
Adjust Voltage Source : Apply a known voltage (V) across one diagonal of the Wheatstone bridge.
This voltage should be within the range suitable for the voltmeter.
Balance the Bridge : Adjust one of the resistors (R3 or R4) until the voltmeter reads zero. This
indicates that the bridge is balanced.
Measure Resistance: Once the bridge is balanced, the resistance of the unknown resistor (Rx) can be
calculated using the formula:
Rx = (R2 / R1) * R3
The Wheatstone Bridge equation required to give the value of the unknown resistance, RX at balance
is given as:
% Display Results
Dept of EEE-RYMEC P
a
Experiment No:2
KELVIN BRIDGE
We aim to measure the resistance of a given resistor using Kelvin Double Bridge and determine its
tolerance. Kelvin Double Bridge is nothing but a modification of Wheatstone bridge. It is used for
measuring of low resistance to a good precision. It compares two ratio arms P,Q and p,q and hence is
called ‘double bridge
P, Q, p, q are the resistances in the ratio arms. G is a galvanometer of D’Arsonal type, used as a null detector. S is
a small standard resistor, R is a resistance under measurement. Usually low resistance consists of four leads. Two
of them are called as voltage leads and remaining as current leads. “r” is the resistance of connecting lead between
RandS.
Dept of EEE-RYMEC P
a
From the above equation, it is clear that the resistance of connecting leads “r” has no effect on the
measurement if the two sets of ratio arms have equal ratios ie, P/Q = p/q.
% Kelvin's Double Bridge Simulation with Resistances in Ratio Arms under Balanced
Condition
MATLAB CODE
P=100.4;
Q=200;
S=100.05;
r=800;
V=5;
Vg=0.01;
ratio_known=P/Q;
p=ratio_known*Q;
q=P/ratio_known;
Rx=(((P/Q)*S)+(((q*r)/(p+q+r)))*((P/Q)-(p/q)));
V_bridge=V*((Q/(P+Q))-(Rx/(S+Rx)));
V_rx=V_bridge*(Rx/(S+Rx));
I_rx=V_rx/Rx;
Rx_measured=V_rx/I_rx;
Sensitivity=Vg/V_bridge;
Dept of EEE-RYMEC P
a
Experiment No: 3
Design and Analysis of measurement of Inductance using Maxwell’s and Anderson Bridges.
Aim: To design and find unknown Inductance using Maxwell’s and Anderson Bridges.
THEORY
Dept of EEE-RYMEC P
a
MAT LAB CODE
% Design Parameters
R1 = 400; % Known resistance 1 (Ohms)
R2 = 150; % Known resistance 2 (Ohms)
R3 = 100; % Known resistance 3 (Ohms)
L3 = 10e-3;% inductance in henry
r=5; % Known internal resistance (Ohms)
f = 500; % Frequency (Hz)
V = 5; % Voltage source (Volts)
% Calculate balanced impedance for unknown inductance
Dept of EEE-RYMEC P
a
Z1 = R1;
Z2 = R2;
Rx = R2*(R3+r)/R1;
Lx=(R2*L3)/R1;
Z3= ((R3+r) +(j *2 * pi * f* L3));
% calculate bridge balance condition
Z4 = (Z2*Z3/Z1);
% Calculate voltage across the bridge
V_bridge = V* abs(Z4);
% Display Results
disp('--- Maxwell''s Bridge Analysis for Inductance Measurement -');
fprintf('Known Resistance R1: %d Ohms\n', R1);
fprintf('Known Resistance R2: %d Ohms\n', R2);
fprintf('Known Resistance R3: %d Ohms\n', R3);
fprintf('Known inductance L3: %d henry\n', L3);
fprintf('Unknown Resistance Rx: %d Ohms\n', Rx);
fprintf('Unknown Inductance Lx: %d henry\n', Lx);
fprintf('Frequency: %d Hz\n', f);
fprintf('Voltage Source: %d Volts\n', V);
fprintf('unknown arm: %.4f\n', Z4);
fprintf('Voltage across the Bridge: %.4f Volts\n', V_bridge);
Dept of EEE-RYMEC P
a
Experiment No: 4
Aim -. Designing and analyzing the measurement of frequency in three-phase circuits involves
considerations for accurate frequency detection across multiple phases.
Theory
1. Measurement Principles
In a three-phase AC system, the frequency (f) represents the rate at which the waveform completes one
full cycle. Commonly, frequency in three-phase circuits is either 50 Hz or 60 Hz, depending on the
region's power standards.
Digital Frequency Meters: These devices are widely used for their accuracy and ease of implementation.
They typically work by counting the number of cycles over a period of time and then calculating the
frequency.
Phase-Locked Loops (PLL): PLL-based frequency meters are effective for variable frequency
measurement and are often used in sophisticated digital frequency synthesizers.
Software-Based Measurement: Using microcontrollers or DSPs (Digital Signal Processors) to sample the
three-phase AC waveform and calculate frequency using techniques such as FFT (Fast Fourier
Transform).
1. Signal Conditioning:
o Use appropriate transformers (CTs and PTs) to step down the voltage and current to levels
suitable for measurement.
o Condition the signals (amplify, filter, and possibly isolate) before feeding them into the PLL
circuit.
o Design a PLL to synchronize with the three-phase AC signal and extract its frequency.
Dept of EEE-RYMEC P
a
o The PLL will typically consist of a phase detector, loop filter, voltage-controlled oscillator
(VCO), and feedback mechanism to lock onto and track the input signal's phase and
frequency.
3. Frequency Calculation:
o Once the PLL locks onto the input signal, the VCO's frequency or the phase difference signal
can be used to determine the input signal's frequency.
MATLAB Code
% Parameters
fs = 1000; % Sampling frequency (Hz)
f_ref = 50; % Reference frequency (Hz) - nominal frequency of the three-phase
system
Kp = 0.1; % Proportional gain of the PLL
Ki = 0.01; % Integral gain of the PLL
f_offset = 0; % Initial frequency offset (Hz)
% Simulation time
T = 1; % Simulation time (seconds)
t = 0:1/fs:T-1/fs; % Time vector
% PLL parameters
theta = zeros(size(t)); % Phase estimate
phi_d = zeros(size(t)); % Phase difference
phi_d(1) = 0; % Initial phase difference
f_pll = zeros(size(t)); % Frequency estimate
f_pll(1) = f_ref + f_offset; % Initial frequency estimate
% PLL loop
for k = 2:length(t)
% Phase detector (phase difference)
Dept of EEE-RYMEC P
a
phi_d(k) = angle(V_total(k-1) * conj(exp(1i*theta(k-1))));
% Frequency estimation
f_pll(k) = f_pll(k-1) + Kp * phi_d(k) * fs / (2*pi);
end
% Plot results
figure;
subplot(2,1,1);
plot(t, V_total);
xlabel('Time (s)');
ylabel('Voltage (V)');
title('Three-Phase AC Signal');
subplot(2,1,2);
plot(t, f_pll);
xlabel('Time (s)');
ylabel('Frequency (Hz)');
Dept of EEE-RYMEC P
a
Experiment No:5
Theory: In this bridge, the self inductance is measured in terms of a standard capacitor. This method is
applicable for precise measurement of self-inductance over a very wide range of values
I1(r1+R1+jωL1) = I2R2 + ICr and IC(r+1/jωC) = (I2-IC) R4 By substituting IC value and equating real and
imaginary parts
Circuit Diagram:
MATLAB CODE
Dept of EEE-RYMEC P
a
% Known values
R1 = 100; % Resistance of self-inductor (ohms)
r = 50; % Resistance (ohms)
R2 = 200; % Known resistance (ohms)
R3 = 300; % Known resistance (ohms)
R4 = 400; % Known resistance (ohms)
r1 = 20; % Known resistance connected in series with self-inductor (ohms)
C = 1e-6; % Capacitance (farads)
fprintf('The unknown inductance L1 is: %.6f H\n', L1); % Display the result
Experiment No: 6
Design and Analysis of measurement of Frequency in Single and Three Phase Circuits.
. THEORY-
In single-phase circuits, the frequency refers to the rate at which the alternating current (AC) changes
direction. In most countries, the standard frequency for residential and commercial electricity supply is 50
Hz or 60 Hz.
To calculate the frequency in hertz (Hz), you can use the following formula:
f=1/T
Where:
f is the frequency in hertz (Hz).
T is the period of the waveform in seconds (s).
The period T is the time taken for one complete cycle of the waveform. It's the reciprocal of the frequency
(T=1/f).
Designing and analyzing a frequency measurement system for single-phase circuits involves several steps
and considerations. Here's a generalized approach:
There are various methods to measure frequency in single-phase circuits. Common methods include
Zero Crossing Detection: Detecting the points where the waveform crosses zero to determine the
period.
Time Interval Measurement: Measuring the time between consecutive zero crossings or peaks of
the waveform.
Digital Signal Processing Techniques: Using algorithms to analyze the waveform and determine its
frequency.
let's design a simple circuit to measure the frequency of a single-phase AC signal using MATLAB. We'll
simulate the circuit and write MATLAB code to analyze the signal and calculate its frequency.
Dept of EEE-RYMEC P
a
To simulate a single-phase AC circuit with a voltage source and a resistor. We'll generate an AC signal
using a sinusoidal function and then measure its frequency using zero crossing detection method.
% generate AC signal
V_ac = Vrms * sqrt(2) * sin(2*pi*frequency*t); % Sinusoidal AC signal
% Plot AC signal
figure;
plot(t, V_ac);
title('Single-Phase AC Signal');
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
Dept of EEE-RYMEC P
a
Experiment No: 7
Theory :
Dept of EEE-RYMEC P
a
(Mat lab code is written based on the
circuit diagram
Dept of EEE-RYMEC P
a
R3 = 4700; % Resistance R3 in Ohms
R4 = 1200; % Resistance R4 in Ohms
C4 = 1e-6; % Capacitance C4 in Farads
f = 500; % Frequency of AC source (Hz)
V_ac = 5; % Supply voltage in Volts (rms)
omega = 2 * pi * f;
Rx = (R3 * C4) / C2;
Cx = (C2 * R4) / R3;
% Impedances
Z1 = Rx - j/(1i * omega * Cx); % Impedance of Rx and Cx in series
Z2 = -j/(1i * omega * C2); % Impedance of C2
Z3 = R3; % Impedance of R3
Z4 = R4 *-j/(1i * omega * C4); % Impedance of R4 and C4 in series
% Calculate unknown capacitance Cx
Cx = (C2 * R4) / R3;
% Calculate unknown resistance Rx
Rx = (R3 * C4) / C2;
% Voltage divider to find voltage across the detector
V_1 = V_ac * (Z3 / (Z3 + Z1)); % Voltage across Z3 and Z1
V_2 = V_ac * (Z4 / (Z4 + Z2)); % Voltage across Z4 and Z2
% Voltage across the detector
V_detector = V_1 - V_2;
%dissipation factor
D=(2*pi*f*Cx*Rx);
% Display results
fprintf('Calculated unknown capacitance Cx: %.2e F\n', Cx);
fprintf('Calculated unknown resistance Rx: %.2f Ohms\n', Rx);
fprintf('Calculated dissipation factor D: %.2f \n', D);
fprintf('Voltage across the detector: %.2f V\n', abs(V_detector));
fprintf('Phase difference across the detector: %.2f degrees\n', angle(V_detector) * (180/pi));
Result:
Calculated unknown capacitance Cx: 2.55e-007 F
Calculated unknown resistance Rx: 4700.00 Ohms
Calculated dissipation factor D: 3.77
Voltage across the detector: 2.11 V
Phase difference across the detector: 180.00 degrees
Dept of EEE-RYMEC P
a
Dept of EEE-RYMEC P
a
Experiment No: 8
DESIGN AND ANALYSIS OF TRUE RMS READING VOLT METERS
THEORY
.
The r.m.s. values of the voltages of complex waveforms of any type such as sine, square, saw tooth etc.,
can be accurately measured with an r.m.s. reading voltmeter. When an a.c. voltage of any complex
waveform is applied to the input terminals of the meter, the input voltage is amplified by an a.c. amplifier.
This amplified voltage is applied to the heating element of the measuring thermocouple. A thermocouple
is a junction of two dissimilar metals, whose contact potential is a function of the temperature of the
junction. The heat produced in the measuring thermocouple raises the temperature of the thermocouple
and produces an output voltage V₁, which is proportional to E² of the applied.
One difficulty with this technique is that the thermocouple is often nonlinear in its behaviour. This
difficulty is overcome by connecting another thermocouple, known as balancing thermocouple as shown
in Fig. The effect of the nonlinear behaviour of the measuring
The two thermocouple elements from part of a bridge circuit in the input circuit of ad.c.amplifier. The
output voltage v, upsets the balance of the bridge. The unbalance voltage is amplified by the d.c. amplifier
and fed back to the heating element of the balancing thermocouple. The balance of the bridge is
established, when the feedback current through the heating element of the balancing the equal and
opposite and the bridge is balanced. When the bridge is balanced the ope aoltage of the measuring
thermocouple v, is equal to the output voltage of the balancing thermocouple v2.
When the bridge is balanced, the d.c. current flowing in the balancing thermocouple is equal to the r.m.s.
value of the a.c. current flowing through the measuring thermocouple. This d.c. current is therefore,
directly proportional to the r.m.s. value of the input voltage and is indicated by the indicating meter,
% Parameters
ac_frequency = 50; % Frequency of the AC input signal in Hz
ac_amplitude = 1; % Amplitude of the AC input signal
ac_amplification_factor = 10; % Amplification factor for the AC amplifier
dc_amplification_factor = 5; % Amplification factor for the DC amplifier
time_duration = 0.1; % Time duration for the simulation in seconds
sampling_rate = 1000; % Sampling rate in Hz
% Time vector
t = 0:1/sampling_rate:time_duration;
% Amplify AC signal
amplified_ac_voltage = ac_amplification_factor * ac_input_voltage;
% Display results
fprintf('V1 (Measuring Thermocouple Voltage): %.4f V\n', V1);
fprintf('V2 (Balancing Thermocouple Voltage): %.4f V\n', V2);
subplot(2,1,2);
plot(t, amplified_ac_voltage);
title('Amplified AC Voltage');
xlabel('Time (s)');
ylabel('Voltage (V)');
Design and Analysis of Integrating and Successive approximation type Digital Volt Meters.
THEORY -In this voltmeter the output of digital to analog convertor with a certain unknown reference
voltage. This meter can measure up to 100 readings per second. The voltmeter uses an amplifier to
choose a required range of input voltage and minimize the noise which can cause distortion.
Working: The input amplifier of this device helps to choose a range of input voltage and eliminates any
noise. The input is then sent to comparator through an S/H circuit. The comparator generates a signal
when it receives the analog signal. This is further sent to AND gate whose output become one if and
only if output of comparator is positive. In the end , a digitized digital signal is generated from control
registers giving us the required voltage.
% Parameters
input_voltage = 1.23; % Input voltage in Volts
reference_voltage = 3; % Reference voltage for DAC in Volts
bit_resolution = 16; % Bit resolution of the ADC
% Initialize variables
digital_value = 0;
dac_voltage = 0;
% Display result
fprintf('Input Voltage: %.2f V\n', input_voltage);
fprintf('Measured Voltage: %.2f V\n', final_dac_voltage);
EXP-10
Theory -
A device that is used to measure the QF (quality factor) or storage factor or quality factor of the circuit at
radio frequencies is called the Q-meter. In the oscillatory system, the QF is one of the essential parameters,
used to illustrate the relationships among the dissipated & stored energies.
By using Q value, the overall efficiency can be evaluated for the capacitors as well as coils used in RF
applications. The principle of this meter mainly depends on series resonance because the voltage drop is Q
times than the applied voltage across the capacitor otherwise coil. When the fixed voltage is applied to an
electric circuit, a voltmeter is used to adjust the capacitor’s Q value to read directly.
the total efficiency of capacitors & coils used for RF applications can be calculated with the help of Q
value.
At resonance XL= XC and EL= IXL, EC = IXC, E = I R Where ‘E’ is an applied voltage
XC’ is the capacitive reactance ‘R’ is the coil resistance ‘I’ is circuit current XL’ is the inductive reactance
‘EC’ is the capacitor voltage ‘EL’ is an inductive voltage Thus, Q = XL/R= Xc/R=EC/E
% f = 1 / (2 * pi * sqrt(L * C))
omega_0 = 2 * pi * 1e3;