Power Electronics Circuits Lab Manual
Power Electronics Circuits Lab Manual
1)
% Parameters
% Input voltage
i_r = v_ac / R;
% Plotting
figure;
subplot(3, 1, 1);
title('Input Voltage');
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 1, 2);
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 1, 3);
title('Load Currents');
xlabel('Time (s)');
ylabel('Current (A)');
grid on;
2)
% Parameters
R = 10; % Resistance (ohms)
i_r = v_ac / R;
% Plotting
figure;
subplot(3, 1, 1);
title('Input Voltage');
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 1, 2);
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 1, 3);
title('Load Currents');
xlabel('Time (s)');
ylabel('Current (A)');
grid on;
4)
% Parameters
i_r = v_ctrl / R;
% Plotting
figure;
subplot(3, 1, 1);
title('Input Voltage');
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 1, 2);
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 1, 3);
title('Load Currents');
xlabel('Time (s)');
ylabel('Current (A)');
grid on;
3)
% Single-phase AC voltage controller with R and RL loads
% Parameters
R = 10; % Resistance (ohms)
L = 0.1; % Inductance (H)
V_line = 230; % Line voltage (V)
f = 50; % Frequency (Hz)
T = 1/f; % Period (s)
alpha = pi/6; % Phase angle control (radians)
t = 0:0.0001:T; % Time vector
% Plotting
figure;
subplot(3, 1, 1);
plot(t, v_ac, 'b', 'LineWidth', 2);
title('Input Voltage');
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 1, 2);
plot(t, v_ctrl, 'r', 'LineWidth', 2);
title('Voltage Controller Output Voltage');
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 1, 3);
plot(t, i_r, 'g', 'LineWidth', 2, t, i_rl, 'm', 'LineWidth', 2);
title('Load Currents');
xlabel('Time (s)');
ylabel('Current (A)');
legend('R Load', 'RL Load');
grid on;
% Parameters
V_dc = 400; % DC voltage (V)
f = 50; % Frequency (Hz)
T = 1/f; % Period (s)
R_load = 10; % Load resistance (ohms)
L_load = 0.1; % Load inductance (H)
alpha = pi; % Firing angle (radians)
t = 0:0.0001:T; % Time vector
% Plotting
figure;
subplot(3, 1, 1);
plot(t, v_dc, 'b', 'LineWidth', 2);
title('DC Voltage');
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 1, 2);
plot(t, v_a, 'r', t, v_b, 'g', t, v_c, 'b', 'LineWidth', 2);
title('Inverter Output Voltage (180 Degrees Conduction)');
xlabel('Time (s)');
ylabel('Voltage (V)');
legend('Phase A', 'Phase B', 'Phase C');
grid on;
subplot(3, 1, 3);
plot(t, i_star, 'm', 'LineWidth', 2, t, i_delta, 'c', 'LineWidth', 2);
title('Load Currents');
xlabel('Time (s)');
ylabel('Current (A)');
legend('Star-connected Load', 'Delta-connected Load');
grid on;
% Parameters
V_dc = 400; % DC voltage (V)
f = 50; % Frequency (Hz)
T = 1/f; % Period (s)
R_load = 10; % Load resistance (ohms)
L_load = 0.1; % Load inductance (H)
alpha = 2*pi/3; % Firing angle (radians)
t = 0:0.0001:T; % Time vector
% Plotting
figure;
subplot(3, 1, 1);
plot(t, v_dc, 'b', 'LineWidth', 2);
title('DC Voltage');
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 1, 2);
plot(t, v_a, 'r', t, v_b, 'g', t, v_c, 'b', 'LineWidth', 2);
title('Inverter Output Voltage (120 Degrees Conduction)');
xlabel('Time (s)');
ylabel('Voltage (V)');
legend('Phase A', 'Phase B', 'Phase C');
grid on;
subplot(3, 1, 3);
plot(t, i_star, 'm', 'LineWidth', 2, t, i_delta, 'c', 'LineWidth', 2);
title('Load Currents');
xlabel('Time (s)');
ylabel('Current (A)');
legend('Star-connected Load', 'Delta-connected Load');
grid on;
6)
% Buck Converter
% Set parameters
set_param('BuckConverterModel', 'Solver', 'ode45');
set_param('BuckConverterModel/Transmission Line', 'Resistance', num2str(R));
set_param('BuckConverterModel/Transmission Line', 'Inductance', num2str(L));
set_param('BuckConverterModel/Controlled Voltage Source', 'amplitude',
num2str(Vin));
set_param('BuckConverterModel/Controlled Voltage Source', 'Frequency',
num2str(fs));
% Connect blocks
add_line('BuckConverterModel', 'Controlled Voltage Source/1', 'Transmission
Line/1');
add_line('BuckConverterModel', 'Transmission Line/2', 'Diode/1');
add_line('BuckConverterModel', 'Diode/2', 'RL Load/1');
add_line('BuckConverterModel', 'RL Load/2', 'Electrical Reference/1');
add_line('BuckConverterModel', 'Electrical Reference/2', 'Transmission
Line/3');
% Boost Converter
open_system(new_system('BoostConverterModel'));
% Set parameters
% Buck-Boost Converter
open_system(new_system('BuckBoostConverterModel'));
% Set parameters
% Connect blocks
7)
% Single-phase cycloconverter
T_source = 1/f_source;
T_output = 1/f_output;
v_output = zeros(size(t));
for i = 1:length(t)
else
v_output(i) = v_source(i);
end
end
% Plotting
figure;
subplot(2, 1, 1);
title('Source Voltage');
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(2, 1, 2);
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
8)
% Three-phase cycloconverter
T_source = 1/f_source;
T_output = 1/f_output;
v_output_A = zeros(size(t));
v_output_B = zeros(size(t));
v_output_C = zeros(size(t));
for i = 1:length(t)
v_output_A(i) = -v_source_A(i);
v_output_B(i) = -v_source_B(i);
v_output_C(i) = -v_source_C(i);
else
v_output_A(i) = v_source_A(i);
v_output_B(i) = v_source_B(i);
v_output_C(i) = v_source_C(i);
end
end
% Plotting
figure;
subplot(3, 2, 1);
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 2, 2);
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 2, 3);
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 2, 4);
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 2, 5);
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
subplot(3, 2, 6);
xlabel('Time (s)');
ylabel('Voltage (V)');
grid on;
10)
open_system(new_system('InductionMotorModel'));
% Set parameters
set_param('InductionMotorModel/Induction Motor', 'Rr', '0.5', 'Xr', '3', 'Xm', '50', 'Vnom', '230');
% Connect blocks
9)