Correcting effects of Humidity on sensors

59 views (last 30 days)
Dharmesh
Dharmesh on 23 Oct 2025 at 13:10
Commented: Star Strider ungefär 12 timmar ago
Hi All
I have gas sensor, that gets effected by hummdity that needs to be corrected. So was hoping to see if we can correct this ?
How can i run my code on the this support forum with my data file, so it can be run?

Answers (1)

Star Strider
Star Strider on 23 Oct 2025 at 14:11
What sort of correction do you want to do to your data?
Do you also have the humidity data?
Are there any published ways to correct the readings for humidity? If so, please share them.
To run your code with your data here, first upload the data file, using the 'paperclip' icon in the top toolbar (just to the right of the Σ). Click on the 'insert a line of doce' icon in the top toolbar (farthest left icon in the CODE section, or ALT+ENTER) to create a code line, then type or copy-paste your code in it. To run it, press the green arrrow in the top toolbar.
x = linspace(0, 2*pi);
y = sin(x) .* cos(x);
figure
plot(x, y)
grid
Your code should run here essentially the same way it runs on your computer, including reading the file.
,
  12 Comments
Dharmesh
Dharmesh ungefär 3 timmar ago
Moved: Torsten ungefär 3 timmar ago
@Star Strider I’ve collected new and improved data, please see below. I used an environmental chamber, which allowed me to stabilise the humidity much better than before.
Before I present my code and data for us to work on the humidity model, I’d like to clean up the data a little so we can present a reference signal that represents the expected behaviour.
The areas that need cleaning are as follows:
  1. Start and End: These sections correspond to when I started and stopped the test, during which the machine was powering up or shutting down. I can simply remove these timestamps from the data file.
  2. Temperature Steps: Each time the temperature increases, it causes a step change, and the humidity shifts slightly, creating small transients in the signal. After each temperature step, I wait for 10 minutes before moving to the next step. Therefore, I’d like to discard the step period and the first 5 minutes following each step.
Is there a function that can do this automatically instead of manually removing the data?
Star Strider
Star Strider ungefär en timme ago
I would not eliminate or edit anything. The transients in the step changes are important. If you know the inpuits (specifically the temperature changes and whatever else was the input signal, such as humidity changes), and have that recorrd, that is all that would be necessary. The input signal needs to be provided as part of the record. I would include the start and end, unless the instrumentation was just coming online and was not stable in those regions.
I am not certain how the humidity changes with temperature, although that might be automatically included in the estimated system. It is linear, (or at least linear in the parameters) in the region-of-interest, that would be enough.
I am still not certain what you are doing, however the data appear to be good.
The parameter estimation will model the system put to it in the data. If you are simply interested in humidity transients, you need to increase, decresas, (or both) the humidity, record those changes in the input signal, and record the system output. Temperature variations will model temperature. Everything else is inference.

Sign in to comment.

Tags

Products


Release

R2025a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!