Archive for October, 2007

Battery made of quarters

October 30, 2007 Leave a comment

Making a battery out of quarters is a neat little project that a lot of kids do, but I had never done this before. I have a few pictures to show how impressively well it works.
For this battery, I used aluminum foil, 10 quarters, and blotting paper soaked in salt and vinegar. I measured 4.18 volts across the completed makeshift battery. I was impressed. The battery was able to light the LED shown on the right overnight.

Categories: Electronics

Matlab stuck "Initializing"

October 29, 2007 3 comments

This week I had an issue with MATLAB failing to start in the Electrical Engineering computer labs at Ohio State. It simply opened the Matlab window and said it was Initializing (image on right), but hung there indefinitely. This turned out to be even more frustrating than when I have problems at home due to the combined hurdles of the altered path of Matlab files and restrictions on certain user actions.

The problem is similar to the one described by The Mathworks here:

I did not expect that I could fix the problem as a non-administrative user, but it turns out to be possible so I describe the method here.

As The Mathworks says somewhere down the list of their possible solutions, the “Mathworks” folder needs to be deleted from the “Application Data” folder to resolve the issue. To do this in the ECE labs:

Step 1: Make sure Matlab is closed
Step 2: Navigate to the Application Data folder
– Go to My Computer >”home on ‘EMC-SNAS:T5.5.28.1 (hiro)'” (Z-drive)
– Open the Application Data folder
– Delete the Mathworks folder
— (The files in Z:\Application Data\MathWorks\MATLAB\R2007a need to be deleted)
Step 3: Restart Matlab
– The issue should be resolved.

I made a batch file (*.bat) to automate this process. Download it here.

To be able to run the script, you must open it in Winzip and execute it from there. You cannot extract it before running it due to permissions.

Graphical Calculation of Gain and Phase of a system in the S-Domain

October 19, 2007 Leave a comment

Today I’d like to record some observations from ECE351, Systems I, taught by Professor Hooshang Hemami of the Electrical Engineering department at The Ohio State University.

First, I will note what H(s) is before showing how to use it to calculate the gain and phase of a system.

H(s) is the transfer function of a system. For any s=σ+jω, H(s) is the relationship between X(s) (the input) and Y(s) (the output).

The zeros of H(s) are found at roots where H(s) = 0.
The poles of H(s) are found at discontinuities of H(s), where H(s)=±∞

The numerator of H(s) is made up of a product of zeros: (s-zero1)(s-zero2)
The denominator of H(s) is made up of a product of poles: (s-pole1)(s-pole2)

The gain and phase of the transfer function are found using the frequency response H(jw).
The gain is the magnitude in the complex plane of H(jw)’s numerator / H(jw)’s deniminator.
The phase is the angle in the complex plane of H(jw)’s numerator – H(jw)’s denominator.

The gain and phase can be calculated graphically on a pole-zero diagram. I expect to post example images in the future.

For the gain, this is done by finding the resultant distance between the zeros and the frequency (w) of interest, then dividing by the distance from the poles to the frequency of interest.

The phase is found by finding the angle between the frequency of interest and the zeros, then subtracting the angle between the frequency of interest and the poles of H(s) in the complex plane.

An interesting case for this graphical method is analysis at discontinuities or zero values. Note that 0 in the complex plane has no magnitude or direction angle, so it cannot be used to calculate the gain and phase. Limits approaching the point along the jw axis must be used.

That’s all for now. I may post example images and more detail in the future, as I mentioned.

Categories: Classes, Electronics