Friday, March 20, 2020

How to Speak by Prof. Patrick Winston

I have watched the full talk, 1 hour and three minutes. At the end of the talk, I'd like to solute to Prof. Winston. This is a MUST watch! It will make one a better writer, a much better speaker to persuade people, and help improve the skill of job hunting or getting recognized of one's ideas. 
There are many memorable notes. Here are a few things: 
1. How to start a talk? Give promises. Tell your audience or students what they can learn. For research talks, show problems by an example. For the case of resource allocation problem, the professor shows how to color a US map with neighboring states in different color. Normal algorithms may never end. On the other hand, a good optimization problem runs in a few seconds. This shows a stark contrast and demonstrates great benefits of an algorithm.  
2. How to give a successful job talk as faculty candidate? In the first 5 minutes, one needs to give a vision and demonstrate that he/she has worked on the research. The second part requires one to show steps of how to solve the problem even he/she has not worked out all the steps.
3. How to design slides? Be concise; use big fonts. 
4. How to get recognized for one's idea? Five elements: have symbols, have a slogan, give surprise, have a salient idea, and tell stories of the discovery. 
5. How to end slides? Use Conclusion page to show your unique contributions. 
6. How to end a talk? Do not say thank you. Rather salute the audience with somethings different. "It's been fun to be at MIT. I look forward to coming back again". Prof. Winston demonstrated two politicians good at speech on how they ended a talk: Governor Christie and Bill Clinton. In both cases, the speakers salute to the audience. They were fun to watch. 

Wednesday, May 10, 2017

Spring 2017 conference papers for NAPS submission


Often times, Ph.D. students with psychological burden on paper writing would request that they be excused from paper submission to a conference. The excuse is that time can be saved for more in-depth study and for the final journal paper writing. The responsible and correct answer is, as always, no.  Any Ph.D. student survival guide would show that paper writing is an essential skill and there is no reason to trust there will be a journal paper before a conference paper. Usually, there are three stages to have a solid paper out. Stage 1: notes; Stage 2: conference paper; and Stage 3: journal paper. 

The spring 2017 semester sees a total of 11 conference papers. Coverage of the papers includes 1) dynamics and control; 2) optimization; and 3) system identification.

On the topic of dynamics, the following papers address converter droop control, synchronous machine modeling, converter cascaded control, and interconnected power system dynamics.
1.  I. Alsaleh and L. Fan, "DQ Current-based Droop Control for Microgrids."
2. Z. Wang and L. Fan, "Space Vector based Synchronous Machine Modeling."
3. Y. Zhou, Z. Miao, Y. Li and L. Fan, " Robust Cascaded Control for Converters. "
4. L. Bao, Z. Miao and L. Fan, "Smart Grid Cyber Attacks to Excite Interarea Oscillations."

On the topic of optimization, the following papers address PMU placement formulation as MIP and nonlinear programming, SDP relaxation AC OPF’s two applications, Using Benders’ decomposition to solve a model predictive control for multi-level modular converters, AC OPF-based financial transmission right auction model while considering loss allocation, and distributed computing using alternating direction method of multipliers (ADMM) for nonconvex AC OPF.
1. A. Almunif and L. Fan, "Optimal PMU Placement for State Estimation in Power Systems."
2. A. Alassaf and L. Fan, "Economic Dispatch with Heavy Loading and Maximum Loading Identification using Convex Relaxation of AC OPF."
3. M. Ma and L. Fan, "Bender's Decomposition for Model Predictive Control of an MMC."
4. A. Alburidy and L. Fan, " Loss Allocation in AC OPF-based FTR Auction Models."
5. R. Kar, M. Zhang, Z. Miao, and L. Fan, "ADMM for nonconvex AC OPF."

On the topic of system identification, the following two papers address how to estimate a synchronous generator’s parameters using PMU data and how to estimation a battery’s SoC and circuit parameters using measurements.
1. Y. Xu, Y. Li, and Z. Miao, "Nonlinear Least-Square Estimation-based Parameter Identification of a Synchronous Generator," submitted, NAPS 2017.
2. M. Zhang, Z. Miao and L. Fan, "Battery Identification based on Real-World Data," submitted, NAPS 2017.

All students are commented for their ability of project management, hardwork, and team spirit. 

Saturday, February 11, 2017

Preface of "Control and Dynamics in Power Systems and Microgrids" by L. Fan




The main part of the book was written in Spring 2016 when the author taught Power Systems II, a
graduate course at University of South Florida, Tampa Florida. The course was designed to focus on
control and dynamics of power systems. Bergen and Vittal's book, Power System Analysis, was
adopted as the textbook. Dynamics and control, especially in the area of power systems applications
where rotating magnetic fields are involved, is a formidable subject to students. Hence, a set of
class notes was developed in that semester to offer a tutorial approach of learning. Many examples
and codes were developed to facilitate understanding and hands-on training. A highlight of this
textbook is its many tutorial examples.

