# PID design of a BLDC motor control can't be completed using Ziegler-Nichols because the slope doesn't match with wath is seen on the step response

Thread Starter

#### vra

Hi all, how are you?. I'm new here so I'm glad to join this forum.

I'm designing a PID control for a BLDC motor, right know I'm working on simulations and the design I'm doing it using scilab, so, I have previously designed the circuit and the transfer function in open loop, also have the transfer function of the system with unit feedback, I have the unit feedback since I'm using Hall sensors to sense the speed of the BLDC motor. Mi original system in open loop is the following

and the unit fieedback system is

the inverse Laplace transform of the unit feedback system is

the time istant to have the tangent line in the inflexion point is t1 = 0.012156 s.

when I realize the study of the system I have the following system responses

The upper left plot is the step response of the system without feedback, this is exactly what I see when I do the simulation of the electrical system.

The upper right plot is the step response of the system with unit feedback and as you can see the response has "S" form which is perfect for using the method 1 of Ziegler-Nichols.

The bottom left plot is the Laplace inverse transform of the unit feedback system, the problem here is as far as I know the inverse Laplace transform which is the Ω(t) and must be equal to the upper right plot but as you can see I don't have the desired plot.

The bottom right plot is supose to be the slope of the step response at every time instant but it can be seen that in the time t1 the value of the slope is almost zero, that doesn't match with the unit feedback with the step response seen at the upper right plot.

So, I need help here to determine if I'm assuming something wrong with the function that I'm using as the inverse Laplace transform to find the slope of the line to design the PID control using Ziegler-Nichols. I've read several documents and chapters related to this theme in mor than one book and I know that I didn't read something somewhere but until now I don't see the wrong criteria that I'm using.

Thanks in advance for the help

#### Attachments

• 2.5 KB Views: 0

#### pnachtwey

You don't say if you are tuning for position or velocity control. It makes a difference.

The whole concept of Ziegler Nichols should be banned and since you have an open loop transfer function, you definitely shouldn't use Z-N. You should use pole placement.

I don't understand what you are trying to do with the unit feed back. You need to include the the PID gains in your loop and then place the closed loop poles.

Thread Starter

#### vra

Yes, I forgo
You don't say if you are tuning for position or velocity control. It makes a difference.

The whole concept of Ziegler Nichols should be banned and since you have an open loop transfer function, you definitely shouldn't use Z-N. You should use pole placement.

I don't understand what you are trying to do with the unit feed back. You need to include the the PID gains in your loop and then place the closed loop poles.
Yes, I forgot to tell explicitly that I'm tunning for velocity because I wrote the Omega symbol as Ω(t), now, I understand and I appreciate your suggestion to use pole placement but the compromise is to make a velocity PID control so I can't change the control method.

About the open loop system, of course the system is initially open loop because it don't have any form of control yet, I'm in design stage (right now I can start, stop and change the direction of movement of the motor but I don't have any form of control on fieedback yet). As I said before the compromise is to use a PID control, that is why I'm using Ziegler-Nichols but now that I'm visiting again the theory of Ziegler-Nichols I see a system that is analized in open loop to apply Ziegler-Nichols, so, is that the problem?, that I'm trying to apply Ziegler-Nichols to the system with unit feedback instead of apply it to the open look system?

Thread Starter

#### vra

In fact, if I must use Ziegler-Nichols in the open loop system the certainly can't use Ziegler-Nichols because the open loop response doesn't have an "S" form and then I can't use the method one; if I use the method 2 for responses that doesn't have an "S" form then the system only has mantained oscillations for negative values of kp according to Routh's method, so...

#### Curious_One

WOW, I had no idea I was using the Ziegler-Nichols method for all these years.

Never looked at any math or simulation. Just TUNED loops until they settled down.

I am impressed.

#### pnachtwey

I am impressed.
There is nothing to be impress with so far.

if you have the open loop transfer function then use pole placement. I could have done it hours ago since the open loop transfer function was provided. However ,the OP wants to use Z-N which is a crime against control theory. Gains can be calculated. Use Ackermann's method to compute the PID gains.
https://en.wikipedia.org/wiki/Ackermann's_formula
It looks more complicated than what is really is.
Ackermann's method allows one to place the closed loop poles on the negative real axis is the s domains or positive real axis in the z domain so there is no over shoot. It is possible to make the poles negative enough in the s domain so that any error decays quickly without overshoot. In the z-domain you want the poles to be on the positive axis between 0 and 1 but the closer to 0 the faster the errors will decay.
On top of that, one can compute the velocity and acceleration feed forwards from the open loop transfer function.

I wonder what they are teaching in control classes now days. The students aren't being taught what they need to know and they pay so much. They are being cheated and their instructors are incompetent.

I can tune a motor up in a couple minutes without guessing or trial and error.

Also, Z-N was meant for temperature systems. There isn't one set of formulas for every system. Each system is different.

vra
Thread Starter

#### vra

There is nothing to be impress with so far.

if you have the open loop transfer function then use pole placement. I could have done it hours ago since the open loop transfer function was provided. However ,the OP wants to use Z-N which is a crime against control theory. Gains can be calculated. Use Ackermann's method to compute the PID gains.
https://en.wikipedia.org/wiki/Ackermann's_formula
It looks more complicated than what is really is.
Ackermann's method allows one to place the closed loop poles on the negative real axis is the s domains or positive real axis in the z domain so there is no over shoot. It is possible to make the poles negative enough in the s domain so that any error decays quickly without overshoot. In the z-domain you want the poles to be on the positive axis between 0 and 1 but the closer to 0 the faster the errors will decay.
On top of that, one can compute the velocity and acceleration feed forwards from the open loop transfer function.

I wonder what they are teaching in control classes now days. The students aren't being taught what they need to know and they pay so much. They are being cheated and their instructors are incompetent.

I can tune a motor up in a couple minutes without guessing or trial and error.

Also, Z-N was meant for temperature systems. There isn't one set of formulas for every system. Each system is different.
Well, thanks, after your first answer looled for some other documents in the web and after made some calculations finally agree with you (I didn't know before) because the system in open loop never stops increasing and in closed loop it never reaches mantained oscillations. About what is teached inclasses today well, I was trying to use what I found in books without asking to any teacher since this is not a class project nor a proffesional project but I defined it as a PID control so I want to mantain the PID approach.

But I simply want to thank you @pnachtwey because I had more than 20 hours trying to reach the impossible until you point me in the right way.