Yunfei Wang (Sí 08) received the B.Sc. and M.Sc. degrees in control science and technology from Harbin Institute of Technology, Harbin, China, in 2003 and Tsinghua University, Beijing, China, in 2006, respectively.

He is currently pursuing the Ph.D. degree in electrical and computer engineering from the University of Alberta, Edmonton, Canada. His research interests are power quality and power system stability.

During his research, he mianly uses MATLAB, PSSE, PSCAD, and LATEX. The following sections will show the experience, the skills, and the programs that he wrote and summarized.


1. Plot function

This tutorial shows the basic functions of plot, including labels and handles. (it is downloaded from

2. Re-order the power system case file

This case_reorder program reorders the power system case file. The re-ordered case file with the bus number in the sequence of [pv_bus; pq_bus; net_bus];(net_bus means the buses without any loads and generators). (note: change '.exe' to '.p' to make it work)

The program also outputs the system matrix K and matrix Z.

[matrixK, matrixZ, ordered_casefile,orginal_bus_order]=case_reorder(casefile);


1. Import PSS/E dynamic simulation output results into Matlab for ploting.

The attached matlab program will directly read the .out file and use five variables (time, value, channel, title1, title2) to retrieve the results; the 'filename' shows the selected file. (you need change the file extension type from ".exe" to ".p")

The following codes show how to use it:

box off;

2. Python for program automation

The attached python program can be used to calculate the base PV curves of power systems. It is just a sample for how to use python in program automation. (The sample power system is downloaded from need change the file extension type from ".exe" to ".py")

A very useful tutorial on how to debug Python program. python-debug(pdb)