-1- Department of Engineering ELE3DDE: Electronic Design Automation – 2015 Assignment: Traffic Light Controller: Design, Synthesis and Test DUE: Code Submission and Demonstration, Wednesday, September 9 Report, 2pm Monday, September 14 Students will work on this assignment individually – developing their own design and producing their own independent report Task: A traffic signal controller is required for an intersection of two cross roads in a busy town centre that also has considerable pedestrian traffic. All four approaches to the intersection have standard traffic lights (Red, Amber and Green) and a traffic sensor (active low), which can detect the presence of approaching traffic. Assume that when a car passes over a sensor, it produces a low signal for approximately three (3) seconds. Thus a constant stream of traffic would produce a continuous low signal (i.e. assume that debouncing for these sensors has already been performed in the sensor circuitry). The intersection also has pedestrian crossing signals (Walk, Don’t Walk (flashing), and Don’t Walk (constantly illuminated), and pedestrian call buttons (simple push button switches) at each of the four crossing points. As a digital design engineer, you have been asked to produce an FPGA prototype for the Traffic Light Controller and assigned the following tasks (i) Produce a VHDL design for the Traffic Light Controller meeting the specifications outlined below. (ii) Produce a test bench for your VHDL design and via simulation confirm that your design functions correctly. (iii) Produce a space efficient, fully tested working prototype, suitable for demonstration to the client. (i.e. implement your design in the ALTERA, Cyclone II FPGA on the ALTERA DE2 board). (iv) Produce a report of your work, including a discussion on the efficiency of your design. (v) All code generated for you design must be included in your report. If you have pages and pages of VHDL code (particularly if you generated them with HDL Designer), these should be included in your report as an appendix. Prototype. The design will be implemented using the ALTERA, Cyclone II (EP2C35F672C6) device on the ALTERA DE2 board. See Appendix or DE2 Board Manual for device I/O pins. The four traffic lights will be represented via the 7-segment displays HEX7 – HEX4, with segment ‘a’ representing a red light, segment ‘g’ representing a yellow light and segment ‘d’ representing a green light. With the traffic sensors in the road represented by four slide switches (SW17, SW15, SW13 & SW11). The emergency Amber flash switch should be connected to slide switch SW3. -2- The pedestrian call buttons will be represented by the push buttons, KEY0, KEY1, KEY2 and KEY3. With 7-segment displays HEX3 – HEX0 used to represent the pedestrian signals for the crossing of the intersection, in the following manner: Walk (segment ‘d’ on), Don’t Walk – flashing (segment ‘a’ flashing), and Don’t Walk (segment ‘a’ on continuously). For timing the development board has a 50MHz clock. Shown above is a diagram of a seven-segment display indicating how segments ‘a’, ‘g’ and ‘d’ are used to represent the red, yellow and green lights, of a traffic light, respectively on HEX7 – HEX4. While below shows seven-segment display indicating how segments ‘a’ and ‘d’ are used to indicate Don’t Walk and Walk respectively on HEX3 – HEX0. Design Specifications – Basic Design. The road traffic lights are to operate using the sequence RedGreenAmberRed according to the timing and requirements outlined below. Whenever the lights for one road are Green or Amber the crossroad must always display a red signal. All traffic lights must display a red signal for two seconds between changeovers. In their inactive state all pedestrian signals will display “Don’t Walk – continuous” (segment ‘a’ continuously on), independent of the changes in the traffic signals. The pedestrian signal can be activated following a pedestrian call being registered (by an appropriate push button(s) being pressed) and will operate in the sequence “Walk” “Don’t Walk – flash” “Don’t Walk – continuous” with the timing and requirements outlined below. As this intersection carries considerable pedestrian traffic the town planners have decided that the traffic sequence will contain a dedicated pedestrian crossing only period, where pedestrians may walk between any two points of the intersection (including through the middle of the intersection). Rather than embedding the pedestrian crossing sequences in with the road traffic sequence – as you are probably more familiar with. Thus whenever any traffic flow enabling signal is active (i.e. Green or Amber on) the pedestrian signals will be inactive (i.e. “Don’t Walk – continuous”) and vice versa, whenever the pedestrian signals are active (“Walk” or “Don’t Walk – flash”) all road traffic lights remain red. a d e f g c b a d e f g c b -3- Traffic Light sequence and timing When all automotive sensors are inactive the default sequence is: Green Road 1 14 sec Amber Road 1 4 sec Red Roads 1/2 2 sec Green Road 2 14 sec Amber Road 2 4 sec Red Roads 1/2 2 sec For both Roads 1 & 2, if any traffic is detected after the road has been showing green for 9 seconds, then the Green time will be extended by a further 10 seconds (i.e. making the Green time 24 seconds for that road, on that sequence. The amber and red/red times remain at 4 and 2 seconds respectively – for all sequences. Thus if both Road 1 and Road 2 have heavy traffic (i.e. traffic still detected after 9 seconds of green signal) then the sequence will be: Green Road 1 24 sec Amber Road 1 4 sec Red Roads 1/2 2 sec Green Road 2 24 sec Amber Road 2 4 sec Red Roads 1/2 2 sec Also, should Road 1 have heavy traffic and Road 2 have only light or no traffic (i.e. no traffic detected after 9 seconds of green signal) then the sequence will be: Green Road 1 24 sec Amber Road 1 4 sec Red Roads 1/2 2 sec Green Road 2 14 sec Amber Road 2 4 sec Red Roads 1/2 2 sec And alternatively, should Road 2 have heavy traffic and Road 1 have only light or no traffic (i.e. no traffic detected after 9 seconds of green signal) then the sequence will be: Green Road 1 14 sec Amber Road 1 4 sec Red Roads 1/2 2 sec Green Road 2 24 sec Amber Road 2 4 sec Red Roads 1/2 2 sec When a pedestrian crossing sequence is required this is always inserted after the Road 2 sequence, following the 2 seconds of red in both directions. Pushing a pedestrian crossing button (outside of the “Walk” period) will register a “pedestrian call” and a pedestrian crossing sequence will be inserted as soon as the next Road 2 sequence is complete. Should a pedestrian call be registered at only one site, then the pedestrian crossing sequence will be: -4- : Red Roads 1/2 2 sec “Walk” (‘d’ on) 18 sec (still Red Roads 1/2) “Don’t Walk Flashing” (‘a’ flashing) 6 sec (still Red Roads 1/2) “Don’t Walk” (‘a’ on) 2 sec (still Red Roads 1/2) Green Road 1 : : Alternatively, should a pedestrian call be registered at more than one site, then the “Walk” portion of the pedestrian crossing sequence will be extended by a further 8 seconds, thus: : Red Roads 1/2 2 sec “Walk” (‘d’ on) 26 sec (still Red Roads 1/2) “Don’t Walk Flashing” (‘a’ flashing) 6 sec (still Red Roads 1/2) “Don’t Walk” (‘a’ on) 2 sec (still Red Roads 1/2) Green Road 1 : : All pedestrian calls will be cleared as soon as the “Walk” (‘d’ on) signal is activated, and will not register again until the “Walk” (‘d’ on) signal is no longer active. Any pedestrian calls (i.e. a pedestrian button push) made during the “Don’t Walk Flashing” signal will be registered as a call towards the next sequence and have no effect on the current length of the “Don’t Walk Flashing” signal. As an example, if the automotive traffic is “heavy” in both directions, and there is also a heavy demand on the pedestrian crossing, then the total sequence would be: : Green Road 1 24 sec Amber Road 1 4 sec Red Roads 1/2 2 sec Green Road 2 24 sec Amber Road 2 4 sec Red Roads 1/2 2 sec “Walk” (‘d’ on) 26 sec (still Red Roads 1/2) “Don’t Walk Flashing” (‘a’ flashing) 6 sec (still Red Roads 1/2) “Don’t Walk” (‘a’ on) 2 sec (still Red Roads 1/2) Green Road 1 24 sec : The traffic controller system must respond to road sensor changes within one second. (Hint – The core of your design may include a state machine that is clocked at 1Hz). Although, you may need a faster clock to register the pedestrian call buttons. Incorporate an emergency Amber flash switch in your design (SW3). When activated the system should move to the ‘Red both directions’ state as soon as possible (i.e. it must go through four seconds of amber if currently green or amber, or through six seconds of “Don’t Walk Flashing” should a pedestrian sequence be active. Then after two seconds of ‘Red both directions’ plus “Don’t Walk” (‘a’ on) it should flash amber at 1Hz in both directions. In this state all pedestrian -5- signals will remain continuously showing “Don’t Walk” and no pedestrian call buttons will be registered. The design must also include an reset (active low), which will immediately place the lights on both roads in the Red state, plus all pedestrian signals showing “Don’t Walk” continuously, hold for two seconds, and then move to normal operations. You should use SW0 for the reset. For the purposes of testing and demonstrating this assignment, you should include a state clock speed modification option (i.e. x4); under “test switch” control (SW2). This will enable an option of viewing (and testing) the sequence changes more quickly. Finally, so that each design is unique, arrange for a selectable option (using SW1) where your student number is displayed on the 7-segment displays. Clearly when the student number is being displayed the traffic light status cannot be shown, although normal operations should continue in the background. That is, SW1 controls a multiplexer that selects between traffic light and student number data to be displayed. There is no need to include this section in your report, as it is not part of the Traffic Light Controller design. However, it is required for the demonstration. Design Specifications – Enhanced Design. Add additional features to enhance your design. 1. Implement the “Walk”/”Don’t Walk” on the LCD display. 2. Display a count of the current ‘seconds’ for a particular state in the sequence. i.e. count up the seconds in “green-red”, then “amber-red”, then “red-red”, then “red-green” etc. 3. Implement Green right turn arrows on the cross roads. Use the four slide switches (SW16, SW14, SW12 & SW10) for the right turn sensors. If a North or East direction road has an right turn sensors that is active prior to the intended green cycle of that road then an additional 6 seconds inserted into the sequence showing “Green Arrow” and “Green” in one direction with “Red” in the opposite direction (i.e. South or West). After the 6 seconds have elapsed the “Green Arrow” is switched off while the “Green” remains on with “Red” still showing in the opposite direction. After a further four seconds the “Red” in opposite direction changes to “green” and the sequence continues normally. Alternatively, the right turn arrow for South or East direction roads is inserted at the end of the green sequence, as follows. If a South or West has an active right turn sensor then at the end of the common “Green” time for that road then an additional ten seconds is added to the sequence to accommodate the “Green Arrow”. This consists of four seconds of “Amber” in the corresponding opposite direction, with “Green” still showing in the South or East direction, followed by “Red” in the opposite direction, and “Green Arrow” with “Green” still on for a further 6 seconds. The cycle then moves to “Amber” in the South or East direction with the “Green Arrow” off and “Red” showing in the opposite direction for four seconds. After that is the “All Red” state for two seconds and then the start of a new sequence. For the purposes of the demonstration HEX7 & HEX6 are North & South respectively, while HEX5 & HEX4 are East & West respectively. As an example the following is a heavy traffic sequence with right turns. Red All Roads 2 sec Green and Green Arrow On North Road (South Red) 6 sec Green North Road with Green Arrow off (South Red) 4 sec Green North & South Roads 24 sec -6- Amber North Road with Green South Road 4 sec Red North Road with Green South Road 2 sec Green and Green Arrow On South Road (North Red) 6 sec Amber with Green Arrow off South Road (North Red) 4 sec Red All Roads 2 sec Green and Green Arrow On East Road (West Red) 6 sec Green East Road with Green Arrow off (West Red) 4 sec Green East & West Roads 24 sec Amber East Road with Green West Road 4 sec Red East Road with Green West Road 2 sec Green and Green Arrow On West Road (East Red) 6 sec Amber with Green Arrow off West Road (East Red) 4 sec Red All Roads 2 sec Shown above is a diagram of a seven-segment display indicating how segment ‘c’ is used to indicate a green right turn arrow in a traffic light, in conjunction with ‘a’, ‘g’ and ‘d’ representing the red, yellow and green lights. Notes/Hints: (i) A pedestrian signal sequence will only occur if a pedestrian call button has been pressed (and hence registered); otherwise it will remain in the continuous “Don’t Walk” state. (ii) The decision to extend a traffic signal sequence from 14 to 24 seconds should be made between the 10 and 14 second mark (inclusive). i.e. read the traffic sensors between these times. (iii) It is recommended that you practice implementing some of the basic functions on the DE2 Board first and build on this before implementing the entire design. At the end of the day, a partially implemented prototype that works will be easier to demonstrate than an entire design that does not work at all. (iv) There are many different ways of describing timing circuits in VHDL, not all are synthesisable. (v) At this stage it may be safer to stick with the standard ieee libraries, while it is possible to set up your own libraries – great care needs to be exercised. a d e f g c b -7- (vi) If you use a package – keep it in your work library, download it to the same folder as your design files (for the Quartus II compiler) and compile it (using the Quartus II compiler) before compiling your vending machine design. (vii) MOST IMPORTANT – the Quartus II compiler does NOT like integers of different ranges being assigned to each other – even though this may compile and simulate correctly in ModelSim. For your assignment report YOU ARE REQUIRED TO SUBMIT THE FOLLOWING: (a) Block diagrams of your design, showing the hierarchy of the design and signals at each level. You can use HDL Designer or another drawing package if you wish. To assist the explanation of your design (e) it may be appropriate to embed these in the written text. (b) Printout(s) of your Traffic Light Controller design (inc. VHDL code). Key parts of the design graphics/code should be included in the main body of the report, along with the explanation of the design. With the complete design code included as an appendix. Reset Amber Flash Road 1 Lights Pedestrian Signals Pedestrian Call Buttons Display Student No. Traffic Sensors Test Road 2 Lights -8- (c) Printout(s) of your test bench (stimulus) file(s). Where key to the understanding of the testing methodology and simulation results these should included in the main body of the report. Otherwise, a complete set of testbench code must be included as an appendix. (d) Test data (i.e. annotated printouts of simulation results and summary of on board testing); <> (e) A concise (two – three pages writing) explanation of your design and your testing methodologies (i.e. how your circuit works, and why your test results demonstrate that it is functioning correctly), also include comments on any particular innovative ideas you have implemented in your design; (f) Include a summary of the FPGA resource usage of your completed design. Briefly comment on the general efficiency of your design, remember that, typically the smaller the design the lower the cost (as it may fit in a smaller/cheaper device), and the lower the power consumption. Are there any areas where you think the design could save some resources by being implemented differently? You are not required to make changes to the VHDL just brief comment(s). (Half page plus resource usage summary). Submission (by 2pm Monday, September 14): Your complete report (including code) must be converted to an OCR compatible (i.e. searchable) PDF file and submitted to the Design Assignment drop box on the LMS site for this subject. No paper copies are required. When you submit your assignment it will be checked automatically by the Turnitin software for similarity with past and present work, web sites, books etc. Any report with a high Turnitin similarity index will be scrutinised for potential plagiarism. It is highly recommended that you submit a draft copy of your assignment report, to the draft Turnitin drop box (on LMS) and check the generated Turnitin report before finalising your submission. If you submit plagiarised work (that is work copied from others – including code) it will most likely be identified and your assignment deemed unsatisfactory! YOU WILL BE REQUIRED TO SUBMIT YOUR DESIGN CODE AND DEMONSTRATE YOUR DESIGN IN PRACTICAL CLASS SESSION IN THE WEEK PRIOR TO THE REPORT DUE DATE (i.e. September 9). Jim Whittington August 2015 -9- APPENDIX – Altera DE2 Board, Switch, LED, 7-Segment Display and Clock pins The following information is taken from the Altera DE2 Board Manual Signal Name FPGA Pin Description SW0 PIN_N25 Slide Switch SW1 PIN_N26 Slide Switch SW2 PIN_P25 Slide Switch SW3 PIN_AE14 Slide Switch SW4 PIN_AF14 Slide Switch SW5 PIN_AD13 Slide Switch SW6 PIN_AC13 Slide Switch SW7 PIN_C13 Slide Switch SW8 PIN_B13 Slide Switch SW9 PIN_A13 Slide Switch SW10 PIN_N1 Slide Switch SW11 PIN_P1 Slide Switch SW12 PIN_P2 Slide Switch SW13 PIN_T7 Slide Switch SW14 PIN_U3 Slide Switch SW15 PIN_U4 Slide Switch SW16 PIN_V1 Slide Switch SW17 PIN_V2 Slide Switch Table-1 Altera DE2 Board Slide Switch Pin Assignments Signal Name FPGA Pin Description KEY0 PIN_G26 Pushbutton KEY1 PIN_N23 Pushbutton  KEY2 PIN_P23 Pushbutton  KEY3 PIN_W26 Pushbutton  Table-2 Altera DE2 Board Push Button Pin Assignments Signal Name FPGA Pin Description LEDR0 PIN_AE23 Red LED LEDR1 PIN_AF23 Red LED LEDR2 PIN_AB21 Red LED LEDR3 PIN_AC22 Red LED LEDR4 PIN_AD22 Red LED LEDR5 PIN_AD23 Red LED LEDR6 PIN_AD21 Red LED LEDR7 PIN_AC21 Red LED LEDR8 PIN_AA14 Red LED LEDR9 PIN_Y13 Red LED LEDR10 PIN_AA13 Red LED LEDR11 PIN_AC14 Red LED LEDR12 PIN_AD15 Red LED -10- LEDR13 PIN_AE15 Red LED LEDR14 PIN_AF13 Red LED LEDR15 PIN_AE13 Red LED LEDR16 PIN_AE12 Red LED LEDR17 PIN_AD12 Red LED LEDG0 PIN_AE22 Green LED LEDG1 PIN_AF22 Green LED LEDG2 PIN_W19 Green LED LEDG3 PIN_V18 Green LED LEDG4 PIN_U18 Green LED LEDG5 PIN_U17 Green LED LEDG6 PIN_AA20 Green LED LEDG7 PIN_Y18 Green LED LEDG8 PIN_Y12 Green LED Table-3 Altera DE2 LED Pin Assignments Signal Name FPGA Pin Description HEX0 PIN_AF10 HEX0 Segment a HEX0 PIN_AB12 HEX0 Segment b HEX0 PIN_AC12 HEX0 Segment c HEX0 PIN_AD11 HEX0 Segment d HEX0 PIN_AE11 HEX0 Segment e HEX0 PIN_V14 HEX0 Segment f HEX0 PIN_V13 HEX0 Segment g HEX1  PIN_V20 HEX1 Segment a HEX1  PIN_V21 HEX1 Segment b HEX1  PIN_W21 HEX1 Segment c HEX1  PIN_Y22 HEX1 Segment d HEX1  PIN_AA24 HEX1 Segment e HEX1  PIN_AA23 HEX1 Segment f HEX1  PIN_AB24 HEX1 Segment g HEX2  PIN_AB23 HEX2 Segment a HEX2  PIN_V22 HEX2 Segment b HEX2  PIN_AC25 HEX2 Segment c HEX2  PIN_AC26 HEX2 Segment d HEX2  PIN_AB26 HEX2 Segment e HEX2  PIN_AB25 HEX2 Segment f HEX2  PIN_Y24 HEX2 Segment g HEX3  PIN_Y23 HEX3 Segment a HEX3  PIN_AA25 HEX3 Segment b HEX3  PIN_AA26 HEX3 Segment c HEX3  PIN_Y26 HEX3 Segment d HEX3  PIN_Y25 HEX3 Segment e HEX3  PIN_U22 HEX3 Segment f -11- HEX3  PIN_W24 HEX3 Segment g HEX4  PIN_U9 HEX4 Segment a HEX4  PIN_U1 HEX4 Segment b HEX4  PIN_U2 HEX4 Segment c HEX4  PIN_T4 HEX4 Segment d HEX4  PIN_R7 HEX4 Segment e HEX4  PIN_R6 HEX4 Segment f HEX4  PIN_T3 HEX4 Segment g HEX5  PIN_T2 HEX5 Segment a HEX5  PIN_P6 HEX5 Segment b HEX5  PIN_P7 HEX5 Segment c HEX5  PIN_T9 HEX5 Segment d HEX5  PIN_R5 HEX5 Segment e HEX5  PIN_R4 HEX5 Segment f HEX5  PIN_R3 HEX5 Segment g HEX6  PIN_R2 HEX6 Segment a HEX6  PIN_P4 HEX6 Segment b HEX6  PIN_P3 HEX6 Segment c HEX6  PIN_M2 HEX6 Segment d HEX6  PIN_M3 HEX6 Segment e HEX6  PIN_M5 HEX6 Segment f HEX6  PIN_M4 HEX6 Segment g HEX7  PIN_L3 HEX7 Segment a HEX7  PIN_L2 HEX7 Segment b HEX7  PIN_L9 HEX7 Segment c HEX7  PIN_L6 HEX7 Segment d HEX7  PIN_L7 HEX7 Segment e HEX7  PIN_P9 HEX7 Segment f HEX7  PIN_N9 HEX7 Segment g Table-4 Altera DE2 Board 7-Segment Display Pin Assignments Signal Name FPGA Pin Description CLOCK_27 PIN_D13 27 MHz Clock CLOCK_50 PIN_N2 50 MHz Clock EXT_CLOCK PIN_P26 External Clock Input (SMA) Table-5 Altera DE2 Board Clock Pin Assignments
For the graph shown, select the statement that best represents the given system of equations. 4y + x = 2 8y + 2x = 4 Number graph that ranges from negative five to five on the x axis and negative four to six on the y axis. A line with a negative slope passes through (two, zero). A. coincident B. consistent and independent C. inconsistent D. not enough information
Chapter 04 Reading Questions Due: 11:59pm on Friday, May 23, 2014 You will receive no credit for items you complete after the assignment is due. Grading Policy Chapter 4 Reading Quiz Question 1 Part A The cells of all plants have _____. ANSWER: Chapter 4 Reading Quiz Question 2 Part A Which of the following is a difference between cellular respiration and anaerobic respiration? ANSWER: Chapter 4 Reading Quiz Question 16 Part A Which of the following are found in the cells of a dog but not in the bacteria that are found on a dog’s fur? ANSWER: chloroplasts but not mitochondria and use carbohydrates to power their functions chloroplasts and mitochondria and use carbohydrates to power their functions mitochondria but not chloroplasts and use proteins to power their functions chloroplasts but not mitochondria and use proteins to power their functions Only anaerobic respiration produces carbon dioxide. Only anaerobic respiration produces water. Only cellular respiration breaks down carbohydrates. Only cellular respiration uses oxygen to break down carbohydrates. membrane-enclosed nucleus, chloroplasts, and cytoplasm mitochondria, nuclei, and cytoplasm membrane-enclosed nucleus and mitochondria mitochondria and chloroplasts Chapter 04 Reading Questions http://session.masteringenvironmentalscience.com/myct/assignmentPrintV… 1 of 7 5/21/2014 7:58 PM Chapter 4 Reading Quiz Question 18 Part A The products of photosynthesis are the materials that react in the process of _____. ANSWER: Chapter 4 Reading Quiz Question 4 Part A Tissues within an organism’s body are different from each other because the cells in each tissue _____. ANSWER: Chapter 4 Reading Quiz Question 5 Part A An egg and a sperm are _____. ANSWER: Chapter 4 Reading Quiz Question 6 chemosynthesis cellular respiration osmosis anaerobic respiration are produced by different combinations of eggs and sperm activate different portions of the identical DNA remove the DNA that they do not need have different types of DNA gametes that combine in asexual reproduction to produce a zygote zygotes that combine in asexual reproduction to produce a gamete zygotes that combine in sexual reproduction to produce a gamete gametes that combine in sexual reproduction to produce a zygote Chapter 04 Reading Questions http://session.masteringenvironmentalscience.com/myct/assignmentPrintV… 2 of 7 5/21/2014 7:58 PM Part A The growth of a population of sparrows accelerates with each generation. The chances of dying are about the same for these sparrows, regardless of age. This population of sparrows therefore demonstrates _____. ANSWER: Chapter 4 Reading Quiz Question 7 Part A A population will grow the fastest when total fertility rates are _____. ANSWER: Chapter 4 Reading Quiz Question 20 Part A A population will not change in size if the _____. ANSWER: Chapter 4 Reading Quiz Question 8 Part A exponential growth and a type III survivorship curve exponential growth and a type II survivorship curve arithmetic growth and a type II survivorship curve arithmetic growth and a type I survivorship curve low and generation times are long high and generation times are short high and generation times are long low and generation times are short birth rate equals the emigration rate birth rate equals the immigration rate and the death rate equals the emigration rate death rate equals the emigration rate birth rate equals the death rate and the immigration rate equals the emigration rate Chapter 04 Reading Questions http://session.masteringenvironmentalscience.com/myct/assignmentPrintV… 3 of 7 5/21/2014 7:58 PM As a population increases to near its carrying capacity, _____. ANSWER: Chapter 4 Reading Quiz Question 10 Part A The various activities that define an organism’s role in an ecosystem are that organism’s _____. ANSWER: Chapter 4 Reading Quiz Question 22 Part A Largemouth bass and rainbow trout are stocked in a small, deep 10-acre pond. The bass are most active in 20-30 °C water, and the rainbow trout prefer water at about 6-22 °C. We expect to find few places in this pond where the two species interact because they have different _____. ANSWER: Chapter 4 Reading Quiz Question 11 Part A The evolutionary concept of fitness is most closely associated with _____. birth rates decline, death rates increase, and the overall rate of population growth declines birth rates decline, death rates decline, and the overall rate of population growth increases birth rates decline, death rates decline, and the overall rate of population growth declines birth rates increase, death rates increase, and the overall rate of population growth declines range of tolerance habitat ecological niche fitness generation times ranges of tolerance growth rates carrying capacities Chapter 04 Reading Questions http://session.masteringenvironmentalscience.com/myct/assignmentPrintV… 4 of 7 5/21/2014 7:58 PM ANSWER: Chapter 4 Reading Quiz Question 12 Part A The ultimate source of new inherited traits in a population is _____. ANSWER: Chapter 4 Reading Quiz Question 23 Part A Studies of human birth weight and infant health reveal that babies who are heavier than 10 pounds or lighter than 6 pounds have decreased survival rates. This pattern of survival is an example of _____. ANSWER: Chapter 4 Reading Quiz Question 14 Part A From an evolutionary perspective, the most important property that defines a species is _____. ANSWER: feeding reproduction carrying capacity mutations adaptation survivorship natural selection mutation disruptive selection directional selection bimodal selection stabilizing selection Chapter 04 Reading Questions http://session.masteringenvironmentalscience.com/myct/assignmentPrintV… 5 of 7 5/21/2014 7:58 PM Chapter 4 Reading Quiz Question 24 Part A In Missouri, the marbled salamander breeds in the late fall (October-December). In the same region, the closely related spotted salamander breeds in early spring (February-March). Thus, these species are kept separate because of _____. ANSWER: Chapter 4 Reading Quiz Question 15 Part A Which one of the following correctly lists the levels of classification from specific to general? ANSWER: Chapter 4 Reading Quiz Question 25 Part A In a phylogenetic tree, all of the species in one family will _____. ANSWER: the ability of a species to extend the its range its type of natural selection its dietary habits reproductive isolation behavioral isolation structural isolation temporal isolation geographic isolation genus, species, order, family, class, phylum, kingdom species, genus, class, family, order, phylum, kingdom species, genus, family, order, class, phylum, kingdom kingdom, phylum, class, order, family, genus, species Chapter 04 Reading Questions http://session.masteringenvironmentalscience.com/myct/assignmentPrintV… 6 of 7 5/21/2014 7:58 PM Score Summary: Your score on this assignment is 0.0%. You received 0 out of a possible total of 19 points. have the same scientific name have identical ecological niches be scattered throughout the tree be clustered together in the tree Chapter 04 Reading Questions http://session.masteringenvironmentalscience.com/myct/assignmentPrintV… 7 of 7 5/21/2014 7:58 PM
Biomedical Signal and Image Processing (4800_420_001) Assigned on September 12th, 2017 Assignment 4 – Noise and Correlation 1. If a signal is measured as 2.5 V and the noise is 28 mV (28 × 10−3 V), what is the SNR in dB? 2. A single sinusoidal signal is found with some noise. If the RMS value of the noise is 0.5 V and the SNR is 10 dB, what is the RMS amplitude of the sinusoid? 3. The file signal_noise.mat contains a variable x that consists of a 1.0-V peak sinusoidal signal buried in noise. What is the SNR for this signal and noise? Assume that the noise RMS is much greater than the signal RMS. Note: “signal_noise.mat” and other files used in these assignments can be downloaded from the content area of Brightspace, within the “Data Files for Exercises” folder. These files can be opened in Matlab by copying into the active folder and double-clicking on the file or using the Matlab load command using the format: load(‘signal_noise.mat’). To discover the variables within the files use the Matlab who command. 4. An 8-bit ADC converter that has an input range of ±5 V is used to convert a signal that ranges between ±2 V. What is the SNR of the input if the input noise equals the quantization noise of the converter? Hint: Refer to Equation below to find the quantization noise: 5. The file filter1.mat contains the spectrum of a fourth-order lowpass filter as variable x in dB. The file also contains the corresponding frequencies of x in variable freq. Plot the spectrum of this filter both as dB versus log frequency and as linear amplitude versus linear frequency. The frequency axis should range between 10 and 400 Hz in both plots. Hint: Use Equation below to convert: Biomedical Signal and Image Processing (4800_420_001) Assigned on September 12th, 2017 6. Generate one cycle of the square wave similar to the one shown below in a 500-point MATLAB array. Determine the RMS value of this waveform. [Hint: When you take the square of the data array, be sure to use a period before the up arrow so that MATLAB does the squaring point-by-point (i.e., x.^2).]. 7. A resistor produces 10 μV noise (i.e., 10 × 10−6 V noise) when the room temperature is 310 K and the bandwidth is 1 kHz (i.e., 1000 Hz). What current noise would be produced by this resistor? 8. A 3-ma current flows through both a diode (i.e., a semiconductor) and a 20,000-Ω (i.e., 20-kΩ) resistor. What is the net current noise, in? Assume a bandwidth of 1 kHz (i.e., 1 × 103 Hz). Which of the two components is responsible for producing the most noise? 9. Determine if the two signals, x and y, in file correl1.mat are correlated by checking the angle between them. 10. Modify the approach used in Practice Problem 3 to find the angle between short signals: Do not attempt to plot these vectors as it would require a 6-dimensional plot!
Morgan Extra Pages Graphing with Excel to be carried out in a computer lab, 3rd floor Calloway Hall or elsewhere The Excel spreadsheet consists of vertical columns and horizontal rows; a column and row intersect at a cell. A cell can contain data for use in calculations of all sorts. The Name Box shows the currently selected cell (Fig. 1). In the Excel 2007 and 2010 versions the drop-down menus familiar in most software screens have been replaced by tabs with horizontally-arranged command buttons of various categories (Fig. 2) ___________________________________________________________________ Open Excel, click on the Microsoft circle, upper left, and Save As your surname. xlsx on the desktop. Before leaving the lab e-mail the file to yourself and/or save to a flash drive. Also e-mail it to your instructor. Figure 1. Parts of an Excel spreadsheet. Name Box Figure 2. Tabs. Click to buy NOW! PDF-XChange Viewer www.docu-track.com Click to buy NOW! PDF-XChange Viewer www.docu-track.com EXERCISE 1: BASIC OPERATIONS Click Save often as you work. 1. Type the heading “Edge Length” in Cell A1 and double click the crack between the A and B column heading for automatic widening of column A. Similarly, write headings for columns B and C and enter numbers in Cells A2 and A3 as in Fig. 3. Highlight Cells A2 and A3 by dragging the cursor (chunky plus-shape) over the two of them and letting go. 2. Note that there are three types of cursor crosses: chunky for selecting, barbed for moving entries or blocks of entries from cell to cell, and tiny (appearing only at the little square in the lower-right corner of a cell). Obtain a tiny arrow for Cell A3 and perform a plus-drag down Column A until the cells are filled up to 40 (in Cell A8). Note that the two highlighted cells set both the starting value of the fill and the intervals. 3. Click on Cell B2 and enter a formula for face area of a cube as follows: type =, click on Cell A2, type ^2, and press Enter (note the formula bar in Fig. 4). 4. Enter the formula for cube volume in Cell C2 (same procedure, but “=, click on A2, ^3, Enter”). 5. Highlight Cells B2 and C2; plus-drag down to Row 8 (Fig. 5). Do the numbers look correct? Click on some cells in the newly filled area and notice how Excel steps the row designations as it moves down the column (it can do it for horizontal plusdrags along rows also). This is the major programming development that has led to the popularity of spreadsheets. Figure 3. Entries. Figure 4. A formula. Figure 5. Plus-dragging formulas. Click to buy NOW! PDF-XChange Viewer www.docu-track.com Click to buy NOW! PDF-XChange Viewer www.docu-track.com 6. Now let’s graph the Face Area versus Edge Length: select Cells A1 through B8, choose the Insert tab, and click the Scatter drop-down menu and select “Scatter with only Markers” (Fig. 6). 7. Move the graph (Excel calls it a “chart”) that appears up alongside your number table and dress it up as follows: a. Note that some Chart Layouts have appeared above. Click Layout 1 and alter each title to read Face Area for the vertical axis, Edge Length for the horizontal and Face Area vs. Edge Length for the Graph Title. b. Activate the Excel Least squares routine, called “fitting a trendline” in the program: right click any of the data markers and click Add Trendline. Choose Power and also check “Display equation on chart” and “Display R-squared value on chart.” Fig. 7 shows what the graph will look like at this point. c. The titles are explicit, so the legend is unnecessary. Click on it and press the delete button to remove it. Figure 6. Creating a scatter graph. Figure 7. A graph with a fitted curve. Click to buy NOW! PDF-XChange Viewer www.docu-track.com Click to buy NOW! PDF-XChange Viewer www.docu-track.com 8. Now let’s overlay the Volume vs. Edge Length curve onto the same graph (optional for 203L/205L): Make a copy of your graph by clicking on the outer white area, clicking ctrl-c (or right click, copy), and pasting the copy somewhere else (ctrl-v). If you wish, delete the trendline as in Fig. 8. a. Right click on the outer white space, choose Select Data and click the Add button. b. You can type in the cell ranges by hand in the dialog box that comes up, but it is easier to click the red, white, and blue button on the right of each space and highlight what you want to go in. Click the red, white, and blue of the bar that has appeared, and you will bounce back to the Add dialog box. Use the Edge Length column for the x’s and Volume for the y’s. c. Right-click on any volume data point and choose Format Data Series. Clicking Secondary Axis will place its scale on the right of the graph as in Fig. 8. d. Dress up your graph with two axis titles (Layout-Labels-Axis Titles), etc. Figure 8. Adding a second curve and y-axis to the graph Click to buy NOW! PDF-XChange Viewer www.docu-track.com Click to buy NOW! PDF-XChange Viewer www.docu-track.com EXERCISE 2: INTERPRETING A LINEAR GRAPH Introduction: Many experiments are repeated a number of times with one of the parameters involved varied from run to run. Often the goal is to measure the rate of change of a dependent variable, rather than a particular value. If the dependent variable can be expressed as a linear function of the independent parameter, then the slope and yintercept of an appropriate graph will give the rate of change and a particular value, respectively. An example of such an experiment in PHYS.203L/205L is the first part of Lab 20, in which weights are added to the bottom of a suspended spring (Figure 9). This experiment shows that a spring exerts a force Fs proportional to the distance stretched y = (y-yo), a relationship known as Hooke’s Law: Fs = – k(y – yo) (Eq. 1) where k is called the Hooke’s Law constant. The minus sign shows that the spring opposes any push or pull on it. In Lab 20 Fs is equal to (- Mg) and y is given by the reading on a meter stick. Masses were added to the bottom of the spring in 50-g increments giving weights in newtons of 0.49, 0.98, etc. The weight pan was used as the pointer for reading y and had a mass of 50 g, so yo could not be directly measured. For convenient graphing Equation 1 can be rewritten: -(Mg) = – ky + kyo Or (Mg) = ky – kyo (Eq. 1′) Procedure 1. On your spreadsheet note the tabs at the bottom left and double-click Sheet1. Type in “Basics,” and then click the Sheet2 tab to bring up a fresh worksheet. Change the sheet name to “Linear Fit” and fill in data as in this table. Hooke’s Law Experiment y (m) -Fs = Mg (N) 0.337 0.49 0.388 0.98 0.446 1.47 0.498 1.96 0.550 2.45 2. Highlight the cells with the numbers, and graph (Mg) versus y as in Steps 6 and 7 of the Basics section. Your Trendline this time will be Linear of course. If you are having trouble remembering what’s versus what, “y” looks like “v”, so what comes before the “v” of “versus” goes on the y (vertical) axis. Yes, this graph is confusing: the horizontal (“x”) axis is distance y, and the “y” axis is something else. 3. Click on the Equation/R2 box on the graph and highlight just the slope, that is, only the number that comes before the “x.” Copy it (control-c is a fast way to Figure 9. A spring with a weight stretching it Click to buy NOW! PDF-XChange Viewer www.docu-track.com Click to buy NOW! PDF-XChange Viewer www.docu-track.com do it) and paste it (control-v) into an empty cell. Do likewise for the intercept (including the minus sign). SAVE YOUR FILE! 5. The next steps use the standard procedure for obtaining information from linear data. Write the general equation for a straight line immediately below a hand-written copy of Equation 1′ then circle matching items: (Mg) = k y + (- k yo) (Eq. 1′) y = m x + b Note the parentheses around the intercept term of Equation 1′ to emphasize that the minus sign is part of it. Equating above and below, you can create two useful new equations: slope m = k (Eq. 2) y-intercept b = -kyo (Eq. 3) 6. Solve Equation 2 for k, that is, rewrite left to right. Then substitute the value for slope m from your graph, and you have an experimental value for the Hooke’s Law constant k. Next solve Equation 3 for yo, substitute the value for intercept b from your graph and the value of k that you just found, and calculate yo. 7. Examine your linear graph for clues to finding the units of the slope and the yintercept. Use these units to find the units of k and yo. 8. Present your values of k and yo with their units neatly at the bottom of your spreadsheet. 9. R2 in Excel, like r in our lab manual and Corr. in the LoggerPro software, is a measure of how well the calculated line matches the data points. 1.00 would indicate a perfect match. State how good a match you think was made in this case? 10. Do the Homework, Further Exercises on Interpreting Linear Graphs, on the following pages. Click to buy NOW! PDF-XChange Viewer www.docu-track.com Click to buy NOW! PDF-XChange Viewer www.docu-track.com Eq.1 M m f M a g , (Eq.2) M slope m g (Eq.3) M b f Morgan Extra Pages Homework: Graph Interpretation Exercises EXAMPLE WITH COMPLETE SOLUTION In PHYS.203L and 205L we do Lab 9 Newton’s Second Law on Atwood’s Machine using a photogate sensor (Fig. 1). The Atwood’s apparatus can slow the rate of fall enough to be measured even with primitive timing devices. In our experiment LoggerPro software automatically collects and analyzes the data giving reliable measurements of g, the acceleration of gravity. The equation governing motion for Atwood’s Machine can be written: where a is the acceleration of the masses and string, g is the acceleration of gravity, M is the total mass at both ends of the string, m is the difference between the masses, and f is the frictional force at the hub of the pulley wheel. In this exercise you are given a graph of a vs. m obtained in this experiment with the values of M and the slope and intercept (Fig. 2). The goal is to extract values for acceleration of gravity g and frictional force f from this information. To analyze the graph we write y = mx + b, the general equation for a straight line, directly under Equation 1 and match up the various parameters: Equating above and below, you can create two new equations: and y m x b M m f M a g Figure 1. The Atwood’s Machine setup (from the LoggerPro handout). Figure 2. Graph of acceleration versus mass difference; data from a Physics I experiment. Atwood’s Machine M = 0.400 kg a = 24.4 m – 0.018 R2 = 0.998 0.00 0.20 0.40 0.60 0.80 1.00 1.20 1.40 0.000 0.010 0.020 0.030 0.040 0.050 0.060 m (kg) a (m/s2) Click to buy NOW! PDF-XChange Viewer www.docu-track.com Click to buy NOW! PDF-XChange Viewer www.docu-track.com 2 2 9.76 / 0.400 24.4 /( ) m s kg m kg s g Mm To handle Equation 2 it pays to consider what the units of the slope are. A slope is “the rise over the run,“ so its units must be the units of the vertical axis divided by those of the horizontal axis. In this case: Now let’s solve Equation 2 for g and substitute the values of total mass M and of the slope m from the graph: Using 9.80 m/s2 as the Baltimore accepted value for g, we can calculate the percent error: A similar process with Equation 3 leads to a value for f, the frictional force at the hub of the pulley wheel. Note that the units of intercept b are simply whatever the vertical axis units are, m/s2 in this case. Solving Equation 3 for f: EXERCISE 1 The Picket Fence experiment makes use of LoggerPro software to calculate velocities at regular time intervals as the striped plate passes through the photogate (Fig. 3). The theoretical equation is v = vi + at (Eq. 4) where vi = 0 (the fence is dropped from rest) and a = g. a. Write Equation 4 with y = mx + b under it and circle matching factors as in the Example. b. What is the experimental value of the acceleration of gravity? What is its percent error from the accepted value for Baltimore, 9.80 m/s2? c. Does the value of the y-intercept make sense? d. How well did the straight Trendline match the data? 2 / 2 kg s m kg m s 0.4% 100 9.80 9.76 9.80 100 . . . % Acc Exp Acc Error kg m s mN kg m s f Mb 7.2 10 / 7.2 0.400 ( 0.018 / ) 3 2 2 Figure 3. Graph of speed versus time as calculated by LoggerPro as a picket fence falls freely through a photogate. Picket Fence Drop y = 9.8224x + 0.0007 R2 = 0.9997 0 2 4 6 8 10 12 0 0.2 0.4 0.6 0.8 1 1.2 t (s) v (m/s) Click to buy NOW! PDF-XChange Viewer www.docu-track.com Click to buy NOW! PDF-XChange Viewer www.docu-track.com EXERCISE 2 This is an electrical example from PHYS.204L/206L, potential difference, V, versus current, I (Fig. 4). The theoretical equation is V = IR (Eq. 5) and is known as “Ohm’s Law.” The unit symbols stand for volts, V, and Amperes, A. The factor R stands for resistance and is measured in units of ohms, symbol (capital omega). The definition of the ohm is: V (Eq. 6) By coincidence the letter symbols for potential (a quantity ) and volts (its unit) are identical. Thus “voltage” has become the laboratory slang name for potential. a. Rearrange the Ohm’s Law equation to match y = mx + b.. b. What is the experimental resistance? c. Comment on the experimental intercept: is its value reasonable? EXERCISE 3 This graph (Fig. 5) also follows Ohm’s Law, but solved for current I. For this graph the experimenter held potential difference V constant at 15.0V and measured the current for resistances of 100, 50, 40, and 30 Solve Ohm’s Law for I and you will see that 1/R is the logical variable to use on the x axis. For units, someone once jokingly referred to a “reciprocal ohm” as a “mho,” and the name stuck. a. Rearrange Equation 5 solved for I to match y = mx + b. b. What is the experimental potential difference? c. Calculate the percent difference from the 15.0 V that the experimenter set on the power supply (the instrument used for such experiments). d. Comment on the experimental intercept: is its value reasonable? Figure 4. Graph of potential difference versus current; data from a Physics II experiment. The theoretical equation, V = IR, is known as “Ohm’s Law.” Ohm’s Law y = 0.628x – 0.0275 R2 = 0.9933 0 0.1 0.2 0.3 0.4 0 0.1 0.2 0.3 0.4 0.5 0.6 Current, I (A) Potential difference, V (V) Figure 5. Another application of Ohm’s Law: a graph of current versus the inverse of resistance, from a different electric circuit experiment. Current versus (1/Resistance) y = 14.727x – 0.2214 R2 = 0.9938 0 100 200 300 400 500 600 5 10 15 20 25 30 35 R-1 (millimhos) I (milliamperes) Click to buy NOW! PDF-XChange Viewer www.docu-track.com Click to buy NOW! PDF-XChange Viewer www.docu-track.com EXERCISE 4 The Atwood’s Machine experiment (see the solved example above) can be done in another way: keep mass difference m the same and vary the total mass M (Fig. 6). a. Rewrite Equation 1 and factor out (1/M). b. Equate the coefficient of (1/M) with the experimental slope and solve for acceleration of gravity g. c. Substitute the values for slope, mass difference, and frictional force and calculate the experimental of g. d. Derive the units of the slope and show that the units of g come out as they should. e. Is the value of the experimental intercept reasonable? EXERCISE 5 In the previous two exercises the reciprocal of a variable was used to make the graph come out linear. In this one the trick will be to use the square root of a variable (Fig. 7). In PHYS.203L and 205L Lab 19 The Pendulum the theoretical equation is where the period T is the time per cycle, L is the length of the string, and g is the acceleration of gravity. a. Rewrite Equation 7 with the square root of L factored out and placed at the end. b. Equate the coefficient of √L with the experimental slope and solve for acceleration of gravity g. c. Substitute the value for slope and calculate the experimental of g. d. Derive the units of the slope and show that the units of g come out as they should. e. Is the value of the experimental intercept reasonable? 2 (Eq . 7) g T L Figure 6. Graph of acceleration versus the reciprocal of total mass; data from a another Physics I experiment. Atwood’s Machine m = 0.020 kg f = 7.2 mN y = 0.1964x – 0.0735 R2 = 0.995 0.400 0.600 0.800 1.000 2.000 2.500 3.000 3.500 4.000 4.500 5.000 1/M (1/kg) a (m/s2) Effect of Pendulum Length on Period y = 2.0523x – 0.0331 R2 = 0.999 0.400 0.800 1.200 1.600 2.000 2.400 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 1.10 L1/2 (m1/2) T (s) Figure 7. Graph of period T versus the square root of pendulum length; data from a Physics I experiment. Click to buy NOW! PDF-XChange Viewer www.docu-track.com Click to buy NOW! PDF-XChange Viewer www.docu-track.com EXERCISE 6 In Exercise 5 another approach would have been to square both sides of Equation 7 and plot T2 versus L. Lab 20 directs us to use that alternative. It involves another case of periodic or harmonic motion with a similar, but more complicated, equation for the period: where T is the period of the bobbing (Fig. 8), M is the suspended mass, ms is the mass of the spring, k is a measure of stiffness called the spring constant, and C is a dimensionless factor showing how much of the spring mass is effectively bobbing. a. Square both sides of Equation 8 and rearrange it to match y = mx + b. b. Write y = mx + b under your rearranged equation and circle matching factors as in the Example. c. Write two new equations analogous to Equations 2 and 3 in the Example. Use the first of the two for calculating k and the second for finding C from the data of Fig. 9. d. A theoretical analysis has shown that for most springs C = 1/3. Find the percent error from that value. e. Derive the units of the slope and intercept; show that the units of k come out as N/m and that C is dimensionless. 2 (Eq . 8) k T M Cm s Figure 8. In Lab 20 mass M is suspended from a spring which is set to bobbing up and down, a good approximation to simple harmonic motion (SHM), described by Equation 8. Lab 20: SHM of a Spring Mass of the spring, ms = 25.1 g y = 3.0185x + 0.0197 R2 = 0.9965 0.0000 0.2000 0.4000 0.6000 0.8000 1.0000 0 0.05 0.1 0.15 0.2 0.25 0.3 M (kg) T 2 2 Figure 9. Graph of the square of the period T2 versus suspended mass M data from a Physics I experiment. Click to buy NOW! PDF-XChange Viewer www.docu-track.com Click to buy NOW! PDF-XChange Viewer www.docu-track.com EXERCISE 7 This last exercise deals with an exponential equation, and the trick is to take the logarithm of both sides. In PHYS.204L/206L we do Lab 33 The RC Time Constant with theoretical equation: where V is the potential difference at time t across a circuit element called a capacitor (the is dropped for simplicity), Vo is V at t = 0 (try it), and (tau) is a characteristic of the circuit called the time constant. a. Take the natural log of both sides and apply the addition rule for logarithms of a product on the right-hand side. b. Noting that the graph (Fig. 10) plots lnV versus t, arrange your equation in y = mx + b order, write y = mx + b under it, and circle the parts as in the Example. c. Write two new equations analogous to Equations 2 and 3 in the Example. Use the first of the two for calculating and the second for finding lnVo and then Vo. d. Note that the units of lnV are the natural log of volts, lnV. As usual derive the units of the slope and interecept and use them to obtain the units of your experimental V and t. V V e (Eq. 9) t o Figure 10. Graph of a logarithm versus time; data from Lab 33, a Physics II experiment. Discharge of a Capacitor y = -9.17E-03x + 2.00E+00 R2 = 9.98E-01 0.00 0.50 1.00 1.50 2.00 2.50