ECGR 2254 – Project 1 Due: Friday 10/14/2022 – 11:59PM Please note the following: • Provide a neatly written report that describes your process. For example, , carefully describe how you...

Just #1 and #3 ONLY


ECGR 2254 – Project 1 Due: Friday 10/14/2022 – 11:59PM Please note the following: • Provide a neatly written report that describes your process. For example, , carefully describe how you chose your time step, mixing words and equations as needed. You don’t need to write a lot, but someone who knows what you’re doing (i.e. me) should be able to follow your logic. • You do not need to type up a report. A neat, hand-written report is sufficient. • Please identify your collaborators (i.e. two or three people with whom you worked on the project). Each person should submit a unique report, and you do not have to collaborate. That said, I think it’s highly likely that you will talk to others, and you should cite that. Working with others is a good way to learn, as long as you re not copying. Problem 1 – AC Circuit Simulations 1 In power-system analysis, it is common to use simulation software to understand the transient conditions that can easily damage equipment. This problem examines an important issue that frequently occur in practice. The circuit shown below models the behavior of an AC power system providing power to a single phase of a building absorbing approximately 10kW of power. The building and its loads are modeled as a 23.04Ω resistor. At time ?? = 0, a tree falls on the line coming into the building and causes a short circuit to ground. This situation can be modeled as a switch closing at ?? = 0 as shown below. The AC system can be modeled as a Thevenin equivalent circuit consisting of voltage source ????(??) in series with an inductor ???? and a resistor ????. Protection engineers use simulation programs to select the circuit breaker that must be placed in series with the voltage source to interrupt the extremely dangerous short-circuit current. Note that ?? is a variable. a) Protection engineers often use what we call “short circuit current” to select a circuit breaker. This value is the amplitude of the steady-state current flowing once the switch closes. Determine this value. To approach this problem, you should do the following: a. Write the differential equation for the current once the switch closes. b. Solve for the steady-state solution of the differential equation assuming ?? = 0. c. Take the amplitude of the result b) You are now going to write code to solve for the current numerically. To do this, please use the following steps: a. Determine an appropriate time step Δ??. Do this by considering the form of the transient solution and the form of the steady-state solution. b. Determine an appropriate end-time for your simulation. Your graph must show at least two complete periods of the steady-state current and at least 7?? c. Write a MATLAB script that solves for the current ????(??) after ?? = 0. Assume that the ????(0) = 0 and ?? = 0. d. Once your code works, try several different values of ?? between 0 and 180 degrees. For what approximate value of ?? does the value of ????(??) become the largest after ?? = 0? c) You are now going to determine the impact of ?? a. Write the differential equation for the current before the switch closes b. Solve for the steady-state solution of the differential equation using the value of ?? that you found in part b.d. c. Use your result from part c.b to determine the true initial condition ????(0). For example, if you found that ????(??) = 10 cos(2??60?? + 30∘) in part c.b, ????(0) = 10 cos(30∘). d. Rerun your simulation from part b with ?? and your new ????(0). This question is asking you to rerun the simulation for the time after the switch closes. e. What is the peak current now? Please note that it should be higher than it was in part b. What is the peak value of the current during the transient period now? Problem 2 – Audio Filtering For this problem, you must also download the file named “sampleaudio.mat.” This file contains some corrupted digital audio. A 60Hz “hum” has somehow corrupted the file. You must remove it. To start this problem, you must download the file “sampleaudio.mat” and place it in your working directory. This directory should be the same one where you are writing your scripts. You can load this file with the following command: >> load(‘sampleaudio.mat’); Once you run this code, you will have the following two variables loaded into your workspace: • x: This is a vector containing the audio file data. • Fs: This is the sampling frequency in Hz. 1/Fs is the amount of time that passes between each point in the audio file. To listen to the sound, use the following command: >> sound(x,Fs); You will hear the 60Hz distortion. We will now remove it. a) Since most audio signals are above 60Hz, we will attempt to clean the signal using a “high pass” digital filter. To create this digital filter, we are going to make a digital equivalent to the following circuit. The voltage source ??(??) would be the audio source, and the voltage ??(??) would be the filtered audio. Write the differential equation that solves for the voltage ??(??) across the resistor. Your equation should be in terms of ?? and ??. Hint: Write the voltage across the capacitor in terms of the source voltage ??(??) and the resistor voltage ??(??). Then recall that ??(??) = ??(??)??. Your final differential equation will include both ????/???? and ????/????. b) Convert the differential equation from part a into an equivalent discrete-time equation. Explain your process. To write the discrete-time equation, you will need to derive it. You cannot simply pattern-match in this case because of the ????/????. The notes from 9/23 should help you to understand how to develop the discrete-time equation. c) Write a MATLAB script that filters the audio signal x. Using what you are given about this problem, choose a reasonable value for Δ?? and explain. Use ?? = 1Ω and ?? = 265.26???? d) Play ?? using the command sound(y,Fs). You should be able to hear a clear sentence. Please provide this sentence. e) Using subplot, show the input x(t) and the output y(t). It should be clear that this is a large signal that has been removed. Make sure to properly label the axes in your plots. Problem 3 – Traditional Communications Amplitude modulation (AM) is a very common technique for sending signals over the airwaves. AM is used in AM radio, and in many advanced communications systems such as cellular and WiFi networks. When sending an audio signal over the airwaves, you multiply the audio signal by a high frequency sinusoid. The transmitted signal might have the form: ??(??) = ????????????(??) cos(2??????) In this case, the high frequency cosine wave has a frequency ?? that is much higher than the audio frequencies. The highest frequencies in voice signals are approximately 2 or 3kHz. The figure below shows a common demodulator system. If designed properly, then the output signal ??(??) should be ??(??) ≈ ????????????(??). If this signal is inside a computer, it can be sent to a sound card to be played. Figure 3.1: Demodulator Please do the following: a) Theory: This part asks you to understand the theory for this problem. The figure above shows how you are going to implement the demodulator. The first step in the demodulator is to multiply ??(??) = ????????????(??)cos (2??????) with cos(2??????). Use Euler’s identity relationships to prove that ????????(??) = 1 2 ????????????(??) + 1 2 ????????????(??) cos(4??????) b) In this part, you are going to implement the multiplication and verify the result you found in part a. There are two broad steps in this part. The first is setup, which includes loading in the file containing ??(??). The second step is to implement the multiplication and review the result. Setup Download the file named “problem3.bin” from Canvas. This file contains a signal ??(??) that was received over a radio. In this case, please note the following: • ?? = 50kHz • The signal ??(??) has been sampled by an analog-to-digital converter. The sampling frequency is ?????????? = 2.205MHz, so Δ?? = 1/??????????. • The analog-to-digital converter saved the values as 32-bit floating point numbers. Place the file “problem3.bin” in your active MATLAB directory. You can find your active MATLAB directory in the command window. In my version of MATLAB, I see the following: This tells me that I’m currently in the folder named, “C:\Users\rcox3\Documents\SDR_files”. Your command window might look a little different, but you should see something similar that tells you your active directory. Create a MATLAB script in this same folder. It is important to have the script saved in your active directory. Inside this script, you will need to write the following code to load “problem3.bin”: fileID = fopen('problem3.bin','r'); x=fread(fileID,'precision'); fclose(fileID); Note that the word precision should be replaced by the appropriate precision. Use the information at the following link to determine whether precision should be single or double: https://www.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html Remember, I said the analog-to-digital converter provided 32-bit floating point values. Implementation: Once this file is loaded properly, please create a piece of code that implements the multiplication. This should be done using the following steps: • Create a time row vector having the same length as ??. It should start at ?? = 0 and increase in steps of Δ?? = 1/??????????. • Check the size of ??
Oct 16, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here