1
$\begingroup$

I have tried to solve, but do not know if the answer is correct or not.

A person has a periodic voltage input to a circuit. The input repeats itself every 0.02 seconds i.e. the fundamental period is 0.02 seconds. The person measures the input with a voltmeter and finds that the input may be approximated by:

Vin(t) = V0*exp(a*t) ; 0 sec <= t < 0.02 sec ; V0= 2 Volts a = -100sec^-1

Graphically the function may be represented by:

enter image description here A)Write a mathematical expression containing an integral that may be used for calculation of the Fourier-coefficients of Vin(t).

B)Evaluate the integral analytically for the DC-term (often referred to as c0 ). Looking at the graph, how can you check if your answer is reasonable?

I know I need to use these formulas:

enter image description here

I've tried to calculate a0 and here I got approx 2, according to this matlab code:

v0 = 2;
a = (-100^-1)
T = 0.02
a_0 = (1/T)*int((v0*exp(a*t)),t,0,T)  

a0 calculated to 1.9998

I stuck with the an and bn, because i'm not sure if that is correct or not...

an = ((2/T)*int((v0*exp(a*t))*cos(n*w0*t),t,0,T))

an calculated to (20000*exp(-1/5000)*(exp(1/5000) - 1))/(100000000*pi^2 + 1)

bn = (2/T)*int((v0*exp(a*t))*sin(n*w0*t),t,0,T)

bn calculated to (200000000*pi*exp(-1/5000)*(exp(1/5000) - 1))/(100000000*pi^2 + 1)

$\endgroup$
  • $\begingroup$ Welcome to DSP.SE! As the canned hold message says, it seems like you're asking for code written to a specification, which is off-topic for this forum. Can you rephrase the question in terms of a signal processing question that would fit better with the forum? Thanks! $\endgroup$ – Peter K. Aug 17 '15 at 19:28
1
$\begingroup$

Hint: this is a lot easier if you use the Euler formula https://en.wikipedia.org/wiki/Euler%27s_formula

Then the integral simply becomes $$X(n)=\frac{1}{L}\int_{0}^{2L}e^{(-a+i\omega)\cdot t}, a_{n}=real[X(n)], b_{n} = imag[X(n)]$$

which is pretty straight forward to solve

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.