Jan GvK

20 Reputation

3 Badges

10 years, 342 days

MaplePrimes Activity


These are questions asked by Jan GvK

Hello,

Can anyone explain to me why there is a difference between:

f := int((A*sin(omega*t+phi)-B*sin(omega*t))^2, t);

and the expanded version:

f := int((A*sin(omega*t)*cos(phi)+A*cos(omega*t)*sin(phi)-B*sin(omega*t))^2, t);

Thanks

Hello,

I understand that the question is not really Maple related, but I still hope for some help.


See the worksheet below. I defined a pure sine wave and determined the complex Fourier coefficients for it which I used to plot the amplitude and power spectra. It is easy to see the relations in terms of amplitude and power between the time and frequency signal.

The Fourier Transform of the sine wave logically shows the Dirac distribution, but I can't see the relation in terms of amplitude and power to the original time signal. Taking the integral of the transformed signal (A) wil result in a step of Pi at w=-1 and again at w=1. What am I missing here?

Thanks

restart; with(inttrans); with(plots); with(DynamicSystems)

 

Define a signal:

 

T := 2*Pi;

2*Pi

 

sin(t)

(1)

 

Determine the waveform power:

 

F := (int(f^2, t))/T+C:

C := simplify(solve(subs(t = 0, F) = 0, C)):

eval((int(f^2, t = -(1/2)*T .. (1/2)*T))/T)

1/2

(2)

plot([f, f^2, F], t = -Pi .. Pi, gridlines = true)

 

 

Determine the complex Fourier series coefficients and plot the spectra:

 

q := proc (n) options operator, arrow; (int(f*exp(-(2*I)*n*Pi*t/T), t = -(1/2)*T .. (1/2)*T))/T end proc:

simplify(q(n))

I*sin(Pi*n)/(Pi*(n^2-1))

(3)

ComplexCoefficients := evalf(`<,>`(seq(q(n), n = -1 .. 1)))

ComplexCoefficients := Vector(3, {(1) = .5000000000*I, (2) = 0., (3) = -.5000000000*I})

(4)

B := evalf(`<,>`(seq(sqrt(Re(q(n))^2+Im(q(n))^2), n = -3 .. 3))):

 

C := evalf(`<,>`(seq(Re(q(n))^2+Im(q(n))^2, n = -3 .. 3))); -1; DiscretePlot(C, -3, 1, titlefont = ["ARIAL", "bold", 14], title = "Power Spectrum", color = "Red", gridlines = true, style = stem)

 

So, the signal power for f of 1/2 can be found directly within the power spectrum plot "(2*1/(4))."

 

I would expect to be able to directly see the amplitude and power relation to the time signal from the Fourier Transform of f but i can't.

 

A := fourier(f, t, w);

I*Pi*(Dirac(w+1)-Dirac(w-1))

(5)


Download 20140127MaplePrime.mw

 

 

Hello,

Assume a periodic signal that is the sum of four sinusoidal signals, all with different frequency and phase. The fundamental frequency has phase=0, so at t=0 its value is 0 (a zero crossing point). I need to find the influence of the other frequency components on the zero crossing point in [seconds] as an analytical expression. I made the Maple script below to find out, but get a RootOf result. How can I solve this?

Thanks for your help!

restart

p := a*sin(omega[P]*t):

q := b*sin(t*omega[Q]+phi[Q]):

r := c*sin(t*omega[R]+phi[R]):

s := d*sin(t*omega[S]+phi[S]):

z := p+q+r+s

a*sin(omega[P]*t)+b*sin(t*omega[Q]+phi[Q])+c*sin(t*omega[R]+phi[R])+d*sin(t*omega[S]+phi[S])

(1)

solve(z, t)

RootOf(sin(_Z)*a+b*sin((_Z*omega[Q]+omega[P]*phi[Q])/omega[P])+c*sin((_Z*omega[R]+omega[P]*phi[R])/omega[P])+d*sin((_Z*omega[S]+omega[P]*phi[S])/omega[P]))/omega[P]

(2)

``


Download 20131130_Zero_crossi.mw

Hello, Suppose I have two sinusoids with the same amplitude and frequency. By changing the phase of one of them it is possible to 'align' them. When the phases are exactly the same the difference between the two sinusoids becomes zero. Now lets define a variable (U[int]) that gives a measure of the difference between the two sinusoids and change the phase phi to generate an animation and 3D plot and see if it is possible to mathematically determine that the difference becomes zero when the phases of the waveforms are equal. Chosing a time t>0 and solving for the derivative does the job.

My question is, can (and how can) Maple determine for which phase phi we have the minimum function without chosing a time t.
 

restart

with(plots):

u[G] := sin(omega*t)

u[L] := sin(omega*t+phi)

U[int] := int((u[G]-u[L])^2, t)+C

C := solve(subs(t = 0, U[int]) = 0, C)

omega := 9:

animate(plot, [[u[G], u[L], (1/10)*U[int]], t = 0 .. 2, legend = ["Public grid voltage", "Local grid voltage (control goal)", "Cum. Actuator voltage (scaled)"]], phi = -Pi .. Pi, gridlines = true, labels = ["Time [s]","Voltage [V]"], labeldirections = ["horizontal", "vertical"], labelfont = ["ARIAL", "bold", 12])

plot3d(U[int], t = 0 .. 2, phi = -Pi .. Pi, shading = zhue, orientation = [-150, 70, 15])

t := 1:

phi = fsolve(diff(U[int], phi))


Download 20131114_Finding_min.mw

 

Thanks a lot!

Hello,

For a control systems project I'am working on I need to minimize the actuator effort required to control an input voltage to certain output voltage. As a first experiment I chose a sinusoidal input ug and a sinusoidal output ul. The function to minimize is the funtion Uint. We know that when both the input voltage and output voltage share the frequency, phase and amplitude, that the control effort is zero. Running the animation (see Maple input below) shows that if the input and output voltage frequencies approach eachother the function Uint goes to zero. However, if the frequencies exactly match and I evaluate the function Uint I get a devision by zero notification (this could already be seen from the function of Uint). How can I solve this?

restart

with(plots):

u[G] := sin(omega[G]*t)

u[L] := sin(omega[L]*t)

U[int] := int((u[G]-u[L])^2, t)

omega[G] := 9:

animate(plot, [[u[G], u[L], (1/10)*U[int]], t = 0 .. 5, legend = ["Public grid voltage", "Local grid voltage (control goal)", "Cum. Actuator voltage (scaled)"]], omega[L] = 8 .. 10, gridlines = true, labels = ["Time [s]","Voltage [V]"], labeldirections = ["horizontal", "vertical"], labelfont = ["ARIAL", "bold", 12])

omega[L] := 9; t := 10; evalf(U[int])

NULL

 

Download 20131109_Division_by.mw

 

Thanks

Page 1 of 1