i need help to solve this. This a due assignment and trying to understand it. Thank you

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

i need help to solve this. This a due assignment and trying to understand it. Thank you

Post by answerhappygod »

i need help to solve this. This a due assignment and trying tounderstand it. Thank you
I Need Help To Solve This This A Due Assignment And Trying To Understand It Thank You 1
I Need Help To Solve This This A Due Assignment And Trying To Understand It Thank You 1 (139.23 KiB) Viewed 152 times
Create a Jupyter notebook named Proj07YourName.ipynb that begins by displaying the following certification. I certify that this project is my own work and is not the work of others. I agree not to share my solution with others. - Print your name here. Then use the pre-written code in the notebook to create and display a square wave that matches the following image. 1.00 0.75 M 0.50- 0.25 0.00 220 Hz square wave - display your name here -0.25 - -0.50 -0.75- www -1.00▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬--------------- 0.000 0.002 0.005 0.007 0.009 0.011 0.014 0.016 0.018 Time in seconds Then write the necessary code in the notebook to compute and display a logarithmic presentation of the amplitude spectrum of the square wave that matches the following image. (See updated information regarding the plot below.)
10² 10⁰ 10-² 10-4 10-6 Log amplitude spectrum - display your name here. 10-8 10-10 10-12 10-14 2200.00 Frequency [Hz] Then write the necessary code in the notebook to compute and display a linear presentation of the amplitude spectrum of the square wave that matches the following image. 80 70 60 50 40 30 20 10 0.00 0.00 1100.00 3300.00 1100.00 Linear amplitude spectrum - display your name here 2200.00 Frequency [Hz] 4400.00 3300.00 4400.00
Also cause your code to write each of the three images into output files named: SquareWave.jpg • LogSpectrum.jpg • LinearSpectrum.jpg Download an HTML version of your notebook named Proj07YourName.html. Encapsulate a copy of the HTML file, a copy of the ipynb file, and each of the three image files in a zip file and submit the zip file via Blackboard. Be sure that your actual name appears in the certification, in each of the images, and in the file names as indicated. Update 01/25/21 A student has determined that when she runs my Python code on her system, the logarithmic presentation of the amplitude spectrum of the square wave differs from the presentation produced by my system, which is shown above. The presentation produced by her system is shown below. 10²- 10-¹- 104- 10-7 Log amplitude spectrum 10-10- 10-11- 0.00 Why 1100.00 showW 2200.00 Frequency [Hz] 3300.00 4400.00 Note in particular that the tick marks and the labels on the tick marks on the vertical axis are different from that shown above. (I inserted the black rectangle to cover the student' name.) Other students have identified other formatting differences on their systems.
Update: 01/01/22 This assignment can be a significant challenge for those who are new to these concepts. For those having difficulty creating the square wave for Asg07, the "formula" is provided in the page at https://cnx.org/contents/[email protected]:9QRQR- Oh@10/Dsp00100-Periodic-Motion-and-Sinusoids#Figure 6 (Note that this page is scheduled to be moved from OpenStax to an Internet Archive in August 2022. Also see Figure 6 in lesson Dsp00100-Periodic Motion and Sinusoids in the DSP Ebook that you can download from your Bb course menu..) I will repeat the formula here for your convenience: cos(2*pi*x/50) - cos(2*pi*x+3/50)/3 + cos(2*pi*x*5/50)/5 - cos(2*pi*x*7/50)/7 + cos(2*pi*x*9/50)/9 - cos(2*pi*x*11/50)/11 + cos(2*pi*x*13/50)/13 - cos(2*pi*x*15/50)/15 + cos(2*pi*x*17/50)/17 - cos(2*pi*x*19/50)/19 You would do well to compare the curves in Figure 5 and Figure 6 at that location to understand what this formula represents. Here is the formula shown in Python code. freq = 220 #cycles per second (Hz) period = 1/freq #seconds per sample #Create 40 samples for each cycle of the square wave time_step = period/40 #sampling interval print('time between samples =',time_step, 'seconds') print('samp rate=',1/time_step, 'samp per second') #Create a time base sufficient to describe four cycles of the #square wave with an interval of time_step. time_vec = np.arange(0, 4*period, time_step) #Create a square wave sampled at the times in the time base sigl= (np.cos(2 np.pi* time_vec / period)) sig2= (np.cos(2 np.pi* time_vec * 3 / period))/3 np.pi np.pi time_vec * 5 / period))/5 sig3= (np.cos(2 sig4 = (np.cos(2 sigs (np.cos(2 sig6 (np.cos(2 np.pi time_vec sig7 (np.cos(2 sig8 (np.cos(2 sig9 (np.cos(2 np. pitime_vec 17 / period))/17 sigle (np.cos(2 np.pi time_vec 19 / period))/19 time_vec 7 / period))/7 np.pitime_vec * 9 / period))/9 11 / period))/11 np.pitime_vec 13 / period))/13 np.pi time_vec 15 / period))/15 * = * sig sigl-sig2+sig3-sig4+sig5-sig6+sig7-sig8+sig9-sigle The code shown above produces the following output text: time between samples = 0.00011363636363636364 seconds
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply