Full Wave Thyristor Rectifier for loop problem

1 次查看(过去 30 天)
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.

回答(1 个)

Mark Dawson
Mark Dawson 2021-1-23
移动:Sabin 2023-1-7
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 :)

社区

更多回答在  Power Electronics Control

类别

Help CenterFile Exchange 中查找有关 Power Converters 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by