2
\$\begingroup\$

I am having trouble getting my PID controller to be accurate over a range of values. My goal is to input a duty cycle for a PWM wave, which controls the speed of a fan rotor. The range of possible speeds should be 300RPM to 2700RPM.

Currently the PID controller is achieving accurate speeds when 800 to 1600 RPM is requested, but below those speeds the output is too high, and above those speeds the output is too low. I think this may be because the relationship between duty cycle and rotor speed is not entirely linear.

Here is our current PID equation: duty_cycle = [ speedset + control + 735] / 4300 Speedset is the requested speed, control is the PID control variable, and the constants are from the equation that we found to be mostly accurate for linking duty cycle with output speed (it is however a linear equation, and was not entirely accurate for extremely low and high data points).

The control variable is: control = 0.104*error + 0.104*previous_error + 0.13*next_error

This is my first time working with PID, so please correct me on anything I am doing wrong. Does anyone have any advice for how I might improve the accuracy of the system at very low and very high speeds?

Block diagram of the system

asked Sep 15, 2016 at 21:55
\$\endgroup\$
10
  • \$\begingroup\$ What is your error signal? (what is it's definition: speed - speedset?) \$\endgroup\$ Commented Sep 15, 2016 at 22:16
  • \$\begingroup\$ Could you provide a control block diagram? Have you tried running it open loop with no load? \$\endgroup\$ Commented Sep 15, 2016 at 22:25
  • \$\begingroup\$ error = requested speed - actual speed. I can draw up a code block diagram a bit later when I have time, at a group meeting right now. What do you mean with no load? Without the rotor? \$\endgroup\$ Commented Sep 15, 2016 at 22:25
  • \$\begingroup\$ Provide a block diagram with all the elements in your system \$\endgroup\$ Commented Sep 15, 2016 at 22:26
  • \$\begingroup\$ I've added in the block diagram one of my group members created :) \$\endgroup\$ Commented Sep 15, 2016 at 22:31

1 Answer 1

0
\$\begingroup\$

Thanks for your help, everyone. I believe I have found and answer by simply adding a conditional that can identify different operating regions (low speed, medium speed and high speed) and uses a different PID equation for each. This has solved the problem.

answered Sep 18, 2016 at 0:54
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.