# Design closed loop fan system with PID controller and with feedforward controller

#### ctoren

I want to design a control circuit where I can adjust the motor speed according to the room temperature. So a closed loop fan system. I want to design this process using feedforward control. I also want to design this process using a PID controller. How can I design these systems? I need to create a block diagram that includes both temperature and speed and design it accordingly. But I don't know how to use speed and temperature in the same block diagram. I will be happy if you can help me.

Thank you for your help .

#### pnachtwey

Feed forward control would be proportional to what?
I motion control a the velocity feed forward output is proportional to the target speed and the acceleration feed forward is proportional to the target acceleration. In a temperature heater control the feed forward would be proportional to the difference between the set point temperature and the ambient temperature.

Feed forward control shouldn't be necessary because the PID will react more than fast enough.

#### ctoren

I am a student of electrical electronics engineering. I haven't taken a course in control and automation yet. I have such an internship homework, although I have no knowledge. I have to design any system with a feedforward controller first and then with a PID controller. And I have to compare the results. I have no idea about these subjects since I only took electrical lessons so far. If you can help, I can try and complete it.

#### pnachtwey

You basically repeated your first post and have provided no new information.
I am crusty old EE and don't like to play 20 questions but I will be be nice.
1. does the fan blow cool air or hot air? Are you trying to heat or cool the room?
2. Can you measure the room temperature?
3. What is the temperature of the air you are controlling?

If you are trying to heat the the room you better be blowing in hot air. The amount of heat will be proportional to the temperature of the air times the volume. The rate the room temperature will increase will be proportional to amount of heat you supply but if the room temperature is greater than ambient then the room will tend to cool at a rate dependent on the difference between the room temperature and ambient.

Now you have an idea of what to look for.

You will fail every time if you can't define what you want to do.

Look up FOPDT and SOPDT temperature control
You better know differential equations and Laplace transforms.

An example SOPDT temperature simulation

“When you can measure what you are speaking about, and express it in numbers, you know something about it, when you cannot express it in numbers, your knowledge is of a meager and unsatisfactory kind; it may be the beginning of knowledge, but you have scarely, in your thoughts advanced to the stage of science.”
William Thomson aka

Lord Kelvin

Remember this quote. My version is you can't control what you don't understand.

#### OmerASD

Hi Ctoren,
Looks like every reply on this question seems to criticize instead of trying to help you. My opinion is that your question is pretty valid and clear. You want to control a fan speed based on keeping a rooms temperature steady. PID only control would be enough here but if it's a large room with a lot of thermodynamic latencies built in such as large objects that need extra time to heat up or cool down then yes you may add Feedforward control which in essence anticipates the the PID controllers output and adds to the output to speed up the error correction. Here is an article from Control Engineering magazine which describes in detail Feedforward augmentation of PID control and includes block diagrams and charts to explain this control method.
https://www.controleng.com/articles/feed-forwards-augment-pid-control/
This article is about motion control but in principle it can equally be applied to temperature and speed control as well.

You may also search for this gentleman Vance Van Doren PE he is the PID guru of all time and has a lot of articles on this subject which I believe would be very helpful in your internship homework .

Good luck,
Omer Gokcen
ASD Automation