Interference between channels in the Analogue Input block of Simulink Desktop Real-Time
66 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I'm experiencing a problem with channel interference when using the Analog Input block of Simulink Desktop Real-Time (SDRT). Although it initially appears to be a case of ‘crosstalk’, the problem also occurs when measuring DC signals from very low impedance sources compared to the input impedance of the data acquisition boards used (National Instruments).
Test description
- I set up several simple voltage dividers (two 10 kΩ resistors in series) powered by an external 5 V supply.
- The voltage at the center of the dividers was measured using a single Analog Input block configured to access multiple channels in vector form [1:n].
- When I short-circuited the resistor connected to GND on the channel (1), its voltage dropped to zero as expected, but I observed a change of around 30 mV in the voltage measured on the channel (2).
- This behavior occurs consistently between any channel (n) and the subsequent channel (n+1).
Additional Tests
- I repeated the test using independent Analog Input blocks for each channel, and, in this case, the problem did not occur for any of the channels, demonstrating that the behavior is related to the vector configuration of the block.
- However, according to the SDRT user guide and the recommendation of MathWorks experts in the past, using a single Analog Input block for multiple signals, using vector notation for channel selection. This approach is necessary to maintain real-time operation, as using independent blocks introduces significant delays, even at low sampling frequencies.
Additional Information
- The same tests were carried out on two different computes (one slower and one faster and robut), with different cards of acquisition (PCI-6221 and PCIe-6323) and in two versions of MATLAB (2021b and 2024a).
- I also randomly changed the order of the input channels to rule out possible problems related to the sequence of the channels.
- The behavior persisted in all the configurations tested.
Requesting Assistance
Are there any known limitations or solutions to this behavior when using the Analog Input block in vector configuration? Considering that SDRT recommends this approach for multiple channels, would a technical review or guidance be possible to solve or mitigate the problem?
.
0 Commenti
Risposte (1)
Jan Houska
il 25 Nov 2024 alle 15:02
Hi Fabrizio,
first, please check if your signals are correctly grounded. Are you using single-ended, NRSE, or differential input mode? If single-ended, using one of the other two modes may help.
Then, please try to change the resistors you are using to lower values - 1 kΩ or even 100 Ω if your power supply allows that. The analog inputs have some capacitance and it might be that this, in combination with the input resistance, is causing them to settle more slowly than expected.
If this does not solve the issue, please try to short-circuit channels 2 and 3 and read 1:3 instead of 1:2. If the reading of channel 3 is more precise than channel 2, this could be due to additional time given to the signal to settle. This would also suggest a workaround: with the exception of channel 1, always use two connected channels for each subsequent signal, ignore the value from the first and use the value from the second.
Then, using two Analog Input blocks is not prohibited. It is just much slower. This extra time may help the signals to settle though. So if the reduced performance is not a problem for your application, you may just stay with this solution.
Good Luck, Jan
3 Commenti
Jan Houska
il 27 Nov 2024 alle 13:18
Hi Fabrizio,
OK, I did not understand that you need to use 32 input channels. This changes the situation somewhat.
3. My suggestion to use 1 kΩ or 100 Ω was for diagnostics purposes only. If this changes the situation somehow, we'd know better where to look further even if 10 kΩ is a requirement for the real use case.
4. There is just one A/D converter on the board and a multiplexer that switches its input from the 32 channels. So even if there are steady-state signals on the inputs, if the values of neighboring signals are different enough, there is still a dynamic behavior on the input of the A/D converter caused by the multiplexer switch from one channel to another.
5. This is a very interesting result that somewhat contradicts what we have found out so far. Just to double-check: does this really mean that both channel 2 and channel 3 read exactly the same value which is 14 mV below? If so, that would be an evidence against the settling time as the cause of the issue. Also, it would be in favor of some static wiring issues, which takes us back to:
2. Please do try either NRSE or differential, if only for diagnostics purposes with a few channels. Knowing how these behave may help in diagnosing the root cause.
And, finally, one that I did not think about before: what input voltage range are you using? Please try to change that, especially to the less sensitive ones (10V or 5V). Does this change the behavior? The higher the sensitivity, the worse the dynamic properties of the multiplexer and converter, and this is especially true for the 0.2V range.
Good Luck, Jan
Vedere anche
Categorie
Scopri di più su Target Computer Setup in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!