A composite signal is defined as: x(t) = sin(2*pi*10*t) + sin(2*pi *40*t) + sin(2*pi *60*t) + sin(2*pi *50*t). Separate the four frequencies without using any of the transform techniques.
9 views (last 30 days)
Show older comments
Amit Shukla
on 21 Nov 2017
Edited: Walter Roberson
on 18 Dec 2024 at 20:27
Which Filtering should i employ for this question? Almost all filtering techniques employ fft in one way or the other, Is there any other way?
0 Comments
Accepted Answer
Birdman
on 21 Nov 2017
My way is all about converting this expression to a equivalent transfer function and let you see the frequency peaks in Bode plot. The following code does the trick:
syms t
x=sin(2*pi*10*t)+sin(2*pi*40*t)+sin(2*pi*50*t)+sin(2*pi*60*t);
Xs=laplace(x);
XsTf=syms2tf(Xs);
opts=bodeoptions;
opts.FreqUnits='Hz';
bode(XsTf,opts)
The first two line defines the x expression symbolically. Then, I took the laplace transform of the expression and the converted it to transfer function(the attached syms2tf function does it). Afterwards, since I obtain a transfer function expression, I expect to see peaks at those frequencies in Bode Plot and the attached figure contains it. Hope this helps to you.
2 Comments
Birdman
on 21 Nov 2017
But you can not do it any other way around. You have already eliminated so much method by saying no transformation, but that transformation probably refers to fft and its similar transforms. I assume that this is a homework question and laplace transform is not something that can be thought as a transformation method.
More Answers (1)
Walter Roberson
on 18 Dec 2024 at 20:25
Edited: Walter Roberson
on 18 Dec 2024 at 20:27
t = 0:0.001:1;
x1 = sin(2*pi*10*t) + sin(2*pi *40*t) + sin(2*pi *60*t) + sin(2*pi *50*t);
plot(t, x1)
x2 = @(f14) sin(2*pi*f14(1)*t) + sin(2*pi*f14(2)*t) + sin(2*pi*f14(3)*t) + sin(2*pi*f14(4)*t);
f = @(f14) sum((x2(f14)-x1).^2);
bestfreqs = fminsearch(f, [10.5 41 49 62])
0 Comments
See Also
Categories
Find more on Single-Rate Filters in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!