Saturday, May 26, 2018

YouTube playlists and lecture series on using the simulator

I reorganized my YouTube channel into playlists:
https://www.youtube.com/channel/UCxVbKNK18A_a9Ohd0Kb7kNA/playlists

So now there is a playlist for every topic rather than just a collection of videos. I am trying to break the videos up into pieces as it is easier to record them and also upload them on YouTube. A playlist ensures everything is in order inside a topic.

Recording videos has been a learning experience. I am gradually getting the hang of using recording and editing software. I use Kazam in Linux to record the screen while programming or going through slides. I use Kdenlive to edit the videos. Initially the videos needed only a clipping of the last extra seconds. Now I need to boost up the volume as I find the volume is quite low. Also as simulations will get longer, it will be needed to pause the video often and that means cut out parts that are just pauses.

The first major lecture series is one on how to use the circuit simulator web app version. How to install the circuit simulator is a separate playlist:
https://www.youtube.com/watch?v=JRKUenYBIA4&list=PL-_jTul4we2SJqPHEANecXJXDFRztsGHM

This playlist contains videos on how to install Python Power Electronics in Windows and Linux.

The lecture series on how to use the simulator should be watched after you have installed a version of the circuit simulator on your system.
https://www.youtube.com/watch?v=Vv0wYq0BPsU&list=PL-_jTul4we2TFRLC8KZcxOMrqhRzI0J3Y

The circuit chosen is a single-phase diode bridge rectifier with a dc capacitor at the output. The load consists of a constant resistor load and a switched resistor load. The first part of the lecture series describes the simulator without using any control functions. The latter part of the simulator describes how to write control functions. The main emphasis here is on the special variables that can be defined with control functions and how they are to be used.

As time goes on more detailed simulation results will be described in the videos. For now the above tutorial is to get you started with Python Power Electronics so that you can use it for your own projects. The video lecture references two short papers that are available on my website:
http://www.pythonpowerelectronics.com/contents/papers/timing_scheduler.pdf
http://www.pythonpowerelectronics.com/contents/papers/control_structure.pdf

And of course for details on the simulator and how control functions are processed or the user interface is handled, check out my book:
https://www.springer.com/gp/book/9783319739830

The book contains entire chapters on user interface, control functions and an entire example on how to simulate a reactive power compensator for a three-phase distribution system.

Making videos is fun and I will continue making them. I feel that videos engage people much more than documents or even slide shows. Stay tuned for more videos on the YouTube channel:
https://www.youtube.com/channel/UCxVbKNK18A_a9Ohd0Kb7kNA

For continuous news and updates, follow my Facebook page:
https://www.facebook.com/pythonpowerelectronics/

Wednesday, May 2, 2018

Releasing the command line version compatible with Python 3

So finally I started with migration to Python 3. Find the download link:
http://pythonpowerelectronics.com/contents/softwaredownloads.html

It wasn't too tough a migration. Mainly the print statement have become functions. So a lot of editing of these statements. Another change which I can't quite understand the necessity of was that raw_input function to get inputs from the user has been removed and an input function is available instead. A more subtle change and this is something which can cause errors to crop up much later is the nature of division.

In Python 2, dividing an integer by an integer yields an integer. So 5/2 will produce 2. In most languages it is the same. To produce exact division, you would have to write 5/2.0 or 5/(2*1.0) etc. Basically one of the operands must be a float. But in Python 3, 5/2 will produce 2.5. To produce an integer result, this would have to be an integer division 5//2.

I many of my loops I use integer division to iterate up to the mid-point of an array. I changed in a couple of places the regular division to integer division or else the for-loop throws an error because the index cannot be a float. But errors are expected later as there a number of such for loops which act on special conditions and it would take a vast number of different circuits before all these loops are discovered and changed.

The next step is to migrate the Django based web app to Python 3. Until then feel free to download and check out the CLI above with Python 3 with your circuits. And please do report errors so that I can fix bugs.

Friday, April 20, 2018

Virtual environments and HOW-TO videos

The first major issue that most people have with a new software is being able to install and execute it. To make this process easier, I make two video lectures on how to install Python Power Electronics in Windows and Linux. I am a Linux user but a vast majority of engineers will be Windows users.

In Windows, I used Anaconda Python which is an entire Python ecosystem. You can download and install it for free on your computer. After which you can create an environment. The advantage of creating an environment is to be able to create a separate isolated container for a particular application. This is particularly when you use your computer for work or study with a different version of Python and do not want an experimental software from messing up your work system. Inside this environment install Django and MatPlotLib which are dependencies for Python Power Electronics besides  Python. The entire video is here:
https://www.youtube.com/watch?v=JRKUenYBIA4&feature=youtu.be


In Linux, I use virtualenv to create a similar Python virtual environment. Inside this environment, I use pip to install Django and MatPlotLib. The entire video can be found here:
https://www.youtube.com/watch?v=jM28A2MD8u4&feature=youtu.be


Now that these lectures describe how to install Python Power Electronics in Windows and Linux, the next part will be on how to simulate a circuit with it. There are three aspects to this. First is the basic circuit simulation. How would you simulate a circuit without any control. Just the circuit, the parameters of the components and how to run it and check the results. This video describes that:
https://www.youtube.com/watch?v=Vv0wYq0BPsU&feature=youtu.be

The next video will describe how to detect and fix bugs in a simulation. There are a few common mistakes that are made quite often and can be fixed fairly easily. The more complex errors are those that occur due to control problems and these are a bit tough to decode. Control problems will be deferred to a later video lecture along with describing how control can be included in a simulation.

Friday, April 13, 2018

The road ahead in 2018

There has been a lot of changes this year and also the past year. Moved to Germany last year in May 2017 and came back in March 2018. Now that I have published a book with Springer, I would like to keep publishing and would not like my first book to be my last. And with this, I need to set some goals particularly for this year.

To begin with, I plan to create video lectures on my YouTube channel fairly regularly. The link to the channel is:
https://www.youtube.com/channel/UCxVbKNK18A_a9Ohd0Kb7kNA

Feel free to subscribe and check out what will be uploaded there. I find that creating a video lecture helps to put together my thoughts for more elaborate reports and tutorials.

My plan is to create mini books in different topics in power electronics, bringing together similar topics or breaking a large topic into smaller sub-topics. Each book will be introduced with a series of video lectures and accompanied by a simulation package. I am planning the first mini-book on simulating many of the known topologies of dc-dc converters.

The theme of these books will be description from fundamental concepts with the minimal amount of mathematical analysis. The reason for doing so is to make power electronics learning accessible to working people who have limited time and energy after their day jobs.

And of course, if you would like to read all about the circuit simulator, feel free to check out my book on circuit simulation:
http://www.springer.com/us/book/9783319739830

Most of the updates to the project will be on my Facebook page:
https://www.facebook.com/pythonpowerelectronics/

So feel free to like and follow the page for regular updates.

Sunday, January 28, 2018

Book published with Springer International

I am happy to make a couple of announcements. The first is that my book on the circuit simulator has been published with Springer International and can be found on their website:

http://www.springer.com/us/book/9783319739830

The second is that I have launched a video lecture series on power electronics with my circuit simulator. For this I have started a You Tube channel:

https://www.youtube.com/channel/UCxVbKNK18A_a9Ohd0Kb7kNA