Free Essay

Assignment

In:

Submitted By Taras111222
Words 2875
Pages 12
1.0 Super Capacitor Lab
2.0 Flywheel Lab
3.0 Introduction to Labview

1.0 SUPER CAPACITOR LAB

The aim of this task is to observe charge and discharge characteristics of a super capacitor, after that to compare achieved and theoretical characteristics.

1. 1: Recording the Supercapacitors Charge Characteristic

PANASONIC - EECHW0D306 - CAPACITOR, RADIAL, 30F, 2.3V Farnell 1305076

Using the battery discharge test PCB setup the charging experiment as shown below but DO NOT connect the capacitor. The current may exceed 500 mA so SET THE AMMETER TO THE 10A RANGE (using the correct terminal). Turn on the 5V supply and check the voltmeter reading is between 2.0V & 2.3V, record this value. If the voltage is correct switch off the supply and connect the capacitor observing the correct polarity.

Now Turn on the 5V supply, this will immediately start charging the capacitor. Record in your logbook the voltage and current at 30 second intervals for ten minutes. Continue to record the voltage and current at one minute intervals until the capacitor reaches the voltage recorded above. It is important to record the time from the moment of connecting the current meter whenever recording values, rather than the interval.

************************************************************************ Table 1.1 Achieved results from capacitor charging

Time, min | Voltage , V | Current , A | 0.5 | 0.53 | 0.45 | 1 | 0.82 | 0.43 | 1.5 | 1.08 | 0.4 | 2 | 1.26 | 0.38 | 2.5 | 1.37 | 0.37 | 3 | 1.48 | 0.36 | 3.5 | 1.59 | 0.35 | 4 | 1.66 | 0.35 | 4.5 | 1.7 | 0.34 | 5 | 1.75 | 0.33 | 5.5 | 1.79 | 0.32 | 6 | 1.83 | 0.32 | 6.5 | 1.86 | 0.31 | 7 | 1.88 | 0.31 | 7.5 | 1.91 | 0.31 | 8 | 1.93 | 0.3 | 8.5 | 1.94 | 0.3 | 9 | 1.95 | 0.29 | 9.5 | 1.96 | 0.29 | 10 | 1.97 | 0.29 |

************************************************************************

1.2 Charge Characteristic

************************************************************************ By using Excel have been drawn capacitor charging characteristic (voltage and current) against time. Figure 1.1 - Capacitor characteristic voltage against time

Figure 1.2 - Capacitor characteristic current against time

Figure 1.3 - Capacitor characteristic voltage, current against time

Over first 4 min period the voltage has risen considerably, after that has been gradually growing till 10min or 5, where began remain stable. According to the teoretical knowledge, during chargering of the capacitor, voltage has grown until 5, after that stay at the same level. To compare voltage charge curve, that has been reached in labaratory and theoretical curve of chargering capacitor, both curves are almost the same.
-------------------------------------------------

1.3 Discharging Characteristic of the Supercapacitors Rearrange the test setup as shown below but DO NOT CONNECT THE AMMETER.
(DO NOT ALLOW THE CAPACITOR TO BE DISCHARGED!)

When ready connect ammeter, this will immediately start discharging the capacitor. Record in your logbook the voltage immediately before and after connecting the ammeter, and then voltage and current at 30 second intervals until the capacitor is discharged.

************************************************************************ According to the circuit diagram that has been provided, new circuit has been built for recording the supercapacitors discharge characteristic, reached results is illustrated in Table1.3

Table 1.3 Obtained results from capacitor discharging experiment

Time, min | Voltage , V | Current , A | 0.5 | 1.89 | 0.26 | 1 | 1.7 | 0.24 | 1.5 | 1.53 | 0.21 | 2 | 1.39 | 0.19 | 2.5 | 1.25 | 0.17 | 3 | 1.12 | 0.16 | 3.5 | 1.02 | 0.15 | 4 | 0.9 | 0.13 | 4.5 | 0.84 | 0.12 | 5 | 0.79 | 0.11 | 5.5 | 0.73 | 0.1 | 6 | 0.67 | 0.08 | 6.5 | 0.61 | 0.08 | 7 | 0.55 | 0.07 | 7.5 | 0.53 | 0.06 | 8 | 0.51 | 0.05 | 8.5 | 0.49 | 0.04 | 9 | 0.46 | 0.03 | 9.5 | 0.43 | 0.02 | 10 | 0.39 | 0.02 |

***************************************************************************

1.4 Plotting the Discharge Characteristic
***************************************************************************
By using Excel and obtained experimentally results of capacitor voltage and current supplied to the load, against time, has been drawn capacitor discharge characteristic.

