Yes exactly same way I did before. tap = x(vv.i1.tap:vv.iN.tap); shift =x(vv.i1.shift:vv.iN.shift); and put back them in tapdata %% put shift and tap in tapdata. tapdata(:,TAP)= tap; tapdata(:,SHIFT)= shift; and by using this I will calculate Ybus like branch = tapdata; [Ybus, Yff, Yft, Ytf, Ytt,Cf, Ct, Yf, Yt] = makeYbus(baseMVA, bus,branch); but still problem remain same. Error using opf_args (line 312) opf_args.m: Incorrect input parameter order, number or type
thanks! On Wed, Jan 14, 2015 at 6:16 AM, Abhyankar, Shrirang G. <[email protected] > wrote: > Take a look at how Sbus is created in opf_consfcn by extracting Pg, and > Qg from the solution vector x. You need to do something similar with Ybus. > > Shri > > From: Mirish Thakur <[email protected]> > Reply-To: MATPOWER discussion forum <[email protected]> > Date: Wed, 14 Jan 2015 00:12:16 +0100 > To: MATPOWER discussion forum <[email protected]> > Subject: Re: Power system modelling with transformer ratio and shift. > > Dear Mr. Abhyankar .G., > > I'm not sure about it and I'm not getting correct way how to extract > the elements from solution vector you are talking about. But what I've done > is- > 1) I didn't put tap ratio and shift values in branch matrix. I have > created another matrix data for transformer like mpc.tapdata in matpower > case file (case9.m) and assigned values with lower and upper bounds for > both ratio and shift. Also created idx_tapdata where I have defined > constants for named column. > 2) Added these extra variables and their constraints in opf_setup by add > _vars and add_constraints. (Total variables were 24 and now they are 42 in > Jacobian matrix verified by spy function.) > 3) Created new function where I get ratio and shift values. > > Problem what I'm facing is how to extract values of ratio and shift > from solver to update the Y bus in opf_hessfcn and opf_consfcn ? But > facing the problem in opf_args. > > Thanks . > Mirish > > On Fri, Jan 9, 2015 at 3:05 PM, Abhyankar, Shrirang G. < > [email protected]> wrote: > >> Are you setting the solution vector (x) size and the indexing >> information for extracting the elements from it correctly? >> >> On Jan 8, 2015, at 4:50 AM, "Mirish Thakur" <[email protected]> >> wrote: >> >> Dear Prof. R. Zimmerman, >> >> I'm master student working on a project dealing with power system >> optimization with additional variables 'tap ratio' and 'shift' on 9 bus >> system by *mipsopf_solver*. I have made necessary changes in respective >> function files. Also I concern with only current flow constraints in >> *opf_hessfcn*. For that I used command like *>>* *mpopt = >> mpoption('OPF_FLOW_LIM', 2);* and* >> runopf(case9,mpopt);*. But I'm >> getting errors - >> >> Did not converge in 17 iterations. >> Error using opf_args (line 315) >> opf_args.m: Incorrect input parameter order, number or type >> >> Error in opf (line 199) >> [mpc, mpopt] = opf_args(varargin{:}); >> >> Error in opf (line 262) >> opf(varargin) >> >> Error in runopf (line 96) >> [r, success] = opf(casedata, mpopt); >> >> As I'm not much faliliar with MATPOWER so I could not understand what >> exactly I need to rectify in *opf_args.m* file. I need your help .Thanks >> in advance. >> >> >> Sincerely >> Mirish >> >> >
