Tuesday, 2 October 2012

Breakthrough, My Way!

01:15 pm

A productive, constructive morning today, must say! After the taking decision the hard way yesterday, I decided to plunge into the concept of Genetic Algorithm. My brain works this way: I first need to know the framework, i.e. the structure of the project, then I can dive into its details. So decided on trying to understand what is Genetic Algorithm, what are its inputs and outputs, how it can be applied in my case, how can I perform it using MATLAB. Get the material, study, try out, if successful, implement.

After surfing through a lot of online material, understood the necessary concepts of Genetic Algorithm. Then, applied it to my case. Until my external guide tells me anything, I'm thinking of taking the same database that is used in this paper. At this stage I'd like to specify the picture that my brain has created of my case scenario, before I forget it, else it'll have to waste time doing it again another day. 

The aim is to replicate the fetal-placental blood flow using three variables:
1)The Placental Resistance
2)The Brain Resistance
3)The Fetal Heart Rate

The database consists of 8 readings ranging from the normal stage to the stage when subject goes into compensatory, i.e. abnormal, detectable, phase. Each of this reading is a result of linear combinations of the three variables, multiplied to different coefficients. Bu using Genetic Algorithm, we have to find the value of these variables that represents the basic value of these three variables, which gets multiplied by coefficients, to create different readings.

The fact that should be considered is that, it is normal for these conditions to vary over time. Thus, the variables also change over time, and it is normal! The Genetic Algorithm doesn't know that! It'll think the value of variables has to remain constant the entire time, which is not true! So, we make a change in the perception of the variables. We make them constant so that the Genetic Algorithm can function properly. How do we do it? We find the normal values of the reading at those particular gestational ages, and divide our readings with the normal values. As a result, our readings now change to some absolute values, whose variables should remain constant over the time! 

After this I moved onto understanding if I have the necessary toolbox to execute the algorithm. Was pleasantly surprised to see, that there exists a software tool.. readily available in MATLAB R2010a in which I only need to select the operation that I need to perform from drop-down box, enter the the data that should be modeled .. And that's it!! I DO need to look through it still, but I'm so happy right now! Had a fruitful morning!! Yeay! Now for lunch!

ATB!

Monday, 1 October 2012

Finding a Way, and Taking a Stand

08:00 pm

A delay.. In fact it's been a very very long delay since I last blogged. I Apologize(to myself). 

What kept me away is a certain kind of repulsion,.. a kind of detachment that I developed from my project. The reason was my external guide. The 2nd Sunday conversation with him was horrible. As I had written down on the blog, I had decided I was going to ask him certain questions so that I was sure of the basics, .. the framework fundamentals of the project. But as I realized that he was busy that day, and would call for 'project discussion' from the airport, I realized I didn't have enough time. Didn't want to take the risk of not having the answers to the questions, so decided to ask the questions right away, as soon as the conversation started.

Did that. To my surprise, he took it as me not knowing anything about the project!!! He asked me if I knew what 'Ultrasound' was; for crying out loud! He said 'I can't go to such a low level'. That hurt me big time.

Not going to talk much about that incident, because it only brings back bad memories. But as the conversation went on, I hope he realized that I knew something as we discussed about the simulation part. What I got as answers from that phone conversation was only that, I had to send him the papers, he'll look through it, and call me in 1 or 2 days to tell me if it was okay to continue with computer simulations. 

Needless to say, firstly from his thinking that 'I do not know anything', and secondly from his not calling on Monday or Tuesday after the 2nd Sunday call, means that he hasn't gone through the progress mails or the attachment mails that I've sent him so far. Disappointed in him. really! 

Anyway,.. since I got no response from him and had to find out about the mechanical simulation facility availability, went and met up with my internal guide. After a good 15 minutes discussion, we came to a conclusion that, computer simulation was much more controllable, and trustworthy, and moreover, easier, and time-saving compared to the method as suggested by my external guide. Same is the feeling here. As the 3rd Sunday approached, I decided to enroll myself into the Image and video processing workshop in GEC, to get a hang of MATLAB, which I did. For this, I had to miss the 3rd Sunday discussion. I intimated my external guide about it. He didn't reply with the rescheduling date. Thought it might be too nagging of me to reply again asking for a phone discussion appointment. So didn't, hoping he would call me sometime next day or so. Well, no surprises here, he didn't. So, messaged him today this :" Sir, hope you had a look at the paper I mailed you. Should I proceed with the computer simulation work?" To which he replied, "Let us discuss first :)"

