Re: CPF with Modal Analysis

2018-05-21 Thread m.drabecki
Dear Jose,
Thank you very much! Now it is working perfectly. 
Best,Mariusz


Wysłano z telefonu Samsung
 Oryginalna wiadomość Od: Jose Luis Marín <mari...@aia.es> 
Data: 20.05.2018  23:01  (GMT+01:00) Do: MATPOWER discussion forum 
<matpowe...@list.cornell.edu> Temat: Re: CPF with Modal Analysis 
Hi Mariusz,

I think the problem is that you have to provide a *solved* target case, because 
the Jacobian should be evaluated *at the solution*.

Even for the base case, it wouldn't hurt to run a powerflow, since you can't 
always trust that the input file is a solved case.

-- 
Jose L. Marin
Grupo AIA




2018-05-20 11:58 GMT+02:00 Mariusz Drabecki <m.drabe...@onet.eu>:
Dear All, I am working on Modal Analysis. I would like to show to my students, 
that in the bifurcation point at least one of the reduced Jacobian eigenvalues 
is zero. This is why I calculate these values once for the base case and then 
for the nose point ( lambda max calculated by the CPF).  Unfortunately there is 
no change in the results. Could anyone help? The results of the eigenvalues are 
as follows (for case14) Eigb= 
[65,420739,953321,993918,911816,449211,34212,706585,568867,66373] And exactly 
the same ones in the nose points. I would greatly appreciate any help from you 
as I got terribly stuck. Best,Mariusz Drabecki  Here is my code: 
define_constantsmpc=loadcase(case14);inc=2.5; %% CPF optionsmpopt = 
mpoption('out.all', 0, 'verbose', 2);mpopt = mpoption(mpopt, 'cpf.stop_at', 
'NOSE', 'cpf.step', 0.1);mpopt = mpoption(mpopt, 'cpf.plot.level', 2); %% Base 
case (base solution operating points)%CPFmpcb=mpc;mpct = mpcb; % set up target 
case withmpct.gen(:, [PG QG]) = mpcb.gen(:, [PG QG]) * inc; % increased 
generationmpct.bus(:, [PD QD]) = mpcb.bus(:, [PD QD]) * inc; % and increased 
loadcpf1 = runcpf(mpcb, mpct, mpopt);lambda_max=cpf1.cpf.max_lam; %Modal 
Analysis for Base Case[jb11,jb12,jb21,jb22,jacb,~,~,~] = 
makeJac(mpcb);jb11=full(jb11);jb12=full(jb12);jb21=full(jb21);jb22=full(jb22); 
Hb=jb11;Mb=jb12;Nb=jb21;Kb=jb22; % The reduced Jacobian for the base case (Q-V 
sensitivities)jacb_red=Kb-Nb*inv(Hb)*Mb; % The eigenvalues of the reduced 
Jacobian (Q-V sensitivities)[leftb eigb rightb]=(eig(jacb_red)); %% Target case 
(nose point)mpct.gen(:, [PG QG]) = mpct.gen(:, [PG QG]) * lambda_max; % 
increased generationmpct.bus(:, [PD QD]) = mpct.bus(:, [PD QD])* lambda_max; % 
and increased load % The  Jacobian for the target 
case[jt11,jt12,jt21,jt22,jact,~,~,~] = makeJac(mpct); 
jt11=full(jb11);jt12=full(jb12);jt21=full(jb21);jt22=full(jb22);njact=size(jact,1);
 Ht=jt11;Mt=jt12;Nt=jt21;Kt=jt22; % The reduced Jacobian for the target 
casejact_red=Kt-Nt*inv(Ht)*Mt; % Eigenvalue decomposition of the reduced 
Jacobian for the target case[leftt eigt rightt]=(eig(jact_red)); 


_com.samsung.android.email_243159952681830
Content-Type: text/html;
charset="utf-8"
Content-Transfer-Encoding: base64

Dear Jose,Thank you 
very much! Now it is working 
perfectly.Best,MariuszWysłano z telefonu Samsung 
Oryginalna wiadomość Od: Jose Luis Marín 
mari...@aia.es Data: 20.05.2018  23:01  (GMT+01:00) 
Do: MATPOWER discussion forum matpowe...@list.cornell.edu 
Temat: Re: CPF with Modal Analysis Hi Mariusz,I think the problem is 
that you have to provide a *solved* target case, because the Jacobian should be 
evaluated *at the solution*.Even for the base case, it wouldn't hurt to run a 
powerflow, since you can't always trust that the input file is a solved 
case.-- Jose 
L. MarinGrupo 
AIA
2018-05-20 11:58 GMT+02:00 Mariusz Drabecki mailto:m.drabe...@onet.eu; 
target="_blank">m.drabe...@onet.eu:Dear 
All,I am working on Modal Analysis. I would 
like to show to my students, that in the bifurcation point at least one of the 
reduced Jacobian eigenvalues is zero. This is why I calculate these values once 
for the base case and then for the nose point ( lambda max calculated by the 
CPF). Unfortunately there is no change in the results. Could anyone 
help?The results of the eigenvalues are as follows (for 
case14)Eigb= [65,420739,953321,993918,911816,449211,34212,706585,568867,66373]And exactly the same ones in the nose 
points.I would greatly appreciate any help from you as I got terribly 
stuck.Best,Mariusz DrabeckiHere is my 
code:define_constantsmpc=loadcase(case14);inc=2.5;%% CPF optionsmpopt = mpoption('out.all', 0, 'verbose', 2);mpopt = mpoption(mpopt, 'cpf.stop_at', 'NOSE', 'cpf.step', 0.1);mpopt = mpoption(mpopt, 'cpf.plot.level', 2); 
%% Base case (base solution operating points)%CPFmpcb=mpc;mpct = mpcb; % set up target case withmpct.gen(:, [PG QG]) = mpcb.gen(:, [PG QG]) * inc; % increased generationmpct.bus(:, [PD QD]) = mpcb.bus(:, [PD QD]) * inc; % and increased loadcpf1 = runcpf(mpcb, mpct, mpopt);lambda_max=cpf1.cpf.max_lam;%Modal Analysis for Base Case[jb11,jb12,jb21,jb22,jacb,~,~,~] = makeJac(mpcb);jb11=full(jb11);jb12=full(jb12);jb21=full(jb21);jb22=fu

