Hai, I want to use a pure PID controller block without filter coefficient(N) in SIMULINK. But I am not able to find a block in the directory. please help me….. Thanks Siva
MATLAB: How can I use a PID controller block without filter coeffcient in SIMULINK
pidsimulink
Related Solutions
Hello Nitin,
PID Tuner works by linearizing the model. It then uses the linearized model to come up with the gains. It is very common to run into zero linearization issue when working with electrical systems like you are doing. Often this happens when pwm is used.
Often times this problems can be solved by linearizing the model at a different operating point than the default one (by default the model is linearized at simulation time 0). This and other suggestions are explained in detail in the documentation here.
HTH.
Arkadiy
Alan actually sent me his model. He is trying to control the quadrotor position and orientation by controlling 4 rotor speeds.
1) In the most general case this is a coupled MIMO system, and PID Tuner would not work - it only works for SISO systems or MIMO systems that can be designed as a set of SISO loops. For a MIMO system like the quadrotor, the right tools are Robust Control Toolbox and/or Simulink Design Optimization.
2) The specific case Alan was working with is to make the quadrotor go up from 0 to 1 m, without changing x and y positions, and while keeping all attitude angles at zero. In this specific case all 4 rotor speeds are the same. The system effectively becomes a SISO loop described by the equation
zdotdot=lift/m -g,
where z is altitude, lift is PID Controller output, m is mass, and g is gravity. Alan applied PID Tuner to this system. When he accepted the design and ran it in Simulink, he observed huge overshoots he wrote about in his question.
This happened because PID Tuner works by linearizing the Simulink model. When linearizing the model zdotdot=lift/m-g, the resulting linearized model is zdotdot=lift/m. In other words, the tuner cannot see g - gravity, which in this case can be thought of as a huge input disturbance (10 times larger than the reference signal). So there is no error in the tuner here - it just does not know about the huge input disturbance acting on the system.
There are 2 ways to deal with this:
A. The better way: compensate for gravity in the feedforward path. You know what the gravity is, so just cancel it. Effectively your PID will then be calculating the lift force required in addition to gravity, not the total lift force. To do this in Simulink, add a constant term, equal to g*m to PID output.
B. The other, not recommended option - crank the bandwidth of the PID all the way up to cancel input disturbance. Not recommended as option 1 makes more sense in this case.
We have also put together a comprehensive page with resources on designing and implementing PID controllers in MATLAB and Simulink. It might provide some help as well.
HTH.
Arkadiy
Best Answer