function mpc = case33_Example
%CASE33d    Power system data for 33 bus radial distribution systm.

%% MATPOWER Case Format : Version 2
mpc.version = '2';

%%-----  Power Flow Data  -----%%
%% system MVA base
mpc.baseMVA = 10;

%% bus data
%	bus_i	type	Pd	Qd	Gs	Bs	area	Vm	Va	baseKV	zone	Vmax	Vmin
mpc.bus = [
	1	3	0	 0	    0	0	1	1	0	12.66	1	1.05	0.90;
	2	1	0.1	 0.06	0	0	1	1   0   12.66	1	1.05   	0.90;
	3	1	0.09 0.04	0	0	1	1	0	12.66	1	1.05	0.90;
	4	1	0.12 0.08	0	0	1	1	0	12.66	1	1.05	0.90;
	5	1	0.06 0.03	0	0	1	1	0   12.66	1	1.05	0.90;
	6	1	0.06 0.02	0	0	1	1	0	12.66	1	1.05	0.90;
	7	1	0.2	 0.1	0	0	1	1   0   12.66	1	1.05	0.90;
	8	1	0.2	 0.1	0	0	1	1	0	12.66	1	1.05	0.90;
	9	1	0.06 0.02	0	0	1	1	0	12.66	1	1.05	0.90;
	10	1	0.06 0.02	0	0	1	1	0	12.66	1	1.05	0.90;
	11	1	0.045 0.03	0	0	1	1	0	12.66	1	1.05	0.90;
	12	1	0.06  0.035	0	0	1	1	0   12.66	1	1.05	0.90;
	13	1	0.06  0.035	0	0	1	1	0	12.66	1	1.05	0.90;
	14	1	0.12 0.08	0	0	1	1	0	12.66	1	1.05	0.90;
	15	1	0.06 0.01	0	0	1	1	0	12.66	1	1.05	0.90;
	16	1	0.06 0.02	0	0	1	1	0	12.66	1	1.05	0.90;
	17	1	0.06 0.02	0	0	1	1	0	12.66	1	1.05	0.90;
	18	1	0.09 0.04	0	0	1	1	0	12.66	1	1.05	0.90;
	19	1	0.09 0.04	0	0	1	1	0	12.66	1	1.05	0.90;
	20	1	0.09 0.04	0	0	1	1	0	12.66	1	1.05	0.90;
	21	1	0.09 0.04	0	0	1	1	0   12.66	1	1.05	0.90;
	22	1	0.09 0.04	0	0	1	1	0	12.66	1	1.05    0.90;
	23	1	0.09 0.05	0	0	1	1	0	12.66	1	1.05    0.90;
	24	1	0.42 0.2	0	0	1	1	0   12.66	1	1.05	0.90;
	25	1	0.42 0.2	0	0	1	1	0	12.66	1	1.05	0.90;
	26	1	0.06 0.025	0	0	1	1	0	12.66	1	1.05	0.90;
	27	1	0.06 0.025	0	0	1	1	0	12.66	1	1.05    0.90;
	28	1	0.06 0.02	0	0	1	1	0	12.66	1	1.05	0.90;
	29	1	0.12 0.07	0	0	1	1	0	12.66	1	1.05	0.90;
	30	1	0.2	 0.6	0	0	1	1	0   12.66	1	1.05	0.90;
    31	1	0.15 0.07	0	0	1	1	0   12.66	1	1.05	0.90;
    32	1	0.21 0.1	0	0	1	1	0   12.66	1	1.05	0.90;
    33	1	0.06 0.04	0	0	1	1	0   12.66	1	1.05	0.90;
];

%% generator data
%	bus	Pg	Qg	Qmax	Qmin	Vg	mBase	status      Pmax	Pmin	Pc1	Pc2	Qc1min	Qc1max	Qc2min	Qc2max	ramp_agc	ramp_10	ramp_30	ramp_q	apf
mpc.gen = [
% 	1	500	0	150	-200	1.05	100	1	800	0	0	0	0	0	0	0	0	0	0	0	0;
    1	0	0       100     -100        1.05	100	1	100     0	0	0	0	0	0	0	0	0	0	0	0;
    18	0.2	0.10	0.10	-0.10       1       100	1	0.2     0	0	0	0	0	0	0	0	0	0	0	0;
    22	0.2	0.10	0.10	-0.10       1       100	1	0.2     0	0	0	0	0	0	0	0	0	0	0	0;
   	25	0.2	0.10	0.10	-0.10       1       100	1	0.2     0	0	0	0	0	0	0	0	0	0	0	0;
    33	0.2	0.10	0.10	-0.10       1       100	1	0.2     0	0	0	0	0	0	0	0	0	0	0	0;

];