I disagree on waiting for his decision to come, I decide on continuing. 

ATB!

Friday, 21 September 2012

Communicating the Doubts to my External Guide

11:07 pm

1) What is the expected input to the project?
2) What is the expected output from the project?
3) The problems with the solution to the data acquisition problem. solution?
4) My suggestion : ASP inverse problem
5) advantages, and paper to be referred.

Don't have an idea about how the conversation regarding first 2 questions will go, but here's my argument to defend my proposal.

3) Are we looking at real life scale replication model of the umbilical or middle cerebral artery flow? 
If so, according to this paper the mean umbilical artery diameter is always less than or equal to 4 mm, and according to this paper mean middle cerebral artery diameter is 0.83 mm around the 32nd gestational week when we usually do the Umbilical Artery or the Middle Cerebral Artery Ultrasound. The most feasible diameter is then Umbilical artery, 4 mm diameter pipe.

According to this, a pulsatile flow pump and a ultrasonic doppler flow meter should be available. According to this catalog the, the flowmeter can support a syringe of a minimum of 177.8 mm. Is it the right paper I should be looking at? I've got no idea. My external guide didn't mention anything about the pump. All he talked about was the the ultrasound doppler flowmeter.
Thus, according to these specifications the ultrasound doppler flowmeter supports pipe with the diameter of minimum 20 mm.

----> So we see that, real life scale replication of even the Umbilical Artery isn't possible!

Thus if we have to do this, we have change the scale of everything. Doesn't that invalidate the entire motive? Solution?

4) Even if the above argument is not convincing enough, I feel the need to propose another model which can simulate the fetal-Placental artery system.

This is a computer simulation based on Inverse Modelling. In inverse modeling, the model is a black box with unknown characteristic values. Given a set of outputs, the task is to identify these unknown characteristic values that produce outputs that match the given output to complete the model.
In our case the simulation output is the velocity profile of the blood or the blood flow. The inversion task is to identify the corresponding parameter values in the fetal-placental artery system to produce that blood flow.

Also, in our case, what affects the fetal-placental blood flow is :
i)   the values of the fetal heart rate,
ii)  the placental resistance
iii) the brain resistances

Based on the information, we can analyze the correlation between fetal heart rate and blood flow in the compensatory fetus.

Now, how do we find these characteristic values? We use the Genetic Algorithm. Genetic algorithm mimics the process of evolution. This is as follows :
i)   Start with a population of randomly generated individuals,
ii)  Find the fitness of all the individuals in this generation,
iii) Select multiple, say 2 individuals from this population with highest level of fitness
iv) Mutate them to form the next generation
v)  Repeat the process till satisfactory level of fitness has been reached.

Applying this to our case, the each characteristic represents the individual in the generation, then we define the fitness level, in terms of how close the values of the simulated output should be to the expected output. And thus we implement the algorithm using various techniques of mutation, or crossover, and repeat the process till the fitness level is reached.

The black box then represents our system.

This has been implemented before, and I have this paper (please refresh to download or view) for help. Additionally, the entire theory is easily available for study. And trustworthy.

Once we have established the characteristics of the system to get certain output, we can give it various input to generate fetal-placental flow with various conditions. This can become the input to another signal processing system which will classify it, and determine which condition exists. This will validate our signal processing system.

Ya? ATB!

Thursday, 20 September 2012

Admitting the Doubt in Feasibility

10:20 am

So, The following are the points at which I'm feeling I have doubts.

1) Simulating the flow: We could used Adaptive signal processing techniques to create the same output that the placenta creates, from Gaussian noise. This paper helps us do that. Gotto study this paper as an alternative to the unnecessary extensive mechanical work on fluidics. But I'm guessing my external guide doesn't trust the signal processing techniques very much, so, I will have to be thorough with the paper before I even suggest him with this alternative. ATB!