The first version of Bergen and Vittal's book was written in 1981 by Professor Bergen. Thirty-six
years have passed since then. This classic textbook has been highly recognized and helped to
educate a generation of power system engineers. Professor Bergen passed away in July 2014. As a
power systems engineer, this author would like to contribute to the field by reinterpreting the
classics of power system control and dynamics. This textbook is also a tribute to Professor Bergen.

There will be several things different from the classic textbook.

 The generator model derivation is very sophisticated in Bergen's book. In  Bergen's book, Park's transformation was employed to derive generator models. Park's transformation was conducted using matrix in real domain. Handling matrix is a sophisticated task. The alternative of Park's transformation is space vector and complex vector transformation, a concept used much more often in machines and power electronics after the 1980s. Space vector concept makes Park's transformation straightforward. In this textbook, the author will explain synchronous generator dynamics, the most formidable dynamics in power systems, using space vector concept. Readers will find that modeling dynamics in space-vector and further in the rotor reference frame an interesting and easy task. The second highlight of generator modeling part is torque derivation. Classic textbooks all use coenergy's derivation against rotor angle. In this book, the author started from physics taught in high school and evolved to the expressions in rotating machines.

 In the 1980s, power electronics and microgrids were yet to be developed. This field is well developed in the 21st century. Many techniques used in power systems for power sharing, e.g., droop control, can also be found in power electronic converter coordination. The part is now related and put into the textbook to help readers understand converter control and coordination. This is another highlight of the textbook.

Advanced control such as networked control (consensus control) were developed after 2000. Many classic engineering implementations follow advanced control framework. It is appealing to find them and interpret the intuitive engineering design with concepts and ideas from networked control. In this textbook, inter-area oscillations are explained using consensus control.

Professor Bergen's book has steady-state analysis and dynamics all together. This textbook focuses
on dynamics and control only. This author would also like to have a better flow to focus on power
system control. Starting from the beginning, ordinary differential equation, the building block of
dynamics and control, is explained using examples. Dynamic simulation and linear system analysis
are conducted for the examples. With the fundamental concept on dynamics built, readers can then
pursue the learning tasks related to power system control and dynamic stability with ease. Readers, if not familiar with coding, learn coding for dynamic simulation.

The flow of the text is to treat frequency or voltage control as control problems. For control  problems, first we discuss the plant model and its related steady-state and dynamic responses. The plant model should be identified with inputs and outputs specified. In the frequency control case, it is obvious that the output of the plant model should be frequency. The inputs are from a generator's mechanical system inputs. After setting up the plant model, we then think about how to design feedback controls to realize control objectives. After control design is conducted, we then employ dynamic simulation to verify controller performance.

The author is grateful to have the opportunity to write and publish this books. The author would like to acknowledge University of South Florida Electrical Engineering Department for providing a great environment to conduct research and teaching. The author wishes to acknowledge her family for countless support.

The book was developed from the author's class notes of Power Systems II for Spring 2016. Minyue
Ma, a Ph.D. student, was the teaching assistant for that course and helped work out examples and
homework problems for the class. A few students in the class, e.g., Abdullah Alassaf, highly
complimented the class notes, which encouraged the author to contact the CRC press for publication.
Yin Li, a Ph.D. student, built MATLAB/Simulink models in Chapter 6 Frequency and voltage control in microgrids. Yangkun Xu, another Ph.D. student drew many for Chapter 3 and Chapter 5. Graduate
students at the USF Power Systems Smart Grid Lab reviewed the book during the holiday season in
December 2016. The author wishes to acknowledge Minyue Ma and Yin Li as reviewers. The author also wishes to acknowledge Yi Yang from Eton Cooperation as a reviewer.

Thursday, February 9, 2017

How to start research for a newbie?

New students often time asked me this question: How do I start research.

There are two critical elements that lead to the success. The first element is the ability to use tools. The second element is the ability of synergy or connecting dots.

The first element is easy to be improved as long as there is a good curriculum setup for students and as long as you are following a great instructor. If the subject area is optimization related, for every example discussed in the class, examine it and be able to extend this example to a different system or a large-scale system. This exercise trains a student to be a good programmer.

The second element requires many years of training. If you are lucky to follow a great researcher, this process can be made shorter. Synergy requires experience, good judgement, a big picture of the research areas, the ability of appreciating others' work, and the ability of capturing subtle details. Such a capability usually is not there for Ph.D. students yet. Thus, whether you are following a great researcher or not directly impact a student's outcome. We see many times, students under the guide of a greater researcher becomes a great researcher. On the other hand, many bright students end up with nothing significant after many years of study.