Results:

Figure 1.4 – Voltage against time over discharging of the capacitor

Figure 1.4 – Current against time over discharging of the capacitor

Figure 1.4 – Voltage, Current against time over discharging of the capacitor

Voltage discharge characteristic of the capacitor obtained experimentally in laboratory is slightly different from theoretical curve. Comparing two curves there some difference, because theoretical curve declining dramatically at the beginning, then more gradually. Graph that presented in Figure1.3, decreases gradually almost over all period of the time.
***************************************************************************

1.5 Processing of Results

1.5.1 From the measurements above, or using additional measurements, calculate the capacitance and internal resistance of the Supercapacitor and compare to the manufacturer’s datasheet.
***************************************************************************

According to the manufacturer’s datasheet, the capacitance is 30F.

According to the manufacturer’s datasheet, internal resistance has not exceed 0.1 for capacitor 30F.

***************************************************************************

2.0 FLYWHEEL LAB

Introduction

The aim of this activity is to measure the power-storage and subsequent power-release characteristics of a simple flywheel electromechanical energy storage system and then to use these characteristics to develop a simple equivalent circuit model.
2. 1: Calibrating the Flywheel
A small DC motor has been connected to a flywheel comprised of an ordinary computer CD-ROM disk. An optical speed sensor has been implemented that measures the angular velocity of the disks by providing one pulse per revolution. It is available on one of the four BNC connections on the PCB, see figure 1. This signal is also connected to a frequency to voltage converter connected to another one of the BNC connectors and provides a DC voltage proportional to the speed of the disks. A third BNC connector provides direct access to the motor terminals and the final BNC connector allows an external input signal. The external input will normally not be used for these experiments so the selector switch should be set to Internal. A current meter is needed between the two Imotor connectors for this part of the experiment.

N.B. The Flywheel will fracture if spun too fast. Before connecting the PSU to the flywheel assembly ensure that the current limit is set below 1.5A. Do not exceed +10V.

2.1.1 The output from the frequency to voltage converter is to be calibrated by applying a varying range of conditions to the DC motor and recording the sensor readings. The motor supply will be adjusted by turning the speed control. The speed of the motor should be allowed to settle to a stable value before taking any measurements. The DC motor supply can be measured using an ammeter on Imotor and a voltmeter on the Vmotor BNC connector. Increase the current in approximate steps of 100 mA up to maximum (<1.5A) and record the actual motor current, motor voltage, frequency of the Flywheel and the Voltage from the Frequency to voltage converter. (Frequency can be measured using the DSO). (For convenience a form is provided table 1).

Speed Pulses
Vin
(Not used)
Vmotor
F - Vout

Ext
Int
Speed
Imotor
Speed Pulses
Vin
(Not used)
Vmotor
F - Vout

Ext
Int
Speed
Imotor

Figure 1: Flywheel connections

Results: Calibration Data

Table 1: Calibration – increasing speed

I Motor(mA) | V Motor(Volts) | ‘F to V’(Volts) | F out (Speed Pulse)Hz | 175 | 0.98 | 1.17 | 22.2 | 260 | 1.34 | 1.91 | 37.4 | 370 | 1.72 | 2.68 | 51.0 | 450 | 1.99 | 3.17 | 62.9 | 540 | 2.28 | 3.76 | 73.6 | 610 | 2.49 | 4.13 | 80.7 | 690 | 2.73 | 4.54 | 89.3 | 740 | 2.89 | 4.89 | 92.6 | 790 | 3.03 | 5.09 | 100.5 | 840 | 3.16 | 5.29 | 104.9 | 890 | 3.32 | 5.59 | 108.5 | 940 | 3.44 | 5.77 | 113.9 | 990 | 3.56 | 5.95 | 119.2 | 1040 | 3.73 | 6.02 | 124.5 | 1190 | 4.12 | 6.05 | 131.9 |

Figure 2.1 – F speed against frequency to voltage

Figure 2.2 – Motor current against motor voltage over speed increasing

Table 2: Calibration – decreasing speed

I Motor, mA | V Motor, V | ‘ F to V’, V | F out (Speed Pulse), Hz | 1175 | 4.12 | 6.06 | 115.1 | 1080 | 3.75 | 6.03 | 114.9 | 965 | 3.46 | 5.89 | 114.4 | 875 | 3.25 | 5.48 | 108.9 | 775 | 2.9 | 5.02 | 97.15 | 675 | 2.69 | 4.55 | 88.3 | 545 | 2.26 | 3.86 | 76.77 | 485 | 2.0 | 3.58 | 68.16 | 365 | 1.64 | 2.76 | 52.2 | 285 | 1.35 | 2.24 | 43.36 | 205 | 1.0 | 1.68 | 32.25 | 155 | 0.8 | 1.16 | 21.47 | |

