Dynamometer Project Data Acquisition Filtering Name: Rauf Tailony Rocket number:R01368594 Supervisor: Prof.Sorin cioc
Dynamometer Project Data Acquisition Filtering
Name: Rauf Tailony Rocket number:R01368594 Supervisor: Prof.Sorin cioc
1. Introduction: Data acquisition is used in this project to give an indication of the engine power by extracting data from a load cell and then convert the load data into torque and power using relevant equations. Data acquisition is a very sensitive part of this project and any project because the more clear the data the more clear the decisions could be made related to the project success. Collecting data is usually a process that uses sensor of different types to collect data for certain parameter in order to compare the result produced by these parameters with the existing ones. Analog sensor reading are usually accompanied with a lot of noise of different types, that could lead to a non clear vision for the parameters that we are trying to answer some questions about, so in order to eliminate any unwanted noise or unwelcomed data its necessary to use filters depending on what kind of data we want present on the output screen. 2. Objective: In this section of the project we are trying to do the following objectives:
1. filtering and fine-‐tuning the data acquisitioned from the sensor ;which is in our case a load cell that measures the force delivered through a beam by the alternator that is connected by a belt with the engine.
2. Comparing the filtered and non filtered force data using graph indicators. 3. Presenting the torque generated using graph indicator after passing the force
data through related equations.
3. Procedure: 3.1 Engine power delivery: engine power is delivered to the alternator through a belt and the alternator varies the load on the engine depending on a lighting system connected to the alternator which is power by a latching button , reflected as a load on the engine which changes engine power produced relating to the load, this load fluctuation leads to a angular force produced by the alternator , and this force in delivered via arm to be applied on the load cell located at the end of the arm, as shown in figure1.
Figure1, connecting arm between Alternator and Load cell 3.2 sensor connection and reading: the used sensor is load cell (omegadyne),Figure 2, and connected in full bridge mode through an NI9949 module as shown in figure 3, and this module is connected via serail port(RJ50) through analog input/output module NI9237,Figure4, and fixed on NI cDAQ-‐9172,Figure 5, and connected to a lab view software of custom design(designed by Rauf Tailony).
Figure 2,Omegadyne load cell
Figure3,NI9949
Figure4,NI9237
Figure5,NI cDAQ-‐9172
3.3 Terminals connection tables and technical information: Load cell-‐NI9949 connections table: Terminal name Load cell colour code NI9949 pin number Signal +(AL+) Green 2 Signal – (AL-‐) White 3 Excitation +(EX+) Red 6 Excitation –(EX-‐) Black 7 *Note: previously the students where converting the wires of AL+ and AL-‐, which was causing the data to be in minus.(fixed) NI9949 – NI9237 connection table: Device Channel NI9949 Single channel NI9237 CH0 * Technical data: Load cell excitation voltage range(3-‐10mv) Used excitation voltage (5mv) Load cell Load range(0-‐20 LB) Arm length (connecting between alternator and load cell) = 6 in 3.4 Filtering and Fine-‐tuning: The filtering procedure we are using is software dependent, which means we didn’t use any physical filters or data conditioning modules, we used the LV express filters in the Block diagram mode ,Figure6, to filter the data extracted from the load cell. We used Butterworth low pass filter with cutoff frequency of 25 HZ, and the order of the filter to be 5, with signals view mode, and the data have been peak limited using
mask and limit testing, and these filtered signals are transferred to graph indicators to be presented to the user,Figure6. Filtered data are sent to spectral measurement tools, to have an idea about what kind of peaks we get from the readings, and sent to a spectral indicator to be read by the user,Figure 7. We adjusted the Butterworth filter , in the sotware to have a slider to control the cutoff frequency in real time mode during the data presentation on the graph indicator,Figure 8, so we give a better control and understanding of the signal form.
Figure6,Block Diagram Mode.
Figure7,Spectrum graph
Figure8,Cutoff frequency Slider
3.5 Lab view Software’s design detailed information: since we are using NI cDaQ-‐9172 as interface between the sensor and the Lab view software, we started the design in the block diagram mode by adding DAQ assistant block, and then passing the data line to subtracter to apply the data offset compensation of 15 lb,after that the data line passed to a low pass analogue filter with cutoff frequency of 10HZ and Butterworth type filter of order 5,and connected a graph indicator on the line to represent the force with time and after that the data line passed to a multiplier with a magnitude of (6in) which is the arm length between the alternator and the load cell in order to calculate the torque(Lb. In) after filtering , and in order to fine-‐tune the data more precisely we passed the data line to a mean(averaging) block to make the signal more smooth, and at last data passed to a data recording block(write to measurement file) to save the data on hard disk depending on user command, all the previously reported blocks are shown in Figure9.
Figure9, Block diagram design.
The graphical user interface mode, is only a representation of the output tools inserted in the block diagram, which contains a force-‐time graph, and Torque-‐time graph, and timer, stop button and cutoff frequency slider and sampling rate,sampling frequency boxes, as shown in figure 10.
Figure10,GUI mode
* Sensor calibration and reset: Since our load cell sensor is a bridge circuit , we need to enter for the lab view software and assign the first two values of calibration provided by the manufacturing company of the load cell, in the load cell we are using we could find some calibration data on the manufacturer’s website(Omegadyne.com), and we can find the place to calibrate the bridge by clicking right on DAQ assistant in block diagram mode and in properties, you will find configure scale,Figure11, and then the table of calibration data,Figure12.
Figure11,DAQ assistant properties window.
Figure12,Configure scale window Note: electrical values are 0.0000 and 0.9668 respectively, and physical values are 0 and 2.5 respectively. Physical sensor calibration: To make sure that the data we are getting in the software are real and there is no error in the reading , we made physical calibration for the sensor side by side with the sensor software calibration. We made the calibration using (0.25,0.65,1.3,5lb) weights , and loading it on the top of the load cell after isolating it from the system and then observing the readings presented on the load graph, and adjusting the subtraction magnitude in order to make the load cell give as much precise data as it is capable of, as described in figures 13,14 respectively. Its worth it to mention that after taking the data on the graph read by the sensor from the previous weights, we found that there is an offset in the factor of (3.39) which we could deal with it by multiplying the data line with this factor before presenting it on the graph, Figure 15.
Figure 13, weights used in calibration.
Figure 14, mounted weight on load cell structure.
Figure15,offset compensation block 3.6 Displaying calculated rpm in the GUI : As it is known , Torque(Lb. IN) has a relation with power(HP) and RPM which is shown the relation below: Torque (lb.in) = 63,025 x Power (HP) / Speed (RPM)……………………….(1) and using this relation allows us to show the calculated engine RPM in the Labview software since the power is known for the engine, but with a limitation that this RPM will be precise only for the engine in the Idle state, but after coupling the engine with the alternator ,it will be very complex to predict the RPM in the calculation torque based method which will give correct data representation only when engine have no load and running on high rpm(>6000rpm) , Figure16.
Figure16,RPM in the GUI mode Before we pass the data line to RPM indicator we passed it to a formula box , which contain the following formula which is number substitution to formula (1) : (63025*0.611)/X1 ………………………….(2)
Torque data Power(HP) Eq.(1) constant We got the power value of 0.611 ,by running the engine on RPM = 7500, and coupling it with the alternator, and Using the ProCal software to get the rpm , we could calculate the real power after coupling using eq.(1), and you can trace the data line passing through the formula block by looking to figure 17.
Figure17,Full block diagram We compared the data we got from our design of labview GUI RPM, with Procal RPM, the results were almost the same in the same running conditions, as indicated in Figure18.
Figure18, Labview RPM VS. Procal
4. Conclusion: Data filtering can enhance the data we extract from the load cell sensor even its not a physical filtering but it could fairly enhance the results to the user in order to give a better understanding of the parameters that we are trying to observe which is in our case the torque and power.
Figure 19, Original Data with noise In the previous graph we are presenting the original data that is extracted in real time directly from the sensor, as you can see in figure 13, the data have a lot of noise which make it hard for the observer to decide of the torque he is getting from the engine is good or bad , and following to that we have pasted the filtered force and torque graphs with time for the engine in the Idle state, so that you can observe the change happened to the data after filtering, and what kind of enhancement made to make the data more stable and readable.
Figure 20, Filtered Data * Mean and averaging: even we have implemented the averaging property to the block diagram as you saw previously, but related to a limitation in the Labview software you can’t present the data of the averaging and mean or RMS as a graph but only as numbers, as presented previously in the GUI screenshot. 5. Recommendations: I would recommend for the coming teams who will work on this project for the software side to use FPGA software to represent more filtered and averaged and stable data that could look more professional for future use of the project, or using matlab since its supporting the graphical representation more than lab view, and also have a lot of resources that could help researcher do a better design than the Labview do.
6. Index: Filter used and related concepts: Butterworth Filter: In applications that use filters to shape the frequency spectrum of a signal such as in communications or control systems, the shape or width of the roll-‐off also called the “transition band”, for a simple first-‐order filter may be too long or wide and so active filters designed with more than one “order” are required. These types of filters are commonly known as “High-‐order” or “nth-‐order” filters. The complexity or Filter Type is defined by the filters “order”, and which is dependant upon the number of reactive components such as capacitors or inductors within its design. We also know that the rate of roll-‐off and therefore the width of the transition band, depends upon the order number of the filter and that for a simple first-‐order filter it has a standard roll-‐off rate of 20dB/decade or 6dB/octave. Then, for a filter that has an nth number order, it will have a subsequent roll-‐off rate of 20n dB/decade or 6n dB/octave. So a first-‐order filter has a roll-‐off rate of 20dB/decade (6dB/octave), a second-‐order filter has a roll-‐off rate of 40dB/decade (12dB/octave), and a fourth-‐order filter has a roll-‐off rate of 80dB/decade (24dB/octave), etc, etc. High-‐order filters, such as third, fourth, and fifth-‐order are usually formed by cascading together single first-‐order and second-‐order filters. For example, two second-‐order low pass filters can be cascaded together to produce a fourth-‐order low pass filter, and so on. Although there is no limit to the order of the filter that can be formed, as the order increases so does its size and cost, also its accuracy declines. Decades and Octaves One final comment about Decades and Octaves. On the frequency scale, a Decade is a tenfold increase (multiply by 10) or tenfold decrease (divide by 10). For example, 2 to 20Hz represents one decade, whereas 50 to 5000Hz represents two decades (50 to 500Hz and then 500 to 5000Hz). An Octave is a doubling (multiply by 2) or halving (divide by 2) of the frequency scale. For example, 10 to 20Hz represents one octave, while 2 to 16Hz is three octaves (2 to 4, 4 to 8 and finally 8 to 16Hz) doubling the frequency each time. Either way, Logarithmic scales are used extensively in the frequency domain to denote a frequency value when working with amplifiers and filters so it is important to understand them.
Logarithmic Frequency Scale
Since the frequency determining resistors are all equal, and as are the frequency determining capacitors, the cut-‐off or corner frequency ( ƒC ) for either a first, second, third or even a fourth-‐order filter must also be equal and is found by using our now old familiar equation:
As with the first and second-‐order filters, the third and fourth-‐order high pass filters are formed by simply interchanging the positions of the frequency determining components (resistors and capacitors) in the equivalent low pass filter. High-‐order filters can be designed by following the procedures we saw previously in the Low Pass and High Pass filter tutorials. However, the overall gain of high-‐order filters is fixed because all the frequency determining components are equal. Filter Approximations So far we have looked at a low and high pass first-‐order filter circuits, their resultant frequency and phase responses. An ideal filter would give us specifications of maximum pass band gain and flatness, minimum stop band attenuation and also a very steep pass band to stop band roll-‐off (the transition band) and it is therefore apparent that a large number of network responses would satisfy these requirements. Not surprisingly then that there are a number of “approximation functions” in linear analogue filter design that use a mathematical approach to best approximate the transfer function we require for the filters design. Such designs are known as Elliptical, Butterworth, Chebyshev, Bessel, Cauer as well as many others. Of these five “classic” linear analogue filter approximation functions only the Butterworth Filter and especially the low pass Butterworth filter design will be considered here as its the most commonly used function. Low Pass Butterworth Filter Design The frequency response of the Butterworth Filter approximation function is also often referred to as “maximally flat” (no ripples) response because the pass band is designed to have a frequency response which is as flat as mathematically possible from 0Hz (DC) until the cut-‐off frequency at -‐3dB with no ripples. Higher frequencies beyond the cut-‐off point rolls-‐off down to zero in the stop band at 20dB/decade or 6dB/octave. This is because it has a “quality factor”, “Q” of just
0.707. However, one main disadvantage of the Butterworth filter is that it achieves this pass band flatness at the expense of a wide transition band as the filter changes from the pass band to the stop band. It also has poor phase characteristics as well. The ideal frequency response, referred to as a “brick wall” filter, and the standard Butterworth approximations, for different filter orders are given below. Ideal Frequency Response for a Butterworth Filter
Where the generalised equation representing a “nth” Order Butterworth filter, the frequency response is given as:
Where: n represents the filter order, Omega ω is equal to 2πƒ and Epsilon ε is the maximum pass band gain, (Amax). If Amax is defined at a frequency equal to the cut-‐off -‐3dB corner point (ƒc), ε will then be equal to one and therefore ε2 will also be one. However, if you now wish to define Amax at a different voltage gain value, for example 1dB, or 1.1220 (1dB = 20logAmax) then the new value of epsilon, ε is found by:
• Where: • H0 = the Maximum Pass band Gain, Amax. • H1 = the Minimum Pass band Gain.
Transpose the equation to give:
The Frequency Response of a filter can be defined mathematically by its Transfer
Function with the standard Voltage Transfer Function H(jω) written as:
• Where: • Vout = the output signal voltage. • Vin = the input signal voltage. • j = to the square root of -‐1 (√-‐1) • ω = the radian frequency (2πƒ)
Note: ( jω ) can also be written as ( s ) to denote the S-‐domain. and the resultant transfer function for a second-‐order low pass filter is given as:
Normalised Low Pass Butterworth Filter Polynomials To help in the design of his low pass filters, Butterworth produced standard tables of normalised second-‐order low pass polynomials given the values of coefficient that correspond to a cut-‐off corner frequency of 1 radian/sec. n Normalised Denominator Polynomials in Factored Form 1 (1+s) 2 (1+1.414s+s2) 3 (1+s)(1+s+s2) 4 (1+0.765s+s2)(1+1.848s+s2) 5 (1+s)(1+0.618s+s2)(1+1.618s+s2) 6 (1+0.518s+s2)(1+1.414s+s2)(1+1.932s+s2) 7 (1+s)(1+0.445s+s2)(1+1.247s+s2)(1+1.802s+s2) 8 (1+0.390s+s2)(1+1.111s+s2)(1+1.663s+s2)(1+1.962s+s2) 9 (1+s)(1+0.347s+s2)(1+s+s2)(1+1.532s+s2)(1+1.879s+s2) 10 (1+0.313s+s2)(1+0.908s+s2)(1+1.414s+s2)(1+1.782s+s2)(1+1.975s+s2) Filter Design – Butterworth Low Pass Find the order of an active low pass Butterworth filter whose specifications are given as: Amax = 0.5dB at a pass band frequency (ωp) of 200 radian/sec (31.8Hz), and Amin = -‐20dB at a stop band frequency (ωs) of 800 radian/sec. Also design a suitable Butterworth filter circuit to match these requirements. Firstly, the maximum pass band gain Amax = 0.5dB which is equal to a gain of 1.0593 (0.5dB = 20log A) at a frequency (ωp) of 200 rads/s, so the value of epsilon ε is found by:
Secondly, the minimum stop band gain Amin = -‐20dB which is equal to a gain of -‐10 (20dB = 20log A) at a stop band frequency (ωs) of 800 rads/s or 127.3Hz. Substituting the values into the general equation for a Butterworth filters frequency response gives us the following:
Since n must always be an integer ( whole number ) then the next highest value to 2.42 is n = 3, therefore a “a third-‐order filter is required” and to produce a third-‐order Butterworth filter, a second-‐order filter stage cascaded together with a first-‐order filter stage is required. From the normalised low pass Butterworth Polynomials table above, the coefficient for a third-‐order filter is given as (1+s)(1+s+s2) and this gives us a gain of 3-‐A = 1, or A = 2. As A = 1 + (Rf/R1), choosing a value for both the feedback resistor Rf and resistor R1 gives us values of 1kΩ and 1kΩ respectively, ( 1kΩ/1kΩ + 1 = 2 ). We know that the cut-‐off corner frequency, the -‐3dB point (ωo) can be found using the formula 1/CR, but we need to find ωo from the pass band frequency ωp then,
So, the cut-‐off corner frequency is given as 284 rads/s or 45.2Hz, (284/2π) and using the familiar formula 1/CR we can find the values of the resistors and capacitors for our third-‐order circuit.
Note that the nearest preferred value to 0.352uF would be 0.36uF, or 360nF.
Third-‐order Butterworth Low Pass Filter and finally our circuit of the third-‐order low pass Butterworth Filter with a cut-‐off corner frequency of 284 rads/s or 45.2Hz, a maximum pass band gain of 0.5dB and a minimum stop band gain of 20dB is constructed as follows.
7. Acknowledgment: Very big thanks for Prof. Sorin Cioc, Assistant professor,UT, for giving me the opportunity to use his Internal combustion lab, and giving me a solid pathway to use it in order to reach the goal in this work using the shortest road. Special thanks for Sabin Bati,Masters student,MIME,UT, for his help in practical work, and for his bright Ideas that he shared with me in order to make the data look and behave more precise. 8. References:
1. http://www.ni.com/community/ 2. http://www.omegadyne.com/nav/entry.html 3. http://www.electronics-‐tutorials.ws