Borrar filtros
Borrar filtros

Full Wave Thyristor Rectifier for loop problem

1 visualización (últimos 30 días)
Mark Dawson
Mark Dawson el 23 de En. de 2021
Movida: Sabin el 7 de En. de 2023
Heyo, Im trying to simulate a full wave rectifier where a thyristor is used in lieu of a diode, however simulink will be inusfficient later on.
I have the first iteraion of the output waveform looking as expected, however, any subsequent itteration end up oscilating between the expected values and zero, and I'm not quite sure why. If i increase the reolution, I obtain a slightly more reasobanble overall profile, however it does not eliminate the problem. I believe i am overlooking something in my for loop, but any help is appreciated:
%Power Supply Charechteristics
V_p = sqrt(2)*230; %Peak Supply Voltage (V)
f = 50; %Supply Voltage Linear Frequency (Hz)
omega = 2*pi*f; %Supply Voltage Angular Frequency (Rad/s)
%Rectifier Circuit Parameters
V_b = 0.7; %Forward Conduction Voltage Bias (V)
alpha = 15; %Thyristor Firing Angle (degrees)
alpha_r = alpha*pi/180; %Thyristor Firing Angle (Rad)
%Simulation Parameters
n = 2; %Desired Number of iterations
res = 100; %Desired Data Resolution
t = [0:(1/(f/n))/res:(n/f)-(1/(f/n))/res]; %timebase (s)
%Thyristor Firing Times
t_0(1)=0;
t_0([2:1:n+1])=([1:1:n]/f);
alpha_t=t_0+(1/f)*(alpha_r/(2*pi));
%%%%%%%%%%%%%%%Output Data%%%%%%%%%%%%%%%
%Supply Power Signals
V_s = V_p*sin(omega*t); %Supply Voltage (V)
for ii = [1:(length(t))/n]
for i=[1:n]
if t(i*ii) >=alpha_t(i)
V_o(i*ii) = abs(V_s(i*ii)-2*V_b); %Ouput Voltage (V)
elseif t(i*ii) >t_0(i)
V_o(i*ii) = 0; %Ouput Voltage (V)
end;end;end
During the course i think i know what I am doing wrong. I think I am overwriting data with an outer and inner loop, however, i can't think how to achieve the function otherwise :/
*Update
for ii = [1:(length(t))/n]
if t(ii) >=alpha_t(1)
V_o(ii) = abs(V_s(ii)-2*V_b); %Ouput Voltage (V)
elseif t(ii) >t_0(1)
V_o(ii) = 0; %Ouput Voltage (V)
end;end
Works as expected, in theory, i could just keep duplicating the data for n itterations, however, if i use a distored signal, as opposed to a clean sinusoid, this would cease to be adequate.

Respuestas (1)

Mark Dawson
Mark Dawson el 23 de En. de 2021
Movida: Sabin el 7 de En. de 2023
Ive Figured it out haha
for i = [1:n]
for ii = [1+((i-1)*length(t)/n):(i)*length(t)/n]
if t(ii) <alpha_t([i]) &t(ii) >= t_0([i])
V_o(ii) = 0;
else
V_o(ii) = abs(V_s(ii)-2*V_b);
end;end;end
If youre reading this from the future, ejoy :)

Comunidades de usuarios

Más respuestas en  Power Electronics Control

Productos


Versión

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by