Figure 2.3 – Motor current against motor voltage over speed decreasing

Figure 2.4 – F speed against frequency to voltage over speed decreasing

2.2: Speed-up and Slow-down Characteristics

2.2.1 Connect up the flywheel system and connect the DSO. Confirm that the pulse signal and the ‘FtoV’ signals are working correctly. Now set the DSO into the Roll time-base mode so that it will sample the F to V signal over the start-up period of the flywheel. This is several seconds long. Turn the speed potentiometer to maximum and then turn off the DC motor using the ‘External’ switch on the right hand side. Wait until the flywheel is stationary. Now change the switch to Internal and allow the motor to accelerate to the maximum speed. Display the ‘FtoV’ signal on the DSO (stopping the sweep to capture the waveform). Download the DSO trace to the PC:

Screenshot which is represented below presents speed –up characteristic, when have been reached maximum velocity (DC motor has been turned off) then can be observed slow-down characteristic. Figure 2.9 – Screenshot from DSO of Speed-up and Slow-down Characteristics

Figure 2.10 - Speed-up and Slow-down Characteristics from Excel 2.2.1.2 Capture the speed-up characteristic as ‘data’. Plot the data in EXCEL – ensure you scale the axes.

Figure 2.11- Graph of speed-up characteristics from Excel

2.2.2 After the DC motor has reached its maximum velocity, repeat 2.2.1 but this time turn off the motor signal rapidly, to obtain the slow-down characteristic.

Screenshot from DSO presented slow-down characteristic is illustrated in Figure 2.9

2.2.2.2 Capture the slow-down characteristic as ‘data’. Plot the data in EXCEL – ensure you scale the axes.

Figure 2.12 - Slow-down characteristics from Excel

2. 3: Adding a load to the Output – Energy Delivery

Repeat the slow-down characteristic of Task 3 but this time with a resistive load connected to the Vmotor output terminals. (The speed up characteristic is not required). Now connect a resistance box to the Vmotor output and set it to 50 Ohms. Repeat the slow-down characteristic. Try different values of load resistance and measure the change in slow-down characteristic. Capture the slow-down waveforms from the DSO.

Results:

Resistance box with 50 Ohms has been connected to Vmotor output, slow-down characteristic has been achieved:

Figure 2.14 – Screenshot of the slow-down characteristic with a 50 Ohm resistor

2.4: Equivalent Circuit Model

Use your results to determine a simple circuit model using capacitors and resistors:

2.4.1 Internal losses the mechanical losses of the flywheel are compensated by the electrical power input in the steady state. From your V-I plot of Task 1 determine a circuit model of the mechanical losses using resistors – you will need to consider if this model is linear or over what range it can be approximated as linear.

***************************************************************************
Results:

Figure 2.15 - Equivalent Circuit

***************************************************************************

2.4.2 Energy Storage model. Taking the diameter of the CD-ROM to be 12cm and mass to be 14g find an expression to determine the kinetic energy stored by a flywheel. Using this calculate an equivalent capacitor value at each speed and plot as a function of speed. From this determine a suitable equivalent circuit model for the flywheel’s stored energy using capacitance – again decide if this model is linear or non-linear with voltage.

***************************************************************************
Results: f=120Hz, r=12cm, m =14g, then
,
,
Where “k” is a constant, for my case k=0.3, then:
I=0.3*0.014*0.00001

***************************************************************************

3.0 INTRODUCTION TO LABVIEW

Aims
To measure the charge & discharge of a Supercapacitor using Labview - PC based instrumentation technique. Read the whole worksheet before starting!

Introduction

Labview is a PC based instrumentation package widely used for automated measurements. It uses graphical programming to develop a ‘vi’ (Virtual Instrument) whereby the PC controls interface devices attached to it, collecting a processing real-time data. This experiment uses an National Instruments DAQ Module (USB-6002) as the interface device, connected to the PC (Labview) via USB. A Labview vi is provided that runs a simple data logging programme displaying the voltage in real time and provides a facility to capture the data in a text file for processing.

3.1: Checking operation of the USB-6002

