Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hello everyone, after reading the related posts I´ve decided to ask directly (I didnt wanted to "invade" somebody else´s post, thats why I´ ve opened a new thread)...
Im new at mathcad, and I was trying to use discrete fourier to "filter" a wave from a bit (to obtain phase and amplitude for it). I think im actually filtering the signal, but I cannot obtain neither the phase nor the amplitude...
To understand how to do all this, I´ ve created a function composed by two sinusoidals with known phase and amplitude. As you will see I am not obtaining the right values of phase and amplitudes. How can I correct this problem? (I would prefer to use complex transform, because I won´t know the number of points of the real system).
Thanks for your time, Alejandro.
PD:Sorry, still working on my english
Alejandro Miccio wrote:
PD:Sorry, still working on my english
Your english is fine, way better than if I tried to communicate in your language.
FFT's aren't nearly as hard as you're making them, and they work way better with units than without.
See my highlighted changes.
Thanks for your answer!!! It was very helpful. Now I ´ll try to apply this to my system, hopefully it will work well !!!
Hello again, If you let me, I would like to ask you something else regarding fourier phase and amplitude.
I am trying to perform the same filtering on a diferent system (an harmonic oscillator, solved numerically with RK) using the previous concepts. Obviously I´m doing something wrong, and I´m not being able to find the problem.
In the highlighted area, if you compare the amplitude of Z (result from RK) with the amplitude of Zcalc (filtered component of Z), you will realize that Zcalc is higher... What is wrong is this scheme? (I have tried to add units after RK, but the results were the same). Thanks again for your help!!!
Rather than try to sort through your sheet, I'm sending an example of how to run rkfixed; you're not setting the problem up correctly (I don't think.) I'm surprised you get anything from this at all.
See if the attached helps.
(It's been my observation that trying to include more than two parameters in the D function crashes rikfixed. There is a way past that but it's not clean.)
Rather than try to sort through your sheet, I'm sending an example of how to run rkfixed; you're not setting the problem up correctly (I don't think.) I'm surprised you get anything from this at all.
See if the attached helps.
(It's been my observation that trying to include more than two parameters in the D function crashes rikfixed. There is a way past that but it's not clean.)
I am really sorry, but I´m still confused... Despite the fact the outcome of the RK is not, lets say, correct... the filtered amplitude should not be bigger than the amplitude of the original bit, am I right? (or maybe I´m just getting an interference with the other freqs, and that is the reason the amplitude of that component is higher?) Am I doing something wrong in this step?. Thanks again for your time, it is really helpful.
PD: In any case I have removed the extra parameters from the RK, to avoid the problems you pointed... I did not know about that. Do you think it is posible to calculate with a D = D(freq, time, z) (only one parameter, "freq")?
I´m asking you this because the next step is programing a frequency sweep for this system (and I will need to call all this solving block for each freq).
I've added to the example to show how to create a function that solves the differential equation for variable force and frequencies. Good luck.