sahubhumi
Posts: 1
Joined: Thu Sep 06, 2018 7:15 am

Implementation of PID controller using Qt creator

Thu Sep 06, 2018 7:29 am

I'm very new on qt creator kindly help me on writing algorithm for pid controller using Qt creator to control temperature and humidity inside the chamber. I'm using HTU21D sensor for my project.

Heater
Posts: 9841
Joined: Tue Jul 17, 2012 3:02 pm

Re: Implementation of PID controller using Qt creator

Fri Sep 07, 2018 9:36 am

sahubhumi,

You question is a bit too vague and general to answer properly. You mention PID and Qt, which implies you are working in C++. You mention a specific sensor.

Which part(s) are you having difficulty with:

a) Understanding the PID control algorithm,

b) Writing an implementation of PID in C/C++,

c) Creating a user interface with Qt,

d) Using C++,

e) Reading the sensors

The PID control algorithm is very simple and described all around the internet. For example: https://en.wikipedia.org/wiki/PID_controller,
https://www.csimn.com/CSI_pages/PIDforDummies.html. Actually using it properly can be rather application dependent and difficult to tune the parameters. Usually requires a good deal of experimentation before getting satisfactory results.

Actually writing a PID algorithm is also very simple in any language. It's only a handful of lines of code and some simple arithmetic. If you are lazy you can find source codes for PID all over the net as well. For example: https://gist.github.com/bradley219/5373998 and https://github.com/tekdemo/MiniPID/blob ... iniPID.cpp

Creating a user interface in Qt is to big a topic for a forum thread. Again there are articles and blogs about using Qt all over the net.

Programming in C++ is too big a topic for a forum thread. Again, see internet.

I know nothing about the sensors you have there.

Return to “C/C++”

Who is online

Users browsing this forum: aire39 and 7 guests