Connect the USB-6002 to a USB port. Check the PC finds device (Devices and Printers).
Connect a 0-10V power supply to pin AI 0 ‘gnd’ and ‘+ve’ (first 2 pins on input connector
Open Labview / Open a blank VI Open Functions Palette (right click on Control Panel)/Measurement I/O / DAQmx- Data Acquisition Add DAQ Assistant / Select Analog Input / Voltage Select Dev 1 (USB-6002) / channel ai0 Set the Terminal Configuration to RSE (unbalanced) Set the Terminal Configuration to RSE (unbalanced) The ‘connections’ tab illustrates which terminals should be connected (hard-wired0 The vi will capture data for a time determined by the number of samples to be recorded and the sample data rate. For instance setting ‘Samples to Read’ to 1k and ‘Rat’ to 1k will record 1 s of data. The graph will auto-scale – but can be set to a fixed scale by typing Ymin and Ymax directly (and un-ticking ‘auto-scale’ box). Run the vi and confirm it measures the voltage on port Ai1 on the USB-6002. Make notes and take appropriate screenshots of your work and paste into your eLog to confirm the USB-6002 is operational

Screenshots that are represented below demonstrate functionality of USB-6002 that has been connected to PC:

3.2: Measuring the Charge of a Supercapacitor

Using Labview to record the charging characteristic of a capacitor from a constant current source.:

3.2.1 Using Appendix A create a suitable data logging vi – or download the Labview vi ‘super_cap1415#2.vi’ from Moodle.
Paste a copy of the vi in your eLog - both ‘Front Panel’ and ‘Block Diagram’

Results

Figure 3.1 - Front Panel

Figure 3.2 - Block Diagram

3.2.2 Measurement of capacitor charging

* Switch off the Power Supply. * Set it to +2.0V and adjust the current limit to 300mA. DO NOT EXCEED 2.0V! * Connect the Power Supply directly to a 30F Supercapacitor (ensure polarity correct on the capacitor) * Connect AI 0 ‘gnd’ and ‘+ve’ of the USB-6002 across the capacitor. Ensure the positive of the Supercapacitor is connected to ‘+ve’. * Run the vi. The voltage displayed should be zero (n.b. ensure the Supercapacitor is fully discharged). * Press ‘Record’, then switch on the Power Supply. Labview should display the Supercapacitor charging. * Once the capacitor voltage has reached 2.0V (i.e. is fully charged) press ‘Not record’.

Paste a screen grab of the vi displaying the charging characteristic

Results

3.2.3 The captured data is stored in the text file C:\log\super_cap.lvm. (Suggestion - rename this to ‘charge.txt’ to prevent your results from being written over in 3.3.) Use EXCEL to plot the charging characteristic. Compare this to the theoretical curve and discuss any differences.

Results:

Figure 3.3- Charging Excel Plot of a Super capacitor

3.3: Measuring the Dis-charge of a Supercapacitor

Using Labview to record the dis-charging characteristic:

3.3.1 Measurement of capacitor dis-charging

* Disconnect the supply – ensuring the Supercapacitor is charged. * Connect one end of a 6.8Ohm, 1W resistor to GND / Negative of the 30F capacitor. * Press ‘Record’, then connect the other end of the resistor to pin 16 / Supercapacitor positive terminal. Labview should display the Supercapacitor dis-charging. * Once the capacitor voltage has reached 0V (i.e. is fully dis-charged) press ‘Not record’.

Paste a screen grab of the vi displaying the dis-charging characteristic

Results

3.3.2 The captured data is stored in the text file C:\log\super_cap.lvm. (suggestion - rename this to ‘dis charge.txt’ to prevent your results from being written over.) Use EXCEL to plot the dis-charging characteristic. Compare this to the theoretical curve and discuss any differences.
Results; EXCEL Plot

Figure 3.4- Dis-charging Excel Plot of a Super capacitor Charging and dis-charging curves which have been obtained experimentally, plotted by using Excel have some difference comparing to theoretical curves of charging and dis-charging capacitor. Theoretical curves have gradually increase and decrease, meanwhile during experiment has been reached sharp decrease dis-charging characteristic of a capacitor.

Similar Documents

Free Essay

Boolean Assignment

...TR PT1420 5/13/14 Unit Assignment 4 l. What is the general fom1at of the statement used to code decisions in an application? A power full asset of the computer is its ability to make decisions and to take alternate course of action based on the outcome. 2. What is a Boolean expression? a logical statement that is either TRUE or FALSE. 3 . Explain the purpose of comparison operators and logical operators. The purpose of a comparison operator is to test some kind of relationship between two entities examples are >, <, ==, !=, etc 4. How does a comparison performed on numeric data differ from a comparison performed on string data? There are commonly used interchangeably, and the distinction between them is a small one. Comparison to" should be used when comparison is made between specific people, things, or other instances. 5. How does Visual Basic compare the Text property of a text box? When you compare the Text property of a text box with another value the Text property behaves like a variant. Visual Basic compares one text box to another as strings and compares a text box to a numeric variable or constant with a numeric compare. You can force a numeric comparison on a Text property by using the Val function. 6 . Why would it be useful to include the ToUpper method in a comparison? When comparing strings, the case of the characters is important. An uppercase “Y” does not compare equal to a lowercase “y”. Since the user may type a name or word in either...

Words: 902 - Pages: 4

Free Essay

Assignment of Income Doctrine

...ACC 616 Prof. Robert Simpson Student name: On the back Assignment 1: Explain Assignment of Income Doctrine The "assignment of income" doctrine states that income is taxed to the one who actually earns it. That means a taxpayer cannot avoid tax liability by assigning his income to another party or entity. Therefore, to be able to shift income to someone else, that one must actually earn the income. This doctrine aims to against the tax evasion when the taxpayer tries to deflect income to another party. First, starting from the term “earning”, earnings can occur either through the direct efforts of the taxpayer or the taxpayer’s ownership of an asset that generates income. Based on that understanding about earning, there are 2 ways to shifting income from one to another: the transferee must really work to earn that income or share the ownership of an asset that creates income. For example, if you are an owner of a business and you want to shift one part of your income to your family member such as your son, you need to hire your son to work for your company and give him the pay rate that is appropriate with his job. And the other way is to share your investment income with him, same meaning with sharing your ownership with him. The assignment of income applies the “tree and fruit” metaphor, in which the fruits cannot be attributed to a different tree from that on which they grew. If you want to avoid the tax liability on the fruit from the tree, you must prove that the...

Words: 421 - Pages: 2

Premium Essay

Assignment 2

...2.20 Write an SQL statement to display unique WarehouseIDs. SELECT DISTINCT WarehouseID FROM INVENTORY; 2.29 Write an SQL statement to display the SKU, SKU_Description, WarehouseID, and QuantityOnHand for all products having a QuantityOnHand greater than 1 and less than 10. Do not use the BETWEEN keyword. SELECT SKU, SKU_Description, WarehouseID, QuantityOnHand FROM INVENTORY WHERE QuantityOnHand > 1 AND QuantityOnhand < 10; 2.31 Write an SQL statement to show a unique SKU and SKU_Description for all products having an SKU description starting with ‘Half-dome’. SELECT DISTINCT SKU, SKU_Description FROM INVENTORY WHERE SKU_Description LIKE 'Half-dome%'; 2.33 Write an SQL statement to show a unique SKU and SKU_Description for all products having a ‘d’ in the third position from the left in SKU_Description. SELECT DISTINCT SKU, SKU_Description FROM INVENTORY WHERE SKU_Description LIKE '__d%'; 2.36 Write an SQL statement to display the WarehouseID and the sum of QuantityOnHand, grouped by WarehouseID. Name the sum TotalItemsOnHand and display the results in descending order of TotalItemsOnHand. SELECT WarehouseID, SUM(QuantityOnHand) AS TotalItemsOnHand FROM INVENTORY GROUP BY WarehouseID ORDER BY SUM (QuantityOnHand) DESC; 2.42 Write an SQL statement to display the SKU, SKU_Description, WarehouseID, Ware- houseCity, and WarehouseState of all items not stored in the Atlanta, Bangor, or Chicago warehouse. Do not use the...

Words: 349 - Pages: 2

Free Essay

Week 5 Assignment

...Janell Taylor 10/23/12 Implicit Test I found the test to be very interesting and I don’t like timed tests because I need time to think about my answer to be sure and confident about my choice. I don’t agree with the results because they said I made too many errors and I don’t understand that because that was just one part where I was making too many errors. It has helped me out in those areas of different topics, but I just wish I had more time. I guess I would say that the answers wasn’t valid enough for me because it didn’t really give me a score because I made too many errors, so I don’t agree with that too much. I believe prejudice is difficult to measure because I don’t agree with it and don’t like the fact that it’s very big and can get worse if we don’t come together to get in one accord to help each other and make the world better to live in dealing with different people and feelings. I think measuring prejudice can be a tough thing to deal with and handle because of the many people that are prejudice, which are hurting and harming many situations and people that’s trying to make it while being equal to everyone regardless of what. I would have to take the test over to get a better score because I felt that wasn’t fair because I made too many errors to get a...

Words: 252 - Pages: 2

Free Essay

Mat222 Week 1 Assignment.

...Solving Proportions MAT222 Week 1 Assignment September 22, 2014 Solving Proportions Solving for a proportion can be used within numerous real-world problems, such as finding the population of an area. Conservationists are able to predict the population of bear’s in their area by comparing information collected from two experiments. In this problem, 50 bears in Keweenaw Peninsula were tagged and released so conservationists could estimate the bear population. One year later, the conservationist took random samples of 100 bears from the same area, proportions are able to be used in order to determine Keweenaw Peninsula’s bear population. “To estimate the size of the bear population on the Keweenaw Peninsula, conservationists captured, tagged, and released 50 bears. One year later, a random sample of 100 bears included only 2 tagged bears. What is the conservationist’s estimate of the size of the bear population (Dugolpolski, 2012)?” In order to figure the estimated population, some variables need to first be defined and explain the rules for solving proportions. The ratio of originally tagged bears to the entire population is (50/x). The ratio of recaptured tagged bears to the sample size is (2/100). 50x=2100 is how the proportion is set up and is now ready to be solved. Cross multiplication is necessary for this problem. The extremes are (100) and (50). The means are (x) and (2). 100(50)=2x New equation, and now solve for (x). 50002=2x2 Divide both...

Words: 608 - Pages: 3

Free Essay

Mat222 Week 1 Assignment

...conservationist’s estimate of the size of the bear population? You will notice while reading question #56 on page 437, we are to assume that the ratio of originally tagged bears to the whole population is equal to the ratio of recaptured tagged bears to the size of the sample. The ratio of originally tagged bears to the whole population is 50X The ration of recaptured tagged bears to the sample size is 2100 50X=2100 This is the proportion set up and ready to solve. I will cross multiply setting the extremes equal to the means. 10050=2x 100and 50 are the extremes, while X and 2 are the means. 50002=2x2 Divide both sides by 2 X = 2500 The bear population on the Keweenaw Peninsula is around 2500 bears. The second problem for assignment one week one I am asked to solve the below equation for y. The first thing I notice is that a single fraction (ratio) on both sides of the equal sign so basically it is a proportion which can be solved by cross multiplying the extremes and the means. y-1x+3=-34 Is the equation I am asked to solve. 3y-1=-3x-4 The result of the cross multiplying. 3y-3=-3x+12 Distribute 3 on the left side and -3 on the right. 3y-3+3=-3x+12+3 Subtract 3 from both sides. 3y=-3x+15 3y3=-3x3+153 Divide both sides by 3 y=-x+5 This is a linear equation in the form of y=mx+b. This equation is in its simplest form. I like how we can take just a couple of numbers from a word equation and put it in an order that will help us solve many estimates...

Words: 340 - Pages: 2

Premium Essay

Pt1420 Unit 3 Assignment

...6.1) Comparison of three numbers Problem is of comparison of values among three values , a very simple problem. Here, the decision making process is done based on the value of the parameters a,b and c. The data types of all these variables are interger. 6.2) Binary search A binary search locates the position of an item in a sorted array. Binary search works by comparing an input value to the middle element of the array. The comparison determines whether the element equals the input, less than the input or greater. When the element being compared to equals the input the search stops and typically returns the position of the element. If the element is not equal to the input then a comparison is made to determine whether the input is less than or greater than the element. Depending on which it is the algorithm then starts over but only searching the top or bottom subset of the array's elements. If the input is not located within the array the algorithm will usually output a unique value indicating this. Binary search algorithms typically halve the number of items to check with each successive iteration, thus locating the given item (or determining its absence) in logarithmic time. A binary search is a dichotomic divide and conquer search algorithm. 6.3) Quadratic problem In Quadratic equation solver problem(called the procedure under test) is chosen. This procedure has three predicates involving both linear and non-linear functions of the input variables. In this there are three...

