cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Mathcad 15 "onefn" function problems

BillDumke
1-Visitor

Mathcad 15 "onefn" function problems

I am having trouble with the onefn function in Mathcad 15. I get double entries in the 1/f noise vector and if I take the CFFT(ofn) I get a zero as the first result. Also I do not understand the mirrored magnitude plot of the 1/f Noise. I also don’t understand why the range variable even starts at zero. That would give infinity for 1/f. See attached.

Bill

Bill Dumke, RF Engineer

Nsight Telservices dba Cellcom

450 Security Blvd

Green Bay, WI 54313

51 REPLIES 51
RichardJ
19-Tanzanite
(To:BillDumke)

If the time domain and frequency domain signals are supposed to correspond to each other then one of them was measured, and the other was generated using an FFT. If the time domain signal is complex, then it obviously was not measured. If you look carefully at it, I bet it in fact has conjugate symmetry.

I said that the conjugate symmetry was necessary for the ICFFT. That is true if you wish to obtain a real time domain signal. If you take a real frequency domain signal that does not have conjugate symmetry and run it though ICFFT (or CFFT for that matter) you will get a complex time domain signal that does have conjugate symmetry. If you wish to add noise to that complex time domain signal and subsequently CFFT it to get a real frequency domain signal, then you need to add it to both the real and imaginary parts, and do so in such a way that the conjugate symmetry is preserved (which is quite possible to do). Or you can CFFT a noise vector with twice the required number of points, throw away the unneeded data, and add the noise in the frequency domain. In your case that is the easier of the two approaches, but that's only because your signal was actually measured in the frequency domain. If it were measured in the time domain (in which case it would be real) then you would just add the onefn vector to it.

