Hi Elis, This is my idea: Tap ratio default value is considered 1 in matpower. (Look at the makeYbus codes)
tap = ones(nl, 1); %% default tap ratio = 1 If you put TAP=0 you are changing your admittance matrix (it is like an open circuit from the source point of view). The program is looking only for non-zero tap ratios i = find(branch(:, TAP)); %% indices of non-zero tap ratios tap(i) = branch(i, TAP); %% assign non-zero tap ratios tap = tap .* exp(1j*pi/180 * branch(:, SHIFT)); %% add phase shifters and the admittance matrix will be calculated by these non-zero tap ratios Ytt = Ys + 1j*Bc/2; Yff = Ytt ./ (tap .* conj(tap)); Yft = - Ys ./ conj(tap); Ytf = - Ys ./ tap; So, in case you don't want to consider tap ratio in transformers leave them 1. Best Regards, Ehsan On Mon, Sep 25, 2017 at 12:03 PM, Elis Nycander <[email protected]> wrote: > Dear Matpower users, > > I have some questions about tap ratios in Matpwer. > > What does it mean if the tap ratios TAP are set to 0? I have previously > run some power flows without caring about the tap ratios (TAP = 0). Now I > set them to 1, and got quite different results. I can't see that the > admittance matrix in Figure 3.1 in the manual is well defined for zero tap > ratio, so I thought setting them to 0 was like deactivating them. > > Also, if I want to run an OPF with active tap changers, would it be best > to include the tap ratios directly in the optimization constraints or to > change the tap ratios in a callback function? Or maybe I can run several > OPFs and change the tap ratios manually between each? > > Regards, > Elis Nycander > >