Words: 728 - Pages: 3

Free Essay

Mobile Service Provider

...11108944 Name: ASHWINI KUMAR Roll No. : RE3R02B32 PART- A 1. Ans :- (a) unary and ternary operator Unary operator:- It pecedes an operand . The operand (the value on which the operator operates ) of the unary operator must have arithmetic or pointer type and the result is the value of the argument. Example:- If a=5 then +a means 5 If a=0 then +a means 0. If a=-4 then +a means -4. Ternary operator:- It precedes an operand. The operand of the unary operator must have arithmetic type and the result is the negation of the operand’s value. Example:- If a=5 then –a means -5 If a=0 then –a means 0 If a=-4 then –a means 4. (b) Assignment and equalto operator Assignment operator:- Equal to operator: An assignment operator assigns value In this we put the To a variable. value as it is. Example – Example- a*=5 means a=5*5. Int a; a=5 means a is initialized with 5 if(a==5) { return true; } return false; (c) Expression and statement Expression:- An expression is any valid combination of operators , constants , and variables. Example:- ...

Words: 399 - Pages: 2

Premium Essay

Student

...Problem Solving with Computing Homework - WEEK 2 [30 points] This is a review of some of the material from Chapter 2 and lectures from class. No credit for answers that are copies or near verbatim transcripts – please use your own words1 and document sources where appropriate. 1 This will apply to all assignments in this class. Answer the following questions: Chapter 2 1. Short Answers [1 point each, 2 points total] 1. What does a professional programmer usually do first to gain an understanding of a problem? The first thing that a professional programmer usually do first to gain an understanding of a program is to closely relate customer (Interview ) to inquire or gather information about the problem. 2. What two things must you normally specify in a variable declaration? The two things normally specified in a variable declaration are the variable type and identifier. 2. Algorithms / Pseudocode [1 point each, 5 points total] 1. Design an algorithm that prompts the user to enter his or her height and stores the user’s input in a variable named height. Declare height Display “Enter Your Height” Input Height Display “Height” 2. Write assignment statements that perform the following operations with the variables a and b. - Adds 2 to a and stores the result in b. - Subtracts 8 from b and stores the result in a Set b=2+a Set a=b-8 3. Write a pseudocode statement that declares the variable cost so it can hold real numbers. Floating Point-Variable...

