April 17, 2005

Lagrange polynomial solver

lagrange polynomial solver
Attempts to fit a lagrange polynomial through the give data points using the matrix solver library, which has also been updated to be cleaner and better. Output is in a form that is easily copy and pasted into various mathematical packages for plotting.

  • Small
  • Works :D
  • Portable to almost everything under the Sun
  • Outputs in a format that can be easily pasted into mathpad or matlab for plotting


April 07, 2005

matrix solver update

  • matrix solver
    Update 7/5/2005 solves for parametric matrices. Update 4/5/2005 - proper detection of the nature of solutions, code clean up, as well as fixing the infinite loop that occurs for certain matrices. A simple program I wrote after learning about matrixes. It performs Guassian elimination on a given matrix, then uses what I considered a very elegant loop to perform back subtitution to solve the system of equations where a solution exists.

    • Command line based
    • Detects unique, parametric solutions, as well as no solutions
    • Prints unique and parametric solutions
    • Works! :)
    • Will print out working
    • Small

solaris:~/code/matrixSolver steve$ ./matrixSolver 3 1 0 -2 1 3 1 -6 1 0 0 0 0
Solving below matrix
0 [ 1.000 0.000 -2.000 1.000 ]
1 [ 3.000 1.000 -6.000 1.000 ]
2 [ 0.000 0.000 0.000 0.000 ]

0 [ 1.000 0.000 -2.000 1.000 ]
1 [ 0.000 1.000 0.000 -2.000 ]
2 [ 0.000 0.000 0.000 0.000 ]

matrix has parametric solution:
unknown0: 1 + 2 * s0
unknown1: -2
unknown2: s0

Self charging behaviour of electrolyte capacitors

During my physics lab this afternoon, I found that discharged electrolyte capacitors re-charges to a percentage of its original voltage when left alone as open circuit. I was informed this effect is called dielectric relaxation by one of the tutors, but no explanation was forth coming.

So I did some research and here is what I have found:
"A capacitor exhibiting dielectric absorption acts as if during its long precharge time the dielectric material has soaked up some charge that remains in the dielectric during the brief discharge period. This charge then bleeds back out of the dielectric during the relaxation period and causes a voltage to appear at the capacitor terminals. Fig 2 depicts a simple model of this capacitor: When 10V is applied for 1 min, the 0.006-µF capacitor gets almost completely charged, but during a 6-sec discharge period it only partially discharges. Then, over the next minute, the charge flows back out of the 0.006-µF and charges the 1-µF capacitor to a couple of dozen millivolts." [http://www.national.com/rap/Application/
"An electrolytic capacitors is, amongst other things, an electrochemical
cell, and as such can store energy as polarization of the electrolyte/electrodes, and as chemical change. Discharging the surface charge briefly does not release this stored energy, which will subsequently give rise to a terminal voltage as the cell settles back to equilibrium. " [http://www.du.edu/~jcalvert/phys/caps.htm#Diel]
The following are posts to sci.physics newsgroup thread regarding the same topic:
"The way I remember it was that the capacitors had TWO "neutral" states: electrically neutral and mechanically neutral.
Upon discharge the capacitor plates were electrically neutral, but as they mechanically relaxed the diaelectric became polarized and thus produced a charge difference on the plates."

"The situation in electrolytics is complicated by the active nature of the electrolyte, i suspect. If this is correct, an initial zero volt indication merely means that the charge closest to the electrofes has been bled off. If investigating, leaving a milliameter (other wise known as a "calibrated short sircuit... 8)>>) and reading it at intervals (or equivalent datalogger, for the instrumentally endowed...) would be instructive."
The same thread also offered alternatives to the dielectric relaxation explanation
"What you have experienced is common- you have to think about what you have there, an ELECTROLYTIC capacitor. Electrolytics contain "electrolyte", a fluid dielectric betweenn the plates. This fluid is not pure, and it is the impurities that
cause the "battery" action you have noticed. Short the pins for a couple of days and THEN retry. Chemically the impurities in the oil will neutralize and the capacitor will no longer "charge itself up". The action is similar to a very poor battery (try
sticking dissimilar metal nails into an orange and measure the voltage across the nails- you should get about half a volt or more)."

"If one can buy electrolytics with pure electrolyte, and plates made of pure aluminum, then such reactions would not be seen. However, traces of copper and other metals in the plates as small as they may be, are responsible for this "battery" action. As long as industrial grade metals and electrolyte oils are used, we will constantly see this effect...............sq"
It would seem there are two schools of thought on this subject:
  1. Dielectric relaxation is responsible for the self-charging behaviour of electrolyte capacitors.
  2. Chemical reaction similar to that of a battry causes the self-charging behaviour of electrolyte capacitors.
Personally the results of the "memory" effects of capacitors observed supports the theory of dielectric relaxation being responsible. If the effect is due to a reversible chemical reaction, then by conservation of energy the longer the capacitor is held at a certain potential, stronger the self-charged voltage.

The following is my own uninformed and most likely wrong explanation of why this happens, as I interpret it:
When a capacitor initally charges its dielectric material's structure is "stressed" or polarised due to the presence of the electric field. This causes a small amount of energy to be stored in the inter-molecular bonds with in the dielectric material. When the capacitor discharges rapidly, the dieletric material's structure is still under stress even though the potential across the terminals is 0 due to its slower response. As it reverts back to its normal, minimal-energy state in the absence of an electric field, a small increase in electric potential develops across the capacitor's terminals after some time. If the dielectric material is held by an electric field for a long period of time the internal structure will re-arrange graduly itself as to achieve minimal-energy under influence. Thus when discharged after a long time with in an electric field the self-charging effects are smaller as a lower amount of stress is present in the molecular structure.
Should any one more knowledgeable stumble on this topic, please correct any mistakes I have made.


