Miniproject 1
Trigonometric Functions and Sound
This mini-project requires that you have installed MATLAB on your computer as described in screencast 1. The basic functionality of the program, which is needed for Exercise 1, is described in screencast 2.
A sinusoid is a function of the form
y(t) = A sin(ωt + φ), (1)
where the independent variable t denotes time (measured in seconds s) and the three constants A, ω, φ are given as follows: A is the peak amplitude (measured in eg. volt V ), ω the angular frequency (in rad/s) and φ the initial phase (in rad). A loudspeaker will generates a ’pure tone’ when connected to a sinusoidal power source.
The frequency f of a sinusoid is by definition the number of cycels per time unit. Frequency is measured in Hertz (1 Hz = 1 s−1). From the 2π- periodicity of the sine function, one can deduce that
Exercise 1
Use MATLAB to plot the graphs in this exercise.
1. Let ω = 2π and φ = 0. Plot the graph of y(t), 1 t 1 for A = 1, A = 2 and A = 3 in the same (t, y)-coordinate system. What are the frequencies of these sinusoids?
2. Plot the graph of y(t) for A = 1, ω = 2π and φ = π/3. Where does the graph intersect the y-axis? What is the point of intersection for a general sinusoid?
3. Now fix A = 1 and φ = 0. Plot the graphs of y(t) for ω = 2π and ω = 4π in the same coordinate system. Plot the graph of y(t) for ω = 8π. What are the frequencies of these three sinusoids?
4. By forming sums of sinusoids, one can create other periodic waveforms. In fact, any periodic waveform can be obtained as a sum of a number of sinusoids, according to a branch of mathematics called Fourier Analysis.
As examples, plot the graph of
y(t) = sin(2πt) + sin(4πt)
and the graph ofπ
Exercise 2
In this exercise, we will examine what happens when one adds sinusoids of the same frequency. Do not use MATLAB here.
1. Using the trigonometric addition formulas, show that the sinusoid (1) can be written as
y(t) = A sin(ωt) cos(φ) + A cos(ωt) sin(φ).
2. Assume that we have two sinusoids with the same angular frequency ω
as follows:
y1(t) = A1 sin(ωt + φ1), y2(t) = A2 sin(ωt + φ2).
Rewrite these as above, and show that
y1(t) + y2(t) = sin(ωt)(A1 cos(φ1) + A2 cos(φ2))
+ cos(ωt)(A1 sin(φ1) + A2 sin(φ2)).
3. Show that if we can find A and φ such that
A cos(φ) = A1 cos(φ1) + A2 cos(φ2) (3)
A sin(φ) = A1 sin(φ1) + A2 sin(φ2) (4) then y1(t) + y2(t) = y(t).
4. Show that there are always an A and a φ which solve the two equations
(3) and (4).
5. Conclude that the sum of two sinusoids of the same frequency is again a sinusoid of that frequency.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme