function y = rectifier(x)
VAC=x(1);
alpha=x(2);
if alpha < 0
    alpha = 0;
elseif alpha > pi/2
    alpha = pi/2;
end
y=VAC*cos(alpha);