Words: 1823 - Pages: 8

Free Essay

Prg/211 Calorie Count Tool

...Team B Calorie Count Tool PRG/211 May 5, 2014 Team B Calorie Count Tool PROBLEM STATEMENT Team B was asked to develop a program which would calculate the user’s daily intake of calories and measure those calories against the overall calories expended. The core purpose of this program will do two primary functions. First, it will record the user intake of calories as acquired through meals throughout the day. Second, the user will record caloric output associated with physical activity. This information will be calculated together to determine the caloric surplus or deficit for the user. In order for the program to execute accurately, and provide customized results, the user will be required to input personal data to include gender, age, weight, and height. This additional information is essential to determine the user’s default caloric burn rate, otherwise known as the basal metabolic rate (BMR). The BMR and the calories burned as a result of physical activity will be calculated against the intake of calories to determine the overall success for the user. As the program is executed it must: * Record user name, age, height, weight to enable more accurate calculations * Record the users specific caloric values entered for each meal * Record the user activity and caloric burn values for that activity * Calculate the basal metabolic rate (BMR) for the individual * Subtotal the total caloric values for the day * Combine the physical activity and...

Words: 1524 - Pages: 7

Premium Essay

Week 2 Assigment

...Week 2 Assignment: Understanding Effective Money Management Assessment A, Part 1: Creating a Personal Financial Statement - Assets | 1 point | Car: Bluebook value $1250.00Cash: $378.00Savings Accounts: $826.00 | Assessment A, Part 2: Creating a Personal Financial Statement - Debts | 1 point | Rent: $750.00Electric/ Gas bill: $131.75Cable/ internet/ Phone bill: $80.42Credit Card: $31.00Cell phone bill: $72.37 | Assessment A, Part 3: Identify Money Management Tool | 1 point | Explain to Monica how the money management tools were identified. | Students should explain how they evaluated various cash management products and services. | Assessment A, Part 4: Creating a Personal Financial Statement – Steps | 1 point | Drag the steps listed on the right into their correct sequences on the left. When done click the Send button | Step 1: I got all my financial stuff together – bills, loans, bank statements, etc. | Step 2: I balance my checkbook. | Step 3: I decided what were my assets and what were my debts. | Step 4: I enter my assets in the program. | Step 5: I enter my debts in the program. | Step 6: The program gave me a Net worth figure at the end. | Assessment B: Creating a Monthly Cash Flow Statement ...

