biological tissue testing final senior design report
TRANSCRIPT
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 1/118
MECH 486 – Senior Design Final Report
Biological Tissue Testing Apparatus
Broughton, [email protected]
Burke, [email protected]
Schuldt, [email protected]
Advisor: Dr. Christian Puttlitz
April 28, 2011
Spring Semester
Department of Mechanical Engineering
Colorado State University
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 2/118
1
Tableof Contents1.0) Introduction ........................................................................................................................... 2
1.1) Soft Tissue ........................................................................................................................... 2 1.2) Methods of Image Capture .................................................................................................. 2 1.3) Validation ............................................................................................................................ 3 1.4) Goals and Constraints .......................................................................................................... 3
2.0) Planning .................................................................................................................................. 4 3.0) Design ...................................................................................................................................... 4
3.1) Overview of Mechanical Design ......................................................................................... 4 3.1.a) Conceptual and Final Design of the Apparatus ................................................................ 4 3.1.b) Manufacturing .................................................................................................................. 5 3.2) Overview of Mechatronics Needs and Requirements ......................................................... 5 3.2.a) Sensor Product Selection .................................................................................................. 6
3.2.a.i) Data Acquisition System ............................................................................................ 6 3.2.a.ii) Displacement ............................................................................................................. 6 3.2.a.iii) Load .......................................................................................................................... 7 3.2.a.iv) Temperature .............................................................................................................. 8
3.2.b) Output and Actuation Product Selection .......................................................................... 8 3.2.b.i) Actuation .................................................................................................................... 8 3.2.b.ii) Heater ........................................................................................................................ 9 3.2.b.iii) Synchronization Indicator ........................................................................................ 9
3.2.c) Additional Electronic Component Selection .................................................................. 10 3.2.c.i) Load Cell Amplifier .................................................................................................. 10 3.2.c.ii) Thermocouple Signal Conditioning ......................................................................... 10
3.2.d) Software .......................................................................................................................... 11 3.3) Development of design specifications for the Digital Image Correlation Algorithm ....... 11 3.3.a) Design Concept Development ........................................................................................ 11 3.3.b) Selection of Language .................................................................................................... 12 3.3.c) Development Process ...................................................................................................... 13
4.0) Impact Statement ................................................................................................................. 13 5.0) Conclusion ............................................................................................................................ 14 6.0) Recommendations ................................................................................................................ 15 7.0) References ............................................................................................................................ 17 8.0) Appendices ........................................................................................................................... 19
8.1) Appendix A: Mecanical ..................................................................................................... 19 8.2) Appendix B: Mechatronics ................................................................................................ 60 8.3) Appendix C: Analysis ...................................................................................................... 105
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 3/118
2
1.0) Introduction
The objective of this project was to design, manufacture, and validate a mechanical apparatusthat is capable of testing soft tissue samples of various dimensions under physiologicconditions. This apparatus works in concert with an image capture system and associatedalgorithm that is capable of generating a global strain map (and determining local strain values)using digital image correlation protocol.
Digital image correlation (DIC) is a relatively novel displacement measurement technique thatquantifies the highly inhomogeneous (finite) deformation behavior of materials.
9This technique
tracks the movement of naturally occurring or artificial markers through a sequence of digitalimages taken as a material is progressively deformed.
7
1.1) Soft Tissue
Soft tissues connect, support, or surround structures and organs of the body. They have the potential to undergo large deformations and still return to their initial configuration whenunloaded.6 Soft tissue also exhibits viscoelasticity, incompressibility, and inhomogeneous
mechanical behavior.15
Two examples of soft tissues are tendons and ligaments. These two types of soft tissue play asignificant role in musculoskeletal biomechanics. The function of tendons is to connect muscle to bone. Tendons must be compliant to facilitate movement of the body while at the same timeremaining strong to prevent damage to the muscle tissues.15 Ligaments connect bone to bone andare stiffer than tendons. Tendons and ligaments are made primarily of collagen. The collagenlimits the deformation and protects the tissues from injury. The orientation of the collagen fibersdetermines many of the tissues anisotropic mechanical properties. Both tendons and ligamentsare subjected to tensile loads and have relatively similar tensile strength.12 The thickest andstrongest tendon in the human body is the Achilles tendon. One study found the average ultimate
tensile strength of the human Achilles tendon to be 1189 N.17 Tendons and ligaments representan important area of orthopedic treatment. Understanding the physical properties of these tissueswill facilitate a better understanding of their functions in the human body.
1.2) Methods of Image Capture
A common procedure used in digital imaging correlation is to speckle, or texture, the surface of the material. The speckle provides a unique surface that can be divided into regions. Since eachregion of the image is unique, it can be located by a computer algorithm in digitized images.4 This provides a tremendous increase in the amount of displacements that can be measured.Different types of speckle can be applied. Black or white spray paint is often used to produce thespeckle pattern.4,6 The sample can also be dusted with carbon particles.6
Not all materials are suited for the application of speckle. Tissue is an example of such amaterial. The surface texture of the tissue may be enhanced for digital imagining analysis usinghigh contrast dye.
10However, this particular technique has certain disadvantages. During
loading, the dyed surface markers tend to deform and rotate into irregular shapes that are difficultto analyze. Over time the dye may also bleed into surrounding tissue, which causes problemswhen trying to calculate displacements.
10
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 4/118
3
1.3) Validation
In order to determine if the DIC algorithm is actually finding the associated strain in the material,a process of validation must be performed. The methods of validation basically fall into twocamps: markers, or testing isotropic materials of known properties. Which method is chosencomes down to the purpose of the study. Markers are a common validation method used when
DIC is used in biological applications.
1.4) Goals and Constraints
1. Goals: a. Be able to accurately measure local strain in a soft tissue sample b. Design and manufacture the physical testing apparatus
i. Use material that will resist corrosionii. Design with an appropriate safety factor for mechanical components that
are susceptible to fatigue and failureiii. Generate Pro/Engineer and FEA images of apparatus design
c. Have an easy and user friendly control interface for the apparatus
i. Control the testing apparatus via computer with means for automatic dataacquisition and synchronization
ii. Create analysis software package that can processes the data resultingfrom testing
2. Constraints: a. Physical Device
i. Must feature an environmental chamber in which the sample stayssubmerged in physiologic saline during testing
ii. Support testing of samples that range in dimensions from0.125”x0.125”x0.125” to 6”x6”x6”
iii. Applies compressive or tensile forces up to 1000lbf iv. The environmental chamber must be removablev. Provide a means to heat the environmental chamber above room
temperature to a target temperature in the range of 30 to 40 degreesCelsius and maintain the temperature within ±1 degree Celsius from thetarget temperature
b. Control Softwarei. Measure temperature in the environmental chamber to an accuracy of 0.3
degrees Celsius using control feedback.ii. Measure linear displacement of the sample during testing to an accuracy
of 0.05 mm using control feedback.
iii. Measure force applied to the sample during testing to an accuracy of 0.1lbsiv. Output raw data files packaged for use with the analysis software
c. Analysis Softwarei. Calculate strain values to within one standard deviation of measured
valuesii. Be able to operate effectively on images with 1% noise as determined by
deviation from solid tone
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 5/118
4
2.0) Planning
As with every stage in this project, the critical paths were broken down into three main tasks:mechanical design, mechatronics, and analysis. There were times in which the three could be progressed independently, but for the most part it was sequential with mechanics needing to becompleted before mechatronics could really begin. The analysis portion started with samplesfrom other testing apparatuses, but then needed to be evaluated on the actual device to ensurethat everything still worked in the change of environments.
Since the mechanics were the forefront of the critical path, extra emphasis was placed on gettingthe necessary parts ordered. All of the parts required to begin construction were ordered beforethe end of 2010 and many of them arrived in time to have machining begin over winter break.There were many parts of our design that needed to be produced on the CNC, so it was beneficialto be able to have this done during the lull in the MIL over this break. Once construction wascompleted, the bulk of the mechatronics portion was able to begin. Once the mechatronics portion was finished, the remaining months were spent testing and validating the device.
The apparatus and associated imaging hardware was presented at E-Days. In order to show off
the capabilities of the device, an ovine Achilles tendon was tested. The device and postersdescribing the salient features of the device were displayed. The apparatus was fully constructedand verified through experimental testing. The imaging algorithm was coded, tested, and fullyvalidated to within acceptable error.
3.0) Design
In order to accurately characterize the mechanical behavior of tendons and ligaments, theapparatus that was built for this project had to take certain design characteristics intoconsideration. To ensure a successful apparatus was produced, the project was divided into threeseparate categories and assignments were performed by individual members of the group. Thesecategories were mechanical design, mechatronics, and algorithm development.
3.1) Overview of Mechanical Design
There were several important factors to consider when designing the apparatus. When humantissue samples are involved, the device needs to be cleaned with chlorine bleach followingsubsequent testing. The apparatus was manufactured out of components made of corrosionresistant, electrochemically similar metals to help prevent corrosion and prolong the lifetime of the device. Stainless steel was chosen as the main engineering material to use. When budget or manufacturing abilities did not allow for stainless steel, anodized aluminum was used instead.
In order to accurately determine the physical properties of soft tissue, the biological environmentin which these tissues typically operate needed to be replicated. An environmental chamber filled
with a saline solution and heated to body temperature provides the necessary conditions in whichthe soft tissues function.
3.1.a) Conceptual and Final Design of the Apparatus
Several different design concepts were considered. A one column, MTS style, concept waseventually selected for the final design (See Appendix A.1). This type of design allowed for the project criteria to be met and limited the amount of material that needed to be purchased, thussaving manufacture time and money. Since a stepper motor was supplied to the group by the
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 6/118
5
OBRL, a lead screw was selected as a means to provide linear motion to a cantilever arm. Thearm was further supported by two precision shafts and plane linear bearings that preventedrotation (See Appendix A.5 for Pro/Engineer images). This ensured that only uniaxial tensile andcompressive forces would be applied to the tissue samples being tested.
Design analysis was performed to ensure that the device met appropriate safety factor requirements and to predict possible failures (See Appendix A.2). Since the force applied to thetissue produced an eccentric load on the device, a major design aspect considered was the possibility of bending and buckling of the apparatus arm and column. Using a safety factor of 10,the appropriate dimensions and materials were selected (See Appendix A.4). Calculations werealso performed to determine the amount of torque needed to apply a load of 1000lbf.
The biological environmental chamber was chosen to be manufactured out of acrylic. Thisallowed the user of the apparatus to view the tissue samples during testing. The chamber isattached to the base of the device by means of an XY table. This table allows the samples to self-align during testing, thus preventing off axis loads which would produce inaccurate data.
Once all the initial design steps were completed, a parts list was generated (See Appendix A.3),and a computer model of the apparatus was produced using Pro/Engineer. Parts were ordered inlate November to allow sufficient time to manufacture the device.
3.1.b) Manufacturing
Manufacturing of the apparatus occurred during the months of December and January. Severaldifferent manufacturing techniques were implemented. Many of the complex parts that wouldhave been difficult to machine by hand were machined on the CNC. This allowed for moreaccurate tolerances and provided easy assembly. With the aid of design drawings (See AppendixA.6), all other parts were machined using vertical milling machines, saws, and finishingequipment located in the MIL at CSU.
3.2) Overview of Mechatronics Needs and Requirements
The mechatronic portion of the project proved to be a lengthy process with equal portionscomponent research and component implementation/programming. The first major task was todetermine the needs of the mechatronic system. While brainstorming ideas for the physicalsample-loading device, the issue of data acquisition needs became apparent.
For inputs, the primary sensing needs were measuring the location of the loading arm, measuringthe magnitude of the load applied, and measuring the temperature of the fluid in theenvironmental chamber. The displacement and the load measurements were clearly the mostcritical insofar as a testing platform would, at minimum, require these measurements. The
temperature was also important but to a lesser degree as the sample would need to be tested innear physiologic conditions in order to accurately replicate the response of the tissue in its nativeenvironment. These sensing needs led to the generation of constraints and criteria related to thesensing portion of the project. For the displacement, over a period of time, it was determined thata stroke length of 4in (10cm) would suffice with a resolution of 0.05mm. For the load, themaximum applied load would be 1000lbf (~4450N) at a measurement resolution of 1lbf (4.45N).The temperature needed to be measured to 0.3C. Also, each of these sensor inputs required amethod to record and store the data alongside the corresponding relative time values.
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 7/118
6
For outputs, it was determined that there was a need to have means to actuate the loading devicethat could be controlled both manually and set up to run controlled motion paths. The basicmotion paths were constant rates of displacement, sine and cosine position waves, and trapezoid position waves. The environmental chamber required a method of heating the fluid contents.
Lastly, the data being recorded by the data acquisition means needed to be synchronized to theimages being recorded. This would allow for sample conditions to be matched to thecorresponding images during analysis.
The next step of the process was to translate these rough requirements into specific componentsand vendors that could deliver the needed parts at reasonable cost and lead times.
3.2.a) Sensor Product Selection
Initial product selection was a lengthy process that was concluded near the end of November.Primarily, this entailed comparing various methods of measurement for each of the real-worldconditions, determining product availability for each method, and determining potential cost andlead times. Secondarily, additional components required to condition the signals needed to bedetermined.
3.2.a.i) Data Acquisition System
The first need was the data acquisition system. A series of National Instruments DAQ cards werecompared with key features being the resolutions of the analog-to-digital convertors and themaximum sampling rates. From the specifications generated, three differential analog channelsand two digital outs were needed at a minimum. Fortunately, this was not a major hindrance because all of the options compared could meet these requirements.
Upon further discussion, the OBRL was able to loan the team a DAQ card that met or exceededthe requirements. The model was the National Instruments USB-6210 with a 16bit analog-to-
digital convertor and a 250 kSamples/s maximum sampling rate1. These parameters proved to besufficient and without internal buffer restrictions because a typical sampling rate to be usedwould be ~6kS/s (this rate resulting from 3 analog channel inputs at a rate of 2kHz with amoving average reduction factor of 2 to yield the desired maximum 1kHz data frequency). In atypical quasi-static loading scenario in which the test lasts several minutes, a rate of 60Hz would be sufficient according to similar test protocols used in the past. (See Appendix B.1.i for detailedDAQ specifications)
3.2.a.ii) Displacement
The primary need was to measure the physical location of the loading arm relative to the starting position. This could be accomplished either by a relative measurement system or by an absolute
measurement system. A linear encoder was an example of an idea for a relative positionmeasurement. It would truly be measuring displacement of the sample from a referenced starting point. A difficulty with this style of measurement was the nature of such relative measurements.It was true that for the testing this would be adequate, but the experimenter would not know theabsolute starting location of the loading arm. There would be no easy way to shut down actuationat a soft stop without additional limit switches. Furthermore, there would be no way to predict if a motion path to be run would be stopped because of reaching other device limits.
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 8/118
7
This moved the direction of discussion to absolute position measurement methods. The twomajor ideas presented were linear variable differential transformers (LVDT) and laser-based position methods. In simple terms, the LVDT tracks the absolute position of a piston using the phases of the transformers contained within the cylinder. The laser displacement method, asidefrom considerable cost, uses a laser unit to track the movement of an object relative to the laser
housing. Both methods presented potential challenges. First, the LVDT would have to integrateto the device. The piston would have to be physically connected to the arm so that movement of the arm would directly translate the piston. The laser method would not have to be internal to thedevice, but would require a large gap between the laser housing and the nearest position of thearm. This would have forced unnecessary space to be included in the design to accommodate therequired gap.
Nonetheless, a main deciding factor was cost. An LVDT was approximately $1200 while thelaser-based method started at $2300 for an analog system and upwards of $8000 for a digitalsystem. The LVDT was the less expensive of the two methods and the design could be altered toaccommodate the cylinder and piston requirements. In terms of resolution, because the LVDT
makes use of transformers which are inherently analog, the resolution is only limited by the noiseexperienced on the signal line and the bit resolution of the analog-to-digital convertor.
Several companies were compared for LVDTs, although Honeywell quickly rose to the top of the list. Other companies under consideration were Macro Sensors and Sentec. The OBRL hadgreat success with the quality of the products offered by Honeywell (Sensotec) in the past.Honeywell offered a captive-guided LVDT with integrated signal conditioning which met therequirements. The movement of the captive-guided piston featured smoother and more stablemotion because of an additional collar that was not present on unguided models. After comparing several models, a captive-guided model, the JEC-C AY323 HR, was selected. Thismodel would output -5VDC to 5VDC over a stroke length of -2in to 2in
16.
As related to the resolution, for a four inch total stroke length, the minimum number of bits of the analog-to-digital converter to yield the resolution of 0.05mm was 11. The NI USB-6210contained a 16bit A-to-D convertor so the resolution obtained surpassed the requirement. (SeeAppendix B.1.ii for detailed LVDT specifications)
3.2.a.iii) Load
Measuring the load was the next main measurement need. There were many options for measuring load although load cells dominated the market. A load cell uses multiple strain gaugesfixed to a precisely machined loading beam. Thus, when the load cell experiences a force, the beam deflects in a predetermined manner and the deflection can be converted into thecorresponding stress. The signals from the strain gauges are combined and output to the signal
lines. Depending on the excitation voltage, the output voltage range is affected. This became animportant concern when determining the resolution.
Several load cell options were compared, including those with different geometries. After considering the options, a dual-stud style load cell was selection. This embodiment features a beam structure internal to a metal cylinder with threaded studs exiting from either end. Theseload cells were available in small- to mid-level load ranges. This style offered flexibility of beingable to swap load cells for greater sensitivity if needed. Also, because of the closed structure they
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 9/118
8
were less likely to be affected by slight amounts of moisture. Additionally, the small size of thisstyle load cell allowed for placement inside of the loading arm. Again, Honeywell was the topvender and both the load cell and the LVDT could be bundled into one order.
The exact load cell ordered was the Series 31 AL311 DL. The load range was 2000lbf and
therefore would accommodate the maximum load of 1000lbf required without risk of permanentdamage and deformation14. The output signal was on the order of 2.0mV/V where the output wasinfluenced by the excitation voltage. By using a 5VDC power source the range of the voltagewould be roughly -10mV to 10mV over the -2000lbf to 2000lbf range. With such a small rangeof voltage, and the minimum voltage range sensitivity of the NI USB-6210 of 4.8μV, the loadresolution would be approximately 0.96lbs. Because of this variability, issues of amplification became a concern. Ultimately, the signal was amplified using an instrumentation amplifier with again of 200. The load cell was then calibrated post-amplification. (See Appendix B.1.iii for detailed load cell specifications and Appendix B.6 for detailed load cell calibration)
3.2.a.iv) Temperature
According to experiment protocols already in place, the temperature of the fluid (typically saline)surrounding the sample needed to be measured. Because of the preconditioning procedures, asample would have time to equilibrate with the surrounding fluid temperature. To measure thetemperature of the fluid, again several options were compared.
At first, a K-type thermocouple was purchased and conditioned with an AD595AQ IC withadditional trim circuitry18,19. However, significant noise errors perhaps attributed to crosschannel interference in the DAQ card, rendered the thermocouple measurements useless for LVDT signal value greater than 0VDC. Because of this error, a new method had to beconsidered. For the second attempt, a positive temperature correlation thermisor was providedand connected in series with an additional resistor to divide the excitation voltage and allow theDAQ card to effectively read the change in resistance by measuring the change in voltage2.Again, there was some interference, although this time from the heater. This error was overcome by measuring temperature only when the heater was in the off-state. (see Appendix B.7 for thethermistor calibration)
Additionally, the thermisor had a hermetically sealed tip which allows for easy cleaning, lower risk of contamination, and prevention of corrosive effects on the resistive element.
3.2.b) Output and Actuation Product Selection
The general requirements and needs for outputs were an actuation means, method of synchronizing data with images, and providing heat to the environmental chamber. Of the three,the actuation was by far the most complex and significant.
3.2.b.i) Actuation
In order to apply a load to the sample, a displacement needed to be generated in a controlledfashion. Hydraulic, pneumatic, and electrical means were discussed. One major consideration of the discussion was that the OBRL had a large stepper motor that the team could access. Thischanged the strategy considerably. The prime focus became answering questions of implementation.
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 10/118
9
After detailed investigations of the motor specifications and torque/speed curves, the team madethe determination that this was a viable solution and, if implemented, would result in costsavings over other systems25. However, this solution came with some risk. Because of its usedcondition, there was some doubt as to the operational status. Furthermore, this motor did not provide a factor of safety much greater than one as shown in the torque calculations.
The motor was an MDrive 34 with Motion Control produced by Schneider Electric8. Assuming a75VDC unregulated supply, the torque output was 300 oz-in at a speed of 600rpm which trailedoff to 200 oz-in at 1500rpm
25. The calculated torque needed to apply a load of 1000lbs was 2400
oz-in for raising torque of the power screw (See Appendix A.2 for preliminary torquecalculations). Therefore, a gearbox was needed to increase the torque of the motor by anappropriate amount. Because of the torques shown above, a planetary gearbox with a ratio of 10:1 was selected to increase the torque at the low end to be above the needed torque for 1000lbsof sample loading. While a larger reduction could have been used to increase torque further, thespeed of the arm would be further reduced which would prevent device usage in small dynamicor cyclical loading tests. Therefore, the 10:1 provided a good blend of torque and speed output.
(See Appendix B.1.iv for detailed motor specifications)
The next question became that of powering the motor. To maximize the torque, the requiredelectrical input was 75VDC at 4A max. Also, an unregulated supply could handle the variable pull of the motor coils as the velocity changed better than a regulated supply. Schneider Electricoffered power supplies for their motors in the past but unfortunately discontinued that productline in January of 2010. After some preliminary research, the team contacted the Schneider Electric engineering staff and asked for a power supply recommendation. PowerVolt, a companyalready under consideration, was suggested although Schneider could not guaranteecompatibility. PowerVolt offered a supply with selectable input power taps and output of 75VDC(no load) with a sustainable current of 5A. The product number was BVU-75FU5 and was promptly ordered. Despite compatibility concerns, this power supply worked flawlessly.
3.2.b.ii) Heater
For environmental chambers used in OBRL in the past, saltwater aquarium heaters have beeneffectively used to heat the fluid. This idea was adopted and used in the final design for the newapparatus. The heater ordered was modified to remove the native temperature control. Thisallowed the device to output heat any time it was powered. This way, the temperature from thethermocouple reading could be used determine the state of the heater.
Controlling the heater was accomplished using an AC outlet that was modified to be controlledvia a logic-level gate. In this way, a low current 0 or 5V output from either the DAQ card or aswitch could determine the state of the AC outlet. Whenever the outlet was powered, the heater
would turn on, and whenever the outlet was off the heater would also turn off. This was produced with help from a tutorial from Sparkfun Electronics, in addition to a component listsourced from that same site
24. (See Appendix B.2.v for a detailed circuit diagram)
3.2.b.iii) Synchronization Indicator
The last output was a method of synchronizing the data collected by the DAQ and the imagesrecorded by the underwater video camera. A solution used in the past was an LED that would beilluminated. This LED light would then appear in the images being captured by the camera. The
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 11/118
10
data acquired was marked when the LED was on. This would let the research know post-experiment, which image frames corresponded to which recorded data points. This method wasused in the past and replicated for the new device. A high power LED, a Luxeon II Star Cyan,was sealed in a UHMWPE cylinder so that it could be submerged in the environmental chamber in a convenient location.
The LED circuit featured a dimming potentiometer and could be activated by a high signal sentto the gate of the inline logic-level mosfet. This LED could be used in two separate ways. First,if the DAQ could share resources between data acquisition and data output then the LED could be set to blink at a designated interval with an indicator appearing the generated data with those points corresponding to an ON event. However, if the DAQ resources were limited to a singleapplication (either signal acquisition or generation but not both), then the user could manuallyactivate the LED and an additional analog channel could be used to monitor the state of the LED.This too would allow for an indicator to appear in the generate data set. (See Appendix B.2.iv for a detailed circuit diagram)
3.2.c) Additional Electronic Component Selection
In addition to the major components listed above, there were several other components thatdeserve explanation. (See Appendix B.3 for a detailed parts list of all of the components)
3.2.c.i) Load Cell Amplifier
The load cell, with an output of ~20mV at the full 2000lbf load required amplification. Importantconsiderations for the amplifier were that it needed to be a non-inverting differential amplifier that could accept a signal on the order of the load cell output. Also, a high common-moderejection ratio was required to prevent amplification of noise common to both of the inputterminals. Another useful, but not absolutely necessary feature, was the ability to adjust the gainto generate an ideal output amplitude. With aid from a mechatronics text, an Analog DevicesAD624 instrument amplifier matched the requirements was selected2. The AD624 had discrete
gains that referenced laser-trimmed internal resistors for values ranging between 1 and 1000. Theminimum CMRR was 130dB which proved sufficient.22
The input voltage range included ±12VDC so the amplifier could be powered directly from the power supply without additional transformers or voltage regulators. Lastly, and extremelyimportant, the IC was available as CDIP so that a traditional breadboard could be used for prototyping without need for microsoldering or a reflow oven. (See Appendix B.1.v for detailedAD624 specifications and Appendix B.2.iii for a detailed circuit diagram)
3.2.c.ii) Thermocouple Signal Conditioning
As mentioned, the implementation of the thermocouple included three major challenges: cold-
junction compensation, amplification, and non-linearity compensation. After initial research,several components offered by Analog Devices appeared to combat these issues: the AD595AQ.This chip provided 10mV/C output. With the addition of a trim circuit, the thermocouple outputcould be zeroed appropriated. However, the application of this chip proved to be limited becauseof the interference and noise problems associated with the thermocouple overall. Therefore, thecircuit with this chip was ultimately disregarded. (See Appendix B.1.vi for detailed AD595AQspecifications and Appendix B.2.i for a detailed circuit diagram)
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 12/118
11
3.2.d) Software
Development of the software was a major undertaking. Because the DAQ card was from National Instruments and because of the presumed flexibility and versatility in data acquisitionapplications, Labview was selected to be the primary program language for computer control of the device. Labview proved to be a good selection although it did present many challenges. First,
Labview is set up in a data flow architecture with automatic multiplexing of parallel loops 11. Thisis unconventional because a program in Labview does not naturally operate in a particular sequence like other languages. Instead, designated loop structures must be used to set the order of events. Another challenge was using the graphical programming language. Programs usegraphical subroutines called subVIs to execute tasks, and complex functions are produced bylinking these subVIs. This is radically different than comparable text-based programs. Overall,Labview did in fact make some tasks easier while others became more difficult.
The primary task of the program was to acquire and write data to a measurement file whilesimultaneously sending commands to the motor. Secondary needs were to set up an experiment,set specific motor paths, use feedback from the thermocouple to set the state of the heater, and
control the status of the LED indicator. (See Appendix B.4 for Annotated LabviewProgramming, Appendix B.5 for a comparison of ideal versus experimental waves, andAppendix B.8 for a sample of the program output)
3.3) Development of design specifications for the Digital Image Correlation Algorithm
There were two design specifications developed for the evaluation of the algorithm. The designspecifications for that algorithm were met, although, they were developed without sufficientunderstanding and thus had less applicability than originally indented. There was no direct testgiven to ensure that local strains were being measured effectively. Tests were carried out whichevaluated these local strains using series of dots on the object to determine the local stain whichwas then compared to the strain provided for the algorithm. The design specification concerning
noise was meaningless without a specification for degree of randomization in source material. Noise can be much more damaging when there is insufficient texture. Also, if gross particle sizeis small then the noise looks more like source material than it does when there is extensive particle aggregation. Further mathematical research is needed in this area to determine thenecessary amount of texture in order for small amounts of noise to be of negligible impact. Howsource material texture affects the efficiency and reliability of the algorithm appears to be anunsolved problem of mathematics and may have to be determined experimentally.20
3.3.a) Design Concept Development
Selection of the algorithm was based on the robustness of prior work. There are other algorithmswhich can be utilized5, but time constraints meant that it was important to go with something
which was known to work even if it was slower or less reliable than other options. A lot of papershave been written with the system that was utilized by Dr. Brian Bay and the implementation of that algorithm was relatively straight forward.4 Without optimization this algorithm is slow and itis untested on systems which are undergoing finite deformation. Treating sequential images assub-systems undergoing infinitesimal strain allowed for the assumptions of small deformationsto be met within those sub-systems. Tracking these infinitesimal deformations from image toimage made it possible for the larger finite strains to be found.
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 13/118
12
It is important that the images forming the sub-systems are close enough that there is highcorrelation between matched points. If the images are too different then the correlation factor will be very weak meaning that it is less reliable that the correct point in the secondary image iscorrect. However, it is also important that the images change as areas that are identical in bothimages of the sub-systems will have a very good correlation factor. This means that things like
grips and background will be identified and skew the “best match” data. This effect can also beseen on edges since the slope of an edge over the area of potential match points is veryconsistent. In practice this is easy to avoid as the region of interest is usually the middle of thesample and not the edges. If edge strain is desired then it is important that the operator providesufficient sample space for the correlation algorithm.
Initially, the algorithm in the Bay paper contained an error and there was limited specification beyond how to treat points in the initial and secondary images. This discrepancy was correctedthrough evaluation of additional works. How large the sample space needed to be and how many points could be correlated became a system of trial and error that depended on the amount of texture in the sample material and the number of pixels in the image.3 Since these quantities are
variable it was left as an option for the operator to vary as they see fit. In general it wasdetermined that it was best to leave the operator with as much discretion as possible so that theycan cater the test to what they want. It also gives the operator the tools deal with poor qualityimages. Use of the Bay algorithm is additionally justified by the fact that it includes all of theseoptions for creating the best individual testing environment.
3.3.b) Selection of Language
The initial implementation of the algorithm was in PERL because that was the language withwhich the team was most familiar. However, PERL is slow and ill-suited for the task of imagemanipulation. This first implementation had a running time of 4 hours on a 900x550px image.(see Appendix C.1) The cause of this was the fact that PERL is an interpreted language so eachinstruction in the code required numerous other instructions to be executed on the back end bythe interpreter. The process was further complicated by the fact that PERL does not have nativeimage handling support so additional programs had to be used in conjunction with the algorithmcode. These supplementary programs were not written for all platforms and PERL is notreliability implemented on all platforms so there is no guarantee the code would be able to run onfuture computers. All of these issues were cleared up with the movement of the code to Java.
One of the major advantages of Java is the fact that it is compiled into a binary that is runthrough the Java Virtual Machine (JVM). Being a compiled language means that Java does nothave all of the background instructions to execute and so it is notably faster. The test images thatwere taking 4 hours in PERL only take an hour in the current Java implementation. There areJVMs written for numerous systems ranging from the standard PC architecture to smaller
embedded systems. As long as there is a JVM for a system a Java program will be able to run onthat platform. While there is a small amount of latency added because of the JVM having tohandle the code it is significantly faster to execute code in Java than in PERL. Java also has agiant collection of methods designed to work with images so there was no need for extra programs to work with the images. (see Appendix C.2)
The cross portability issue is why languages like C# and Visual Basic were not selected. Sincethere is a large amount of computational power required it is possible that this will be run on
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 14/118
13
large Linux machines where .NET languages are unreliable and generally unsupported. Graphicsnaturally lend themselves to object oriented languages which would naturally fit C++ or Objective-C. However, the amount of programming overhead in these languages meant that theylacked the rapid implementation characteristics that are beneficial in small scale projects. Java,then, was the best match as it naturally handles garbage collection, is structured in an object
oriented manner, has pre-developed image manipulation libraries, and is compiled. Because of these characteristics it was determined that Java was the best selection for our developmentlanguage.
3.3.c) Development Process
The algorithm was implemented in a series of increasingly complicated revisions. It wasimportant to check the validity of the algorithm at each step so that it would be easier to debug.This revision process resulted in four milestones:
Rev. 1) Code had to be recompiled whenever anything needed to be changed. This revision didnot have the ability to specify the sample size, instead defaulting to the equally spaced distancesurrounding the centers in the original image. While this code worked on very densely texturedimages it proved unreliable on images without sufficient texture.
Rev. 2) This revision added the ability to change the sample size. This drastically increases thecomputational time but provides significantly more reliable positioning of centers in thesecondary image. Additionally, this revision output images with superimposed centers on the primary and secondary images so that the operator could better determine how they need tochange the parameters.
Rev. 3) The largest change in this revision was the ability for the operator to change parameterswithout having to recompile the code. A minor improvement was made to output a color imagefor the secondary image with overlaid centers. Color is beneficial because sometimes it is hard toidentify center location in a black and white image. (see Appendix C.6)
Rev. 4) Images produced by this code have a “heat map” of correlation values of potential center locations to further aid the operator is determining the reliability of the data returned by thealgorithm. (see Appendix C.7)
4.0) Impact Statement
The Biological Tissue Test project has implications far beyond that of senior design. The projectwas completed as part of a research goal to enhance the scientific body of knowledge centeredabout the behavior of biological materials.
Societal: This ongoing research is important for society so as to develop new medicaltechnologies and treatments to improve orthopedic (and other) pathologies. Without predicateresearch into material properties, those scientists and engineers tasked with designing new products could not develop products with enhanced functionality or performance. The ‘new’designs would represent little more than a cosmetic evolution. With new research, on the other hand, the functionality of the human body will be better understood and thus new productdesigns will be able to better operate in the biological environment. The evolution, then,
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 15/118
14
becomes that of function and performance (including safety and efficacy). The Biological TissueTesting platform will be used in these types of research applications and particularly inevaluating the viscoelastic properties of inhomogeneous, anisotropic biomaterials. Specifically,one application is evaluation of spinal function so as to improve FEA models of the spine. Theseimproved models can then be used in designing spinal implants (both anterior and posterior
styles) that aid in the spinal fusion process. Furthermore, mechanical alterations to soft tissuesamples (such as anterior cruciate ligaments) can be evaluated for interdisciplinary, experimentaltreatments such as gene therapies for ligament repairs.
21
Environmental: The nature of the research brings to light several indirect environmentalimpacts. Biological samples, whether human or animal, must be obtained in accordance toethical and regulatory standards. After testing is performed, the disposal of used samples alsomust be performed according to proper biohazard protocols. This is important in ensuring thatthe device and the tests to be performed have a minimal negative impact on the environment.
Safety: The device is to be used to test biological tissues. As such, a significant safety concern is
appropriate protocols for working with biohazard materials. The device was designed to allowfor cleaning with chlorine bleach solutions to prevent the contamination associated especially inhuman cadaver tissue tests. In using the device, standard biohazard procedures are critical tomaintain a safe environment for the technicians. Additionally, because the device is designed toapply significant loads to samples, care must be taken to avoid eye and physical injury duringoperation. To do this, proper safety equipment (such as eye protection) is recommended to beused at all times. Also, care must be taken to avoid placing hands (or other body parts) in themoving portion of the device or in tight spaces especially while the loading arm is in motion.
5.0) Conclusion
The device was designed and built according to the design constraints and goals generated at the
beginning of the academic year. An apparatus manufactured out of stainless steel and anodizedaluminum helps prevent corrosion, thus prolonging the life of the device. The device wasdesigned with consideration given to safety and reliability. A removable environmental chamber was constructed and allows for a variety of sample sizes to be tested. Chamber attachment to anXY table allows vertical self-aligning of samples. A Pro/Engineer model was created and isavailable to future users for reference. The design also allows for future upgrades to be madewithout subsequent machining and manufacturing.
Much has been accomplished in terms of the mechatronics portion of the project especiallyconsidering the starting point: little prior knowledge of sensors and electrical signal processingand no experience with Labview, data acquisition systems, or motor controls. The mechatronics
segment has produced a significant number of challenges although it has provided an outlet for much success and learning.
The vast majority of the mechatronics tasks are complete. The requirements for sensing weredeveloped and translated into numerical constraints. Various methods of collecting, processing,and recording information were researched and employed. Individual sensors and associatedelectrical components were selected, ordered, and implemented.
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 16/118
15
For actuation and outputs, the provided motor was thoroughly investigated to determine theadditional components needed for operation. The major component was a power supply whichwas researched and purchased. The wiring was then completed to connect the power supply to anAC wall outlet and to connect the power supply to the motor.
All electrical circuits were built and contained in a common housing. This provided flexibility of connecting sensors from the device to their separate circuits, and connecting the circuits to thecomputer via the DAQ card.
Software was developed to control the data acquisition and motor motion path. This included asetup window to manually control the device in preparation for an experiment, in addition toinputting the desired motion path. The program also featured a test window that would collectand record data while running the motor in the designated path.
There were two claims that were put forward for the algorithm, namely:
1)
The ability to operate on images containing 1% noise as defined as definition from singletone2) The ability to calculate strains to within one standard deviation of published values.
There were insufficient published values of strain in tendons and none on sheep, so the Louis-Ugbo, Lesson, and Hutton paper on human Achilles tendons was used.
17Based on the
measurements, the average strain of the Achilles was within one standard deviation of the value published in this paper. (see Appendix C.6) While not identical, there is a lot of biomechanicsimilarity between human and sheep. The function of the Achilles tendon in sheep is different, but since the material is the same it is reasonable to accept that the values are comparable.Additional tests were performed utilizing natural and artificial markers to better ascertain thevalidity of the algorithm output. (see Appendix C.3, C.4, and C.5) During this process it wasdiscovered that the underwater camera being used in the current setup lacks the resolution to givea highly detailed strain map.
13The average strain appears to be nearly correct, but at low
resolution single pixel changes can be large strains. Future development will be able to better calculate the strain maps.
The noise claim was evaluated by adding artificial noise and then calculating the strain based onthat image and comparing it to what was calculated on images without the added noise. Therewas no difference found in the strain values of any of the tested images when 1% noise wasadded. (see Appendix C.8) Not only were the strain values the same, but the points of interestwere actually identical. This may be due in part to the random nature of noise. In actual testingscenarios where the incorrect pixel values are the cause of something systematic or interrelated itis unclear if the algorithm will still perform properly. However, based on the criteria put forwardas a measure of success, the algorithm passed this test.
6.0) Recommendations
The apparatus was designed with the intent of upgrading it in the future. Many of the parts areinterchangeable with off the shelf items. For example, the current XY table is manufactured from plane linear bearing blocks and anodized aluminum guide rails. The blocks are manually
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 17/118
16
adjustable, which allows a user to adjust the ease at which they slide. Unfortunately, this allowsfor a small degree of compliance when the blocks are completely free to move. They also do not provide the most accurate self-aligning. Upgrading to a XY table that incorporates steel ball bearings instead of plane bearings would help eliminate these issues. However, these types of linear motion systems typically cost much more.
Another part that may be upgraded in the future is the power screw nut. Currently, the nut usedin the device is made out of plastic. A brass nut is also available. Updating to brass would provide a larger load capacity and would help reduce friction. It may also help reduce unknowncompliance issues.
For mechatronics, there is additional work that can be added to increase core functionality.Shielding signal wires would help prevent noise in the data. Upgrading the motor to the triplestack length would provide over 1100 oz-in or torque so that the device can reach 1000lbf. Also,the triple stack version is hot swappable with the current motor. Again, in reference to the motor,enhancements can be made to the feedback controller. Moving from open-loop to closed-loop
feedback would prevent vertical drift and circumvent some of the problems associated withvelocity control. Lastly, is to add more flexibility to the wave generation. This consists of addingadditional waveforms, being able to link multiple waveforms together (e.g. ramp to a position,then apply a cyclical sine wave), or input an arbitrary position curve.
For algorithm programming, using a Fast Fourier Transform and an additional algorithm toidentify spots of interest it is believed that the computational time can be cut down. This has theadded benefit of no longer requiring a center search space input as that is determined by thedisplacement of the points of interest. This approach was developed based upon the work done inthe past decade in the area of voice recognition. This same approach can be seen in “songidentifying” applications like Shazam. A similar method has also been used in particle imagevelocimitry. Since it has been used in such a wide range of projects it is believed that it willwork, however it has not been properly evaluated and should be considered an experimental procedure.
On images of small size there is insufficient pixel density required to get adequate precisionstrain values. (see Appendix C.6) To remedy this problem there are a couple of ways to performsubpixel interpolation.23 One proposed method is by interpolating on the correlation values asthese should be parameterized along lines that provide weaker and stronger matches and thus atany level they should be approaching the best match. (for visual representation of correlationvalues see Appendix C.7) The other is to look at the pixels themselves and interpolatinghalftones to increase the number of virtual pixels in the sample space.
Finally, a GUI needs to be built so that the operator is freed from the command line. This willincrease the ease of use, something which is important when people are working with unfamiliar code. It would also be visually attractive if the GUI also provided a strain map over the image. If prior experimental revisions are successful this last revision may be able to provide these mapsin real-time depending on the computational savings from the other changes.
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 18/118
17
7.0) References
1. "16-Bit, 250 kS/s M Series Multifunction DAQ, Bus-Powered." NI USB-6210. NationalInstruments, 21 Aug. 2006. Web. 15 Oct. 2010.<http://sine.ni.com/nips/cds/print/p/lang/en/nid/203223>.
2. Alciatore, David G., and Michael B. Histand. Introduction to Mechatronics and
Measurement Systems. 3rd ed. Dubuque, IA: Mcgraw-Hill, 2007. Print.
3. Amodio, D., Broggiato, G.B., Campana, F., and Newaz, G.M., “Digital Speckle Correlationfor Strain Measurement by Image Analysis,” Society for Experimental Mechanics, 43 (4),396-402 (2003).
4. Bay, B. K., “Texture Correlation: A Method for the Measurement of Detailed StrainDistributions Within Trabecular Bone,” J. Orthop. Res., 13 (2), 258-267 (1995).
5. Bruck, H.A., McNeill, S.R., Sutton, M.A., Peters, W.H., “Digital image correlation using Newton-Raphson method of partial differential correction,” Experimental Mechanics 29,261-267 (1989).
6. Choi D., Thorpe J.L., Hanna R.B., “Image analysis to measure strain in wood and paper,”Wood Sci Technol 25, 251-262 (1991).
7. Chu, T.C., Ranson, W.E, Sutton, M.A. and Peters, W.H., "Applications of Digital-Image-Correlation Techniques to Experimental Mechanics," Experimental Mechanics, 25, 232-244(1985).
8. Cofaru C, Philips W, and W Van Paepegem, “Evaluation of digital image correlation
techniques using realistic ground truth speckle images,” Measurement Science andTechnology 21, 055102 (2010).
9. "Deformation Mechanics." Wikipedia: The Free Encyclopedia. Wikimedia Foundation, Inc.Retrieved October 2010.
10. Doehring, Todd C., Kahelin, Michael, and Vesely, Ivan, “Direct Measurement of Nonuniform Large Deformations in Soft Tissues During Uniaxial Extension,” Journal of Biomechanical Engineering, 131, (2009).
11. Essick, John. Hands-on Introduction to LabVIEW for Scientists and Engineers . New York:
Oxford University Press, 2009. Print.
12. Fung, Y.C., “Biomechanics: Mechanical Properties of Living Tissues,” 2nd Edition,Springer-Verlag New York, Inc., (1993).
13. Gilchrist, Christopher L., Xia, Jessie Q., Setton, Lori A., and Hsu, Edward W., “High-Resolution Determination of Soft Tissue Deformations Using MRI and First-Order TextureCorrelation,” IEEE Transactions on Medical Imaging, 23 (5), 546-553 (2004).
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 19/118
18
14. "High Range Precision Miniature Load Cell." Model 31 High Data Sheet . Version 1.Honeywell, 20 July 2010. Web. 1 Nov. 2010. <https://measurementsensors.honeywell.com>.
15. Lanir, Y., “Structure-Strength Relations in Mammalian Tendon,” Biophysical Journal, 24,
541-544, (1978).
16. "Long Stroke Displacement Transducer." Model JEC-C DC-DC Datasheet . Version 1.Honeywell, 20 June 2008. Web. 5 Jan. 2010.<https://measurementsensors.honeywell.com/ProductDocuments/Displacement/Model_JEC-C_Datasheet.pdf>.
17. Louis-Ugbo, John, Leeson, Benjamin, and Hutton, William C., “Tensile Properties of FreshHuman Calcaneal (Achilles) Tendons,” Clinical Anatomy, 17, 30-35, (2004).
18. Marcin, Joe. " AN-369 Application Note. Version A. Analog Devices, 23 July 1998. Web. 30
Jan. 2011. <www.analog.com/static/imported-files/application_notes/34661261AN369.pdf>.
19. "Monolithic Thermocouple Amplifiers with Cold Junction Compensation." AD594/AD595
Datasheet . Version C. Analog Devices, 30 Nov. 1999. Web. 30 Jan. 2011.<www.analog.com/static/imported-files/data_sheets/AD594_595.pdf>.
20. Pan, Bing, Lu, Zixing, and Xie, Huimin, “Mean intensity gradient: An effective global parameter for quality assessment of the speckle patterns used in digital image correlation,”Optics and Lasers in Engineering 48, 469-477, (2010).
21. Pascher, Arnulf, Steinert, Andre F., Palmer, Glyn D., Betz, Oliver, Gouze, Jean-Noel, Gouze,Elvire, Pilapil, Carmencita, Ghivizzani, Stephen C., Evans, Christopher H., and Murray,Martha M., “Enhanced Repair of the Anterior Cruciate Ligament by in Situ Gene Transfer:Evaluation in an in Vitro Model,” Molecular Therapy, 10 (2), 327-336, (2004).
22. "Precision Instrumentation Amplifier." AD624 Datasheet . Version C. Analog Devices, 25May 2001. Web. 29 Jan. 2011. <www.analog.com/static/imported-files/data_sheets/AD624.pdf>.
23. Qi Tian, Michael N. Huhns, “Algorithms for subpixel registration”, Computer Vision,Graphics, and Image Processing, Volume 35, Issue 2, 220-233(1986).
24. Seidle, Nathan. "Controllable Power Outlet." Controlling Big, Mean, Devices. SparkFunElectronics, 12 Dec. 2008. Web. 6 Nov. 2010. <http://www.sparkfun.com/tutorials/119>.
25. "Stepper Motors with Integrated Electronics." MDrive 34 Datasheet . Version 071610.Schneider Electric Motion, 14 Oct. 2010. Web. 28 Oct. 2010.<http:http://www.imshome.com/downloads/datasheets/MDI34Plus.pdf>.
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 20/118
19
8.0) Appendices8.1) Appendix A: Mechanical
Appendix A.1 Conceptual Design
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 21/118
20
Appendix A.2 Design Analysis
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 22/118
21
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 23/118
22
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 24/118
23
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 25/118
24
Appendix A.3 Parts List
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 26/118
25
Appendix A.4 Material Properties
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 27/118
26
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 28/118
27
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 29/118
28
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 30/118
29
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 31/118
30
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 32/118
31
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 33/118
32
Appendix A.5 Pro/Engineer Images
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 34/118
33
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 35/118
34
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 36/118
35
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 37/118
36
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 38/118
37
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 39/118
38
Appendix A.6 Design Drawings
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 40/118
39
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 41/118
40
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 42/118
41
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 43/118
42
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 44/118
43
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 45/118
44
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 46/118
45
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 47/118
46
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 48/118
47
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 49/118
48
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 50/118
49
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 51/118
50
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 52/118
51
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 53/118
52
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 54/118
53
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 55/118
54
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 56/118
55
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 57/118
56
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 58/118
57
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 59/118
58
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 60/118
59
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 61/118
60
8.2) Appendix B: Mechatronics
Appendix B.1 Product Datasheets
Appendix B.1.i National Instruments USB-6210
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 62/118
61
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 63/118
62
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 64/118
63
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 65/118
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 66/118
65
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 67/118
66
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 68/118
67
Appendix B.1.iii Honeywell Series 31 Load Cell
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 69/118
68
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 70/118
69
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 71/118
70
Appendix B.1.iv MDrive 34 with Motion Control Stepper Motor
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 72/118
71
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 73/118
72
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 74/118
73
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 75/118
74
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 76/118
75
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 77/118
76
Appendix B.1.v Analog Devices AD624 Instrumentation Amplifier
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 78/118
77
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 79/118
78
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 80/118
79
Appendix B.1.vi Analog Devices AD595AQ Thermocouple Conditioner
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 81/118
80
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 82/118
81
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 83/118
82
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 84/118
83
Appendix B.1.vii Application Note AN369: Offsetting and Gain Change Subsection
Below is page 4 of the original document which features the applicable section.
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 85/118
84
Appendix B.2 Circuit Diagrams
Appendix B.2.i Thermocouple with Amplifier
Appendix B.2.ii LVDT
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 86/118
85
Appendix B.2.iii Load Cell with Amplifier
Appendix B.2.iv LED Indicator
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 87/118
86
Appendix B.2.v AC Outlet with Relay Control
Courtesy of Nathan Seidle
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 88/118
87
Appendix B.3 Mechatronics Parts List
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 89/118
88
Appendix B.4 Annotated Labview Front Panel and Block Diagrams
Appendix B.4.i Front Panel Display during Initialization
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 90/118
89
Appendix B.4.ii Front Panel Display during Testing
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 91/118
90
Appendix B.4.iii Block Diagram for Initialization
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 92/118
91
Appendix B.4.iv Wave Generation for Initialization
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 93/118
92
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 94/118
93
Appendix B.4.v Experiment Motor Sequence
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 95/118
94
Appendix B.4.vi Data Collection for Experiment
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 96/118
95
Appendix B.5 Comparison of Experimental Waves vs. Theoretical
Appendix B.5.i Positive Constant Linear Velocity Rates
y = 0.503x + 48.093
52
54
56
58
60
62
64
7.5 12.5 17.5 22.5 27.5 32.5
D i s p l a c e m e n t ( m m )
Time (s)
Constant Rate of +0.5mm/s
y = 3.000x - 4.681
0
10
20
30
40
50
60
70
8 10 12 14 16 18 20 22 24
D i s p l a c e m e n t ( m m )
Time (s)
Constant Rate of +3mm/s
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 97/118
96
y = -0.502x + 64.036
50
52
54
56
58
60
62
64
0 5 10 15 20 25 30
D i s p l a c e m e n t ( m m )
Time (s)
Constant Rate of -0.5mm/s
y = -2.997x + 69.888
0
10
20
30
40
50
60
4 6 8 10 12 14 16
D i s p l a c e m e n t ( m m )
Time (s)
Constant Rate of -3mm/s
Regression
R2 = 0.99
Appendix B.5.ii Negative Constant Linear Velocity Rates
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 98/118
97
Appendix B.5.iii Summary of Constant Rates
Experiment
Number
(#)
Ideal Linear
Velocity
(mm/s)
Experimental
Linear Velocity
(mm/s)
Difference
(mm/s)
Percent
Different
(%)
1 -0.500 -0.502 -0.002 0.400
2 -3.000 -2.997 0.003 -0.1003 0.500 0.502 0.002 0.400
4 3.000 3.000 0.000 0.000
Numerical Comparison of Ideal vs.Experimental Constant Linear Velocities
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 99/118
98
0 1 2 3 4 5 6
- 5
0
5
1 0
1 5
2 0
2 5
3 0
O f f s e t D i s p l a c e m e n t ( m m )
T i m
e ( s )
T r a p e z
o i d W a v e
T h e o r e t i c a l W a v e
E x p e r i m e n t a l W a v e
Appendix B.5.iv Trapezoid Wave
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 100/118
99
- 6 - 4 - 2 0 2 4 6
0
5
1 0
1 5
2 0
2 5
O f f s e t D i s p l a c e m e n t ( m m )
T i m e ( s ) S
i n e W a v e
T h e o r e t i c a l W
a v e
E x p e r i m e n t a l W a v e
Appendix B.5.iv Sine Wave
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 101/118
100
- 1 2
- 1 0 - 8 - 6 - 4 - 2 0 2
0
5
1 0
1 5
2 0
2 5
O f f s e t D i s p l a c e m e n t ( m m )
T i m e ( s )
C o s
i n e W a v e
T h e o r e t i c a l W a v e
E x p e r i m e n t a l W a v e
Appendix B.5.iv Cosine Wave
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 102/118
101
Appendix B.6 Load Cell Calibration
y = 4346.89x + 10.16
‐1500
‐1000
‐500
0
500
1000
1500
‐0.30 ‐0.20 ‐0.10 0.00 0.10 0.20 0.30 L o a d ( N )
Post Amplification Voltage (V)
Experimental Calibration (MTS)
Experimental Full
Linear (Experimental
Full)
y = 4347.20x ‐ 58.61
‐10000
‐8000
‐6000
‐4000
‐2000
0
2000
4000
6000
8000
10000
‐3 ‐2 ‐1 0 1 2 3 L o a d ( N )
Post Amplification Voltage
Factory Calibration
Factory Calibration Full
Linear (Factory Calibration
Full)
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 103/118
102
Load (N) Calibration
Factor (mV/V)
Raw
Voltage (V)
Amp.
Voltage
(V)0.00 0.00 0.00 -0.26
-4448.22 -0.98 -0.51 -518.20
-8896.44 -1.97 -1.02 -1037.82
-4448.22 -0.98 -0.51 -518.99
0.00 0.00 0.00 -0.32
0.00 0.01 0.00 4.28
4448.22 1.01 0.52 534.56
0.00 0.01 0.00 4.38
4448.22 1.01 0.52 534.09
8896.44 2.02 1.05 1067.64
Factory Calibration
Voltage (V) Load (N)
-0.117 -501
-0.233 -1003
0.119 517
0.231 1021
Experimental Calibration
Note: All data generated was based on an
experimental measurement of 5.13V
supply voltage and an instrumentationamplifier gain of 200
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 104/118
103
Appendix B.7 Thermistor Calibration
y = 104.85901x‐ 249.07411
R² = 0.99674
0
10
20
30
40
50
60
70
2.4 2.5 2.6 2.7 2.8 2.9 3
T e m p e r a t u r e ( D e g r e e s C e l s i u s )
Voltage (V)
Thermistor Calibration
Temperature
(ºC)
Voltage
(V)
5.6 2.425
6.8 2.439
9.7 2.45914.3 2.506
17.1 2.538
19.8 2.566
22.6 2.594
25.2 2.623
Experimental Thermistor Calibration Data
Temperature
(ºC)
Voltage
(V)
28.6 2.659
31 2.681
34 2.71035.8 2.728
38.9 2.736
43 2.772
49.2 2.835
58.3 2.929
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 105/118
104
Appendix B.8 Sample of Data Output File
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 106/118
105
8.3) Appendix C: Analysis
Appendix C.1 Perl Algorithm Implementation
#!/usr/bin/perl
use strict;use Image::Imlib2;
my $firstimage = shift;
my $secondimage = shift;
my $spacingx = 27;
my $spacingy = 17;
my $firstimgobj = Image::Imlib2->load($firstimage);
my $secondimgobj = Image::Imlib2->load($secondimage);
my $aimgarray = buildimage($firstimgobj);
my $bimgarray = buildimage($secondimgobj);
print "working : $$aimgarray[1][1] ggg $$bimgarray[1][1]\n";
my $xcenter = int(($firstimgobj->width)/$spacingx);
my $ycenter = int(($firstimgobj->height)/$spacingy);print "xcenter $xcenter ycenter $ycenter\n";
my @firstblock;
for ( my $c=0; $c < $spacingx; $c++){
for ( my $d=0; $d < $spacingy; $d++){
for ( my $x=0; $x < $xcenter; $x++){
for ( my $y=0; $y < $ycenter; $y++){
my $xcorner = $xcenter*$c;
my $ycorner = $ycenter*$d;
$firstblock[$c][$d][$x][$y] = $$aimgarray[$xcorner + $x][$ycorner + $y];
#print "got here\n";
}
}}
}
print "block check $firstblock[0][0][1][1] , $$aimgarray[1][1]\n";
my @newcenters;
for ( my $p=1; $p < $spacingx -1; $p++ ){ #iterate over blocks in x di-
rection
for ( my $q=1; $q < $spacingy-1; $q++ ){ #iterate over blocks in y
direction
my $tempcenterx = int($xcenter/2 + $xcenter*$p);
my $tempcentery = int($ycenter/2 + $ycenter*$q);
my ($bestx, $besty, $bestcountx, $bestcounty);
my $bestc = 10000000000;my $bestcount = 0;
#print "maxx ".(-1)*int($maxmovex/2)." maxy ".int($maxmovex/2)."\n";
for ( my $g = (-20); $g <= 20; $g++ ){ #iterate over poten-
tial centers in x direction
for ( my $h = (-60); $h <= (-10); $h++ ){ #iterate over
potential centers in y direction
#print "got here\n";
my ($num, $den1, $den2, $blockcount);
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 107/118
106
my $sectempcentx = $tempcenterx + $g;
my $sectempcenty = $tempcentery + $h;
#print "x $xcenter y $ycenter\n";
for ( my $x=-20; $x < 20; $x++ ){ #choose all pix-
els in x direction
for ( my $y=-20; $y < 20; $y++ ){ #choose
all pixels in y directionmy $oor = 0;
# if ((($sectempcentx + $x-int
($xcenter/2)) < 0) || (($sectempcentx + $x+int($xcenter/2)) > $first-
imgobj->width)){$oor = 1; print " \n";};
# if ((($sectempcenty + $y-int
($ycenter/2)) < 0) || (($sectempcenty + $y+int($ycenter/2)) > $first-
imgobj->height)){$oor = 1; print " \n";};
# if (!($oor == 1)){ $num += $firstblock
[$p][$q][$x][$y] * $$bimgarray[$sectempcentx + $x - int($xcenter/2)]
[$sectempcenty + $y - int($ycenter/2)];}else{$num += 0;}
# if(!($oor)){
# $den1 += ($firstblock[$p][$q][$x]
[$y])**2;# $den2 += ($$bimgarray
[$sectempcentx + $x -int($xcenter/2)][$sectempcenty + $y -int
($ycenter/2)])**2;
# }else{
# $den2 += 1000**2;
# $den1 += ($firstblock[$p][$q][$x]
[$y])**2;
# }
my $tempvarx = $sectempcentx + $x;
my $tempvary = $sectempcenty + $y;
my $xt = $x + int($xcenter/2);
my $yt = $y + int($ycenter/2);
#if (($g == 0) && ($h == 0)){print "$tempvarx $tempvary $xt $yt $$bim-garray[$sectempcentx + $x][$sectempcenty + $y] $firstblock[$p][$q][$x +
int($xcenter/2)][$y + int($ycenter/2)]\n";}
my $originalval = $firstblock[$p][$q][$x + int($xcenter/2)][$y + int
($ycenter/2)];
my $secondval = $$bimgarray[$sectempcentx + $x][$sectempcenty + $y];
$num += $originalval * ($originalval - (abs($originalval - $secondval)));
$den1 += ($originalval)**2;
$den2 += ($originalval - (abs
($originalval - $secondval)))**2;
if ($firstblock[$p][$q][$x + int($xcenter/2)][$y + int($ycenter/2)] ==
$$bimgarray[$sectempcentx + $x][$sectempcenty + $y])
{
$blockcount++;
}
}
}
my $blockc = 1-($num/($den1*$den2)**0.5);
#print "$g $h block worth $blockc $bestc\n";
if($blockc < $bestc){$bestc = $blockc; $bestx =
$g; $besty = $h;}
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 108/118
107
if($blockcount > $bestcount){$bestcount =
$blockcount; $bestcountx = $g; $bestcounty = $h;}
}
}
$newcenters[$p][$q] = [$bestx+$tempcenterx,
$besty+$tempcentery];
$firstimgobj->set_color(0,255,0,255);$secondimgobj->set_color(0,255,0,255);
my $centx = $tempcenterx + $bestx;
my $centy = $tempcentery + $besty;
$firstimgobj->fill_ellipse($tempcenterx, $tempcentery, 5, 5);
$secondimgobj->fill_ellipse($centx, $centy, 5, 5);
#$secondimgobj->set_color(0,0,255,255);
#$centx = $tempcenterx + $bestcountx;
#$centy = $tempcentery + $bestcounty;
#$secondimgobj->fill_ellipse($centx, $centy, 5, 5);
print "Center ".'['."$p $q".']'." $bestx $besty $bestcountx
$bestcounty\n";
}
}
for ( my $x=1; $x < ($spacingx - 2); $x++){
for ( my $y=1; $y < ($spacingy - 1); $y++){
my $newxlen = ($newcenters[$x+1][$y][0] - $newcenters[$x][$y][0])/
$xcenter;
print "x stretch x $x y $y : $newxlen\n";
}
}
for ( my $x=1; $x < ($spacingx - 1); $x++){
for ( my $y=1; $y < ($spacingy - 2); $y++){
my $newylen = ($newcenters[$x][$y+1][1] - $newcenters[$x][$y][1])/
$ycenter;print "y stretch x $x y $y : $newylen\n";
}
}
$firstimgobj->set_quality(80);
$firstimgobj->save("pic1alt.jpg");
$secondimgobj->set_quality(80);
$secondimgobj->save("pic2alt.jpg");
sub buildimage{
my $img = shift;
my @imagearray;
for ( my $x = 0; $x < ($img->width); $x++ ) {
for ( my $y = 0; $y < ($img->height); $y++ ) {
my($r, $g, $b, $a) = $img->query_pixel($x,$y);
my $gray = int(0.2126 * $r + 0.7152 * $g + 0.0722 * $b);
$imagearray[$x][$y] = $gray;
}
}
return(\@imagearray);
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 109/118
108
import java.awt.event.*;
import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;import javax.imageio.ImageIO;
import java.io.File;
import java.awt.Color;
import java.io.*;
public class toGray2 {
public static void main(String[] args) {
System.out.println("First image: ");
String path = userInput();
System.out.println("Last image: ");
String path1 = userInput();
String str1="out";
String pathn = str1.concat(path);
String pathn1 = str1.concat(path1);
int centersinx = 5;
int centersiny = 17;
int maxmovex = 17;
int maxmovey = 33;
// convert the first image
BufferedImage old_img = null;
try { old_img = ImageIO.read(new File(path));}
catch (Exception e) { e.printStackTrace(); }
BufferedImage new_img = new BufferedImage( old_img.getWidth(),
old_img.getHeight(),
BufferedImage.TYPE_BYTE_GRAY);
BufferedImage out_img = new BufferedImage( old_img.getWidth(),
old_img.getHeight(),
BufferedImage.TYPE_INT_RGB);
Graphics gr3 = out_img.getGraphics();Graphics gr = new_img.getGraphics();
gr.drawImage(old_img, 0, 0, null);
// convert the second image
BufferedImage old_img2 = null;
Appendix C.2 JAVA Algorithm Implementation
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 110/118
109
try { old_img2 = ImageIO.read(new File(path1));}
catch (Exception e) { e.printStackTrace(); }
BufferedImage new_img2 = new BufferedImage( old_img2.getWidth(),
old_img2.getHeight(),
BufferedImage.TYPE_BYTE_GRAY);
Graphics gr2 = new_img2.getGraphics();
gr2.drawImage(old_img2, 0, 0, null);
gr3.drawImage(old_img2, 0, 0, null);
gr3.setColor(Color.green);
gr2.setColor(Color.green);
gr.setColor(Color.green);
/*try {
ImageIO.write(new_img, "jpg", new File(path1));
}
catch (Exception e) { e.printStackTrace(); } */
int n = old_img.getWidth();
int m = old_img.getHeight();
int xspacing = n/(centersinx);
int yspacing = m/(centersiny);
System.out.println("xspacing " + xspacing + " yspacing " + yspacing);
for (int blockrow = 2; blockrow < (centersiny - 3); blockrow++) //
iterate over centers in x
{
for (int blockcol = 1; blockcol < (centersinx - 1);
blockcol++) //interate over centers in y
{int currentcenterx = ((blockcol*xspacing) + (xspacing/2));
int currentcentery = ((blockrow*yspacing) + (yspacing/2));
gr.fillOval(currentcenterx, currentcentery, 4, 4);
System.out.println("Starting position: " + currentcenterx + " " + cur-
rentcentery);
double bestc = 1.0;
int bestx = 0;
int besty = 0;
for (int potcol = (-maxmovex); potcol < maxmovex; ++potcol) //
iterate over potential centers in new image in x
{
for (int potrow = (-maxmovey); potrow < maxmovey; ++potrow) //
interate over potential centers in new image in y
{
long numerator = 0;
long den1 = 0;
long den2 = 0;
for (int pixcol = (-(xspacing/2)-7); pixcol < ((xspacing/2)+7);
++pixcol) //iterate over pixels in new image in x
{
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 111/118
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 112/118
111
try {
ImageIO.write(new_img, "jpg", new File(pathn));
}
catch (Exception e) { e.printStackTrace(); }
try {ImageIO.write(out_img, "jpg", new File(pathn1));
}
catch (Exception e) { e.printStackTrace(); }
}
public static String userInput(){
String inputValue = "";
InputStreamReader input = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(input);
try
{
inputValue = reader.readLine();
}
catch(Exception e){}
return inputValue;
}
}
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 113/118
112
Appendix C.3 Trabecular Bone MTS Test with Algorithm Display
Unstressed Sample
Stressed Sample
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 114/118
113
Appendix C.4 Ovine Shoulder with Virtual Markers Following Ink Markers
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 115/118
114
Appendix C.5 Leather Test utilizing the Biological Tissue Testing Apparatus
Stressed SampleUnstressed Sample
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 116/118
115
Appendix C.6 Ovine Achilles Tendon Test with Biological Tissue
Testing Apparatus
Stressed SampleUnstressed Sample
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 117/118
116
Appendix C.7 Heat Map Overlay showing Relative Validity of Centers of
Interest and Boxes Delineating Best-Case Search Spaces with Padding
8/7/2019 Biological Tissue Testing Final Senior Design Report
http://slidepdf.com/reader/full/biological-tissue-testing-final-senior-design-report 118/118
117
Appendix C.8 Comparison of Best Match Centers under No Noise
and 1% Noise Conditions