07-06-2020 12:30 AM
Hi Developers,
I recently started working on a project to simulate several sensor signals, it is a Hardware In the Loop testing system, I need to simulate a variable reluctance speed sensor signal, the signal is a sinusoidal with 24 pulses per revolution, one pulse has a lower amplitude than the other 23 pulses, I found in other old post a VI which generate a sine wave that is multiply but a square wave with a duty cycle calculated based on the number of missing teeth, so while square amplitude is zero sine is multiplied by zero and We get the pattern for a crank shaft sensor, instead of that the signal I need has one pulse with a lower amplitude, any idea on how I can do this, maybe generating a sine wave counting zero crossing and every 24 pulse multiply sine amplitude to have one pulse lower than the other 23??? I am pretty new using labview HIL suite and the PXI system with RTOS and FPGA module, any info or help will be appreciated. Thanks
Solved! Go to Solution.
07-06-2020 10:12 AM
Usually there are two input variables , position and speed, both have an influence on your reluctance sensor output.
One possible FPGA approach: First look-up table for position to du/dv value , followed by a multiplication with speed.
07-06-2020 10:30 AM
here is one quick solution for a simple 'simulation' ..
edit : the vi posted creates two versions since I don't know how your signal looks like. maybe a starting point, shown is just one ..
07-06-2020 07:49 PM - edited 07-06-2020 08:05 PM
Hi Henrik, thank you so much for your help, based on the VI you shared and a VI I found in an older post from 2005, I developed a new VI that generates the signal I need, signal has 24 pulses per revolution, 1 pulse has a lower amplitude than the other 23 pulses, It has a linear behavior for the amplitude respect to RPMs, I attached the VI I generated and the VI I found in addition to the one You shared. Any comment or idea to create a more efficient VI will be appreciated. Also an image of the signal generated below. Thanks again.
04-15-2026 03:43 PM
I love this solution, and it works great for my application. Now I need to do almost the exact same thing, but I need to add a tooth rather than have a missing tooth. For example, 24 evenly spaced teeth and one extra tooth placed between tooth 23 and 24.
Thanks for the help
04-16-2026 03:20 AM - edited 04-16-2026 04:14 AM
Now it gets a little more into physics..
The regular teeth have a shape that results in signal depending on the type of sensor, say you see the representation of the weel survace distance (say opical senso) or you see (kind of) the derivation of that distance (inductive sensor), resulting in increasing amplitudes with increasing speed. I assume the second.
Now you need to build that shape with your index tooth. you say that index is smaller .. a smaller sensor signal or a smaller tooth? How does the sensor signal look like?
Think of a model of the wheel (array of angle and diameter) , a model of the sensor (say an integrating window over a certain angle) that results (derivation of the wheel with an integrating window of the sensor) in an array of angle and sensor signal scaled by the speed.
I know a guy that did that (and much more) to emulate the measured tone wheels of a (atually 3 or more) Hammond B3 organ(s) in a FPGA , a realtime physical emulation of all wheels , followed by emulated electronics (analog filters, switches, tube amplifier, ...)
https://www.youtube.com/watch?v=OOmVIg0raWo 😄
04-16-2026 06:42 AM
That is a very cool video! I love seeing so many different disciplines being brought together.
What I am trying to simulate is an inductive sensor reading a metal wheel. I don't have samples that I am trying to replicate. I only know the teeth count and placement will change with different product generations and models. Both of the VI's in this thread work well at simulating a missing tooth, but do not allow me to add an additional tooth. At this time, I don't need to add more than one extra tooth. Here is a simple representation of what I need to simulate:
IIIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOI
Thanks.
04-16-2026 03:33 PM
In my previous post I told you the steps how to get your signal.
If you know the shape, what is your problem?
04-16-2026 04:53 PM
I would like the VI to be able to reproduce the 25/24 like it can with the 23/24.
04-17-2026 03:33 AM
That should give you an idea
If you want a free scale of RPM and samplerate, rescale it to phase and use the native sine function...