%% branch data
%	fbus	tbus	r	x	b	rateA	rateB	rateC	ratio	angle	status	angmin	angmax
mpc.branch = [
    1	2	0.005752591	0.002976124	0	130	130	130	0	0	1	-360	360;
    2	3	0.030759517	0.015666764	0	130	130	130	0	0	1	-360	360;
    3	4	0.022835666	0.011629967	0	130	130	130	0	0	1	-360	360;
    4	5	0.023777793	0.01211039	0	130	130	130	0	0	1	-360	360;
    5	6	0.051099481	0.044111518	0	130	130	130	0	0	1	-360	360;
    6	7	0.011679881	0.038608497	0	130	130	130	0	0	1	-360	360;
    7	8	0.106778574	0.077061012	0	130	130	130	0	0	1	-360	360;
    8	9	0.064264305	0.046170471	0	130	130	130	0	0	1	-360	360;
    9	10	0.062642099	0.046170471	0	130	130	130	0	0	1	-360	360;
    10	11	0.012266371	0.004055514	0	130	130	130	0	0	1	-360	360;
    11	12	0.023359763	0.007724195	0	130	130	130	0	0	1	-360	360;
    12	13	0.091592232	0.072063371	0	130	130	130	0	0	1	-360	360;
    13	14	0.033791794	0.044479634	0	130	130	130	0	0	1	-360	360;
    14	15	0.036873985	0.03281847	0	130	130	130	0	0	1	-360	360;
    15	16	0.046563544	0.034003928	0	130	130	130	0	0	1	-360	360;
    16	17	0.08042397	0.107377542	0	130	130	130	0	0	1	-360	360;
    17	18	0.045671331	0.035813312	0	130	130	130	0	0	1	-360	360;
    2	19	0.010232375	0.009764431	0	130	130	130	0	0	1	-360	360;
    19	20	0.093850842	0.084566834	0	130	130	130	0	0	1	-360	360;
    20	21	0.025549741	0.029848586	0	130	130	130	0	0	1	-360	360;
    21	22	0.044230064	0.058480517	0	130	130	130	0	0	1	-360	360;
    3	23	0.028151509	0.019235617	0	130	130	130	0	0	1	-360	360;
    23	24	0.056028491	0.044242542	0	130	130	130	0	0	1	-360	360;
    24	25	0.055903706	0.043743402	0	130	130	130	0	0	1	-360	360;
    6	26	0.012665683	0.006451387	0	130	130	130	0	0	1	-360	360;
    26	27	0.017731957	0.009028199	0	130	130	130	0	0	1	-360	360;
    27	28	0.066073688	0.058255904	0	130	130	130	0	0	1	-360	360;
    28	29	0.050176072	0.043712206	0	130	130	130	0	0	1	-360	360;
    29	30	0.031664208	0.016109751	0	130	130	130	0	0	1	-360	360;
    30	31	0.06079528	0.060084005	0	130	130	130	0	0	1	-360	360;
    31	32	0.01937288	0.022579856	0	130	130	130	0	0	1	-360	360;
    32	33	0.021275852	0.033080519	0	130	130	130	0	0	1	-360	360;
	%21	8	2.0	2.0	0	160	160	160	0	0	1	-360	360;
	%9	15	2.0	2.0	0	160	160	160	0	0	1	-360	360;
	%12	22	2.0	2.0	0	160	160	160	0	0	1	-360	360;
	%18	33	0.5	0.5	0.02	320	320	320	0	0	1	-360	360;
	%25	19	0.5	0.5	0.01	320	320	320	0	0	1	-360	360;
];

%% generator cost data
%	1	startup	shutdown	n	x1	y1	...	xn	yn
%	2	startup	shutdown	n	c(n-1)	...	c0
mpc.gencost = [
	2	0	0	2	30	0;
    2	0	0	2	30	0;
	2	0	0	2	30	0;
	2	0	0	2	30	0;
    2	0	0	2	30	0;
    2	0	0	2	3	0;
    2	0	0	2	3	0;
	2	0	0	2	3	0;
	2	0	0	2	3	0;
    2	0	0	2	3	0;
];
