I have got a need to solve equations repeatedly whose coefficients are changing with each iteration. MatLab function ‘fsolve’ is tested using function handle and anonymous function as follows.
Testing fsolve and anonymous function
December 30th, 2011Hand, Foot and Mouth Disease (HFMD)
December 16th, 2011My baby got blister-like rash on her hands and feet last week. Doctor said it may be caused by HFMD or flu. I found out later that it was the flu in my daughter case. I have never heard of HFMD before and that is why I re-share a brochure from KK hospital.
Geometric Template Matching in LabVIEW
December 16th, 2011
In NI’s IMAQ Vision Concepts Manual, geometric template matching is described as follows.
Geometric matching locates regions in a grayscale image that match a model, or template, of a reference pattern. Geometric matching is specialized to locate templates that are characterized by distinct geometric or shape information.
When using geometric matching, a template is created that represents the object to be searched. Machine vision application then searches for instances of the template in each inspection image and calculates a score for each match. The score relates how closely the template resembles the located matches.
Geometric matching finds template matches regardless of lighting variation, blur, noise, occlusion, and geometric transformations such as shifting, rotation, or scaling of the template.
The VIs such as IMAQ Find CoordSys (Pattern) 2 are used to locate the model. The template for the model is created as discussed in the following steps.
Troubleshooting Daikin Aircon
August 13th, 2011
We have been using Daikin(3MKD58DVM) inverter multi-split (R-22) aircon for a few years. Last month, one of the indoor units (FTKD25DVM) was faulty. There was power and we could turn it on but the operation stops suddenly after a few seconds. Then one the LED indicators kept blinking.
After searching on the Internet, we found a troubleshooting procedure using our ARC433B47 remote controller as follows.
Curve Fitting in Matlab
June 3rd, 2011
One of my friends was doing analysis of some sampled data. He wanted to fit them into a curve to derive the equation. He said Excel could fit up to polynomial of order 6 and he wanted a higher order one. So, he asked my help to write a Matlab program. He also wanted the plotted curve besides the calculated coefficients. The program and sample data are shown below. That is good for me because I also need to fit data occasionally and I can reuse it later
Monte Carlo Integration
June 3rd, 2011As I am reading about Particle Filter, just for fun, I wrote a Matlab program that performs Monte Carlo integration using uniform distribution. The equation and the program are as follows.
Degrees of Freedom of the Human Arm
May 5th, 2011
Have you ever think how many degrees of freedom the human arm has (excluding palm and fingers)? I would like to share a short excerpt from a book by Saeed Benjamin Niku, Introduction to Robotics -Analysis, Control, Applications.
The shoulder, the elbow, and the wrist are three joint clusters in the human arm.
The shoulder has 3 degrees of freedom.
The upper arm can swing up and down in the coronal plane.
It can also swing back and forth in the transverse plane.
And rotation with respective to the axis along humerus can be done also.
The following is the illustration of human anatomy planes from Wikipedia.
Simple 6 DOF Translation and Rotation Stages
March 4th, 2011I had the requirement to control a device in 6 degrees of freedom (DOF). There were 3 motorized translation stages to control the position of the tool in 3D space and 3 rotary motorized stages to control its orientation. Although it could be thought as a robot arm having 3 prismatic joints and 3 revolute joints, I did not want to involve complex forward and inverse kinematics for this simple testing equipment. Here is an example transformation. By arranging rotational axes of rotary motorized stages to intersect at the tool, a simple direct 6 DOF control could be achieved. The following figures show schematic diagram and 3D drawing for the equipment that I designed.
Capacitor selection for a Crystal Oscillator
March 3rd, 2011
A typical crystal oscillator circuit and an example layout design are shown in the figures. A crystal manufacturer normally specifies the load capacitance, CL, needed for a crystal in its datasheet. This value is the load seen by the crystal which is in series with C1 and C2, including all parasites. Typically, overall stray capacitance, Cstray, for pin, board, and PCB trace is between 2 pF and 7 pF. The relation between them can be represented by the following formula.
CL=(C1 * C2)/(C1 + C2) + Cstray
C1 and C2 are normally chosen to have equal value. Therefore,
C1 = C2=2 * (CL – Cstray)
For example, assume that Cstray is 4 pF and crystal load capacitance CL is 18 pF, C1 = C2= 28 pF. The normalized value of 30 pF can be used.
Denavit-Hartenberg Representation of Robots
February 22nd, 2011
The D-H model of representation is a simple way of modeling robot links and joints that can be used for any robot configuration.
We will have to assign a z-axis and an x-axis for each link. The D-H representation does not use the y-axis at all. Let Lk be the frame associated with link k.
Inkscape
December 30th, 2010
Inkscape is a vector graphic editor similar to Illustrator or CorelDraw. Inkscape is better in the sense of cost because it is free. It is also an open source software.
It can be downloaded for free at http://inkscape.org/
The nice feature is that graphics can be saved in pdf format. It allows high quality graphics when you use it with pdflatex to produce pdf files. Since they are Scalable Vector Graphics, unlike bitmap images, there is no problem even when they are magnified.
Texmaker: a LaTeX editor
December 29th, 2010Texmaker is a free and cross-platform LaTeX editor. Editing LaTeX is much more convenient than it used to be.
proTeXt and package problem
October 5th, 2010
I like to use proTeXt to write documents. It is freely available at http://tug.org/protext/.
When I used new distribution proTeXt with MiKTeX 2.8, I got a problem if I include \usepackage{mathptmx} in my file and tried to build and view (ctrl+shift+F5).
Blind Love: a Myanmar Song
July 19th, 2010This is another Myanmar song. I liked it very much. Please enjoy the original lyrics in Myanmar.
Random Password Generator
July 12th, 2010I have a few nagging computer user accounts that regularly ask me to change password. Some of them even remember history of about ten old passwords to prevent me from using them again.
Forgetting: a Myanmar Song
May 29th, 2010
Let me share one of my favorite songs when I was a teenager
Please enjoy the lyrics in Myanmar.
