01-30-2024 06:05 AM - edited 01-30-2024 06:14 AM
The measurements shown are data from a Hall effect based current probe connected to an NI 9215 analog input on a cDAQ-9133 CPU. The current probe measures the DC current for a 3-phase AC motor drive inverter. The horizontal axis shows time in seconds and the vertical axis shows amperes.
The top plot shows data when using the onboard clock with a sampling frequency of 100 Hz as the sampling clock for the NI-9215 module.
The bottom plot shows data when using a TTL pulse running at 25 kHz, synchronous with the drive PWM, as the sampling clock for the NI-9215 module.
Note that there is an interval at the start and at the end of the data acquisition, where the PWM is not running in both plots.
Also, note that the data in the lower plot samples on the rising edge of each 250'th pulse of the 25 kHz - resulting in 100 Hz sampling frequency on those measurements as well.
When we don't synchronize the data acquisition, e.g. as in the top plot, then we consistently get this slow waveform on both current and voltage, even if sampling with various frequencies.
The next figure shows equivalent data, where the top plot shows data using the onboard clock with 5 Hz sampling time and the lower plot shows data using the 25 kHz TTL pulse from the drive, here sampling every 25'th sample - resulting in 1000 Hz sampling frequency
Is this waveform an alias of the PWM ?
If we were to sample the NI-9215 fast enough, then would we see the same waveform with a 25 kHz frequency ?
02-15-2024 05:28 PM
Hello there,
There is a lot going on, so let's unpack your inquiry. I'm going to ask you to answer several questions so we can proceed with the solution of your problem.
Please answer the questions in as much detail as possible.
03-18-2025 09:14 AM - edited 03-18-2025 09:15 AM
Please look at the figure
The current probe is connected to channel 1 of the AI. The TTL pulse is connected to channel 0. It is a short pulse coming every 40'th us (25 kHz).
My goal is to determine whether or not the slow waveform is an alias of a 25 kHz waveform resulting from power switching the DC bus of the inverter.
The upper plots of each figure are sampled asynchronous (using internal clock), whereas the lower plots of each figure are sampled using the synchronous TTL pulse.
03-18-2025 10:19 AM - edited 03-18-2025 10:20 AM
I'm not an expert in these things but I've been around the block a couple times...
Here's one generally useful way to answer the question, "is this regular waveform pattern an aliasing artifact?"
1. Measure the apparent repetition interval for the waveform at sample rate A. In the pic you shared, this looks like ~10 time units (seconds?) when sampling at 100 Hz.
2. Consider your knowledge of how aliasing works, where a true repetitive pattern gets mirrored across the boundaries defined by Nyquist (= 1/2 sample rate) and 0. If your pic shows seconds, you have an "apparent" 0.1 Hz pattern. What it *might* actually be is a higher frequency pattern that is 0.1 Hz away from an integer multiple of your Nyquist freq.
Some of these may mirror back to look like 0.1 Hz, others would mirror back to look like 49.9. There's specific math to govern which are which, but I don't know it off the top of my head. For now it's enough to know where to look for "suspects." Here that could be frequencies of 50.1, 99.9, 100.1, 149.9, 150.1, etc.
[Cutting to the chase here for a moment. Are you in a region that uses 50 Hz mains power? If so, there's a strong chance that's a major contributor to the slow pattern that "looks like" 0.1 Hz when sampling at 100 Hz.]
3. Have a closer look at your 100 Hz data by doing an FFT to find the main contributors to your pattern. Identify a few most prominent frequencies.
3. Now you can repeat your test with a different sample rate that's NOT near one of those multiples of 50 Hz, let's say 110 Hz. Do the FFT. What kind of prominent frequencies do you see now?
Here, a 50.1 Hz contributor will show up as 50.1 rather than as an alias. But a 99.9 or 100.1 would show up as a "distance from a multiple of 55 Hz", which would no longer look like 0.1.
4. Repeat again with a higher sample rate, perhaps your target 25 kHz. Again do the FFT and look for frequency content contributors.
In general, if a given bin of frequency contribution stays fairly constant regardless of sample rate, it's probably a true contribution at that frequency. If it moves around or seems to appear / disappear with varying sample rate, it may be an aliasing artifact.
Bear in mind that really high frequency noise sources with very slight jitter can confound things tremendously. They tend to throw a bunch of garbage aliasing noise all over your FFT bins. This is one of the big things you can solve with an analog anti-aliasing filter. Attenuating the high frequencies before conversion limits how much havoc they can cause.
-Kevin P