Professional Documents
Culture Documents
Experiment No. 4
Group No. 6
1 Objectives 1
2 Control Algorithm 1
4 Results 3
6 References 6
Noise cancellation in headphones
1 | Objectives
The aim of the experiment is:
To design and implement an analog circuit for noise cancellation in headphones using closed-loop control
gain techniques satisfying the following requirements.
The objectives to be followed:
■ Go through the properties of headphones by constructing the appropriate circuit and identify the
kind of system(frequency response analysis) using Headphone setup, DSO, Function generator,
Probes, Amplifier ICs, Breadboard, Wires, Jumpers, Wire stripper in a proper way.
■ Evaluate the bode plot of the system and find a transfer function to lift the bode plot to achieve an
attenuation of 20 dB when a noise of 100 Hz frequency is applied.
■ Design an open-loop circuit gain circuit on the breadboard to achieve this transfer function.
■ Now, make a fresh bode plot for the recent circuit with open-loop gain to check the working of the
open-loop gain circuit.
■ Now modify the previous circuit to a closed-loop circuit to give feedback to input so that even if a
disturbance is applied, the circuit will feedback itself to give the required results.
■ Check the working of the circuit by applying a frequency of 100Hz and also take other readings to
make a bode-plot of the final system.
2 | Control Algorithm
Matlab code:
frequency = [49.69, 76.26, 85.32, 100.0, 200.8, 302.1, 515.5, 750.8, 1008.0, 1515.0, 2041.0, 2509.0,
input_data = [1.74, 1.8, 1.8, 1.62, 1.62, 1.62, 1.66, 1.78, 1.76, 1.74, 1.74, 1.72, 1.72, 1.72, 1.7,
output_data = [0.27, 0.44, 0.45, 0.55, 0.608, 0.52, 0.48, 0.43, 0.4, 0.88, 0.98, 1.0, 0.82, 0.62, 0.4
% Calculate magnitude
magnitude = output_data ./ input_data;
phase = [150.0, 114.0, 95.0, 90.0, 30.0, 10.0, -10.0, -15.0, -18.8, -40.0, -70.0, -115.0, -165.0, -20
phase_rad = phase;
% Convert magnitude to dB
magnitude_dB = 20*log10(magnitude);
% y= 20*log10(10*magnitude);
omega = 2*pi*frequency;
s = zpk(’s’);
R = 3900;
QR = 1800;
C = 1e-6;
C1 = 0.05e-6;
Page 1
Noise cancellation in headphones
R2 = 342;
R1 = 1000;
R3 = 1000;
r = 2200;
num = (C1/C)(C1/C)*sˆ2 + (1/C)((1/R1) - (r/(R*R3)))*s + 1/(C*C*R*R2);
den = sˆ2 + s/(QR*C) + 1/(R*R*C*C);
sys = num/den;
% sys = 0.05*(s+4000)(s+4000)/((s+250)(s+300));
% print(mag_tf)
%bode(sys)
temp = transpose(squeeze(mag_tf));
% Bode plot
figure;
subplot(2,1,1);
semilogx(frequency, y, ’LineWidth’, 2);
grid on;
xlabel(’Frequency (Hz)’);
ylabel(’Magnitude (dB)’);
title(’Bode Plot - Magnitude’);
subplot(2,1,2);
semilogx(frequency, phase_rad, ’LineWidth’, 2);
grid on;
xlabel(’Frequency (Hz)’);
ylabel(’Phase (radians)’);
title(’Bode Plot - Phase’);
After making the bode plot, implementing the transfer function was a heavy task, identifying which
transfer function would suit the best with the kind of available resistors and capacitors in the lab.
Taking the readings for plotting the bode plot was very cumbersome. The DSO was oscillating all the
time, not allowing us to get accurate readings.
Building up the open-loop circuit was slightly hard as the circuit became clumsy with too many components.
Page 2
Noise cancellation in headphones
4 | Results
Could achieve the standards mentioned.Achieved an attenuation of 20 dB, when a noise of 100 Hz frequency
is applied.
Page 3
Noise cancellation in headphones
Page 4
Noise cancellation in headphones
Page 5
Noise cancellation in headphones
6 | References
Page 6