Large ADC sampling error on rt_box2 – ~8 deviation from true constant value

I’m currently using the rt_box2 and facing an accuracy issue with ADC sampling.

In my model:

The plant block uses constant parameters, all set to 90.

In the controller block, I use an ADC sampling module to read these values.

The problem is that the actual sampled values deviate from the true value by about 8 (i.e., the error is roughly 8). The true value is 90, but the sampled result is around 82.

Has anyone encountered similar ADC inaccuracy on rt_box2? Could this be a configuration issue, driver problem, or hardware limitation? Any suggestions to improve sampling accuracy would be greatly appreciated.

Thank you.

Hi yanyinyan,

It is difficult to debug the issue without a model. A couple of questions that would help narrow this down:

  • What scale factor are you using to output the constant value of 90 through the Analog Output block and what is the Analog Output Voltage Range you are using?

  • With the selected scale factor, when you measure the Analog Output voltage using a multimeter, do you observe the expected voltage?

  • Is the analog output voltage being processed in any way before being fed back into the analog input?
    For example:

    • resistor dividers
    • filtering circuits
    • buffering circuitry
  • Are you seeing this offset of 8 consistently across the entire operating range?
    For example, if you set the constant value to 10, does the ADC reading become 2?