Re: CPF with Modal Analysis

2018-05-20 Thread Jose Luis Marín
Hi Mariusz,

I think the problem is that you have to provide a *solved* target case,
because the Jacobian should be evaluated *at the solution*.

Even for the base case, it wouldn't hurt to run a powerflow, since you
can't always trust that the input file is a solved case.

-- 
Jose L. Marin
Grupo AIA



2018-05-20 11:58 GMT+02:00 Mariusz Drabecki :

> Dear All,
>
>
>
> I am working on Modal Analysis. I would like to show to my students, that
> in the bifurcation point at least one of the reduced Jacobian eigenvalues
> is zero. This is why I calculate these values once for the base case and
> then for the nose point ( lambda max calculated by the CPF).
>
>
>
> Unfortunately there is no change in the results. Could anyone help?
>
>
>
> The results of the eigenvalues are as follows (for case14)
>
>
>
> Eigb=
>
> [
>
> 65,4207
>
> 39,9533
>
> 21,9939
>
> 18,9118
>
> 16,4492
>
> 11,3421
>
> 2,70658
>
> 5,56886
>
> 7,66373
>
> ]
>
>
>
> And *exactly the same ones* in the nose points.
>
>
>
> I would greatly appreciate any help from you as I got terribly stuck.
>
>
>
> Best,
>
> Mariusz Drabecki
>
>
>
>
>
> Here is my code:
>
>
>
> define_constants
>
> mpc=loadcase(case14);
>
> inc=2.5;
>
>
>
> %% CPF options
>
> mpopt = mpoption('out.all', 0, 'verbose', 2);
>
> mpopt = mpoption(mpopt, 'cpf.stop_at', 'NOSE', 'cpf.step', 0.1);
>
> mpopt = mpoption(mpopt, 'cpf.plot.level', 2);
>
> %% Base case (base solution operating points)
>
> %CPF
>
> mpcb=mpc;
>
> mpct = mpcb; % set up target case with
>
> mpct.gen(:, [PG QG]) = mpcb.gen(:, [PG QG]) * inc; % increased generation
>
> mpct.bus(:, [PD QD]) = mpcb.bus(:, [PD QD]) * inc; % and increased load
>
> cpf1 = runcpf(mpcb, mpct, mpopt);
>
> lambda_max=cpf1.cpf.max_lam;
>
>
>
> %Modal Analysis for Base Case
>
> [jb11,jb12,jb21,jb22,jacb,~,~,~] = makeJac(mpcb);
>
> jb11=full(jb11);
>
> jb12=full(jb12);
>
> jb21=full(jb21);
>
> jb22=full(jb22);
>
> Hb=jb11;
>
> Mb=jb12;
>
> Nb=jb21;
>
> Kb=jb22;
>
> % The reduced Jacobian for the base case (Q-V sensitivities)
>
> jacb_red=Kb-Nb*inv(Hb)*Mb;
>
>
>
> % The eigenvalues of the reduced Jacobian (Q-V sensitivities)
>
> [leftb eigb rightb]=(eig(jacb_red));
>
>
>
> %% Target case (nose point)
>
> mpct.gen(:, [PG QG]) = mpct.gen(:, [PG QG]) * lambda_max; % increased
> generation
>
> mpct.bus(:, [PD QD]) = mpct.bus(:, [PD QD])* lambda_max; % and increased
> load
>
> % The  Jacobian for the target case
>
> [jt11,jt12,jt21,jt22,jact,~,~,~] = makeJac(mpct);
>
> jt11=full(jb11);
>
> jt12=full(jb12);
>
> jt21=full(jb21);
>
> jt22=full(jb22);
>
> njact=size(jact,1);
>
> Ht=jt11;
>
> Mt=jt12;
>
> Nt=jt21;
>
> Kt=jt22;
>
> % The reduced Jacobian for the target case
>
> jact_red=Kt-Nt*inv(Ht)*Mt;
>
> % Eigenvalue decomposition of the reduced Jacobian for the target case
>
> [leftt eigt rightt]=(eig(jact_red));
>
>
>
>
>
>
>
>
>