So in other words when I use the whiten() function I should add the white noise in the frequency domain and throw away the top half of the frequency domain as well? I checked and you are correct. (I didn't know I would have that with the whiten() function which is real.)

Bill

RichardJ
19-Tanzanite
(To:BillDumke)

In your case, yes, that is the easiest approach, because your real (measured) signal is in the frequency domain. CFFT a noise vector of twice the required length and throw away the second half. Be aware that will not work for anything other than noise though (because it's random, and other signals are not).

I am not using measured data. It is all based on the OFDM simulator posted in 2007 on the collaboratory. I looked at the complex time domain data and it is not symmetric about the midpoint at all. He used a different white noise generator method. But I will have to check if that is symmetric in the frequency domain or not. It probably is. I may have to make a few changes.

Thanks for the help!

Bill

I looked at the white noise generator in the OFDM Simulator by itself. It is not symmetric in the frequency domain, probably because he recalculates the noise function for the real and imaginary part independently, and then adds them to get a complex time domain. Maybe I could have done the same thing for the 1/f noise?

Bill

RichardJ
19-Tanzanite
(To:BillDumke)

Bill Dumke wrote:

I am not using measured data. It is all based on the OFDM simulator posted in 2007 on the collaboratory. I looked at the complex time domain data and it is not symmetric about the midpoint at all.

I''ll have to look at the simulator. But if you can CFFT the complex time domain data to get a real frequency domain vector then the time domain vector has to be conjugate symmetric. Either that, or both the time and frequency domain vectors are complex, in which case I would argue that the simulator has a problem.

Richard,

Here is a copy of the OFDM simulator. I highlighted the additive white gaussian noise sections in yellow. The AWGN variable is used just to turn the noise on or off. The Noise(c,a) function just uses the signal data to get the number of columns it needs. I believe the reason it gets around the symmetry problem in the frequency domain is that it uses two independent runs of the Noise(c,a) function added independently to the real and Imaginary parts of the signal, ich2 and qch2 in this case. And then he adds the real and complex parts together and takes the CFFT. There is no conjugate symmetry in the noise taken by itself and transformed by the CFFT. I suspect this would be another way of getting around the symmetry problem in the 1/f noise frequency domain as well. Do two independent runs of the onefn function and add them to the real and imaginary parts in the time domain independently, then add the real and imaginary parts, then do the CFFT.

I think I will try it. .

Bill

RichardJ
19-Tanzanite
(To:BillDumke)

I don't know the first thing about OFDM, but as I read it, the image is converted into a complex signal. That signal has to be split into the real and imaginary parts for transmission. The noise that's added is supposed to simulate the noise that occurs during transmission, and the noise for the real and imaginary parts are therefore independent of each other. Afterwards, the signal is converted back to a bitstream, with a certain error rate due to the noise. The bitstream is then converted back to the image, with resulting errors.

Since the transmitted signal is both complex and not conjugate symmetric, the CFFT of the signal will also be both complex and not conjugate symmetric.

Real signal --> CFFT --> complex spectrum with conjugate symmetry

Complex signal with conjugate symmetry --> CFFT --> real spectrum

Complex signal with no conjugate symmetry --> CFFT --> Complex spectrum with no conjugate symmetry

So I guess this leaves us with the question: what are you trying to do? Simulate ODFM? Simulate something else? Perhaps if you told us exactly what you are trying to achieve we can make more progress.

Richard,

FYI, I was assigned the job of looking for potential problems in LTE (Long Term Evolution) which is the up and coming broadband cellular data technology so we know what to expect in terms of "gotchas". LTE is a newer OFDM variation, and I found the OFDM simulator on the Mathcad collaboratory. So besides doing some reading on the subject, I decided to play with it and see what would happen in various scenarios. One thing that has been hyped up in some of the techncal media is LTE's "invulnerability" to multipath interference. When I tested it using the simulator modifed for the purpose, I found that it is indeed susceptible to multipath problems if the multipath signal is close in amplitude to the direct signal. This was confirmed to be true with LTE as well by Dr. Byung K. Yi of LG Electronics who gave a talk on LTE at our company. He gave a very good presentation and I was able to ask some very good questions, which he answered very well.

1/f noise was another potential problem, along with many others I looked at, and still a few I have yet to do.

Thank you all very much for your input. I learned a lot.

Bill

Just an RF Engineer

>guess I was was wrong. See attached. The onefn noise still has a minimum about the midpoint, but technically it is not conjugate symmetric.<

____________________

The onefn is a random generator of a kind vs another kind. If your simulator gives minimum about midpoint, then it can't be otherwise than quadratic trig. You can make the simulator do anything you want.

Richard,

I guess I was was wrong. See attached. The onefn noise still has a minimum about the midpoint, but technically it is not conjugate symmetric. So it looks like there is a flaw in the simulator with the white noise as well, as you said. Although, it isn't obvious, becuase it is not conjugate symmetric. I don't know if this is important or not in the white noise case.

Bill

LouP
12-Amethyst
(To:BillDumke)

There are no flaws in the simulation. In my first post on this thread, I said "For real signals time, this gives the conjugate symmetry of the spectrum. This symmetry doesn't exist for complex signals." If you look at real physical signals, they will automatically have conjugate symmetry in the spectrum. Period.

You have made the following statements in your posts and sheets:

"The purpose of the following is to create 1000 data point 1/f noise in both the time and frequency domains with no conjugate symmetry about the midpoint in the frequency domain."

"I suspect this would be another way of getting around the symmetry problem."

The first is simply not mathematically possible for a real-valued noise signal. The second is perhaps the root of the issue. As long as you see the symmetry as a "problem," rather than a characteristic that is inextricably linked to the DFT of a real signal, I don't think you will get out of the loop that you're in. The spectra of time sampled signals is simply not the same as those of continuous time signals. What you can see on a spectrum/network analyzer is not necessarily what you will get with a DFT (emphasize Discrete) simulation.

The OFDM simulation takes the spectra of complex-valued time signals, hence the lack of conjugate symmetry. However, complex signals require both positive and negative frequencies. The symmetry issue is lying low with white noise, but is more apparent with 1/f noise. If you truly want 1/f noise, then presumably you want to have the spectral density at -10Hz to be the same as the spectral density at +10Hz (strange 1/f noise otherwise). This is already the conjugate symmetry - mirror symmetry when reproduced near the sampling freq - that you labeled a "problem."

All the hoops of "...converted to the frequency domain, the first half of the complex data points extracted..." etc. are unnecessary. I think the core issue is your expectation that the upper half of the DFT should look like a "real" continuous spectrum that you would see on an analyzer. Address why you think the symmetry is a problem, and you will be able to move on to the simulation you are trying to run.

Lou

lamb
5-Regular Member
(To:mzeftel)

This bug is still there in Mathcad Prime 5.0!

VladimirN
24-Ruby II
(To:lamb)

You can use the "Case Logger" tool on PTC's site to open technical support case: https://support.ptc.com/apps/case_logger_viewer/auth/ssl/log

jmG

RichardJ
19-Tanzanite
(To:jeanGiraud)

I missed that spike in your last post, and my reply (which you deliberately deleted along with your post). What point are you trying to make with it though? Are you still trying to claim evidence of the mythical CFFT/cfft bug? There is no CFFT/cfft bug. The bug is in the calculation of the residuals.

And please don't delete my posts in the future, even if you don't like or agree with what is said.

Richard Jackson wrote:

I missed that spike in your last post, and my reply (which you deliberately deleted along with your post). What point are you trying to make with it though? Are you still trying to claim evidence of the mythical CFFT/cfft bug? There is no CFFT/cfft bug. The bug is in the calculation of the residuals.

And please don't delete my posts in the future, even if you don't like or agree with what is said.

I like very much and how much you dislike that pest of deleting, no noise from PTC about it. It could happen to me, but don't know how I would react !. The "mytical Fourier-Gibbs" origins from Mathsoft. I made it clear for myself and those interested. I'm not in contradiction with CFFT/cfft simply understanding deeper. There is no bug in the calculation of the relative residuals [ a most universal Engineering formula, and largely used in qualifying the numerical approximations, especially about the problem when the approximation should be 0 @ 0 but is not]. I just designed a quick and irrefutable way of negotiating a discontinuity as soon as possible in the demo.

I agree, the delete bug is quite an offense, same as your private e-mail that came from this forum.

How come Mona didn't notice these two disasters ?

And the spell check does not work with Google Chrome [ underline but no proposition].

RichardJ
19-Tanzanite
(To:jeanGiraud)

I agree, the delete bug is quite an offense, same as your private e-mail that came from this forum.

I didn't send you any email from this forum, private or otherwise. Do you mean that you got a notification about my post in this thread?

Richard Jackson wrote:

I agree, the delete bug is quite an offense, same as your private e-mail that came from this forum.

I didn't send you any email from this forum, private or otherwise. Do you mean that you got a notification about my post in this thread?

Yes Richard,

It refers and confirms what Tom had exposed about "spams". This web is so loosely designed and erratic that it apparently decided by default to e-mail me notifications of the collab activity [same was reported by Mike]. Consequence ... I'm receiving all the collab chats and ,,, and though all collabs e-mail were guarantied to be private and only resident at PTC, I have got your e-mail and John Sellers e-mail via the collab chats that land on flat in my mail box. What all that means is that this forum is not hermetic as it should and "spamers" are at joy.

Yes, "Do you mean that you got a notification about my post in this thread ?", but not about your post in this thread , about another of your replies in this forum [it must be around two weeks ago]

>We already discussed this. As I pointed out before, there is no bug. It's a figment of your imagination.< [Richard]

___________________________________

I'm not disputing any collab expertise [Richard, Lou, Bill, PTC ..] neither "figment of my imagination". I'm just trying to illustrated that any nuances in the maths/physics may reflect on real projects. Consider the 2nd example, comparing the Mathcad 2000 points and the Budapest 2000 points and the same for 2001 points. How all those things reflect on the "onefn(N)" built-in function and the project in collaboration ? ... Don't know. If there is an issue with the onefn(N) duplicates, then same issue exists in the Signal Processing. I have no recollection of such an issue and it looks working as demonstrated [Mathcad 11].

RichardJ
19-Tanzanite
(To:jeanGiraud)

Consider the 2nd example, comparing the Mathcad 2000 points and the Budapest 2000 points and the same for 2001 points.

I confess to being aware of that issue in my last post. I just ignored it out of laziness. See the attached sheet.

lamb
5-Regular Member
(To:BillDumke)

The double entry appears to have been fixed in Mathcad Prime 9.0.0.0.

Announcements

Top Tags