2) Diameter of the pipe: The pipe that emulates the umbilical artery must be around 1.5 to 2 mm in diameter, whereas the one that emulates the middle cerebral can be around 3.5 mm in diameter, according to information I found on Google. Thus, based on the size constraints, emulating the middle cerebral artery is the better solution of the two. But that still is very small a size to simulate a pulsatile flow in.

3) Pulsatile flow pump: The only one pump that I found on the net was this. I'm not sure if this is the right one. Because this one is not for research purposes, it looks like it is for industrial, I mean practical use by the doctors during surgeries or so. Other articles I found were all papers which showed how to create a computer controlled flow pumps for pulsatile flow simulations. Asking my internal guide, then the HOD, and then the action plan decision is the agenda for next week.

4) Doppler / Ultrasound Flowmeter: In addition to giving me a tension that it is not audio that we are taking in as the imput, this also gives me a tension about are these available in the labs and are they available in the size of 3.5 mm? This Ultrasonic flowmeter manual suggests otherwise!

Overall, I'm still amazed at the minute feasibility percentage that I'm relying upon, and continuing with this project!

ATB!

Monday, 17 September 2012

No Go with a Confused Head

10:46 am

What did start out with ? What am I doing? What will this take me to? 

My Project Title as I have submitted to the Goa University is "Analysis of audio output of Ultrasound Doppler for Diagnostic Applications using Signal Processing Techniques". Now, I'll just try to breakdown the title and see if I see all of those things being accomplished in sight. I'll start with, 

Signal Processing Techniques : Yes, as far as I can see, I'll have to do this by myself, no problem, but looks like that's the only part that is going to be actually related to my branch of communication. Now what is the input to this signal processing system, and what is its expected output?

Expected input: Audio signal from patient
Problem: Too many variants, needs detailed observation, might lose focus on necessary data in trying to maintain stable conditions to take observations in.
Solution: Simulate the blood flow and measure the data. Thus stable and known operating conditions and flow, open for verification.
Problem: The output from the simulated system isn't audio, instead, it is the velocity of flow.
Need solution for this!

Expected output: A classification eg, normal, abnormal, or output giving specific condition. It is plane useless if the output gives a velocity profile. Because that an ultrasound machine can do!

Here's what I'm thinking pictorially : 

The Expect Project Flow :









The Actual Project Flow that it has turned out to be :









What I need is a block that will bridge the gap between these two different input blocks, which looks something like this : 


This is a very very important paper which lets me add that second block, and it's the only only solution to the problem in sight to me! Otherwise, just gotta follow what my External Guide says!

A Promising Discussion with my External Guide and Some Concerns



12:35 pm

Yesterday, my External Guide replied to the mail I had sent him, stating the problems that I'm having primarily based on Data Acquisition. In his reply, he wished to have a discussion regarding the project over the telephone.

In the discussion, we spoke about the following:

1. Problems with Data Acquisition directly from the patient
2. Solution to the problem using laboratory simulations of the patient.
3. An outline of the laboratory procedure
4. Availability of the necessary Laboratory Equipment
5. Planned timeline