A colleague summarizes it well:  To have a successful career, just make sure these two things: make a correct choice of your advisor; be humble and follow his/her words.

Saturday, July 2, 2016

On Programming

MATLAB is usually used for Power Systems Analysis teaching. If there is something to do with control system analysis, MATLAB is excellent. Other times, if we focus only on computing, then other tools might be better. One significant advantage of Python over MATLAB is that Python is free. Secondly, MATLAB occupies huge memory and starting it up takes time. On the other hand, unless you use a module, that module won't be loaded. A Python program is much easier to load and run. The third reason is related to job market. Many employers would ask students: Do you know Python? Familiarity with Python is an advantage.

Starting from Fall 2016, Python will be adopted in class teaching. In fact, Python was introduced in Fall 2015 already though not until we started to do optimization, Python was used. This time, Python will be used for every demonstration.

Programming is almost nature. There are only 3 to 4 things to be concerned:
1. how do we store data
2. How to do repeated work.
3. How to make visual display.
4. How to make things modular

1. In MATLAB, vectors and matrices are stored by one or two-dimensional array. In Python, a little bit complicated. We can still use just one line to define a vector. For example:

tt = [i*0.0001 for i in range(0, 1000)]
This is to define a vector of 1000 elements starting from 0, to 0.1. Further, we can create a null array, and during iterative process, append the array with something. Python uses .append.

2. Python has For loop.


3. Load pylab module, we can plot figures similar as Matlab's plot.
4. Python's functions are under def.

With that a Python program is ready.


Saturday, April 30, 2016

Use Python to generate figures

From Stackflow:
If you are using matplotlib and trying to get good figures in a latex document, save as an eps. Specifically, try something like this after running the commands to plot the image:
plt.savefig('destination_path.eps', format='eps', dpi=1000)
I have found that eps files work best and the dpi parameter is what really makes them look good in a document.
UPDATE:
To specify the orientation of the figure before saving simply call the following before the plt.savefig call, but after creating the plot (assuming you have plotted using an axes with the name ax):
ax.view_init(elev=elevation_angle, azim=azimuthal_angle)
Where elevation_angle is a number (in degrees) specifying the polar angle (down from vertical z axis) and the azimuthal_angle specifies the azimuthal angle (around the z axis).
I find that it is easiest to determine these values by first plotting the image and then rotating it and watching the current values of the angles appear towards the bottom of the window just below the actual plot. Keep in mind that the x, y, z, positions appear by default, but are replaced with the two angles when you start to click+drag+rotate the image.
=================================
Just to add my results, also using matplotlib.
.eps made all my text bold and removed transparency. .svg gave me high-res pictures that actually looked like my graph. 
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
# Do the plot code
fig.savefig('myimage.svg', format='svg', dpi=1200)
I used 1200 dpi because a lot of scientific journals require images in 1200 / 600 / 300 dpi depending on what the image is of. Convert to desired dpi and format in GiMP or Inkscape. 
EDIT: Obviously the dpi doesn't matter since .svg are vector graphics and have "infinite resolution".


Sunday, April 10, 2016

Curriculum setup for Ph.D. study

Number of Ph.D. graduates indicates a group's research capability. Nurturing process is time consuming. With a systematic curriculum setup, we expect to see an improved and effective outcome if not mass production of Ph.D. graduates.

People usually have the wrong impression that research has nothing to do with courses. Wrong. It has everything to do with courses. Top schools such as MIT, Stanford or Caltech have four-year engineering curricula and the BS students can smoothly transfer into researchers. One MIT circuit course is equivalent to four courses in a tier-2 university. A Caltech undergraduate course in a quarter semester can lift students to the level of semi-experts. In ten weeks twenty lectures and ten intensive homework sets, anybody with a goal of learning and disciplines can be lifted to a level that their peers in tier-2 universities will be awed.

That said, the key for effective production of Ph.D. students is curriculum design. Which set of courses should be taken and which books should be read. Without experience, an advisor may have difficulty to answer. Novice advisors feed students with papers and have weekly meetings. Experienced ones spend much less time on meetings and yet receive much better outcomes.

Design a curriculum for power engineering Ph.D. study is challenging. Power engineering itself requires a breadth and the integration of three subareas: power systems, machines and power electronics. In the previous generation, many educators and researchers, are experts in one of the three subareas. On top of power engineering fundamentals, the advanced study has to include math:  controls, operations research, etc.

Thanks to the public sharing of top schools, we now can see the contents and videos of Stanford, MIT or Caltech's theoretic courses. With such resources, all other universities and application areas can catch up, to a level that the previous generation cannot imagine.