Words: 255 - Pages: 2

Premium Essay

Andy Owes Bill a Debt.

...Law Written Assignment 3 Case Study 1 Parks, a 7-foot, 265-pound center for the San Diego Slick, objected when his contract was assigned from the ABC Corporation to the XYZ Corporation, the team’s new owner. The change of owners did not cause a change in the composition of the team although a new coach was hired. Parks’s compensation and his responsibilities remained the same. Was this contract assignable? Facts of the Case: 1) Parks contract was assigned from the ABC Corporation to XYZ Corporation. 2) Parks compensation and his responsibilities remained the same. Issues: 1) The reason why we are in court today is to identify if Park’s contract was assignable. Rules of the Law: 1) Personal Service Contract – The parties agree that a personal service contract may be assigned. This allows the trade of an athlete from one team to another team. 2) Notice of Assignment – Assignee is under a duty to notify the obligor that the assignment has been made and performance must be rendered to the assignee. 3) Anti-Assignment Clause – Prohibits the assignment of rights under the contract. 4) Approval Clause – requires that the obligor approves any assignment of contract. Analysis & Conclusion: Since we do not have all the facts we can assume the following: 1) Parks contract did include the Personal service contract. 2) Notice of assignment was made by XYZ Corporation. 3) Parks contract did NOT include Anti-Assignment Clause. ...