April 04, 2005

Better communication, better world

Its hard to believe having grown up in China witnessing the exploitation of immigrant workers (people who move to Guang Zhou, where I grew up) that the same companies are facing a shortage of workers, a far cry from the days where the sons of farmers were willing to work in construction sites with out any safety gear (friend and I used to play in construction sites at night, the half finished buildings and stock piles of materials provided the settings for many imaginary adventures).

New York times attributed this to the aging working population, and its true. Many of my other's co-workers have retired when my mother and I visited them in 2000. This can be seen even in rural areas which once produced a seemingly unending stream of young people, a tradition breed into the farmer class in a culture where health care is non-existent and death comes early. I visited the village where my dad grew up, a backwater area reached by driving along a poor excuse for a road, then trekking along a muddy track. Where once a thriving village was, an entire section is now abandoned, houses falling into disrepair inhibited by animals. Family planning has finally extended its long arm and curbed the growth of humanity.

Despite this decrease however there are still more than enough people in China. What has changed the status quo in my opinion is better communication. Rural youths are no longer disillusioned with promises of easy money and adventures in the Big City having been told by those who ventured before them due to the improved telephone services. Youths are more technology literate, they utilise emails and SMS to regularly keep in touch with friends and family. The effect of improved communication is that people are able to compare their respective pay and living conditions and gain knowledge of better conditions elsewhere. They are no longer trapped in isolation, living in what facilities provided by the management, cut off and made to think they are having it better. In the same way that privatisations of businesses opened up markets for competition, the advance of communication technology has made the hiring market competitive.

Similarly better communication will eventually brush aside the "iron curtain" around the Chinese government and its people. With some 2 billion people, it will take considerable effort to keep anything from a population that can instant message, send anonymous messages, and post to public viewable noticeboards. Censorship of information so effectively used during the cultural revolution to control the masses, will not work in a world that is becoming ever more connected. The Chinese government now faces a dilemma: the advance tide of communication networks is granting its citizens more power, more knowledge, more freedom. Yet its also moving China forwards in technology and science, essential for its continued growth to become a world power. To restrict such communication is to cut itself off, and in this day and age its no longer a viable option. Its export economy will collapse as its manufacturing technology falls behind and increased reliance on imported technology will strip any fat on its balance sheets gain from the recent years of rapid growth and place it at the mercy of more advanced societies. On the other hand if continued exchange of knowledge is to be allowed, it will need to significantly restructure itself in order to survive in a country where its citizens are free to compare their conditions against the rest of the world, to express opinions and exchange ideas.

Time will tell how the government will react, but regardless of what they do the people has already tasted the first fruits of improved connectivity, and will not willing allow their connections to be cut.

April 02, 2005

The case against VSU

The driving logic and motivation behind VSU can be summed up in the following quote from a report produced by the Student Association Inc:

Federal Education Minister, Dr David Kemp, referred to Western
Australia as a working example of Voluntary Student Unionism (VSU) in its purest
form, stating ‘when campus organisations cannot take their customers for granted,
they will have to provide a better service or they will lose their customers…In
Western Australia, which has had VSU since 1995, we have already seen change in
the services provided’

Despite Dr David Kemp's claims the result was far removed from the idealistic projections as the following extract from the same report shows:

In reality however, VSU resulted in a significant demise in
the services that were provided to students in Western Australia . Although the
legislation has been significantly repealed by the current WA Government since then, at the time it resulted in the collapse of campus life at Edith Cowan University and a severe cut back of it at Murdoch and Curtin Universities.

Further more the introduction of VSU will also undermine student's authority in educational institutes:

Under the proposed legislation, the Student Association would lose
approximately 75% of its net income. This would almost certainly result in the
winding up of the organisation, terminating the delivery of services and activities
currently provided and also terminating any prospect of development of improvement of campus facilities in the future. In addition, the SA’s representational role in the university decision making processes would be lost.

Proponents of VSU like to tout that people will join the union if they want its services. The following data show instead that people will value their money over even basic services, even if the buildings are falling around their ears.

From the a report produced by University of Queensland Union:

In 1995, the following percentage of students joined their respective student unions:
  • Curtin - 10%
  • Edith Cowan - 13%
  • Uni of WA - 28%
  • Murdoch - 38%
After 4 years of cost cutting and aggressive advertisement, the figures improved:
  • Edith Cowan - 6%
  • Curtin - 30%
  • Uni of WA - 30%
  • Murdoch - 35%
However during this 4 year period:

Most of the commercial services continued to operate after 1997 but the profits were insufficient to continue to the comprehensive range of non-cost recovery services,publications and advice/support normally offered by the guilds...universities had to step in to provide financial assistance to the guilds to ensure the maintenance of a basic level of student services, and in the case of Edith Cowan the university took on a role the role of direct administration after the Guild collapsed.

As you can see, despite the disintegration of services due to lack of members, students still would keep their money rather than improve their university services. This attitude is born from greed and the mentality "I can put up with this because eventually others besides me will join and make things better. Then I can reap the benefits with out any personal cost." To make matters worst the current VSU legislation prevents universities from funding non-academic activities, all student services would vanish following the collapse of student guilds.

There is an interesting table on page 5 and 6 detailing the effects of 4 years of VSU. Its a despairing sight as it forecasts the losses we will be expected to endure. Specifically:
  • Student Emergency loans - lost from 3 universities
  • Full program of cultural events - lost from 3 universities
  • Student conference funding - lost from all 4 universities.
This puts lie to the claim that university life would not be significantly affected by VSU's introduction.

If the past is any indication the introduction of VSU nationally will see the deterioration of student services, student representation, university life and basic services.