Problems with Data Acquisition directly from the patient 


  • If we collect data from an ultrasound machine from patients, there are a lot of variables. The patients could be having various types of diseases. Analysis would be influenced by the disease conditions that the patients have. Thus, validation of signal processing will become very tough. Anyone could challenge the reliability on the outcome of the processed signal. 
  • Also, it is very common that, in a patient, during observation, a blood vessel suddenly changes its diameter or the baby itself moves within the within the womb, as a result of which getting steady readings is highly impossible. Also, the velocities the doctors get in the morning are completely different from what they get in the evening. Many a times readings diagnosed as abnormal in the morning, may be normal in the evening with the same patient. So, taking steady readings requires a very detailed kind of an examination, on patients. 
  • Also limited by, regulatory requirements of taking patient's consent, unnecessarily delay. 
  • Analysis would be influenced also by the amount of data we collect. 
  • Before going to the patients , it is always a good idea to do the lab test. 
  • In the lab we can have simulated conditions, and thus, actually compare the signal processing techniques with a simulated flow that we simulate. Therefore you will have a greater confidence in saying that the applied processing techniques, and the results that are being obtained from those techniques, are actually matching. This becomes the proof. 
  • Additionally, there are many other parameters which are not being measured in a doppler study. For example Doppler signal is a map of fluid velocities at different times. As the fluid velocities change, the doppler signal also changes. But, it is very difficult to analyse, from just knowing the fluid velocities, what the pressure changes are present in the vessels, due to which the fluid velocities change. But if we have a simulated flow, then you can actually measure them.
  • Then we will be able to arrive at some kind of a relation, between the doppler signal and pressure measurement or the pressure distance between different of the pipe which is emulating the artery. 
  • In this way, if we can identify more parameters than just the flows, using the flow signal itself then we can extrapolate the knowledge of changing flows, and map the causes to probably the pressure difference, may be the vascular resistance, or may be the diameter of the vessel or suddenly changes. 
  • This is the reason why we decide to keep the patient studies for a later stage in the project. 

An Outline of the Laboratory Procedure 


  • We need to collect some form of a data of flowing fluid, analyze that data, and from that data analysis we are trying to characterize, the flow.
  • Thus, we need a laboratory set up, where you can actually have flowing fluid. To collect or read the data we’ll need an ultrasound, or a doppler flowmeter. 
  • To emulate the flow in a lab, we need to make the setup in such a way, that, it resembles the actual physiological pulsatile flow in an artery. We can have various physiological scenarios that we could simulate on such a model, and thus the working conditions would be in our control, that is, we’ll have a control environment. 
  • We could change the scenarios based on different values of flow rates, pressure differences between the two ends of the pipe, and pulsatile magnitude. 
  • Now, if we acquire the signal using the flowmeter, and apply the signal processing techniques, we can actually validate your technique, because, we are having a control environment. 
  • This would give us a very good understanding of the flows within the vessels and so on. 
  • Thus, this point can become a very good validation point. and we can always very well defend a thesis that we can validate. 

The Availability of Necessary Laboratory Equipment 

  • We could design the experiment and the setup necessary, but the equipment required has to be available. 
  • Also, it becomes altogether simpler if the particular laboratory technician is able to help out with setting up of the experiment. 
  • The second chapter of the thesis should be on these you know setting up the lab simulating lab. eg, is it the umbilical artery flow that we are trying to simulate or the middle cerebral artery flow? Accordingly the pulsatality could be kept at 72 beats per minute or 140 beats per minute. As such, what all are the configurations possible? etc. 
  • Need a flowmeter which will suffice to our conditions, so need to select a flowmeter with a suitable specification. 
  • We need to prove it that the the experimental setup, is the best possible that we could have for the specified simulation conditions. 

Planned Timeline 

  • The Data Acquisition stage normally takes around 2 months. 
  • In the 3rd month, may be by December, we should be able to acquire the data and perform the first set of simulated experiments. 



My concerns:


1. Do we have the facilities available here in Goa College of Engineering? Like in the departments eg, Mechanical department..? Or will I have to go to IIT Bombay? Is that possible?
2. Does the project still remain based on audio Doppler,.. since that is included in the name of the project.

Saturday, 15 September 2012

A Ray of Hope

02:00 am 16th September

He replied!! My external guide, replied to my mail..! Although there wasn't much content, it at least consisted of a promise. Expecting a call from him tomorrow sometime. Have studied the workflow, made the report and sent it to him. Now its my turn to ask questions.

1. No literature available on the internet nor with any doctor regarding diagnosis based on audio doppler. Any resource?

2. The diagnosis of the audio will change as the gestational age increases. What gestational age data should be collected and analysed for training of the neural system?

3. The audio output port doesn't exist for a normal ultrasound machine, how to acquire data? Options are:
a) Buy a Digital Voice Recorder, b) Buy a Doppler Hand-Held Machine.

Then gotta brief him about my plan of using Wavelet Transform and Neural Networks for initial classification.

ATB!