Words: 495 - Pages: 2

Free Essay

Eopp

...Reflection assignment In this assignment I will be using the Gibbs Reflective Model, reference, to reflect on an incident that occurred in placement that demonstrates an understanding of the Outcome : 3.1: Demonstrate that they respect diversity and individual preferences and value differences, regardless of their own personal views. To do this I will first, briefly describe the event, supporting my outline with relevant information. I will then explore the event, and discuss why it is important and how it relates to the learning outcome. I will also be discussing why materials such as law and guidelines say this is important. I will then proceed to analyse the incident by breaking it down and picking out the main features of the experience, discussing why they are important, whilst linking the main points together. I will attempt to think about opposing arguments to what I have explored, and discuss the advantages and disadvantages of the arguments. Finally I will be using SMART goals, to create an action plan for future development. Explain incident with evidence Whilst on a shift, we had an elderly patient arrive on the ward. The patient suffered from a Frank Haematuria, Colovesciular fistula as well as incontinence. It was suggested that the patient received surgery to have this corrected, but the patient refused surgery, stating that at his age he did not want to go through with it, and wanted to put a DNAR in place. I along with the other nurses respected his choice...

Words: 370 - Pages: 2

Free Essay

Misconceptions of Algebra

...Diagnostic Algebra Assessment Definitions Categories Equality Symbol Misconception Graphing Misconception Definition Concept of a Variable Misconception Equality Symbol Misconception As algebra teachers, we all know how frustrating it can be to teach a particular concept and to have a percentage of our students not get it. We try different approaches and activities but to no avail. These students just do not seem to grasp the concept. Often, we blame the students for not trying hard enough. Worse yet, others blame us for not teaching students well enough. Students often learn the equality symbol misconception when they begin learning mathematics. Rather than understanding that the equal sign indicates equivalence between the expressions on the left side and the right side of an equation, students interpret the equal sign as meaning “do something” or the sign before the answer. This problem is exacerbated by many adults solving problems in the following way: 5 × 4 + 3 = ? 5 × 4 = 20 + 3 = 23 Students may also have difficulty understanding statements like 7 = 3 + 4 or 5 = 5, since these do not involve a problem on the left and an answer on the right. Falkner presented the following problem to 6th grade classes: 8 + 4 = [] + 5 All 145 students gave the answer of 12 or 17. It can be assumed that students got 12 since 8 + 4 = 12. The 17 may be from those who continued the problem: 12 + 5 = 17. Students with this misconception may also have difficulty with the idea that adding...

Words: 797 - Pages: 4

Free Essay

Book Report

...Selection statements Selection is used to select which statements are to be performed next based on a condition being true or false. Relational expressions In the solution of many problems, different actions must be taken depending on the value of the data. The if statement in C I used to implement such s decision structure in its simplest form – that of selecting a statement to be executed only if a condition is satisfied. Syntax: if(condtion) statement executed if condition is true When an executing program encounters the if statement, the condition is evaluated to determine its numerical value, which is then interpreted as either true or false. If the condition evaluates to any non-0 value (positive or negative), the condition is considered as a “true” condition and the statement following the if is executed; otherwise this statement is not executed. Relational Operators In C Relational operator | Meaning | Example | < | Less than | age < 30 | > | Greater than | height > 6.2 | <= | Less than or equal to | taxable <= 200000 | >= | Greater than or equal to | temp >= 98.6 | == | Equal to | grade == 100 | != | Not equal to | number !=250 | In creating relational expressions, the relational operators must be typed exactly as given in the above table. Thus, although the following relational expressions are all valid: age > 40 length <= 50 temp >= 98.6 3 < 4 flag == done day != 5 The following are invalid: length =< 50 ...

Words: 1617 - Pages: 7