Sunday, January 29, 2012

Linear circuit investigation using FFT

The Fourier analysis is very powerful and useful instrument of investigation that is used widely in many scientific applications. It named after French mathematician Joseph Fourier who proved that arbitrary signal can be represented by sum of harmonic signals. Each harmonic signal (sinus or cosines) has own frequency, phase and amplitude. Нarmonic signal keeps its shape while passing through the linear circuit and change only amplitude and phase. This ability makes the Fourier analysis to become a power method of investigation. To perform Fourier analysis on computers in digital form the Discrete Fourier Transform (DFT) was developed. The fast optimized version of DFT is called Fast Fourier Transform (FFT).

Saturday, January 28, 2012

Electrical impedance tomography (Part III) - The nonlinear model

The nonlinear model of EIT will be discussed. To obtain a tomographic image of the object a matrix of electrodes is superimposed on it's surface and series of measurements are produced. 
During the one measurement through the current electrodes the current is passed, while from measurement electrodes the potentials are measured relative to a reference electrode. This procedure is repeated with new current electrodes more and more to obtain dataset of observations.

Wednesday, January 25, 2012

Simple Java MVC for Google App Engine

Using heavy Java frameworks on Google Application Engine (GAE)  is painful: after some time, when you website gets no incoming requests, GAE stops Java Virtual Machine (JVM). After that to processing new request JVM has to start again and has to start the Framework. Unfortunately Java EE frameworks have doing some initialization process, that takes much time. I tried to use great Play!Framework and Spring Framework but slow "cold start" and slow working forced me to find another solution for implementing MVC for my projects.
I'm going to describe how to write simple MVC framework using plain Java HttpServlets and FreeMarker that can run fast in GAE, doesn't have slow "cold start" and much CPU time consuming.
For my project I used Eclipse Java EE IDE (Indigo Release). I had installed Google Plugin for Eclipse
to make GAE applications development faster and easier.

Wednesday, January 18, 2012

FIR filter implementation

FIR (finite impulse response) filter is a digital filter without feedback. Absence of feedback makes impulse filter response to be finite. Digital filters can be with infinite impulse response (IIR filters).
The advantages of FIR filters compared to IIR filters:
1. FIR filter can be designed with linear phase.
2. FIR filter is simple to implement.

Sunday, January 15, 2012

Solving ordinary differential equations


How to solve systems of linear differential equations? Here we describe three ways: Runge - Kutta method, and two similar ways to each other using the method of state space.

Let our process is described by the following differential equation:

Electrical impedance tomography (Part I)

Electrical impedance tomography (EIT) is a method of imaging the spatial distribution of conductivity inside the object (in particular human organs), by measuring the voltage on its surface. This voltage is excited by small current that flows through the object in various combinations. EIT is based on fact that different areas inside the object under investigation have different conductivity, thereby current flow changes its direction. That effect leads to boundary potential changes, that can be detected.

Electrical impedance tomography (Part II) - The physical principle


The classical forward problem is to find the output response of the model due to the input impact. The model and input signal we know.
Such problems are correct in the sense of Hadamard [1], for which:
1) a solution exists for all input signals;
2) the solution is unique;
3) the solution depends continuously on the input data.
Physical problems that satisfy the conditions of existence of solution, its uniqueness and stability are correct. The solution of such problems are not sensitive to small changes (errors) of input data [2].

Saturday, January 14, 2012

Fast Fourier Transform (FFT) simple usage

How to build spectrum of signal? Here is simple, but detailed example of Matlab's fft() function usage. Also I showed how correctly plot discrete time signal and discrete spectrum of signal.

Friday, January 13, 2012

Model-View-Controller (MVC) pattern simple example

About this architectural pattern is so much articles have been written, so I don't describe it in details. Follow MVC in Wikipedia link to read about theory of MVC. I just want to represent a very simple implementation of MVC pattern using Java and Swing library.